UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

A digital image preprocessor for optical character recognition Lunscher, Wolfram H.H.J. 1983

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-UBC_1983_A7 L86.pdf [ 11.25MB ]
Metadata
JSON: 831-1.0095819.json
JSON-LD: 831-1.0095819-ld.json
RDF/XML (Pretty): 831-1.0095819-rdf.xml
RDF/JSON: 831-1.0095819-rdf.json
Turtle: 831-1.0095819-turtle.txt
N-Triples: 831-1.0095819-rdf-ntriples.txt
Original Record: 831-1.0095819-source.json
Full Text
831-1.0095819-fulltext.txt
Citation
831-1.0095819.ris

Full Text

c A DIGITAL IMAGE PREPROCESSOR FOR OPTICAL CHARACTER RECOGNITION by WOLFRAM H.H.J. LUNSCHER B.A.Sc, The University of B r i t i s h Columbia, 1980 B.Sc, The University of Toronto, 1974 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF APPLIED SCIENCE in THE FACULTY OF GRADUATE STUDIES (Department of E l e c t r i c a l Engineering) We accept th i s thesis as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA October 1983 © Wolfram H.H.J. Lunscher, 1983 I n p r e s e n t i n g t h i s t h e s i s i n p a r t i a l f u l f i l m e n t o f t h e r e q u i r e m e n t s f o r an a d v a n c e d d e g r e e a t t h e U n i v e r s i t y o f B r i t i s h C o l u m b i a , I a g r e e t h a t t h e L i b r a r y s h a l l make i t f r e e l y a v a i l a b l e f o r r e f e r e n c e and s t u d y . I f u r t h e r a g r e e t h a t p e r m i s s i o n f o r e x t e n s i v e c o p y i n g o f t h i s t h e s i s f o r s c h o l a r l y p u r p o s e s may be g r a n t e d by t h e h e a d o f my d e p a r t m e n t o r by h i s o r h e r r e p r e s e n t a t i v e s . I t i s u n d e r s t o o d t h a t c o p y i n g o r p u b l i c a t i o n o f t h i s t h e s i s f o r f i n a n c i a l g a i n s h a l l n o t be a l l o w e d w i t h o u t my w r i t t e n p e r m i s s i o n . W o l f r a m L u n s c h e r D e p a r t m e n t o f E l e c t r i c a l E n g i n e e r i n g The U n i v e r s i t y o f B r i t i s h C o l u m b i a 2075 Wesbrook P l a c e V a n c o u v e r , C anada V6T 1W5 O c t o b e r 17, 1983 ABSTRACT Optical character recognition requires that data acquired from a camera device f i r s t be reconditioned into a suitable form. This thesis presents a design study of a preprocessor intended to accomplish t h i s task under the constraints of real-time, autonomous operation as part of a reading machine for the b l i n d . The preprocessor contains three components: a f i l t e r to reduce the influence of noise and enhance the text seen; a bina r i z a t i o n stage to i d e n t i f y the character and background pi x e l s by a single b i t ; and a segmention system which is o l a t e s individual characters for delivery to the recognizer in proper causal order. F i l t e r i n g of the acquired video information i s performed with the Laplacian of a Gaussian, V 2g, edge detection operator developed by D. Marr. This f i l t e r is shown to locate the char-acter edges and to control the amount of d e t a i l seen optimally. Developed from models of the human v i s u a l system, th i s f i l t e r promises that the preprocessor could a t t a i n a human text resolution c a p a b i l i t y . Binarization is also reduced to a simple thresholding of the f i l t e r ' s output. To achieve optimal enhancement of p r i n t structures of known dimensions a f i l t e r design strategy i s presented incorporating two periodic edge models. Since the f i l t e r must be d i g i t i z e d , the design method i s further extended to include an analysis of the e f f e c t s of i i sampling the continuous f i l t e r and quantizing i t s c o e f f i c i e n t s for a direct-form f i n i t e impulse response implementation. To validate the claim that t h i s f i l t e r ' s performance i s superior to other edge detection methods, a chapter i s devoted to quantitative evaluation of V 2g f i l t e r e d test images. The results are compared to others published and found superior, as well as remarkably noise immune. Segmentation of the binarized text i s accomplished with a technique adapted from the binary-image description method of C.T. Zahn. The text images are reduced to a hybrid chain-code-and-coordinate description of a l l internal and external boundaries concurrent with the incoming raster-acquired data. No more than two image scan l i n e s need be stored. A l l closed borders within the text are detected immediately as they occur by monitoring the l o c a l changes in the image's Euler number during a scan, and v e r i f y i n g global closure by following pointers through a l i n k e d - l i s t data structure. A simulation of an implementation of the segmentation system, operating on f i f t y V 2g f i l t e r e d test images, indicated that the real-time performance objective can be achieved through a combined s e r i a l and p a r a l l e l architecture. TABLE OF CONTENTS Page Abstract i i Table of Contents iv L i s t of Tables v i L i s t of Figures v i i Acknowledgements xi I. INTRODUCTION 1 I I . OPTIMAL EDGE DETECTOR DESIGN 10 2.1 Introduction 10 2.2 The Case for Optimality 15 2.2.1 Marr Optimality 15 2.2.2 Dickey and Shanmugam Optimality 18 2.2.3 Unifying the F i l t e r s 21 2.3 Predicting F i l t e r Performance 22 2.3.1 Staircase Edge Response 24 2.3.2 Square-Wave Edge Response 27 2.4 Performance in Additive Noise 30 2.5 Multiband F i l t e r i n g 43 2.6 Sampling the V 2g F i l t e r 46 2.7 Co e f f i c i e n t Quantization 51 2.8 F i l t e r Design Example 67 2.9 Test-Image Examples 70 2.10 Design Summary and Conclusions 83 II I . OPTIMAL EDGE DETECTOR EVALUATION 88 3.1 Introduction 88 3.2 Kitchen-Rosenfeld Evaluation 95 3.3 Evaluation Experiment Procedures 102 3.4 Evaluation Results 106 3.4.1 Rings Image Evaluation 106 3.4.2 V e r t i c a l Step Evaluation 116 3.4.3 Pure Noise Evaluation 123 3.5 Comparison to other Edge Operators 126 3.6 Conclusions 128 iv Page IV. FAST BINARY-IMAGE SEGMENTATION 130 4.1 Introduction 130 4.2 Preliminary Concepts 133 4.2.1 Connectivity 133 4.2.2 Borders and Edges 135 4.2.3 Chain Codes 136 4.2.4 Trace Direction 137 4.3 Review of Past Work 138 4.4 Zahn's Binary-Image Description Method 144 4.5 Border Linkage and Closure 150 4.6 Closure Detection 163 4.6.1 Region Counting Approach 163 4.6.2 The Euler Number Approach 168 4.6.3 Euler Number Closure Detection Procedure Summary 175 4.7 Border Point Representation 178 4.8 Object Reconstruction 182 4.9 Touching Characters 190 4.10 Segmentation Summary 195 4.11 Segmentation Simulations 200 4.12 Conclusions 231 V. DISCUSSION AND CONCLUSIONS 233 REFERENCES 238 v LIST OF TABLES Table Page I. Values of maximum 7 19 II. r and j /27 against unsigned word size t 60 I I I . Expected in-band rejections at fl for 6- and 8-bit quantized V 2g f i l t e r s 78 IV. Segmentation simulation results including "checkerboard" worst-case 207 v i LIST OF FIGURES Figure Page 1.1 Preprocessor block structure 2 2.1 Staircase edge model magnitude response 26 2.2 Square wave edge model magnitude response 29 2.3 Calculation of the zero crossing standard deviation in the presence of noise 33 2.4 Proportion of al i a s e d f i l t e r energy plotted against the normalized half-sampling frequency 49 2.5 V 2g normalized spectral energy density 49 2.6 Additional b i t s , At, required to produce a given in-band rejection change, A„, due to quantization .... 57 2.7 F i l t e r half-width, N, re s u l t i n g from normalized sample spacing 8, for 4, 8, 12, and 16 b i t c o e f f i c i e n t word sizes 61 2.8 Quantized in-band rejection resulting from unsigned word size t for unquantized in-band rejections of (a) 20, (b) 40, (c) 60, and (d) 80 db 62 2.9 Minimum unsigned word size required given the quantized in-band rejection for At of (a) 0, (b) 1, (c) 2, (d) 3, and (e) 4 64 2.10 V2g(n,m) f i l t e r c o e f f i c i e n t s for sample spacing 5=1.25 and 8-bit t o t a l word size 69 2.11 Ideal V 2g f i l t e r e d rings image with af of (a) 16, (b) 6.4, and (c) 1.6 73 2.12 8-bit V 2g f i l t e r e d rings image with af of (a) 16, (b) 6.4, and (c) 1.6 76 2.13 6-bit V 2g f i l t e r e d rings image with a( of (a) 16, (b) 6.4, and (c) 1.6 77 2.14 Unbiased 8-bit V 2g f i l t e r e d rings image with a, of (a) 16, (b) 6.4, and (c) 1.6 81 2.15 Unbiased 6-bit V 2g f i l t e r e d rings image with of of (a) 16, (b) 6.4, and (c) 1.6 82 v i i 3.1 Edge p i x e l neighbourhood 3.2 Minimally curved neighbourhood 3.3 a, =16.0 V 2g f i l t e r e d rings image: (a) edge magnitude histogram; evaluation measure against (b) threshold l e v e l ; (c) edge p i x e l fr a c t i o n 3.4 of =6.4 V 2g f i l t e r e d rings image: (a) edge magnitude histogram; evaluation measure against (b) threshold l e v e l ; (c) edge p i x e l fr a c t i o n 3.5 a, =1.6 V 2g f i l t e r e d rings image: (a) edge magnitude histogram; evaluation measure against (b) threshold l e v e l ; (c) edge p i x e l fr a c t i o n 3.6 a, =16 V 2g f i l t e r e d rings image evaluation r e s u l t s : (a) SNR= 1, 2, 5, 10, 20, 50, and 100 (from bottom curve to top), 6=0.8; (b) peak evaluation scores against SNR 3.7 a, =6.4 V 2g f i l t e r e d rings image evaluation r e s u l t s : (a) SNR= 1, 2, 5, 10, 20, 50, and 100 (from bottom curve to top), 6=0.8; (b) peak evaluation scores against SNR 3.8 a, =1.6 V 2g f i l t e r e d rings image evaluation r e s u l t s : (a) SNR= 1, 2, 5, 10, 20, 50, and 100 (from bottom curve to top), 8=0.8; (b) peak evaluation scores against SNR 3.9 a, =6.4 V 2g f i l t e r e d v e r t i c a l step edge for SNR = (a) 1, (b) 2, (c) 5, (d) 10, (e) 20, (f) 50, and (g) 100 3.10 af =6.4 V 2g f i l t e r e d v e r t i c a l step evaluation r e s u l t s : (a) SNR = 1, 2, 5, 10, 20, 50, and 100 (from bottom curve to top), 8=0.8; (b) peak evaluation scores against SNR 3.11 af=1.6 V 2g f i l t e r e d v e r t i c a l step edge for SNR = (a) 1, (b) 2, (c) 5, (d) 10, (e) 20, (f) 50, and (g) 100 3.12 a, =1.6 V 2g f i l t e r e d v e r t i c a l step evaluation r e s u l t s : (a) SNR = 1, 2, 5, 10, 20, 50, and 100 (from bottom curve to top), 6=0.8; (b) peak evaluation scores against SNR , 3.13 V 2g f i l t e r e d random noise evaluation results for (a) a, =6.4; (b) af=1.6 , v i i i Figure Page 3.14 Superimposition of the V 2g maximum evaluation scores upon those of Kitchen and Rosenfeld : (a) rings; (b) v e r t i c a l step 127 4.1 Modular image representation 160 4.2 Euler number var i a t i o n in Is topped and 0 topped image representations 170 4.3 Touching character separation 194 4.4 Segmentation system state diagram 198 4.5 Sample test images: (a) a, =0.8; (b) a, =1.6; (c) a( =2.4; (d) a, =3.2; (e) af =4.0 203 4.6 "Checkerboard" worst-case image 205 4.7 List-1 occupancy against row count 209 4.8 af =0.8 histogram: (a) number of points traced per row; (b) number of points transmitted per row 212 4.9 of =1.6 histogram: (a) number of points traced per row; (b) number of points transmitted per row 213 4.10 a, =2.4 histogram: (a) number of points traced per row; (b) number of points transmitted per row 214 4.11 af =3.2 histogram: (a) number of points traced per row; (b) number of points transmitted per row 215 4.12 a, =4.0 histogram: (a) number of points traced per row; (b) number of points transmitted per row 216 4.13 Total combined histogram: (a) number of points traced per row; (b) number of points transmitted per row .... 217 4.14 a, =0.8 stack occupancy: (a) external border stack; (b) internal border stack; (c) transmission stack .... 224 4.15 af=1.6 stack occupancy: (a) external border stack; (b) internal border stack; (c) transmission stack .... 225 4.16 o, =2.4 stack occupancy: (a) external border stack; (b) internal border stack; (c) transmission stack .... 226 4.17 a( =3.2 stack occupancy: (a) external border stack; (b) internal border stack; (c) transmission stack .... 227 ix Figure Page 4.18 at =4.0 stack occupancy: (a) external border stack; (b) internal border stack; (c) transmission stack .... 228 4.19 Total combined stack occupancy: (a) external border stack; (b) internal border stack; (c) transmission stack 229 x ACKNOWLEDGEMENTS I w i s h t o e x t e n d my t h a n k s t o D r . M i c h a e l P. B e d d o e s f o r o f f e r i n g t h e o p p o r t u n i t y t o e x p l o r e t h i s p r o j e c t , a n d f o r much v a l u e d g u i d a n c e . The a u t h o r a c k n o w l e d g e s f i n a n c i a l s u p p o r t f r o m a r e s e a r c h a s s i s t a n t s h i p 1980-82 a w a r d e d by t h e N a t i o n a l R e s e a r c h C o u n c i l of C a n a d a , g r a n t number 6 7 - 3 2 9 0 . A U n i v e r s i t y o f B r i t i s h C o l u m b i a f e l l o w s h i p 1982-83 i s g r a t e f u l l y a p p r e c i a t e d . S p e c i a l t h a n k s go o u t t o my l o v e l y f i a n c e e C i n d y K.Y. Chan f o r h e r u n f a u l t e r i n g e m o t i o n a l s u p p o r t t h r o u g h o u t t h i s d e g r e e p r o g r a m , and w i t h o u t whose f r e q u e n t a s s i s t a n c e a n d s k i l l a t t h e k e y b o a r d , p r e p a r a t i o n o f t h i s t h e s i s w o u l d h a v e been t r u l y t e d i o u s . x i 1 I. INTRODUCTION This thesis presents a design study preliminary to the development of a d i g i t a l image preprocessor for o p t i c a l character recognition. As a design study, the objective of t h i s thesis i s to examine a number of approaches to the development of a preprocessor, and then endorse a p a r t i c u l a r configuration. The operational parameters incorporated in t h i s configuration are then studied to f a c i l i t a t e the f i n a l assembly and adjustment of the preprocessor. No attempt i s made to address the problem of o p t i c a l character recognition (OCR). The dominant reason for t h i s i s that t h i s system was envisioned to complement an e x i s t i n g OCR system developed by Dr. M.P. Beddoes of the Department of E l e c t r i c a l Engineering at the University of B r i t i s h Columbia as part of a reading machine for the b l i n d . However, the pre-processor design i s kept as general as possible so that i t may serve as an input to most other OCR systems. The purpose of an OCR device i s to accept a description of a machine-printed or handwritten character as input and then make a decision as to the i d e n t i t y of the character. The purpose of an OCR preprocessor is to accept the raw video information from an imaging device as input and then transform i t into a form the OCR device can accept. Among the tasks performed by the preprocessor are noise removal ( f i l t e r i n g ) , i d e n t i f i c a t i o n of character and background pixels ( b i n a r i z a t i o n ) , and "packaging" of the characters into individual units (segmentation). Not a l l OCR preprocessing systems perform a l l of these tasks, but the system 2 proposed in th i s thesis does. Figure 1.1 i l l u s t r a t e s these operations in the order they w i l l be performed. camera f i l t e r tm binar i -zat ion segmen-tat ion the •="0" • = " 1 " t h O C R Figure 1.1 Preprocessor block structure Since the f i r s t OCR system was commercially marketed in 1954 by the I n t e l l i g e n t Machines Research Corporation, the l i t e r a t u r e has come to abound with material related to OCR. Comprehensive surveys of the early machines and the problems they encountered were published by the B r i t i s h Computer Society [1], Auerbach [2], and Harmon [3]. More recently Ullmann [4], [5], [6], has presented several surveys of the f i e l d spanning the developments of the past decade. The current state of the art i s reviewed by Schurmann [7]. These surveys i l l u s t r a t e the d i v e r s i t y that exists among OCR systems. Not only do many systems choose to organize the preprocessor d i f f e r e n t l y from Figure 1.1, but some systems choose to omit one or more of these stages. Indeed, purely o p t i c a l systems, u t i l i z i n g the p r i n c i p l e s of laser holography, may do away with the enti r e system altogether. This d i v e r s i t y in designs i s largely a consequence of the d i v e r s i t y of OCR applications. These range from magnetic ink 3 character readers, employed to i d e n t i f y bank cheques, for which binarization and segmentation i s t r i v i a l , to hand-printed-document readers for which preprocessing and p a r t i c u l a r l y recognition i s very d i f f i c u l t . Most of these systems require the input material to be presented in a suitable and sometimes r i g i d l y fixed format. This includes characters hand-printed at fixed locations on the document, or machine-printed characters organized into well defined l i n e s without the interspersion of non-text material. However, modern research i s making progress towards relaxing the r e s t r i c t i o n s on the input to permit variable text formats, and random placement of i l l u s t r a t i o n s (Wong et a l . [8]). This added sophistication requires the addition of more components to the preprocessing system of Figure 1.1 to locate the text regions and to d i r e c t their a c q u i s i t i o n . The system developed here i s targeted to serve as a component of a reading machine for the b l i n d . This imposes certain constraints on i t s operation. Blindness i s frequently accompanied by various motor d i s a b i l i t i e s . This demands the system's operation to require l i t t l e or no manual dexterity. In order to produce a natural reading pace, real-time operation i s required. Lastly, since the complete system i s envisioned to be operated autonomously by a single user, i t must be robust. Deviations in print q u a l i t y , or minor operator errors must not generate a situation requiring intervention by a second party. Of course, the preprocessing system alone cannot be responsible for f u l l f i l l i n g a l l these constraints; these are issues that must be addressed by the OCR system as a whole. However, to be acceptable, the preprocessor must be compatible with these 4 constraints. The image acquisiton device, or camera, can take on many forms. These include f l y i n g sport scanners, vidicons, laser scanners, and charge-coupled device (CCD) arrays. The system currently in use by Dr. Beddoes u t i l i z e s a 64 element linear CCD array. This device i s readily amenable to handheld or simple machine-directed operation. Therefore, the preprocessor was designed to accomodate a linear-array-type a c q u i s i t i o n device. Vidicon and other two-dimensional a c q u i s i t i o n systems are also suitable. These permit the camera to remain stationary while the document i s scanned e l e c t r o n i c a l l y , requiring less dexterity and tra i n i n g on the part of the b l i n d user. The primary constraints on the camera are p i x e l resolution, and f i e l d of view. Ullmann [5] notes that the optimal p i x e l size for most print styles covers l3nMm, though Schurmann [7] claims 50Aim i s necessary for book p r i n t . The f i e l d of view must, of course, at least include the largest character expected. The noise f i l t e r i n g and binar i z a t i o n stages are frequently arranged in a d i f f e r e n t order from Figure 1.1, and sometimes combined into a single operation. Binarization reduces the o r i g i n a l p i x e l data representation to a single b i t with character pixels receiving value "1" and background the value "0". The reasons behind t h i s operation are largely economic. Binarized images require less storage space, and allow both segmentation and recognition to be performed with simple boolean operations. Binarization always involves some form of thresholding operation. The success of the preprocessor c o r r e c t l y i d e n t i f y i n g 5 the character pixels depends on the proper setting of th i s threshold. In the majority of systems reviewed the threshold i s applied d i r e c t l y to the input data without an intervening f i l t e r . The simplest such operation i s to pick a fixed threshold intensity l e v e l and apply i t throughout the image. Ullmann [4] notes that t h i s i s not a very useful operation since background and character intensity levels vary continually making i t impossible to select a sa t i s f a c t o r y l e v e l for a l l circumstances. An alt e r n a t i v e approach i s to adopt a f l o a t i n g threshold l e v e l adjusted according to l o c a l grey-level measurements. One of the most sophisticated such methods was developed by Bartz [9] for the IBM 1975 o p t i c a l page reader. The threshold was not only influenced by l o c a l grey-level averaging, but also by the character l i n e widths seen. Furthermore, a noise analysis revealed that typewritten and machine printed documents d i f f e r e d s u b s t a n t i a l l y in t h e i r noise content. Therefore, two d i f f e r e n t , user selectable, thresholding algorithms were applied. This, however, i s inconsistent with our autonomous operation constraint. Another, less common, threshold selection procedure requires analysis of the document's grey-level histogram. This requires selection of an optimal p a r t i t i o n to separate the d i s t r i b u t i o n modes i d e n t i f i e d with character and background p i x e l s . Such a method was outlined by Otsu [10], and applied successfully by Tou et a l . [11]. However, the method was not considered suitable here because the grey-level s t a t i s t i c s are accumulated by prescanning the entire document causing the method to be i n s u f f i c i e n t l y sensitive to l o c a l contrast v a r i a t i o n . Since a l l of the above binarization techniques operate 6 d i r e c t l y on the input image without an intervening noise f i l t e r , a certain amount of extraneous d e t a i l invariably receives an inappropriate l a b e l . This may take the form of stray dark pixels in the background, l i g h t holes within the character regions, or rough character outlines. Removal of t h i s noise i s considered s u f f i c i e n t l y important that almost every developer of an OCR system employing this form of binarization has included a noise cleaning stage. A general study of t h i s procedure was published by Rosenfeld and Park [12]. In view of the unsatisfactory performance of most binar i z a t i o n procedures, i t was f e l t that an alternative approach, founded on the p r i n c i p l e s of edge detection, was j u s t i f i e d . Edge detection procedures have the advantage that their primary objective i s the detection of l o c a l intensity variations while maximizing noise r e j e c t i o n . The intensity variations of interest are, of course, those caused by the presence of printed characters. Use of edge detection in OCR preprocessing i s uncommon, but not new. The f l y i n g spot scanner used by Greanias et a l . [13] sensed the l o c a l discontinuity at character edges to d i r e c t a contour trace, and the BCS [ l ] discuss another f l y i n g spot scanner control method where the signal difference between a focused and defocused beam (an approximation to a Laplacian) located character edges. Recent edge detector research has developed a class of edge f i l t e r s which simulates the operation of the lower l e v e l s of the human vi s u a l system. Such a f i l t e r holds a p a r t i c u l a r a t t r a c t i o n because the range of d e t a i l resolved and noise rejection achieved would be similar to that of a human reader. Therefore, any 7 document that a human could read, a machine incorporating such an edge f i l t e r should be able to read also. Even though edge detection was not developed for image b i n a r i z a t i o n , i t was observed that t h i s new f i l t e r c l ass could readily be modified to do t h i s . Furthermore, t h i s modification simply involves the application of a fixed threshold. This new edge f i l t e r c l ass i s ca l l e d the optimal edge detection f i l t e r s , and forms the subject of the next two chapters. Chapter 2 introduces these optimal edge f i l t e r s and defines the nature of their optimality. The rest of the chapter w i l l address the design of the f i l t e r to render i t suitable for any given image processing task. It w i l l be seen that optimal f i l t e r resolution depends on at least one parameter. Since the f i l t e r must be capable of resolving a l l character d e t a i l while at the same time rejecting unwanted noise, considerable attention is given to the resolution response and noise s e n s i t i v i t y of the f i l t e r under variations of t h i s parameter. Also, since the f i l t e r i s i n i t i a l l y s p e c i f i e d as a continuous two-dimensional point spread function, i t must be d i g i t i z e d before i n s t a l l a t i o n into the preprocessor. D i g i t i z a t i o n takes the form of s p a t i a l sampling and c o e f f i c i e n t quantization. These operations are therefore also examined at length to determine the necessary sample spacing and c o e f f i c i e n t word s i z e . Chapter 3 w i l l attempt to substantiate the claims made in Chapter 2 that the performance of an optimal f i l t e r w i l l exceed that of a l l other edge f i l t e r s in common use. To achieve t h i s objective, a purely quantitative edge detector evaluation method w i l l be applied to an optimal edge f i l t e r . When compared 8 to published evaluation scores, the optimal f i l t e r ' s superior performance, and hence s u i t a b i l i t y for the preprocessor, i s c l e a r l y seen. The binarized image serves as the input to the segmentation stage of the preprocessor. Segmentation i s viewed as necessary because i t separates the individual characters from the remainder of the image for analysis and recognition. In thi s way, the recognition system can be reasonably certain that the data i t has received represents a single character. However, not a l l researchers agree on the need for segmentation. Clayden, Clowes and Parks [14], maintain that segmentation i s neither necessary nor desirable since i t requires a certain degree of position and orientation control over the input. Instead, they applied a mask matching recognition technique d i r e c t l y to the running text without p r i o r segmentation. While i t i s true that some po s i t i o n a l control i s necessary, i t i s also true that t h i s necessity i s largely a response to the need for the camera to consistently follow a given l i n e of text. They also claim that correct segmentation may not always be possible. However, di r e c t recognition did not seem to offer a useful alternative since their own results show recognition accuracy to deteriorate as character spacing decreases, a situ a t i o n in which most segmentation schemes also break down. In an attempt to avoid the d i f f i c u l t i e s posed by variable spacing and touching characters, the IBM 1275 reader [15] places the binarized data into a series of s h i f t registers which in turn are connected to a template correlation-type recognizer. The s h i f t r e g i s t e r s then move the characters to every possible v e r t i c a l and horizontal position 9 within the correlator as though mounted on a rotating drum. Ullmann [ 5 ] , [6] notes two shortcomings with th i s approach. It has d i f f i c u l t y with certain types of close characters such as "rn" which can be confused with "m". Also, t h i s method i s slow and costly to implement. Chapter 4 w i l l present a review of a number of seg-mentation methods and then describe the method endorsed for t h i s system. Segmentation can be both a complex and time-consuming process. For t h i s reason, the real-time constraint w i l l have i t s greatest impact on t h i s system component. In an attempt to estimate both the hardware requirements and expected processing delay times, a software simulation i s performed on the segmentation system with f i f t y binarized images serving as input. The problem of separating touching characters i s , however, addressed only l i g h t l y . This i s seen as a complex problem, but suggestions for further work in t h i s area are presented. 10 I I . O p t i m a l Edge D e t e c t o r D e s i g n 2.1 I n t r o d u c t i o n R e c e n t l y a new a p p r o a c h t o t h e p r o b l e m o f edge d e t e c t i o n h a s a p p e a r e d . T h i s a p p r o a c h i n v o l v e s an image f i l t e r whose r e s p o n s e was d e r i v e d t o o p t i m i z e t h e enhancement o f e d g e s i n a c l e a r l y d e f i n e d way. Two s u c h f i l t e r s h a ve been p u b l i s h e d . The f i r s t , d e v e l o p e d by D. M a r r a n d E. H i l d r e t h [ 1 6 ] , s h o ws, t h r o u g h an h e u r i s t i c a r g u m e n t , t h a t t h e l o c a l r e s p o n s e a n d r a n g e o f s p a t i a l v a r i a t i o n c a n o p t i m a l l y be m i n i m i z e d t h r o u g h a p p l i c a t i o n o f a G a u s s i a n f i l t e r , f o l l o w e d by a L a p l a c i a n o p e r a t i o n t o f a c i l i t a t e edge d e t e c t i o n . The s e c o n d , f i r s t p u b l i s h e d by D i c k e y a n d Shanmugam [ 1 7 ] , i s more r i g o r o u s i n i t s d e f i n i t i o n o f an edge a n d c r i t e r i a f o r o p t i m a l i t y . By d e f i n i n g an e dge a s a s t e p d i s c o n t i n u i t y b e t w e e n a d j a c e n t r e g i o n s o f d i f f e r i n g , b u t i n d i v i d u a l l y u n i f o r m , i n t e n s i t i e s , t h e y show t h a t t h e i d e a l b a n d l i m i t e d f i l t e r t o o p t i m a l l y l o c a l i z e i t s r e s p o n s e a b o u t t h e edge i s g i v e n by a p r o l a t e s p h e r o i d a l wave f u n c t i o n . I t w i l l l a t e r be shown t h a t t h e M a r r f i l t e r i s e s s e n t i a l l y an a p p r o x i m a t i o n t o t h e D i c k e y f i l t e r ; i t s s i m p l e r f o r m a l s o makes i t more a m e n a b l e t o a p p l i c a t i o n a n d s t u d y . The p r i m a r y d i f f e r e n c e b e t w e e n t h e s e o p e r a t o r s a n d t h e many o t h e r s p u b l i s h e d i s t h a t t h e y were d e v e l o p e d f r o m a n a r r o w s e t o f a s s u m p t i o n s d e s c r i b i n g t h e r e s p o n s e d e s i r e d , w h i c h t h e n c o n s t r a i n e d t h e f i l t e r t o a f o r m n e c e s s a r y t o p r o v i d e t h i s r e s p o n s e . M ost edge o p e r a t o r s , h o w e v e r , b e g i n by m a k i n g c e r t a i n o b s e r v a t i o n s a b o u t t h e p r o p e r t i e s o f e d g e s i n t h e i n p u t image and 11 t h e n s e e k t o i s o l a t e p i x e l s w i t h t h e s e p r o p e r t i e s f r o m t h e b a c k g r o u n d . A l a r g e c l a s s of edge o p e r a t o r s s t a r t w i t h t h e a s s u m p t i o n t h a t e d g e s a r e s i g n i f i e d by maxima i n t h e g r a d i e n t o f t h e i n p u t image. T h i s i d e a s t i m u l a t e d t h e d e v e l o p m e n t o f t h e s i m p l e g r a d i e n t o p e r a t o r w h i c h l a r g e l y owes i t s a n c e s t r y t o R o b e r t s [ 1 8 ] . However, o w i n g t o t h e w e l l - k n o w n n o i s e enhancement p r o p e r t i e s o f t h e p u r e g r a d i e n t , i t s o o n became a p p a r e n t t h a t some s o r t o f s m o o t h i n g o p e r a t i o n must be i n c l u d e d t o r e d u c e s p u r i o u s edge d e t a i l . R o s e n f e l d a n d T h u r s t o n [ 1 9 ] u s e d t h e d i f f e r e n c e b e t w e e n t h e a v e r a g e i n t e n s i t i e s i n a d j a c e n t s q u a r e r e g i o n s , whose s p a t i a l d i m e n s i o n s were p o w e r s o f t w o , t o e s t i m a t e t h e g r a d i e n t a t a p i x e l b e t w e e n them. The f i n a l s i z e a n d o r i e n t a t i o n o f t h e r e g i o n s was d e t e r m i n e d d y n a m i c a l l y a c c o r d i n g t o t h e g r e a t e s t a b s o l u t e d i f f e r e n c e . M a c l e o d [ 2 0 ] a v o i d s t h e w i d e b a n d r e s p o n s e a n d t h e r e s u l t a n t " r i n g i n g " c h a r a c t e r i s t i c o f a s q u a r e r e g i o n a v e r a g e by d i f f e r e n c i n g image a r e a s s m o o t h e d by s u p e r i m p o s e d d i s p l a c e d e x p o n e n t i a l s windowed by a G a u s s i a n . F o r b o t h edge o p e r a t o r s s m o o t h i n g l a r g e a r e a s o f t h e i n p u t image r e d u c e s t h e amount o f image d e t a i l s e e n i n t h e o u t p u t i m a g e . T h i s r e d u c e s n o i s e d e t a i l , b u t l i t t l e c o n t r o l i s p r o v i d e d o v e r t h e e x a c t amount o f t r u e image d e t a i l t h a t c a n be r e s o l v e d . A d i f f e r e n t a p p r o a c h f r o m t h e g r a d i e n t m ethods i s t o m o d e l t h e i d e a l edge a s an i n t e n s i t y s t e p , t h e n f o r m u l a t e a s e r i e s o f t e m p l a t e s t h a t w i l l p r o d u c e a maximum r e s p o n s e when c e n t e r e d on an e d g e . P e r h a p s t h e most s o p h i s t i c a t e d o f t h e s e was d e v e l o p e d by H u e c k e l [ 2 1 ] , [ 2 2 ] where up t o n i n e t e m p l a t e s , r e p r e s e n t i n g a s e t of o r t h o g o n a l b a s i s f u n c t i o n s o v e r a c i r c u l a r r e g i o n , a r e a p p l i e d . A f t e r c o m b i n i n g t h e r e s p o n s e o f t h e t e m p l a t e s i n t o a m easure o f t h e H i l b e r t d i s t a n c e f r o m t h e image s a m p l e t o t h e 1 2 i d e a l e d g e , a d e c i s i o n a s t o t h e p r e s e n c e o f an edge i s made. L i k e t h e g r a d i e n t m e t h o d s , t h e t e m p l a t e a p p r o a c h a l s o s u f f e r s i n t h e p r e s e n c e o f n o i s e o r n o n - i d e a l b l u r r e d e d g e s . The p r o b l e m o f c h o o s i n g t h e t e m p l a t e s i z e t o p r e v e n t u n d e s i r a b l e s m o o t h i n g o f edge d e t a i l a l s o r e m a i n s . However t h e g r e a t e s t p r o b l e m o f b o t h t h e g r a d i e n t a n d t e m p l a t e m e t h o d s i s s e e n i n t h e r e s u l t s ; t h e e d g e s a r e g e n e r a l l y d i s c o n n e c t e d a n d i r r e g u l a r r e g a r d l e s s o f w h e t h e r g e n e r a t e d by o b j e c t s o r n o i s e . To combat t h i s s h o r t c o m i n g , most a u t h o r s p r o v i d e some f o r m o f r e l a x a t i o n o r l i n e f i t t i n g t e c h n i q u e t o c o n n e c t t h e edge s e g m e n t s i n t o c l o s e d r e g i o n s . The o p t i m a l edge d e t e c t o r , i t w i l l be shown, d o e s n o t h a v e t h i s s h o r t c o m i n g . I t n a t u r a l l y e n c l o s e s image r e g i o n s i n u n b r o k e n edge b o u n d a r i e s . A n o t h e r o b j e c t i o n i s t h a t t h e s p a t i a l f r e q u e n c y r e s p o n s e i s s e l d o m c o n s i d e r e d i n edge d e t e c t o r d e v e l o p m e n t . One e x c e p t i o n i s when t h e d e t e c t o r i s t o a c t a s a m a t c h e d f i l t e r f o r a p a r t i c u l a r e dge o r l i n e f e a t u r e , e .g. H a l e [ 2 3 ] , F o u r i e r t r a n s f o r m s o f some o f t h e s e o p e r a t o r s , p a r t i c u l a r l y t h o s e i n v o l v i n g l o c a l a v e r a g i n g o v e r d i s c o n t i n u o u s f i e l d s l i k e t h e R o s e n f e l d - T h u r s t o n , r e v e a l h i g h f r e q u e n c y p a s s b a n d s e x t e n d i n g w e l l b e y o n d t h e p r i n c i p a l p a s s b a n d . As a c o n s e q u e n c e , h i g h f r e q u e n c y n o i s e i s n o t e n t i r e l y s u p p r e s s e d . A l s o , a d d i t i o n a l f e a t u r e s n o t p r e s e n t i n t h e i n p u t i m a g e , s u c h a s t h e " r i n g i n g " o f c e r t a i n e d g e s , a p p e a r . To remove t h e s e u n w a n t e d f e a t u r e s c a r e f u l a t t e n t i o n i s g i v e n t o t h e s e l e c t i o n o f a t h r e s h o l d l e v e l t o be a p p l i e d a g a i n s t t h e r e s u l t a n t o p e r a t o r o u t p u t . I n c o n t r a s t , t h e o p t i m a l edge d e t e c t o r s were d e s i g n e d p r i m a r i l y i n t h e f r e q u e n c y d o m a i n . The M a r r a n d H i l d r e t h f i l t e r 1 3 e v o l v e d f r o m a model o f human v i s i o n . The l o w e s t l e v e l s o f mammal v i s i o n were o b s e r v e d t o i n c l u d e b a n d p a s s s p a t i a l f r e q u e n c y c h a n n e l s t o f i l t e r image d e t a i l a t v a r i o u s d e g r e e s o f r e s o l u t i o n [ 2 4 ] . A f t e r W i l s o n and G i e s e [ 2 5 ] showed t h a t t h e f r e q u e n c y r e s p o n s e o f t h e s e b a n d p a s s c h a n n e l s c a n be a p p r o x i m a t e d by a d i f f e r e n c e o f two G a u s s i a n d i s t r i b u t i o n s , M a r r a n d P o g g i o [ 2 6 ] showed t h a t e a c h c h a n n e l c o u l d d e t e c t e d g e s t h r o u g h t h e z e r o c r o s s i n g s i t p r o d u c e d . F u r t h e r c o n s i d e r a t i o n s a s t o what c o n s t i t u t e s t h e b e s t f o r m o f an edge f i l t e r l e a d M a r r a n d H i l d r e t h t o t h e L a p l a c i a n o f a G a u s s i a n w h i c h t h e y show t o be t h e l i m i t i n g c o n d i t i o n o f t h e d i f f e r e n c e o f two G a u s s i a n s a s t h e i r v a r i a n c e s c o n v e r g e . The D i c k e y a n d Shanmugam f i l t e r , on t h e o t h e r h a n d , was d e v e l o p e d i n a more d i r e c t , a n a l y t i c a l manner, b u t a g a i n i n v o l v e d s e r i o u s c o n s i d e r a t i o n o f t h e f o r m o f t h e f r e q u e n c y r e s p o n s e . The f a c t t h a t a p r o l a t e s p h e r o i d a l wave f u n c t i o n o p t i m i z e s t h e edge f i l t e r r e s u l t s i n p a r t f r o m s t r i c t l y b a n d l i m i t i n g t h e f i l t e r t o c o n t r o l n o i s e a t t h e o u t s e t . A n o t h e r d i s t i n g u i s h i n g f e a t u r e o f o p t i m a l edge f i l t e r s i s t h a t t h e f o r m o f t h e i r r e s p o n s e i s n o t f i x e d . I n s t e a d i t i s c o n t r o l l e d by t h e s t a n d a r d d e v i a t i o n o f t h e G a u s s i a n i n t h e c a s e o f t h e M a r r a n d H i l d r e t h f i l t e r , a n d by t h e b a n d w i d t h a n d t h e r e s o l u t i o n - b a n d w i d t h p r o d u c t i n t h e c a s e o f t h e D i c k e y and Shanmugam f i l t e r . T h i s d i f f e r s f r o m many o t h e r edge d e t e c t i o n f i l t e r s w h i c h a r e s p e c i f i e d a s a mask o f f i x e d f o r m . The two o p t i m a l f i l t e r s w i l l be c o m b i n e d i n t o one w i t h t h e f o r m o f t h e M a r r - H i l d r e t h f i l t e r t h r o u g h c h o i c e o f a common b a n d w i d t h a n d a d o p t i n g an a s y m p t o t i c a p p r o x i m a t i o n t o t h e Dickey-Shanmugam f i l t e r . T h i s w i l l l e a v e o n l y one p a r a m e t e r , a s t a n d a r d d e v i a t i o n , t o d e t e r m i n e t h e f o r m o f t h e f i l t e r . The c h o i c e o f 1 4 t h e a p p r o p r i a t e s t a n d a r d d e v i a t i o n and t h e r e s u l t a n t c o n s e q u e n c e s f o r t h e f i l t e r ' s a c c u r a c y c o n s t i t u t e t h e p r i n c i p a l d e s i g n p r o b l e m a d d r e s s e d h e r e . N e i t h e r M a r r a nd H i l d r e t h n o r D i c k e y a n d Shanmugam p r o v i d e much g u i d a n c e i n t h i s m a t t e r . M a r r a nd H i l d r e t h c l a i m t h a t p a r a l l e l e d g e s c o u l d n o t be r e s o l v e d a c c u r a t e l y when t h e f i l t e r ' s c e n t r a l w a v e l e n g t h e x c e e d s t w i c e t h e edge s p a c i n g . The D i c k e y a n d Shanmugam f i l t e r s , on t h e o t h e r h a n d , i n v o l v e d s p e c i f i c a t i o n o f a r e s o l u t i o n i n t e r v a l w i t h i n w h i c h i t i s u n l i k e l y a n o t h e r edge f e a t u r e w i l l be f o u n d . To i m p r o v e on t h i s s t a t e o f a f f a i r s f o u r s t a g e s o f f i l t e r d e s i g n w i l l be c o n s i d e r e d . The f i r s t two w i l l i n v o l v e s e l e c t i o n o f an a p p r o p r i a t e f i l t e r s t a n d a r d d e v i a t i o n t o meet s p e c i f i e d edge r e s o l u t i o n r e q u i r e m e n t s a c c o r d i n g t o t h e s t r u c t u r e o f t h e i n p u t image a nd a c c u r a c y i n t h e p r e s e n c e o f n o i s e . T h i s w i l l be done by e x a m i n i n g t h e r e s p o n s e t o two p e r i o d i c edge m o d e l s b l u r r e d w i t h a G a u s s i a n d i s t r i b u t i o n . L a t e r , t h e p o s i t i o n a l a c c u r a c y o f an i s o l a t e d z e r o c r o s s i n g i n t h e p r e s e n c e o f a d d i t i v e G a u s s i a n n o i s e w i l l be c o n s i d e r e d . The r e s u l t w i l l be a s e t o f d e s i g n r u l e s o u t l i n i n g t h e maximum f i l t e r s t a n d a r d d e v i a t i o n n e c e s s a r y t o r e s o l v e a n image w h i c h , i n p a r t , r e s e m b l e s one o f t h e edge m o d e l s . The e x p e c t e d a c c u r a c y t o be a c h i e v e d w i t h t h a t s t a n d a r d d e v i a t i o n i s t h e n p r e s e n t e d , a s w e l l a s t h e minimum t o l e r a b l e s i g n a l t o n o i s e r a t i o i n t h e i n p u t image. The r e m a i n i n g two d e s i g n s t a g e s w i l l a d d r e s s t h e p r o b l e m s o f d i g i t a l i m p l e m e n t a t i o n : s a m p l i n g t h e c o n t i n u o u s f i l t e r ; a n d q u a n t i z i n g t h e r e s u l t a n t c o e f f i c i e n t s . I t w i l l be s e e n , h o w e v e r , t h a t t h e f i l t e r i s v e r y r o b u s t u n d e r b o t h t h e s e o p e r a t i o n s a l l o w i n g a c o m p a r a t i v e l y c o a r s e s a m p l e s p a c i n g and a q u a n t i z a t i o n w o r d s i z e t o m a t c h most image a c q u i s i t i o n s y s t e m s . 1 5 T h i s d e s i g n m e t h o d o l o g y s h o u l d p r o v i d e a c o m p r e h e n s i v e g u i d e f o r t h e s e l e c t i o n a n d i m p l e m e n t a t i o n o f a f i l t e r d e s i g n e d a t t h e o u t s e t t o be o p t i m a l a t t h e t a s k o f r e s o l v i n g edge f e a t u r e s . F i r s t we w i l l r e v i e w how t h e f o r m o f t h e o p t i m a l f i l t e r c a n be f o u n d . 2.2 The C a s e f o r O p t i m a l i t y M a r r a n d H i l d r e t h , a n d D i c k e y a n d Shanmugam h a v e i n d e p e n d e n t a r g u m e n t s t o s u b s t a n t i a t e t h e i r r e s p e c t i v e c l a i m o f h a v i n g f o u n d an o p t i m a l f i l t e r . E a c h i s r o o t e d i n a d i f f e r e n t c o s t f u n c t i o n . T h a t u s e d by M a r r a n d H i l d r e t h m e a s u r e s t h e l o c a l i z a t i o n o f t h e f i l t e r ' s i n f l u e n c e i n b o t h t h e s p a t i a l a n d f r e q u e n c y d o m a i n s . D i c k e y a n d Shanmugam, on t h e o t h e r h a n d , a d o p t e d t h e p r o p o r t i o n o f t h e f i l t e r ' s e n e r g y w i t h i n a s p e c i f i e d r e s o l u t i o n i n t e r v a l a b o u t an edge f e a t u r e . We w i l l now e x a m i n e e a c h o f t h e s e a p p r o a c h e s i n t u r n a n d t h e n c o m b i n e t h e r e s u l t s i n t o a s i n g l e n e a r - o p t i m a l f i l t e r . 2.2.1 M a r r O p t i m a l i t y M a r r and H i l d r e t h a v o i d e d c o m m i t t i n g t h e m s e l v e s t o a r i g o r o u s m a t h e m a t i c a l m o d e l o f an edge p r e f e r r i n g i n s t e a d t o draw a t t e n t i o n t o t h e v a r i e t y o f n a t u r a l phenomena g i v i n g r i s e t o i n t e n s i t y c h a n g e s i n t h e v i s u a l w o r l d . T h e s e i n c l u d e i l l u m i n a t i o n c h a n g e s s u c h a s shadows, t h e o r i e n t a t i o n o f v i s i b l e s u r f a c e s , a n d c h a n g e s i n s u r f a c e r e f l e c t a n c e . One o b s e r v a t i o n i s t h a t i n t e n s i t y c h a n g e s a r e s p a t i a l l y l o c a l i z e d r a t h e r t h a n e x t e n d e d a n d w a v e l i k e . F u r t h e r m o r e , t h e s e c h a n g e s o c c u r o v e r a w i d e r a n g e o f s c a l e s , i . e . , s p a t i a l f r e q u e n c i e s . I n o r d e r t o i d e n t i f y t h e p r o c e s s e s r e s p o n s i b l e f o r t h e image d e t a i l s w i t h i n 16 t h i s r a n g e t h e o p t i m a l f i l t e r must have a r e s t r i c t e d b a n d w i d t h c o r r e s p o n d i n g t o a c e r t a i n edge r e s o l u t i o n i n t h e o u t p u t image. The c o n s t r a i n t s p l a c e d on t h e edge f i l t e r a r e t h e r e f o r e c o n f l i c t i n g . To r e s t r i c t t h e r a n g e o f s c a l e i n t h e f i l t e r e d image t h e f i l t e r must p o s s e s s a m i n i m a l b a n d w i d t h o f s t a n d a r d d e v i a t i o n Ao. To l o c a l i z e edge p o s i t i o n s a c c u r a t e l y t h e f i l t e r ' s i n f l u e n c e must be c o n c e n t r a t e d a b o u t t h o s e p o s i t i o n s w i t h m i n i m a l s t a n d a r d d e v i a t i o n Ax. The c o s t f u n c t i o n t o be m i n i m i z e d by t h i s o p t i m a l f i l t e r , t h e r e f o r e , i s t h e p r o d u c t o f t h e s e two s t a n d a r d d e v i a t i o n s , AxAco. O n l y a f i l t e r i n t h e f o r m o f a G a u s s i a n d i s t r i b u t i o n , g ( x , y ) , c a n m i n i m i z e t h i s p r o d u c t [ 2 7 ] . H owever, f i l t e r i n g an image w i t h a G a u s s i a n f u n c t i o n a l o n e i s o n l y a s m o o t h i n g o p e r a t i o n r e d u c i n g t h e r a n g e o f d e t a i l by b l u r r i n g t h e o r i g i n a l . The p o s i t i o n o f t h e edge i s d e f i n e d t o c o i n c i d e w i t h l i n e s o f s t e e p e s t g r a d i e n t i n t h e f i l t e r e d i mage. T h i s i n d i c a t e s t h a t an edge i s c h a r a c t e r i z e d by a z e r o c r o s s i n g i n t h e L a p l a c i a n o f t h e f i l t e r e d image i f i n t e n s i t y v a r i a t i o n n e a r a n d p a r a l l e l t o t h e l i n e o f z e r o c r o s s i n g s i s l o c a l l y l i n e a r ( M a r r a n d H i l d r e t h ' s c o n d i t i o n o f l i n e a r v a r i a t i o n ) . I f l i n e a r v a r i a t i o n d o e s n o t h o l d , t h e p o s i t i o n o f t h e z e r o c r o s s i n g w i l l be d i s p l a c e d t o one s i d e o f t h e t r u e edge ( i . e . g r a d i e n t maximum). T h e r e a r e a number o f a d v a n t a g e s t o u s i n g t h e L a p l a c i a n f o r e dge d e t e c t i o n . I t i s an o r i e n t a t i o n i n d e p e n d e n t o p e r a t o r , t h e r e f o r e p r o d u c i n g o n l y a s c a l a r v a l u e f o r e a c h p i x e l i n t h e f i n a l i mage. The z e r o c r o s s i n g s p r o d u c e d f o r m c l o s e d c u r v e s f o r edge phenomena t o t a l l y e n c l o s e d by t h e i mage. T h i s i s an 1 7 i m p o r t a n t c o n s i d e r a t i o n s h o u l d s u b s e q u e n t r e g i o n o r o b j e c t s e g m e n t a t i o n schemes be a p p l i e d . F i n a l l y , t h e L a p l a c i a n c a n be c o m b i n e d w i t h t h e G a u s s i a n t o c o n d e n s e t h e image f i l t e r i n g p r o c e s s i n t o one s t e p : V 2 [ g ( x , y ) * I ( x , y ) ] = V 2 g ( x , y ) * I ( x , y ) . ( 2 . 1 ) T h e r e f o r e , M a r r a n d H i l d r e t h a r g u e , t h e o p t i m a l edge d e t e c t i o n f i l t e r t o a p p l y i s t h e L a p l a c i a n o f a G a u s s i a n p o i n t s p r e a d f u n c t i o n w i t h t h e r e s u l t i n g z e r o c r o s s i n g s d e f i n i n g t h e image e d g e s : V 2 g ( x , y ) = - [ 1 - ( x 2 + y 2 ) / 2 o , 2 ] e x p [ - ( x 2 + jy 2 )/2a, 2 ]/( ™,« ) . ( 2 . 2 ) The s p a t i a l f r e q u e n c y r e s p o n s e o f t h i s f i l t e r i s b a n d p a s s a s d e s c r i b e d by G " ( u , v ) = - 4 T T 2 ( U 2 + v 2 ) e x p [ - 2 7 r 2 ( u 2 + v 2 ) c f 2 ] . ( 2 . 3 ) The f i l t e r ' s h a l f power b a n d w i d t h i s 1.2 o c t a v e s . T h i s a l m o s t m e e t s t h e one o c t a v e r e q u i r e m e n t o f L o g a n ' s t h e o r e m [ 2 8 ] w h i c h c l a i m s t h a t a one o c t a v e b a n d p a s s s i g n a l i s c o m p l e t e l y d e t e r m i n e d by i t s z e r o c r o s s i n g s . M a r r , U l l m a n and P o g g i o [ 2 9 ] , h o w e v e r , h a v e f o u n d e x p e r i m e n t a l l y t h a t t h i s b a n d w i d t h r e q u i r e m e n t c a n be r e l a x e d c o n s i d e r a b l y w i t h l i t t l e i n t r o d u c t i o n o f e r r o r . T h e r e f o r e image d e t a i l i n t h e r e s o l u t i o n band o f i n t e r e s t i s f u l l y d e s c r i b e d by t h e e d g e s f o u n d on a p p l i c a t i o n o f t h e V 2 g f i l t e r . T h i s b a n d p a s s c h a r a c t e r o f t h e V 2 g f i l t e r w o u l d seem t o weaken i t s c l a i m t o o p t i m a l i t y by t h e p r e v i o u s a r g u m e n t s i n c e i t was f o u n d t h a t a l o w p a s s , G a u s s i a n f i l t e r was o f t h e c o r r e c t 18 f o r m . F u r t h e r m o r e , s i n c e n o t h i n g h a s been s a i d o f t h e e x a c t f o r m of t h e edge f e a t u r e s b e i n g s o u g h t , l i t t l e c a n be s a i d o f t h e s u i t a b i l i t y o f t h i s f i l t e r f o r h i g h l i g h t i n g s p e c i f i c edge s t r u c t u r e s . T h e s e c r i t i c i s m s a r i s e l a r g e l y b e c a u s e o f t h e h e u r i s t i c n a t u r e o f t h e a r g u m e n t s u s e d i n t h i s f i l t e r ' s d e v e l o p m e n t . I n f a c t t h e f o l l o w i n g a r g u m e n t w i l l show t h a t t h e V 2 g f i l t e r i s a s y m p t o t i c o p t i m a l up t o a p r e d e t e r m i n e d c u t o f f f r e q u e n c y . 2.2.2 D i c k e y a n d Shanmugam O p t i m a l i t y By d e f i n i n g an edge a s a u n i t s t e p f e a t u r e i n image s p a c e , D i c k e y a n d Shanmugam d e r i v e d an edge f i l t e r t h a t o p t i m i z e d a v e r y d i f f e r e n t m e a s u r e o f l o c a l i n f l u e n c e . The o p t i m a l f i l t e r was d e f i n e d a s m a x i m i z i n g t h e p r o p o r t i o n o f o u t p u t image e n e r g y i n t h e v i c i n i t y o f t h e edge l o c a t i o n f o r g i v e n b a n d w i d t h a n d r e s o l u t i o n r e q u i r e m e n t s . I n one d i m e n s i o n t h i s t r a n s l a t e s i n t o m a x i m i z a t i o n o f t h e f o l l o w i n g c o s t f u n c t i o n : J 2 | g ( x ) | 2 d x -1/2 7 = ( 2 . 4 ) / | g ( x ) | 2 d x where g ( x ) i s t h e s t e p s p r e a d f u n c t i o n o f t h e o p t i m a l f i l t e r , a n d I i s t h e r e s o l u t i o n i n t e r v a l c e n t e r e d on t h e s t e p e d g e . The f i l t e r i s a l s o c o n s t r a i n e d t o be b a n d l i m i t e d t o r a d i a n f r e q u e n c y J2. W i t h t h i s i n f o r m a t i o n D i c k e y a n d Shanmugam were a b l e t o show t h a t t h e o p t i m a l f i l t e r t r a n s f e r f u n c t i o n i s g i v e n by 19 K 1 ^ , ( 0 , 0 ) 1 / 2 0 ) , |o)|<f2 H ( C J ) = ( 2 . 5 ) 0 e l s e w h e r e , where K, i s a r e a l c o n s t a n t , \p, i s t h e f i r s t d e g r e e z e r o o r d e r p r o l a t e s p h e r o i d a l wave f u n c t i o n a n d c i s t h e r e s o l u t i o n -b a n d w i d t h p r o d u c t , d e f i n e d by N o t e t h a t c i s s i m i l a r i n c o n c e p t t o t h e r e s o l u t i o n - b a n d w i d t h p r o d u c t m i n i m i z e d i n M a r r ' s d e r i v a t i o n . H o wever, H(co) d o e s n o t s e e k t o m i n i m i z e c . R a t h e r , c i s s p e c i f i e d by t h e f i l t e r d e s i g n e r and r e l a t e s t o t h e maximum 7 a t t a i n a b l e a s g i v e n i n T a b l e I . O b s e r v e t h a t D i c k e y a n d Shanmugam's a p p r o a c h p r o v i d e s a s h a r p e r m e a s u r e o f c o n c e n t r a t i o n o f g ( x ) a n d H(CJ) t h a n t h a t o f M a r r a n d H i l d r e t h b e c a u s e i n t e g r a t i o n s a r e now r e s t r i c t e d t o a f i n i t e i n t e r v a l i n s p a c e a n d f r e q u e n c y . c 0.5 1 2 4 8 7 m a , ( c ) 0.00858 0.06279 0.35564 0.91211 0.99988 R e p r e s e n t i n g t h e f i l t e r a s g i v e n i n ( 2 . 5 ) makes f o r a number of p r o b l e m s when i t s p r a c t i c a l i m p l e m e n t a t i o n i s c o n s i d e r e d . ^ , ( c , x ) must e i t h e r be n u m e r i c a l l y c o m p u t e d o r r e f e r e n c e d f r o m t a b l e s [ 3 0 ] . A l s o s p a t i a l c o n v o l u t i o n s y s t e m s w o u l d r e q u i r e t h a t e i t h e r t h e two d i m e n s i o n a l f o r m o f H(co) be t r a n s f o r m e d t o t h e c = 01/2 ( 2 . 6 ) T a b l e I . V a l u e s o f maximum 7 20 s p a t i a l d o m a i n w i t h t h e d i s c r e t e F o u r i e r t r a n s f o r m o r t h a t t h e l i n e s p r e a d f u n c t i o n o f H ( w ) , t h e d e r i v a t i v e o f a r e s c a l e d i/>,(c,x), be c o n v e r t e d t o a p o i n t s p r e a d f u n c t i o n t h r o u g h t h e A b e l t r a n s f o r m [ 3 1 , p. 2 1 0 ] . T h e s e a r e cumbersome p r o c e s s e s w h i c h do n o t a d m i t w e l l t o an a n a l y s i s o f t h e f i l t e r ' s p e r f o r m a n c e g i v e n a more r e a l i s t i c edge d e t e c t i o n p r o b l e m . A d d r e s s i n g t h e s e d i f f i c u l t i e s , Shanmugam, D i c k e y a n d G r e e n [ 3 2 ] a t t e m p t e d t o r e p l a c e ^ , ( c , x ) w i t h a c l o s e d f o r m a s y m p t o t i c a p p r o x i m a t i o n . The r e s u l t a n t f o r m o f t h e f i l t e r was much more a m e n a b l e t o a n a l y s i s t h a n ( 2 . 5 ) . L u n s c h e r [ 3 3 ] , h o w e v e r , p o i n t e d o u t t h a t t h e a p p l i e d a p p r o x i m a t i o n was i m p r o p e r l y s c a l e d a n d t h a t t h e c o r r e c t f o r m o f t h e a s y m p t o t i c o p t i m a l f i l t e r i s g i v e n by R u 2 e x p ( - c o j 2 / 2 J i 2 ) , |o)|<Q 0 e l s e w h e r e , H ( U ) - ' ( 2 ' 7 ) v a l i d on |CJ| < Qc - i / « N o t e t h a t i n t h e r e g i o n < S2 t h e f o r m o f H(w) i s t h a t o f t h e L a p l a c i a n o f a G a u s s i a n d i s t r i b u t i o n . F u r t h e r m o r e , s i n c e H(CJ) i s an e v e n f u n c t i o n a n d t h e s t e p edge m o d e l i s an odd f u n c t i o n , t h e r e s u l t a n t f i l t e r r e s p o n s e , g ( x ) , i s a l s o an odd f u n c t i o n . T h e r e f o r e , t h e e d g e s i n an image f i l t e r e d by t h e two d i m e n s i o n a l e x t e n s i o n o f ( 2 . 7 ) a r e i n d i c a t e d by z e r o c r o s s i n g s i n t h e o u t p u t i m a g e . From t h e s e r e s u l t s , i t c a n be c o n c l u d e d t h a t up t o a s u i t a b l e c u t o f f f r e q u e n c y , fl, t h e M a r r and Shanmugam f i l t e r s a r e i d e n t i c a l . T h e r e f o r e t h e V 2 g f i l t e r i s a c t u a l l y s u b o p t i m a l i n 21 t h e s e n s e o f m a x i m i z i n g t h e f i l t e r e d image e n e r g y a b o u t s t e p - l i k e e d g e s a n d b a n d l i m i t i n g t h e r a n g e o f s c a l e s p a s s e d . 2.2.3 U n i f y i n g t h e F i l t e r s By t h e P a l e y - W i e n e r C r i t e r i o n [ 3 4 , p p . 1 6 - 2 0 ] n e i t h e r H(w) n o r G"(o>) a r e p h y s i c a l l y r e a l i z a b l e b e c a u s e t h e h i g h f r e q u e n c y c u t o f f f a l l s t o z e r o f a s t e r t h a n e x p o n e n t i a l o r d e r . P a r t i c u l a r l y i n t h e c a s e o f H(co) , t h e s h a r p c u t o f f w o u l d be s m o o t h e d somewhat by t h e a c t o f w i n d o w i n g t h e s p a t i a l f i l t e r o r i n p u t i m a g e . The r e s u l t o f i m p l e m e n t i n g t h e f i l t e r s , t h e n , i s t o f o r c e t h e i r f o r m i n t o c l o s e r a g r e e m e n t . The f i l t e r s c a n t h e r e f o r e be r e l a t e d by a g r e e i n g upon a h i g h c u t o f f f r e q u e n c y on G " ( C J ) w h i c h w i l l c o r r e s p o n d t o fl. By s t a n d a r d c o n v e n t i o n t h e 3 db h a l f power p o i n t i s c h o s e n . I t w i l l l a t e r be shown t h a t t h i s o c c u r s a t fi = 27r0.325/a t . ( 2 . 8 ) G"(w) a n d H(CJ) a r e t h e r e f o r e e q u i v a l e n t i n f o r m when of = c/S2 2 = I/2G, ( 2 . 9 ) r e s u l t i n g i n c = n za, 2, ( 2 . 10a) 1/2 = Qa,2 . ( 2 . 10b) S u b s t i t u t i n g ( 2 . 8 ) i n t o ( 2 . 1 0 ) : c = 4 . 1 7 , 1/2 = 2.04a, . T a b l e I shows t h a t t h i s v a l u e o f c c o r r e s p o n d s t o 9 1 % o f t h e f i l t e r e d image e n e r g y b e i n g c o n c e n t r a t e d w i t h i n t h e r e s o l u t i o n 22 i n t e r v a l I . T h i s i m p l i e s a v e r y low p r o b a b i l i t y o f e n c o u n t e r i n g a n o t h e r z e r o c r o s s i n g w i t h i n 2of o f t h e m a i n edge f e a t u r e . T h i s o b s e r v a t i o n i s s u p p o r t e d by t h e p r o b a b i l i t y a n a l y s i s o f V 2 g f i l t e r e d w h i t e n o i s e o f G r i m s o n [ 3 5 ] , l a t e r c o r r e c t e d by C l a r k [ 3 6 ] . T h i s w o u l d a l s o i m p l y t h a t i f image e d g e s a r e p a r t o f a p e r i o d i c s t r u c t u r e s u c h a s a s q u a r e wave, t h e n i f t h e edge s p a c i n g i s l e s s t h a n 2o f , t h e s t r u c t u r e w o u l d be p o o r l y s e e n , i f a t a l l . T h e s e p e r f o r m a n c e q u e s t i o n s a r e a d d r e s s e d i n a more r i g o r o u s manner i n t h e n e x t s e c t i o n . 2.3 P r e d i c t i n g F i l t e r P e r f o r m a n c e I t h a s been e s t a b l i s h e d t h a t t h e V 2 g f i l t e r m a x i m i z e s f i l t e r e d image r e s p o n s e a b o u t s t e p - l i k e edge s t r u c t u r e s , a nd c o n t r o l s t h e r a n g e o f d e t a i l o f t h e s e s t r u c t u r e s t h r o u g h i t s b a n d p a s s r e s p o n s e . F u r t h e r m o r e , t h i s p a s s b a n d b e i n g a b o u t one o c t a v e w i d e , t h e z e r o c r o s s i n g s i n t h i s image p r o v i d e a c o m p l e t e d e s c r i p t i o n o f t h e image d e t a i l p a s s e d . H o w e v e r , b e y o n d t h e p r e d i c t i o n t h a t z e r o c r o s s i n g s p a c i n g i s u n l i k e l y t o be n a r r o w e r t h a n 2CT, no q u a n t i t a t i v e m e a s u r e o f t h e e x p e c t e d r a n g e o f d e t a i l i s e v i d e n t . I t c a n be a r g u e d t h a t t h e f r e q u e n c y r e s p o n s e , G " ( u , v ) , p r o v i d e s t h i s m e a s u r e ; b u t , a s M a r r a n d H i l d r e t h c o r r e c t l y p o i n t o u t , r e a l i m a g e s do n o t c o n s i s t o f smooth s i n u s o i d a l v a r i a t i o n s i n i n t e n s i t y . R a t h e r , t h e y c o n s i s t o f a b r u p t c h a n g e s o c c u r r i n g o v e r a v a r i e t y o f p e r i o d s . F u r t h e r m o r e t h e s e i n t e n s i t y c h a n g e s r a r e l y e x h i b i t t h e i d e a l a b r u p t n e s s o f a s t e p f u n c t i o n . P r o c e s s e s s u c h a s d i f f r a c t i o n o f l i g h t , d i f f u s i o n o f i n k and a d d i t i v e n o i s e t e n d t o b l u r s u c h d e t a i l . The e x t r e m e c a s e o f t h e s p a c i n g o f d e t a i l r e s o l v e d i n r a n d o m l y s t r u c t u r e d images w i t h r e s p e c t . t o af was e x a m i n e d by G r i m s o n , and C l a r k . 23 However n o t h i n g was s a i d o f t h e m a g n i t u d e o f t h e r e s u l t a n t r e s p o n s e a g a i n s t edge s p a c i n g i n t h e o r i g i n a l image. S i n c e r e a l i m a g e s do e x h i b i t some f o r m o f m e a s u r a b l e s t r u c t u r e , what i s n e e d e d i s a method o f r e l a t i n g t h e f i l t e r s t a n d a r d d e v i a t i o n , a, , t o t h e m a g n i t u d e o f r e s p o n s e s e e n a t t h e e d g e s o f t h e s e s t r u c t u r e s . W i t h t h e s e r e s u l t s t h e d e g r e e o f i n v i s i b l e d e t a i l f o r a, c a n be i d e n t i f i e d . A l s o , s i n c e t h e V 2 g f i l t e r was o r i g i n a l l y m o d e l e d on t h e human v i s u a l s y s t e m , p r e d i c t i o n s c o u l d be made c o n c e r n i n g human v i s u a l p e r f o r m a n c e . The method c h o s e n t o p r e d i c t t h e f i l t e r ' s p e r f o r m a n c e was t o o b s e r v e i t s r e s p o n s e when p r e s e n t e d w i t h two s e t s o f p e r i o d i c n o n - i d e a l edge s t r u c t u r e s . The r e s u l t p e r m i t s a p r o c e s s o f f i l t e r d e s i g n t h r o u g h t h e c h o i c e o f a s u i t a b l e a, f o r r e s o l v i n g image s t r u c t u r e s o f a known r e g u l a r i t y . The two p e r i o d i c edge m o d e l s u s e d were an a s c e n d i n g s t a i r c a s e , a n d a s q u a r e wave p u l s e t r a i n . To m o d el n o n - i d e a l e d g e s b l u r r e d by v a r i o u s p r o c e s s e s , t h e s e s t r u c t u r e s a r e c o n v o l v e d w i t h a n o t h e r G a u s s i a n o f v a r i a b l e s t a n d a r d d e v i a t i o n ab . G a u s s i a n b l u r o f t h i s k i n d i s t h e k e r n e l o f t h e d i f f u s i o n e q u a t i o n [ 3 7 , pp.1 13-117] a n d s o most a c c u r a t e l y d e s c r i b e s d e t e r i o r a t i o n o f e d g e s t h r o u g h d i f f u s i o n o f d y e t h r o u g h p a p e r o r e x p o s e d g r a i n s t h r o u g h p h o t o g r a p h i c e m u l s i o n . Some s u c c e s s h a s a l s o been r e p o r t e d on a p p l y i n g t h i s m o d e l t o b l u r f o u n d i n i n d u s t r i a l X - r a y r a d i o g r a p h s [ 3 8 ] . Shanmugam e t a l . e x a m i n e d t h e i n f l u e n c e o f b l u r r i n g an i d e a l edge w i t h e s s e n t i a l l y a f i r s t o r d e r a p p r o x i m a t i o n t o a G a u s s i a n . T h e i r c o n c l u s i o n s , t r a n s l a t e d i n t e r m s o f a G a u s s i a n , show t h a t t h e f i l t e r r e t a i n s o p t i m a l p e r f o r m a n c e i f t h e r e s o l u t i o n i n t e r v a l i s g r e a t e r t h a n nab/\/2r 24 i . e . , 1/2 = 2a, > 1 . 1 1 ab . The f o l l o w i n g a n a l y s i s w i l l show t h i s r e s u l t t o be t o o o p t i m i s t i c . The edge m o d e l s p r e s e n t e d w i l l be c o n s i d e r e d d e p e n d e n t on o n l y one s p a t i a l v a r i a b l e . T h i s w i l l s i m p l i f y t h e a n a l y s i s t h r o u g h u s e o f t h e f i l t e r l i n e s p r e a d f u n c t i o n : V 2 g , ( x ) = J° V 2 g , ( x , y ) d y = - ( 1 - x 2 / a , 2 ) e x p ( - x 2 / 2 a , 2 ) / ( i / 2 * a f 3 ) ( 2 . 1 1 a ) w i t h F o u r i e r t r a n s f o r m G " ( f ) = -4TT 2 f 2 e x p ( - 2 7 r 2 f 2a, 2) . ( 2 . 1 1 b ) Edge m a g n i t u d e s w i l l be d e f i n e d by t h e s l o p e o f t h e o u t p u t s i g n a l a t t h e z e r o c r o s s i n g . 2.3.1 S t a i r c a s e Edge R e s p o n s e The edge m o d e l u s e d t o r e p r e s e n t a b l u r r e d i n f i n i t e s t a i r c a s e o f a s c e n d i n g m a g n i t u d e i s , e S T ( x ) = g b ( x ) * Z u ( x - nT) ( 2 . 1 2 ) n;- oo where g b ( x ) = G a u s s i a n b l u r f u n c t i o n = e x p ( - x 2 / 2 a b 2 ) / / 2 ; r a b 2 . ( 2 . 1 3 ) The r e s u l t o f f i l t e r i n g e S T ( x ) w i t h V 2 g f ( x ) i s , e S T o ( x ) = V 2 [ g , ( x ) * e S T ( x ) ] = Vg, ( x ) * g b ( x ) * I 5 ( x - n T ) , ( 2 . 1 4 ) n i - oo w i t h F o u r i e r t r a n s f o r m E s i o ( f ) = j 2 7 r f 2 Z n e x p [ - 2 7 r 2 n 2 f 2 ( a 2 + a, 2)] 6 ( f - n f , ) , ( 2 . 1 5 ) n r - uo 25 where f s = 1/T. N o r m a l i z e t h e edge s p a c i n g T and t h e b l u r s t a n d a r d d e v i a t i o n w i t h r e s p e c t t o t h e f i l t e r s t a n d a r d d e v i a t i o n : ob= aa, , ( 2 . 16a) T = 0*i • ( 2 . 1 6 b ) S u b s t i t u t i n g i n t o ( 2 . 1 5 ) : E S T O ( f ) = j 2 7 r / ( / 3 2 a , 2 ) I n e x p [ - 2 7 r 2 n 2 d + a 2 ) / / 3 2 ] 6 ( f - n f s ) . ( 2 . 1 7 ) The m a g n i t u d e o f t h e s l o p e o f t h e z e r o c r o s s i n g a t t h e o r i g i n w i l l d e f i n e t h e edge m a g n i t u d e : | V e S T O ( x = 0) | = | j 2 i r j f E S T 0 ( f ) d f I — o o = 8 i r 2 / ( 0 3 a , 3 ) 2 n 2 e x p [ - 2 7 r 2 n 2 (1 + a 2 ) / / 3 2 ] . ( 2 . 1 8 ) n a 1 The r e s u l t i s p l o t t e d i n F i g u r e 2.1 i n db n o r m a l i z e d t o peak m a g n i t u d e a g a i n s t a and /3. O b s e r v e t h a t f o r s m a l l a (a < 0.2) t h e 3 db t u r n on s p a c i n g i s 0 = 2.75. A t l a r g e a t h e 3 db o f peak r e g i o n i s a t a = 0.51 f o r 0 > 5.5 . O u t s i d e t h e 3 db l e v e l b o r d e r i n g t h e p l a t e a u t h e r e s p o n s e d e c a y s l i n e a r l y i n db p e r d e c a d e a, and a t a h i g h e r r a t e p e r d e c a d e 0. T h e r e f o r e i t i s e x p e c t e d t h a t t h e e d g e s a r e f u l l y r e s o l v e d i n t h i s image f o r a b < 0 . 5 1 a, , T > 5.5 a, , and i n t h e c a s e o f n e g l i g i b l e b l u r T > 2.7 5 a, . F i g u r e 2. 1 S t a i r c a s e edge model m a g n i t u d e r e s p o n s e 2 7 I t c a n be r e a d i l y shown t h a t t h e r e i s a n o t h e r z e r o c r o s s i n g b e t w een t h e s t e p s a t ( n + 1/2 )T o f m a g n i t u d e d e c r e a s i n g w i t h i n c r e a s i n g 0 f o r /3> 5 . The e x i s t e n c e o f t h i s z e r o c r o s s i n g may c o n f u s e t h e p r o c e s s o f edge d e t e c t i o n f o r t h e s e t y p e s of image s t r u c t u r e s . A method w i l l be d i s c u s s e d l a t e r t o r e s o l v e t h i s p r o b l e m u s i n g m u l t i p l e f i l t e r s o f d i f f e r i n g b a n d w i d t h s . 2.3.2 Square-Wave Edge R e s p o n s e A more common image s t r u c t u r e i s one o f p e r i o d i c a l l y r i s i n g a n d f a l l i n g i n t e n s i t y . I n i t s s i m p l e s t f o r m i t c a n be m o d e l e d by a b l u r r e d s q u a r e wave, e S Q ( x ) = g„(x) * u ( x ) u ( T - x ) * Z 5 ( x - 2nT) . ( 2 . 1 9 ) n z — co H e r e T r e p r e s e n t s t h e s p a c i n g o f t h e e d g e s o f t h e s q u a r e wave r a t h e r t h a n t h e p e r i o d o f t h e s q u a r e wave i t s e l f . A f t e r f i l t e r i n g w i t h V 2 g ( ( x ) t h e r e s u l t i s e S Q 0 ( x ) = V 2 [ g f ( x ) * e S Q ( x ) } = Vg t ( x ) * g b ( x ) * { Z [ 6 ( x - 2nT) -n s - oo 6 ( x - ( 2 n + 1 ) T ) ] } ( 2 . 2 0 ) w i t h F o u r i e r t r a n s f o r m , Esodtf) = J27rf s 2Z n[1 - e x p ( - j n f f ) ] n z -oo e x p [ - 2 7 r 2 n 2 f 2 ( a b 2 + of)] 5 ( f - n f s ) ( 2 . 2 1 ) 28 where f s = ( 2 T ) " 1 . S u b s t i t u t i n g t h e n o r m a l i z i n g f a c t o r s , ( 2 . 1 6 ) : E S Q O ( f ) = j f / ( 2 0 2 a f 2 )L n [ l - e x p ( - j n r r ) ] nr- oo e x p [ - 7 r 2 n 2 ( 1 + a 2 ) / 2 0 2 ] 6 ( f - n f , ) . (2 . 2 2 ) The m a g n i t u d e o f t h e s l o p e o f t h e z e r o c r o s s i n g a t t h e o r i g i n i s I V e s o o ( 0 ) | = | j27r/° f E S Q 0 ( f ) d f | = i r 2 / ( 0 3 a f 3 ) Z n 2 ( 1 - c o s ( r n r ) ) n=.1 e x p [ - 7 r 2 n 2 ( l + a 2 ) / 2 0 2 ] . (2 . 2 3 ) T h i s r e s u l t i s p l o t t e d i n F i g u r e 2.2. N o t e t h a t t h e r e s p o n s e i s more c o m p l e x a n d s e n s i t i v e t o n a r r o w s p a c i n g t h a n i n t h e c a s e o f t h e s t a i r c a s e m o d e l . The s t r o n g 5.3 db peak a b o v e s t e a d y s t a t e a t 0=1.81 f o r s m a l l a i n d i c a t e s t h a t t h e e d g e s a r e most s t r o n g l y e n h a n c e d a t t h e b r i n k o f v i s i b i l i t y . The r e s p o n s e r e a c h e s 3 db b e l o w t h e s m a l l a - l a r g e 0 p l a t e a u a t 0=1.15 f o r s m a l l a (a < 0 . 2 ) . F o r l a r g e a t h i s l e v e l o f r e s p o n s e i s f i r s t r e a c h e d f o r a=0.51 and 0£1.36. N o t e t h a t t h i s 3 db maximum b l u r l e v e l i s i d e n t i c a l t o t h a t o f t h e s t a i r c a s e m o d e l . F i n a l l y , u n c h a n g i n g s t e a d y s t a t e r e s p o n s e i s a c h i e v e d f o r a<0.51 a n d 0S5.OO. A g a i n i t i s s e e n t h a t t h e r e s p o n s e f a l l s o f f l i n e a r l y i n db p e r d e c a d e a, a n d a t a much h i g h e r r a t e p e r d e c a d e 0. T h e r e f o r e i t c a n be c o n c l u d e d t h a t a b l u r r e d s q u a r e wave image i s f u l l y r e s o l v e d f o r a < 0.5! a, , T > 1.36 a, , a n d i n t h e c a s e o f n e g l i g i b l e b l u r T > 1 . 1 5 fff • F i g u r e 2.2 S q u a r e wave edge m o d e l m a g n i t u d e r e s p o n s e 30 2.4 P e r f o r m a n c e i n A d d i t i v e N o i s e The f o r g o i n g a n a l y s i s h a s s u c c e e d e d i n p r o v i d i n g a g u i d e a s t o when c e r t a i n edge s t r u c t u r e s c a n be e x p e c t e d t o become v i s i b l e g i v e n a,. However, s i n c e t h e s i g n a l m o d e l s u s e d were p e r f e c t l y d e t e r m i n i s t i c , t h e f i l t e r p e r f o r m a n c e i n t h e p r e s e n c e o f a d d i t i v e n o i s e r e m a i n s t o be r e s o l v e d . To a d d r e s s t h i s p r o b l e m , r e t a i n t h e o n e - d i m e n s i o n a l s i g n a l m o d e l s u s e d t h u s f a r , a n d c o r r u p t them w i t h a d d i t i v e w h i t e G a u s s i a n n o i s e o f power s p e c t r a l d e n s i t y 170/2. The f i r s t q u e s t i o n t o a r i s e c o n c e r n s t h e a c c u r a c y o f t h e z e r o c r o s s i n g s a s a m e a s u r e o f t h e t r u e edge p o s i t i o n s . C o n s i d e r an i s o l a t e d f i l t e r e d e d ge s i g n a l , y 0 ( x ) , c e n t e r e d on t h e z e r o c r o s s i n g w i t h f i l t e r e d G a u s s i a n n o i s e , n ( x ) , a d d e d . B e i n g a random p r o c e s s , n o t h i n g c a n be s a i d o f where e x a c t l y n ( x ) + y 0 ( x ) w i l l c r o s s t h e x - a x i s n e a r e s t x=0. I n s t e a d , a s t a t i s t i c a l d e s c r i p t i o n i n t h e f o r m o f t h e s t a n d a r d d e v i a t i o n o f t h e z e r o c r o s s i n g a b o u t t h e o r i g i n , oz , must be s o u g h t . To make t h e p r o b l e m m a n a g e a b l e , assume a l i n e a r m o d e l f o r b o t h t h e s i g n a l a n d t h e n o i s e a t t h e o r i g i n . The s i g n a l t h e n becomes y , ( x ) = Ax ( 2 . 2 4 a ) and t h e n o i s e , w i t h y - i n t e r c e p t n 0 a n d s l o p e n 0 , becomes y 2 ( x ) = n 0 x + n 0 ( 2 . 2 4 b ) C l e a r l y t h i s a s s u m p t i o n o f l i n e a r i t y has a l i m i t e d r a n g e . F o r t h e s i g n a l , t h i s r a n g e i s bounded by t h e s i g n a l p e ak a t |x| = A. F o r an i d e a l s t e p e d g e , c o r r e s p o n d i n g t o i d e a l s t a i r c a s e a nd s q u a r e wave e d g e s w i t h /3 > 5, t h i s o c c u r s a t |x| = a, . P l a u s i b l e 31 v a l u e s o f oz s h o u l d t h e r e f o r e be b o u n d e d by af/2 f o r a t l e a s t 95.4% o f t h e z e r o c r o s s i n g s t o be c o n t a i n e d i n t h e l i n e a r r e g i o n . T h i s i n t u r n w i l l l e a d t o a l o w e r bound on t h e s i g n a l t o n o i s e r a t i o i n b o t h t h e f i l t e r e d a n d u n f i l t e r e d image f o r w h i c h t h e f i l t e r c a n be e x p e c t e d t o y i e l d a c c u r a t e r e s u l t s . The most s t r a i g h t f o r w a r d a p p r o a c h t o d e t e r m i n i n g az i n v o l v e s s o l v i n g t h e v a r i a n c e o f t h e x - i n t e r c e p t o f t h e sum o f y, a n d y 2 , i . e . , y , ( x ) + y 2 ( x ) = (A + n 0 ) x + n 0 = 0, y i e l d s an x - i n t e r c e p t o f *o = _ n 0 / ( A + h0). The v a r i a n c e o f x 0 f o r m s t h e v a r i a n c e o f t h e z e r o c r o s s i n g e s t i m a t e , az2: a2 = E [ n 0 2 / ( A + n 0 ) 2 ] - E [ n 0 / ( A + n 0 ) ] 2 . ( 2 . 2 5 ) S i n c e a random v a r i a b l e a n d i t s d e r i v a t i v e a r e u n c o r r e l a t e d [ 3 9 , p. 2 4 5 ] , and u n c o r r e l a t e d G a u s s i a n p r o c e s s e s a r e i n d e p e n d e n t a 2 = E [ n 2 ] E [ ( A + n0)'2} - E [ n 0 ] 2 E [ ( A + n 0 ) - 1 ] 2 = E [ n 2 ] E [ ( A + n 0 ) " 2 ] . ( 2 . 2 6 ) where E { n 0 } = 0 s i n c e t h e f i l t e r d o e s n o t p a s s d c . T h e r e f o r e , w r i t i n g t h e v a r i a n c e o f n 0 a n d n 0 a s nl and h2, o o o o /n 2exp(-n 0 2 / 2 n 2 ) d n 0 rexp(-n 0 2 / 2 n 0 2 ) d n 0 . / (2.27) /2Tn7 ^ (A + h V2imJ J (A + n 0 ) 2 / 2 7 r r V J . The f i r s t i n t e g r a l s i m p l y y i e l d s n 2,. , H owever, t h e s e c o n d 32 i n t e g r a l c a n n o t be d i r e c t l y e v a l u a t e d b e c a u s e o f t h e s i n g u l a r i t y a t n 0 = -A. T h i s s i n g u l a r i t y i m p l i e s an i n t e r c e p t a t i n f i n i t y w h i c h u n d e r s c o r e s t h e l i m i t a t i o n s o f t h e l i n e a r m o d e l a p p l i e d h e r e . I n f a c t any n 0 , w h i c h , t o g e t h e r w i t h n 0 , p r o d u c e s an i n t e r c e p t o u t s i d e j x 0|= a f v i o l a t e s t h e l i n e a r i t y a s s u m p t i o n . By i n t e g r a t i n g n 0 o n l y o v e r t h e r e g i o n w h i c h m a i n t a i n s x 0 w i t h i n t h e bounds o f | x 0 | < a, , s l o p e s o u t s i d e o f t h i s r e g i o n c a n be e f f e c t i v e l y i g n o r e d a s h i g h l y i m p r o b a b l e . H owever, t h i s s o l u t i o n i s n o t s a t i s f a c t o r y f o r t h e s i m p l e r e a s o n t h a t s l o p e s a b o u t n 0 = -A a r e p e r f e c t l y r e a s o n a b l e s i n c e t h e f i l t e r o b v i o u s l y p a s s e d t h e s i g n a l w i t h t h a t s l o p e . A more w o r k a b l e a p p r o a c h i s made p o s s i b l e by e s t i m a t i n g az f r o m t h e x - i n t e r c e p t o f t h e n o i s e s t a n d a r d d e v i a t i o n bounds a b o u t t h e s i g n a l n e a r t h e z e r o c r o s s i n g . T h i s t i m e , assume a l i n e a r m o d e l o n l y f o r t h e s i g n a l w i t h i n |x| < A , a n d a d d t o t h i s t h e n o i s e , n ( x ) : y ( x ) = A x + n ( x ) . S i n c e t h e n o i s e i s assumed s t a t i o n a r y , y ( x ) h a s a c o n s t a n t v a r i a n c e o f n 2 and s t a n d a r d d e v i a t i o n tfo = / n f ( 2 . 2 8 ) c e n t e r e d on t h e s i g n a l . The x - i n t e r c e p t s o f t h e l i n e s p a s s i n g t h r o u g h t h e u p p e r a n d l o w e r b o u n d s on y ( x ) a s d e f i n e d by aQ w i l l be u s e d t o e s t i m a t e az . F i g u r e 2.3 shows t h e s e l i n e s s u p e r i m p o s e d on t h e s i g n a l m o d e l . The l i n e d e f i n e d by t h e l o w e r bound i s y, ( x ) = Ax - o0 ( 2 . 2 9 ) w i t h x - i n t e r c e p t x 0 - o0/A. (2.30) 33 F i g u r e 2.3 C a l c u l a t i o n o f t h e z e r o c r o s s i n g s t a n d a r d d e v i a t i o n i n t h e p r e s e n c e o f n o i s e 34 The x - i n t e r c e p t o f t h e u p p e r l i n e i s o b v i o u s l y o f e q u a l m a g n i t u d e a n d o p p o s i t e s i g n . B e i n g t h e i n t e r c e p t , o r z e r o c r o s s i n g , o f t h e s t a n d a r d d e v i a t i o n bounds o f y ( x ) , x 0 w i l l s e r v e a s t h e e s t i m a t e o f t h e s t a n d a r d d e v i a t i o n o f t h e z e r o c r o s s i n g , (7 2 . B e f o r e p r o c e e d i n g , i t i s n e c e s s a r y t o e v a l u a t e aQ. The f i l t e r e d n o i s e power s p e c t r a l d e n s i t y i s g i v e n by S n o ( f ) = | G " ( f ) | 2 S n ( f ) (2.31 ) w h e r e , f r o m e q u a t i o n ( 2 . 1 1 b ) , | G " ( f ) | 2 = 16w"f " e x p ( - 4 7 r 2 f 2 a f 2 ) . ( 2 . 3 2 ) a n d S „ ( f ) = TJO/2. S i n c e n ( x ) i s an e r g o d i c p r o c e s s t h e f i l t e r e d n o i s e v a r i a n c e i s g i v e n by t h e o u t p u t n o i s e p o wer, n | = J Sno ( f ) d f = \6irnr)0? f " e x p ( - 4 f f 2 f 2 o f 2 ) . o = 3 T J 0 / ( 16^of5) . ( 2 . 3 3 ) S u b s t i t u t i n g n | i n t o ( 2 . 2 8 ) and ( 2 . 3 0 ) , t h e e s t i m a t e f o r t h e z e r o c r o s s i n g s t a n d a r d d e v i a t i o n becomes 1 az = — A / 3r?< 1 / 2 ( 2 . 3 4 ) The m a g n i t u d e o f t h e s l o p e a t t h e z e r o c r o s s i n g , A, was d e t e r m i n e d e a r l i e r f o r t h e p e r i o d i c edge m o d e l s . S u b s t i t u t i n g ( 2 . 1 8 ) and ( 2 . 2 3 ) y i e l d s oz f o r 35 The s t a i r c a s e m o d e l : /•V ffZST / 3j? 0a f } 1 / 2 16TT 9' 2 - I n 2 e x p [ - 2 7 r 2 n 2 ( 1 + a 2 )/B2 ] 03 n s i ( 2 . 3 5 ) The s q u a r e wave m o d e l : - Z n 2 ( 1 - c o s n 7 r ) e x p [ - 7 r 2 n 2 ( 1 + a 2 ) / 2 ^ 2 ] # ( 2 . 3 6 ) As was o b s e r v e d e a r l i e r , t h e s e m o d e l s c o n v e r g e on i d e a l s t e p edge p e r f o r m a n c e f o r a « 1, 0 > 5. To s i m p l i f y f u r t h e r a n a l y s i s assume t h e s e c o n d i t i o n s t o be t r u e . I n t h i s c a s e t h e t e r m s i n t h e p a r e n t h e s i s o f ( 2 . 3 5 ) a n d ( 2 . 3 6 ) a r e a l l e q u a l t o { ... } = 4.0421 X 1 0 - 2 . T h e r e f o r e f o r t h e c a s e o f f u l l y r e s o l v e d e d g e s , / „ 1 / 2 az = 24.74 ( 2 . 3 7 ) 16TT 9' 2 . C l e a r l y t h i s e s t i m a t e p r e d i c t s t h a t t h e s t a n d a r d d e v i a t i o n o f t h e z e r o c r o s s i n g i n t h e p r e s e n c e o f n o i s e v a r i e s a s t h e r o o t o f t h e f i l t e r s t a n d a r d d e v i a t i o n . T h e r e f o r e i n o r d e r t o a c h i e v e a more a c c u r a t e m e a s u r e o f t h e edge p o s i t i o n t h e n a r r o w e s t f i l t e r a v a i l a b l e s h o u l d be u s e d . T h i s seems i n t u i t i v e l y c o r r e c t s i n c e t h e s m a l l e r of , t h e more s p a t i a l l y l o c a l t h e f i l t e r i n f l u e n c e . However a w i d e r f i l t e r w o u l d be more e f f e c t i v e i n s m o o t h i n g t h e n o i s e a n d w o u l d t h e r e f o r e be t o l e r a b l e o f l o w e r s i g n a l t o n o i s e 36 r a t i o s . To t e s t t h i s h y p o t h e s i s and e s t a b l i s h t h e l o w e s t bound on t h e s i g n a l t o n o i s e r a t i o g i v e n of , a l i m i t must be p l a c e d on oz . As i l l u s t r a t e d e a r l i e r t h e l i n e a r m o d e l u s e d i n t h e d e r i v a t i o n o f az b r e a k s down f o r oz > A. F o r t h e f u l l y r e s o l v e d e d g e s u s e d t o f i n d ( 2 . 3 7 ) , A = at . T h e r e f o r e t h e d i s t r i b u t i o n o f z e r o c r o s s i n g s must l a r g e l y be c o n t a i n e d w i t h i n a f i l t e r s t a n d a r d d e v i a t i o n w h i c h , t o 9 5 . 4 % p r o b a b i l i t y , i m p l i e s £ / 37,0 V ' 2 — = 24.74 < 0.5 ( 2 . 3 8 ) °f \ l 6 i r 9 ' 2 o f l S i n c e i d e a l s q u a r e waves c a n be r e s o l v e d w i t h an edge s p a c i n g a s l i t t l e a s 1.15a f t h e a b o v e c r i t e r i a c o u l d be made e v e n more r e s t r i c t i v e t o g u a r a n t e e m e a n i n g f u l edge p o s i t i o n s . H o wever, s u c h a d j u s t m e n t s c a n be r e a d i l y made t o ( 2 . 3 8 ) a s n e e d e d . af a n d rj0 a r e t h e r e f o r e b ounded by Of /no > 2448 [ 3 / ( 1 6TT 9^ 2 ) ] = 2.66 . ( 2 . 3 9 ) T h i s r e s u l t c a n be u s e d t o e s t a b l i s h t h e minimum s i g n a l t o n o i s e r a t i o i n t h e f i l t e r e d r e s o l u t i o n i n t e r v a l , a n d i n i t i a l image f o r t h e az e s t i m a t e t o be v a l i d . As was shown by L u n s c h e r [ 3 3 ] , r e f i n e d f r o m Shanmugam e t a l . [ 3 2 ] , t h e s i g n a l t o n o i s e r a t i o w i t h i n t h e r e s o l u t i o n i n t e r v a l o f an i d e a l s t e p edge a f t e r f i l t e r i n g w i t h t h e a s y m p t o t i c o p t i m a l f i l t e r i s 37 7^ / w 2 e x p ( - c c j 2 / Q 2 ) d o > SNR 0 = ° — ( 2 . 4 0 ) C TJO t w a e x p ( - c w 2 / f i 2 ) d w . o S i n c e t h e V 2 g f i l t e r i s n o t s h a r p l y b a n d l i m i t e d t o Q, a s t h e f i l t e r u s e d t o d e r i v e ( 2 . 4 0 ) , t h e i n t e g r a t i o n l i m i t s may e x t e n d t o i n f i n i t y . By f i x i n g Q t o t h e 3 db h i g h c u t o f f f r e q u e n c y , i t was shown e a r l i e r t h a t 7=0.91. T h e r e f o r e , s u b s t i t u t i n g f o r 7 , an d ( 2 . 8 ) a n d ( 2 . 1 0 a ) f o r 0 a n d c , ( 2 . 4 0 ) becomes 1.4 J a > 2 e x p ( - a 2 a j 2 )da> SNR 0 = -no 7 j 0 f c j " e x p ( - a 2 c o 2 )dcj O = 2.8a f / ( 3 7 r r j 0 ) . ( 2 . 4 1 ) r e p r e s e n t i n g t h e s i g n a l t o n o i s e r a t i o w i t h i n 2ot o f t h e V 2 g f i l t e r e d z e r o c r o s s i n g . S u b s t i t u t i n g i n e q u a l i t y ( 2 . 3 9 ) i n t o t h i s r e s u l t , SNR 0 > 2 . 8 ( 2 . 6 6 ) / ( 3 i r ) = 0.79 ( 2 . 4 2 ) p r o v i d e s t h e minimum s i g n a l t o n o i s e r a t i o a b o u t t h e z e r o c r o s s i n g f o r az t o be m e a n i n g f u l . C l e a r l y t h i s i s a v e r y l o w SNR f i g u r e by most image p r o c e s s i n g s t a n d a r d s . F u r t h e r m o r e , s i n c e ( 2 . 4 1 ) shows SNR 0 i n c r e a s i n g d i r e c t l y w i t h of , l i m i t ( 2 . 4 2 ) s i m p l y bounds t h e n a r r o w e s t u s a b l e f i l t e r . Of g r e a t e r i n t e r e s t t h a n t h e s i g n a l t o n o i s e r a t i o o f ( 2 . 4 1 ) i s t h a t o f t h e u n f i l t e r e d image, SNRj . The i d e a l s t e p and s q u a r e wave image m o d e l s y i e l d i d e n t i c a l s i g n a l power o f 38 Sj = l i m [ ( 1 / 2 T ) / u ( t ) 2 d t ] = 0.5 . ( 2 . 4 3 ) S i n c e t h e n o i s e s p e c t r u m was assumed t o be w h i t e , t h e i n p u t n o i s e power i s i d e a l l y i n f i n i t e . H o w e v e r , s i n c e image p r o c e s s i n g i s g e n e r a l l y done on a s a m p l e d image t h e i n i t i a l image must be l o w p a s s f i l t e r e d w i t h a maximum b a n d w i d t h o f h a l f t h e s a m p l i n g r a t e t o a v o i d a l i a s i n g e f f e c t s . The n o i s e power p a s s e d i s c l e a r l y f i n i t e w i t h a maximum v a l u e o f N 0 = 2 ( T J 0 / 2 ) (2T)" 1 ( 2 . 4 4 ) w here T i s t h e s a m p l i n g p e r i o d . N o r m a l i z e T t o t h e f i l t e r s t a n d a r d d e v i a t i o n w i t h T = bof . (2.45) S u b s t i t u t i n g ( 2 . 4 5 ) i n t o ( 2 . 4 4 ) p r o d u c e s t h e n o r m a l i z e d n o i s e p o w e r , N 0 = T?0/(25<7,: ) . ( 2 . 4 6 ) T o g e t h e r w i t h S t h i s shows t h e i n p u t s i g n a l t o n o i s e r a t i o t o be SNR j = Si / N 0 = 5a, / r ? 0 . (2.47) S u b s t i t u t i n g ( 2 . 3 9 ) i t i s f o u n d t h a t t h e r a n g e f o r w h i c h oz < af/2 i s SNR j > 2.665 . (2.48) As t h e f i l t e r w i d t h i n c r e a s e s , 5 d e c r e a s e s l o w e r i n g t h e r e q u i r e d s i g n a l t o n o i s e r a t i o . To e s t a b l i s h t h e maximum l o w e r bound on SNRi n o t e t h a t t h e h i g h e s t f r e q u e n c y edge f e a t u r e p o s s i b l e i n t h e s a m p l e d image w o u l d be a s q u a r e wave o r p u l s e t r a i n o f p e r i o d 2T 39 w i t h e f f e c t i v e edge s p a c i n g o f T. S i n c e s u c h a f e a t u r e i s h i g h l y a l i a s e d , a nd t h e r e f o r e p o o r l y r e p r e s e n t e d by t h e a c t o f s a m p l i n g , t h e f i l t e r s e n s i t i v i t y e x p e c t e d w o u l d c o r r e s p o n d t o t h a t o f a somewhat b l u r r e d s q u a r e wave. The i n i t i a l d e t e c t i o n s p a c i n g f o r s u c h a f e a t u r e i s a b o u t 1.25a f . T h e r e f o r e , w i t h t h i s of , t h e maximum 6 i s 1.25. S u b s t i t u t i n g i n t o ( 2 . 4 8 ) : S N R i ( 6 = 1 . 2 5 ) > 3.325 . ( 2 . 4 9 ) T h i s e s t a b l i s h e s t h e most p e s s i m i s t i c l o w e r b ound on t h e i n p u t s i g n a l t o n o i s e r a t i o . T h i s f i g u r e i s h i g h e r t h a n t h a t r e q u i r e d w i t h i n t h e f i l t e r e d i m a g e , ( 2 . 4 1 ) , b u t i s s t i l l r e m a r k a b l y low a n d s e e n t o d e c r e a s e w i t h o u t l i m i t a s af i s i n c r e a s e d . Of c o u r s e i n c r e a s i n g af d e c r e a s e s t h e l e v e l o f d e t a i l t h a t c a n be r e s o l v e d , a n d , by i n c r e a s i n g az , d e c r e a s e s t h e a c c u r a c y o f t h e edge p o s i t i o n . When SNR| s a t i s f i e s ( 2 . 4 8 ) i t c a n be u s e d d i r e c t l y t o e s t i m a t e oz . S u b s t i t u t i n g ( 2 . 4 7 ) i n t o ( 2 . 3 7 ) g i v e s 36o* \ , / 2 2 4 ' 7 4 ( — ( 2 . 5 0 ) 1 6 f f 9 ' 2 S N R , / , On a d o p t i n g t h e p i x e l s p a c i n g , T, a s t h e u n i t o f m e a s u r e , ba( = 1 . T h e r e f o r e , / 3 ^ V ' 2 \ l 6 7 r 9 / 2 S N R i / . The edge p o s i t i o n a c c u r a c y i s t h e r e f o r e i m p r o v e d by i n c r e a s i n g s i g n a l t o n o i s e r a t i o , a s e x p e c t e d . 40 The f o r e g o i n g a n a l y s i s h a s a d d r e s s e d t h e q u e s t i o n s o f t h e z e r o c r o s s i n g a c c u r a c y a n d s i g n a l t o n o i s e r a t i o w i t h i n t h e r e s o l u t i o n i n t e r v a l . The q u e s t i o n r e m a i n s a s t o t h e image q u a l i t y o u t s i d e t h e r e s o l u t i o n i n t e r v a l . S i n c e t h i s r e g i o n c a n be q u i t e l a r g e i n t h e c a s e o f l a r g e f e a t u r e s a n d a n a r r o w f i l t e r , t h e q u a l i t y c a n b e s t be a d d r e s s e d t h r o u g h t h e s i g n a l t o n o i s e r a t i o t h e r e , SNRQ . F o r t h e c a s e o f t h e i d e a l s t e p edge model e x t e n d i n g t o i n f i n i t y t h e s i g n a l e n e r g y o u t s i d e t h e r e s o l u t i o n i n t e r v a l i s ( 1 - 7 ) . The s i g n a l power i s t h e r e f o r e z e r o . To r e n d e r t h e p r o b l e m more r e a l i s t i c p l a c e t h i s e d ge c e n t r a l l y w i t h i n a l a r g e image o f f i n i t e d i a m e t e r D much l a r g e r t h a n I = 2a, . I n t h i s c a s e S N R Q i s s i m p l y f o u n d by r e p l a c i n g 7 w i t h ( 1 - 7 ) i n ( 2 . 4 0 ) , and m u l t i p l y i n g by I / ( D - I ) . A l l o w i n g t h e i n t e g r a t i o n l i m i t s t o go t o i n f i n i t y a s b e f o r e a n d s u b s t i t u t i n g f o r c a n d 0 g i v e s : 4(1-7)o> 2 4 ( 1 - 7 ) o , 2 SNRQ = - ( 2 . 5 2 ) 3 ( D - I ) T ? 0 3D 7? 0 . C l e a r l y SNRQ i s l e s s t h a n S N R 0 . A l s o , a s t h i s r e g i o n becomes more removed f r o m t h e z e r o c r o s s i n g by i n c r e a s i n g I , 7 r a p i d l y a p p r o a c h e s u n i t y b e c a u s e c i n c r e a s e s . T h e r e f o r e t h e s i g n a l t o n o i s e r a t i o a p p r o a c h e s z e r o f o r r e g i o n s f a r r emoved f r o m t h e z e r o c r o s s i n g . I n t u i t i v e l y t h i s c o n c l u s i o n c a n be g e n e r a l i z e d t o t h e p r e v i o u s edge m o d e l s when f u l l y r e s o l v e d . W i t h o u t r e p e a t i n g t h e d e t a i l s h e r e , i t was f o u n d t h a t SNRi d e c r e a s e s i n v e r s e l y w i t h /J f o r s t a i r c a s e and s q u a r e wave e d g e s . The p r e s e n c e o f b l u r s e r v e s 41 t o d e c r e a s e SNRQ , a nd S N R 0 , f u r t h e r by 1/a f o r a > 0 . 5 1 . The e x p e c t e d r e s u l t , t h e n , on f i l t e r i n g a n o i s y , p e r i o d i c image w i t h a l a r g e 0 f i l t e r i s an e s s e n t i a l l y n o i s e f r e e a r e a a b o u t 2of to e i t h e r s i d e o f t h e t r u e edge p o s i t i o n s s u r r o u n d e d by w i d e a r e a s f i l l e d w i t h random n o i s e e d g e s . S i n c e any edge s t r u c t u r e s c l o s e r t h a n 1.15o f c a n n o t be r e s o l v e d , t h e s e n o i s e e d g e s w i l l h ave d i m e n s i o n s c o m m e n s u r a t e w i t h t h o s e o f t h e minimum r e s o l v a b l e image d e t a i l . T h i s n o i s e a n a l y s i s h a s s e r v e d t o p o i n t o u t a g a i n t h e c o n f l i c t i n g n a t u r e o f t h e demands p l a c e d on t h e p e r f o r m a n c e o f an edge d e t e c t o r . I d e a l l y t h e edge d e t e c t o r s h o u l d r e j e c t a l l n o i s e d e t a i l , e n h a n c i n g o n l y t h e e d g e s o f known image o b j e c t s . From t h e f o r e g o i n g , t h i s r e q u i r e s f o r c i n g t h e r e s o l u t i o n i n t e r v a l s a b o u t t h e s e e d g e s t o o v e r l a p t h r o u g h s e l e c t i o n o f t h e w i d e s t f i l t e r p o s s i b l e . The edge m o d e l s a n a l y z e d w i l l s e r v e a s t h e g u i d e f o r t h i s s e l e c t i o n . H o wever, t h e edge d e t e c t o r s h o u l d a l s o p i n p o i n t t h e edge p o s i t i o n s w i t h maximum a c c u r a c y . As was s e e n , t h i s i s b e s t a c h i e v e d w i t h t h e n a r r o w e s t f i l t e r p o s s i b l e , h e n c e t h e c o n f l i c t . One way t o r e s o l v e t h i s c o n f l i c t i s t o f i l t e r t h e image w i t h a n a r r o w f i l t e r a n d t h e n t h r e s h o l d t h e r e s u l t a n t e d g e s a t some s u i t a b l e l e v e l . The p r e m i s e b e h i n d t h i s p r o c e d u r e i s t h a t t h e e d g e s g e n e r a t e d by n o i s e w o u l d g e n e r a l l y h a v e a l o w e r g r a d i e n t m a g n i t u d e t h a n t h o s e g e n e r a t e d by image o b j e c t s . However, b e c a u s e o f t h e s t a t i s t i c a l n a t u r e o f t h e n o i s e t h e r e must be i n c i d e n c e s where t h e n o i s e e d g e s w i l l e x c e e d t h e t h r e s h o l d , and l i k e w i s e i n c i d e n c e s where weak o r c o r r u p t e d o b j e c t e d g e s f a l l b e l o w . T h e r e f o r e , t h o u g h t h e r e a r e a v a r i e t y o f t h r e s h o l d 42 s e l e c t i o n t e c h n i q u e s t h a t c a n be a p p l i e d [ 4 0 ] , t h e i r p e r f o r m a n c e c a n o n l y be s t a t i s t i c a l a t b e s t , r e s u l t i n g i n an image o f b r o k e n edge s e g m e n t s . T h i s i s u n f o r t u n a t e s i n c e t h e V 2 g f i l t e r i s g u a r a n t e e d t o p r o d u c e c l o s e d l o o p e d g e s f o r f u l l y c o n t a i n e d o b j e c t s . To r e s t o r e t h e image t o t h i s c o n d i t i o n a p o s t - p r o c e s s i n g a l g o r i t h m must be a p p l i e d t o s c r e e n o u t t h e s m a l l e s t edge s e g m e n t s a n d r e p a i r t h e l a r g e r o n e s . A n o t h e r a p p r o a c h , f o u n d e d on t h e same p r e m i s e a s t h r e s h o l d i n g , i s t o a p p l y r e l a x a t i o n t e c h n i q u e s t o t h e f i l t e r e d i m a g e . A g a i n t h e r e a r e a v a r i e t y o f r e l a x a t i o n t e c h n i q u e s a v a i l a b l e [ 4 1 ] , and t h e y c a n be a d a p t e d t o i n s u r e c l o s e d e d g e s . The b a s i c c o n c e p t h e r e i s t o e x a m i n e t h e m a g n i t u d e s o f t h e edge s e g m e n t s on a p i x e l by p i x e l b a s i s a n d a s s i g n a c o n f i d e n c e v a l u e t o e a c h s e g m e n t . I n s u c c e s s i v e i t e r a t i v e p a s s e s o v e r t h e i m a g e , e d g e s o f l o w c o n f i d e n c e a r e p r o g r e s s i v e l y e l i m i n a t e d w h i l e t h o s e o f h i g h c o n f i d e n c e a r e f o r m e d i n t o c l o s e d s t r u c t u r e s . T hough r e l a x a t i o n w o u l d f i l t e r o u t n o i s e w h i l e r e t a i n i n g c l o s e d o b j e c t e d g e s , i t d o e s s o a t t h e e x p e n s e o f r e q u i r i n g a n o t h e r i m a g e - s i z e a r r a y t o s t o r e t h e c o n f i d e n c e m e a s u r e s . P r o c e s s i n g t i m e may a l s o i n c r e a s e c o n s i d e r a b l y s i n c e a s m a l l a l g o r i t h m must be e x e c u t e d a t e a c h p i x e l i n t h e image o v e r t h e c o u r s e o f a number o f i t e r a t i o n s . The p e r f o r m a n c e i s a l s o i n f l u e n c e d by t h e q u a l i t a t i v e s e l e c t i o n of c e r t a i n p a r a m e t e r s s u c h a s t h e m a g n i t u d e o f t h e c o n f i d e n c e l e v e l i n c r e m e n t [ 4 2 ] . B o t h t h e a b o v e t e c h n i q u e s a r e s u b j e c t t o a n o t h e r f a i l i n g . I f t h e o b s e r v a t i o n of g r o s s image d e t a i l i s d e s i r e d and a n a r r o w f i l t e r c h o s e n f o r t h e p u r p o s e o f p r e c i s e l y l o c a t i n g t h a t d e t a i l , t h e n f i n e o b j e c t d e t a i l w i l l a l s o a p p e a r . F u r t h e r m o r e , a s s e e n 43 i n t h e s q u a r e wave r e s p o n s e p l o t , t h i s f i n e d e t a i l c a n p r o d u c e a s u b s t a n t i a l l y l a r g e r r e s p o n s e t h a n t h e g r o s s d e t a i l when i t s d i m e n s i o n s c o i n c i d e w i t h t h e peak a f t e r t u r n - o n . The n e t r e s u l t i s t h a t t h e s e e d g e s w o u l d c e r t a i n l y be g i v e n h i g h c o n f i d e n c e d u r i n g p o s t - p r o c e s s i n g , t h e r e b y o b s c u r i n g t h e g r o s s d e t a i l . The a p p r o a c h t o s o l v i n g t h i s c o n f l i c t , w h i l e a v o i d i n g t h e p r e v i o u s d i f f i c u l t i e s , i s m u l t i b a n d f i l t e r i n g . 2.5 M u l t i b a n d F i l t e r i n g The i d e a o f m u l t i b a n d f i l t e r i n g i s s i m p l e . I n i t i a l l y f i l t e r t h e image w i t h t h e w i d e s t f i l t e r a p p r o p r i a t e t o t h e l e v e l o f d e t a i l d e s i r e d a n d n o t e t h e edge p o s i t i o n s . Then f i l t e r t h e image w i t h p r o g r e s s i v e l y n a r r o w e r f i l t e r s r e t a i n i n g o n l y t h o s e e d g e s i n c l o s e p r o x i m i t y t o t h e i n i t i a l e d g e s . T h i s p r o c e s s i s t e r m i n a t e d when t h e d e s i r e d l e v e l o f edge p r e c i s i o n i s a t t a i n e d . T h i s method o f r e f i n i n g edge p o s i t i o n s h i e r a r c h i c a l l y t h r o u g h s t a g e s o f d i f f e r i n g r e s o l u t i o n c h a r a c t e r i z e s a c l a s s o f t e c h n i q u e s known a s p r o c e s s i n g c o n e s [ 4 3 ] . O f t e n t h i s a p p r o a c h i n v o l v e s t h r e e s t a g e s o f p r o c e s s i n g a t e a c h l e v e l o f r e s o l u t i o n . A t y p i c a l e x a m p l e i s g i v e n by t h e p i o n e e r i n g work o f K e l l y [ 4 4 ] w here t h e i m a g es o f l o w r e s o l u t i o n a r e p r o d u c e d by l o c a l a v e r a g i n g o f t h e o r i g i n a l i mage. A s i m p l e edge d e t e c t o r was t h e n a p p l i e d f o l l o w e d by a r e l a x a t i o n p r o c e d u r e t o remove e x t r a n e o u s d e t a i l . I n c o n t r a s t , t h e V 2 g f i l t e r p e r f o r m s t h i s o p e r a t i o n i n e s s e n t i a l l y one s t e p . Use o f a w i d e f i l t e r m a t c h e d t o t h e g r o s s image d e t a i l s mooths o u t f i n e image f e a t u r e s . 44 F u r t h e r m o r e , s i n c e i t c o n t a i n s no p e a k s i n t h e f r e q u e n c y r e s p o n s e a b o v e Q, i t p e r f o r m s t h i s o p e r a t i o n b e t t e r t h a n l o c a l a v e r a g i n g w h i c h d o e s p o s s e s s s u c h p e a k s . The a c t o f edge d e t e c t i o n i s l i m i t e d t o a s e a r c h f o r z e r o c r o s s i n g s , and s i n c e t h e s e c r o s s i n g s a r e g u a r a n t e e d t o be c l o s e d no r e l a x a t i o n s t a g e i s n e c e s s a r y . The r e m a i n i n g s t r u c t u r e o f t h e p r o c e s s i n g c o n e d e p e n d s on t h e o b j e c t i v e o f t h e i m a g i n g s y s t e m . I f t h e o b j e c t i v e i s p r e c i s e measurement o f t h e d i m e n s i o n s o f g r o s s image d e t a i l t h e n t h e f o l l o w i n g method w o u l d be a p p l i e d . B e g i n w i t h an e s t i m a t e o f t h e s i z e o f t h e image o b j e c t o f i n t e r e s t a n d t h e d e g r e e o f b l u r p r e s e n t . D e p e n d i n g on w h i c h o f t h e edge m o d e l s s u i t s t h i s image b e s t , f i g u r e s 2.1 and 2.2 w i l l s u p p l y t h e minimum 0 f o r of , t o j u s t r e s o l v e t h e i m a g e . I f p o s s i b l e , a l s o e s t i m a t e t h e s i g n a l t o n o i s e r a t i o w h i c h , w i t h e q u a t i o n ( 2 . 5 1 ) , p r o v i d e s <T2 . A f t e r f i l t e r i n g , t h e z e r o c r o s s i n g p o s i t i o n s a r e n o t e d . The n e x t l e v e l o f d e t a i l i s d e t e r m i n e d by a f i l t e r o f w i d t h a( 2 = o z T h e s e a r c h f o r t h e new edge p o s i t i o n i s p e r f o r m e d w i t h i n one af2 r e s o l u t i o n i n t e r v a l a b o u t t h e o l d a f 1 e d g e s . T h i s i n t e r v a l i s 4 a f 2 w i d e . S i n c e t h e z e r o c r o s s i n g l o c a t i o n s were assumed G a u s s i a n d i s t r i b u t e d , w i t h 95.4% c o n f i d e n c e , s u b s e q u e n t e d g e s w i l l be l o c a t e d w i t h i n 2<TZ1 o f t h e c r o s s i n g . T h e r e f o r e t h e w i d t h o f t h e s e a r c h i n t e r v a l s h o u l d be 4 a 2 1 = 4 a f 2 . A f t e r l o c a t i n g t h e e d ges i n t h i s i n t e r v a l t h i s p r o c e s s i s r e p e a t e d u n t i l t h e d e s i r e d l e v e l o f p r e c i s i o n i s a t t a i n e d o r u n t i l a22 > 0(2 i n w h i c h c a s e t h e e x t r a p r e c i s i o n i s l o s t i n n o i s e . 45 On t h e o t h e r h a n d , i f t h e o b j e c t i v e o f t h e i m a g i n g s y s t e m i s t o e x a m i n e and c l a s s i f y a l l l e v e l s o f image d e t a i l , o r i f az i s t o o d i f f i c u l t t o e s t i m a t e , t h e n a s e t o f f i l t e r s must be a p p l i e d w h i c h t o g e t h e r s p a n a l l p r a c t i c a l s p a t i a l f r e q u e n c i e s . S i n c e t h e V 2 g f i l t e r i s b a n d p a s s w i t h a b a n d w i d t h o f 1.2 o c t a v e s , minimum o v e r l a p i s a c h i e v e d i f s u c c e s s i v e bands a r e s e p a r a t e d by 1.2 o c t a v e s . However t o make some a l l o w a n c e f o r e r r o r a n d e a s e o f i m p l e m e n t a t i o n a one o c t a v e s p a c i n g i s p r e f e r r e d . T h e r e f o r e , a f t e r c h o o s i n g a s u i t a b l y l a r g e o f 1 , s u c c e s s i v e f i l t e r w i d t h s a r e s i m p l y h a l v e d u n t i l t h e maximum p r e c i s i o n i s a t t a i n e d . A m e thod s i m i l a r t o t h i s was u s e d by G r i m s o n [ 3 5 ] t o c o n t r o l v e r g e n c e f o r t h e d e t e r m i n a t i o n o f d e p t h f r o m t h e b i n o c u l a r d i s p a r i t y i n f o r m a t i o n i n s t e r e o g r a m s . One a d d i t i o n a l , i m p o r t a n t a p p l i c a t i o n o f m u l t i b a n d f i l t e r i n g i s t h e e l i m i n a t i o n o f t h e p s e u d o - e d g e s i n s t a i r c a s e t y p e i m a g e s . You w i l l r e c a l l t h a t when c o n s i d e r i n g t h e s t a i r c a s e edge m o d e l i t was p o i n t e d o u t t h a t a n o t h e r z e r o c r o s s i n g was l o c a t e d e x a c t l y h a l f way b e t w e e n t h e t r u e edge p o s i t i o n s . U n l i k e t h e t r u e - e d g e z e r o c r o s s i n g , h o w e v e r , t h e m a g n i t u d e o f t h i s p s e u d o - e d g e d e c r e a s e s w i t h i n c r e a s e d edge s p a c i n g . The p r e s e n c e o f t h i s p s e u d o - e d g e c a n c o n f u s e an i m a g i n g s y s t e m u s i n g t h e V 2 g f i l t e r . To e l i m i n a t e i t , i t i s n o t e d t h a t i n any p r a c t i c a l s y s t e m t h e V 2 g f i l t e r a t t a i n s a f i n i t e s i z e b e f o r e f a l l i n g b e l o w t h e minimum q u a n t i z a t i o n l e v e l , and t h a t t h i s s i z e d e c r e a s e s w i t h of . C o n s e q u e n t l y a p s e u d o - e d g e t h a t i s w e l l e s t a b l i s h e d f o r one f i l t e r s i z e w i l l e v e n t u a l l y b i f u r c a t e i n t o two p a r a l l e l e d g e s f o r p r o g r e s s i v e l y n a r r o w e r 46 f i l t e r s . F u r t h e r p r o g r e s s i o n w i l l c a u s e t h e s e two e d g e s t o d i v e r g e f r o m t h e o r i g i n a l l ow r e s o l u t i o n p s e u d o - e d g e p o s i t i o n , a b e h a v i o r e x a c t l y o p p o s i t e t o t h a t o f t r u e e d g e s . I n c l u s i o n of p r o v i s i o n s f o r t h e d e t e c t i o n o f t h i s d i v e r g e n c e , w o u l d a l l o w a m u l t i b a n d s y s t e m t o i g n o r e t h e s e f a l s e e d g e s . 2.6 S a m p l i n g t h e V 2 g F i l t e r To t h i s p o i n t i n o u r d i s c u s s i o n t h e V 2 g image f i l t e r h a s been r e p r e s e n t e d i n i t s c o n t i n u o u s f o r m . T h i s h a s p r o v e d u s e f u l b e c a u s e i t p e r m i t t e d a n a l y t i c d e r i v a t i o n o f i t s p e r f o r m a n c e u n d e r v a r i o u s c i r c u m s t a n c e s . H owever, w i t h t h e e x c e p t i o n o f o p t i c a l s i g n a l p r o c e s s i n g , image p r o c e s s i n g i n v o l v e s s a m p l e d d a t a s i g n a l s . S u c h d i s c r e t e s i g n a l p r o c e s s i n g r e q u i r e s t h a t t h e f i l t e r be s a m p l e d a n d q u a n t i z e d . I n t h i s s e c t i o n t h e a c t o f s a m p l i n g w i l l be c o n s i d e r e d , a n d i n t h e n e x t , q u a n t i z a t i o n . The o b j e c t i v e w i l l be t o d e t e r m i n e a minimum s a m p l i n g r a t e b e f o r e a l i a s i n g e f f e c t s become e x c e s s i v e i n a d i s c r e t e c o n v o l u t i o n i m p l e m e n t a t i o n . R e c a l l t h a t t h e V 2 g two d i m e n s i o n a l p o i n t s p r e a d f u n c t i o n i s : V 2 g ( x , y ) = - [ 1 - ( x 2 + y 2 ) / 2 a , 2 ] e x p [ - ( x 2 + y 2 ) / 2 a , 2 ] / ( 7 r a , a ) ( 2 . 5 3 ) w i t h f r e q u e n c y r e s p o n s e : G " ( u , v ) = - 4 r r 2 ( u 2 + v 2 ) e x p [ - 2 7 r 2 ( u 2 + v 2 ) a f 2 ] . To i d e a l l y s a m p l e V 2 g m u l t i p l y ( 2 . 5 3 ) by 6 T ( x , y ) = I If 5 (x-mT, y-nT) , ( 2 . 5 4 ) 47 w h i c h , on s u b s t i t u t i n g T = 5of , y i e l d s V 2 g ( m , n ) = - [ 1 - ( m 2 + n 2 ) 6 2 / 2 ] e x p [ - ( m 2 + n 2 ) 6 2 / 2 ] / ( w o * ) ( 2 . 5 5 ) w i t h f r e q u e n c y r e s p o n s e , G " ( u , v ) T = G " ( u , v ) * [ 8 T ( u ) 5 T ( v ) ] / T 2 ( 2 . 5 6 ) where ^ (m, f o r x=u 6 T ( x ) = Z J ( x - k / T ) , k =[ ' n, f o r x=v. B e c a u s e G " ( u , v ) i s n o t b a n d l i m i t e d , t h e f r e q u e n c y c o n v o l u t i o n c a u s e s a c e r t a i n d e g r e e o f a l i a s i n g b e t w e e n t h e h a r m o n i c s o f G " ( u , v ) T . The a l i a s i n g w i t h t h e b a s e b a n d ( | u|, |v| < ( 2 T ) " 1 ) i s most s e v e r e a l o n g t h e u, v a x i s where t h e h a r m o n i c s a r e most c l o s e l y s p a c e d . F o r t h e t i m e b e i n g l e t ' s assume t h a t t h e c o n t r i b u t i o n f r o m o f f - a x i s h a r m o n i c s i s n e g l i g i b l e , a n d t h a t t h e w o r s t c a s e s a m p l e d r e s p o n s e c a n be a d e q u a t e l y r e p r e s e n t e d a l o n g a s i n g l e a x i s . L a b e l t h i s t h e f a x i s , f o r c o n s i s t e n c y w i t h p r e v i o u s s e c t i o n s , a n d s e t t h e o t h e r s p a t i a l f r e q u e n c y component t o z e r o . The s i m p l i f i e d s a m p l e d r e s p o n s e t h e n becomes - 4 r r 2 f 2 G " ( f ) T = e x p ( - 2 7 r 2 f 2of) * L 6 ( f - n / T ) . ( 2 . 5 7 ) To i n v e s t i g a t e t h e d e g r e e o f a l i a s i n g , l e t us e x a m i n e t h e s p e c t r a l e n e r g y d e n s i t y o f t h e b a s e b a n d h a r m o n i c : £'(f) = - 1 6 7 r a f " e x p ( - 4 7 r 2 f 2 o2 )/T« . (2. 5 8 ) M o st o f t h e a l i a s i n g e f f e c t s come a s a r e s u l t o f o v e r l a p w i t h t h e 48 f i r s t h a r m o n i c c e n t e r e d a t f = 1/T. To e s t i m a t e t h e d e g r e e o f t h i s o v e r l a p , t h e amount o f a l i a s e d f i l t e r e n e r g y w i l l be f o u n d by i n t e g r a t i n g £'(f) f r o m f = ( 2 T ) " 1 t o i n f i n i t y , i e . , £ a = X t ( f ) d f = / ( f ) d f - J £' ( f ) d f . ( 2 . 5 9 ) (2T)"1 O O A p e r h a p s more u s e f u l m e a s u r e i s t h e f r a c t i o n o f a l i a s e d e n e r g y w i t h r e s p e c t t o t h e b a s e b a n d e n e r g y , <2Tf1 oo iaf= 1 ~ X £ ' ( £ ) d f / X £ ' < f ) d f o o <2T)-1 J f " e x p ( - 4 T r 2 f 2o2 ) d f o = 1 - ( 2 . 6 0 ) r f " e x p ( - 4 7 r 2 f 2o2 ) d f . o N o r m a l i z e ( 2 . 6 0 ) w i t h f = (5a, ) " ' s o t h a t T = 5 so f : ( 2 5 S ) " 1 / 5 - a e x p ( - 4 7 r 2 / 6 2 ) d S - 1 / 5 - u e x p ( - 4 7 r 2 / 6 2 ) d 5 - 1 o 256 <2*s>"1 = 1 - _ _ „ 9 , 2 j 6-'«exp(-47r 2/a 2)d5- 1 . ( 2 . 6 1 ) The r e m a i n i n g i n t e g r a l was e v a l u a t e d n u m e r i c a l l y a n d t h e r e s u l t a n t Saf was p l o t t e d i n F i g u r e 2.4 t o g e t h e r w i t h £' ( f ) a l s o n o r m a l i z e d w i t h f = ( 6 a f ) _ 1 a n d u n i t p e a k , F i g u r e 2.5. N o t e i n F i g u r e 2.5 t h e key p o i n t s o f t h e f r e q u e n c y r e s p o n s e : peak a t f = /2 / ( 2 7 r a f ), a n d h a l f power p o i n t s a t f = 0.139/a, and 0. 325/CT, . The l a t t e r l e a d s t o t h e p r e v i o u s c h o i c e o f fl. F i g u r e 2.4, t h e n , i l l u s t r a t e s how t h e e n e r g y o f f i g u r e 49 us F i g u r e 2.4 P r o p o r t i o n o f a l i a s e d f i l t e r e n e r g y p l o t t e d a g a i n s t t h e n o r m a l i z e d h a l f - s a m p l i n g f r e q u e n c y us F i g u r e 2.5 V 2 g n o r m a l i z e d s p e c t r a l e n e r g y d e n s i t y 50 2.5 i s d i s t r i b u t e d . N o t e t h a t f o r 8 S = 1 l e a d i n g t o T = a f o n l y 0.14% o f t h e f i l t e r e n e r g y i s c o n t a i n e d i n f r e q u e n c i e s a b o v e f s / 2 = 0.5/a f . A l i a s i n g c a n be c o n s i d e r e d t o become e x t r e m e when 10% o f t h e f i l t e r e n e r g y i s a b o v e f s / 2 . T h i s i s s e e n t o o c c u r a t 8=2.92, l e a d i n g t o a s a m p l e s p a c i n g o f 1 . 4 6 c f . As shown e a r l i e r , t h e maximum f i l t e r r e s o l u t i o n d e s i r a b l e w o u l d be one p i x e l w i d e f o r s q u a r e wave o r p u l s e e d g e s . A t s u c h a s a m p l e s p a c i n g , t h e s e edge s p e c t r a w o u l d be so a l i a s e d a s t o c o n s i s t o f o n l y i m p u l s e s a t f = ( 2 T ) " 1 . I f t h e f i l t e r i s s a m p l e d t o j u s t r e s o l v e s u c h a f e a t u r e , t h e n T ^ 1 . 2 5 a f . 6 S t h e r e f o r e i s 1.25. On e x a m i n i n g F i g u r e 2.4, i t i s s e e n t h a t o n l y 2.7% o f t h e f i l t e r e n e r g y l i e s a b o v e f s / 2 = 0.4/ff, . T h e r e f o r e , e v e n f o r t h e n a r r o w e s t f i l t e r d e s i r a b l e , t h e d e g r e e o f a l i a s i n g i s s l i g h t . What o f t h e p r e v i o u s a s s u m p t i o n t h a t o f f - a x i s h a r m o n i c s a n d s e c o n d o r h i g h e r o n - a x i s h a r m o n i c s h a v e n e g l i g i b l e e f f e c t ? The n e x t g r e a t e s t i n f l u e n c e b e y o n d t h e o n - a x i s f i r s t h a r m o n i c w o u l d come f r o m t h e f i r s t o f f - a x i s h a r m o n i c . From t h e f o r e g o i n g , t h e n e a r e s t o f t h e s e i s c e n t e r e d a t l e a s t 0.8/of f r e q u e n c y u n i t s away f r o m t h e a x i s , i e . , 8 =1.25. From F i g u r e 2.4, i t i s c l e a r t h a t t h e amount o f f i l t e r e n e r g y a b o v e 8=1.25 i s n e g l i g i b l e , t h e r e f o r e c o n f i r m i n g t h e p r e v i o u s assump-t i o n s . I n c o n c l u s i o n t h e n , f i l t e r r e s p o n s e c a n be c o n s i d e r e d i d e a l f o r f i l t e r s w i t h 6 < 1, a n d e v e n f o r t h e n a r r o w e s t d e s i r a b l e f i l t e r , 8=1.25, t h e d e g r e e o f a l i a s i n g i n t h e f i l t e r r e s p o n s e i s s l i g h t , c o m p a r e d t o t h a t o f t h e f i n e s t edge m o d e l s c o n s i d e r e d r e s o l v a b l e . 51 2.7 C o e f f i c i e n t Q u a n t i z a t i o n S a m p l i n g i s t h e f i r s t s t e p f o r d i g i t a l r e p r e s e n t a t i o n o f a f i l t e r . The s e c o n d s t e p i s q u a n t i z a t i o n o f t h e r e s u l t i n g c o e f f i c i e n t s . The l i m i t o f q u a n t i z a t i o n i s d e t e r m i n e d by t h e p r o c e s s i n g s y s t e m t o be u s e d a n d c a n r a n g e f r o m 64 b i t s f o r l a r g e m a i n f r a m e s , t o 16 o r 8 b i t s f o r m i n i s and m i c r o s , o r e v e n 6 b i t s f o r s p e c i a l s y s t e m s i n t e n d e d t o m a t c h t y p i c a l v i d e o r e s o l u t i o n [ 4 5 , p . 1 1 4 ] . A g a i n a d i r e c t f o r m d i s c r e t e c o n v o l u t i o n i m p l e m e n t a t i o n w i l l be c o n s i d e r e d . The o b j e c t i v e o f t h i s a n a l y s i s w i l l be t o e x a m i n e t h e i n f l u e n c e o f t h e q u a n t i z a t i o n e r r o r on t h e f i l t e r s p e c t r u m a n d t h e r e b y d e v e l o p a s t r a t e g y f o r t h e s e l e c t i o n o f t h e minimum word s i z e n e c e s s a r y t o k e e p t h e e r r o r w i t h i n a c c e p t a b l e b o u n d s . The a n a l y s i s o f t h e q u a n t i z a t i o n e r r o r s i n o n e - d i m e n s i o n a l d i r e c t f o r m f i n i t e i m p u l s e r e s p o n s e ( F I R ) f i l t e r s was f i r s t p e r f o r m e d by Chan a n d R a b i n e r [ 4 6 ] . T h e i r t e c h n i q u e s have been a d a p t e d h e r e f o r t w o - d i m e n s i o n a l f i l t e r s i n g e n e r a l , a n d t h e V 2 g f i l t e r i n p a r t i c u l a r . The s p a t i a l f r e q u e n c y r e s p o n s e f o r an a r b i t r a r y , n o n - c a u s a l (2N-1) X (2N-1) t w o - d i m e n s i o n a l F I R f i l t e r w i t h p o i n t s p r e a d f u n c t i o n h ( m , n ) , s y m m e t r i c a l a b o u t t h e o r i g i n , i s g i v e n b y , H ( e i 0 l , e i < j 2 ) = z'z' h ( m , n ) e i " 1 e i o > 2 n:(N-l)ms(N-l) N-1 N-1 = h ( 0 , 0 ) + 2Z h(m,0)cosu,m + 21 h ( 0 , n ) c o s u 2 n + n«1 n»1 N-1 N-1 41 Z h(m,n)cosw,m c o s u 2 n . ( 2 . 6 2 ) m =1 n =1 On q u a n t i z a t i o n t h e c o e f f i c i e n t s d i f f e r f r o m t h e i d e a l by an e r r o r t e r m e ( m , n ) : 52 h*(m,n) = h ( m r n ) + e(m,n) (2 . 6 3 ) where -Q/2 < e(m,n) < Q/2 . ( 2 . 6 4 ) The e r r o r i n t h e f r e q u e n c y r e s p o n s e a t ( w 1 , w 2 ) r e s u l t i n g f r o m q u a n t i z a t i o n i s r e p r e s e n t e d a s E L ( e j t J ' , e j U 2 ) = H * ( e i u \ e i < i J 2 ) - H ( e i u , , e i U 2 ) N-1 N-1 = e ( 0 , 0 ) + 2L e(m,0)cosa),m + 2Z e ( 0 , n ) c o s o j 2 n + msl n«1 N-1 N-1 4L L coscj,m c o s o j 2 n . ( 2 . 6 5 ) nm1 n i l The u p p e r bound on t h i s e r r o r c a n be f o u n d by m a x i m i z i n g a l l o f t h e c o m p o n e n t s i n ( 2 . 6 5 ) i n c l u d i n g |e(n,m)| ( n a x = Q/2. | E L ( e J U \ e i W » ) | < (Q/2 H i + 2Z |cosb>,m| + N-1 N-1 N-1 2L | c o s c j 2 n | + 4Z I I C O S C J ^ c o s o ) 2 n l ] rial msl n»1 = Q ( 2 N - 1 ) 2 / 2 . ( 2 . 6 6 ) T h i s e r r o r bound i s e x c e s s i v e l y p e s s i m i s t i c , r e f l e c t i n g o n l y t h e e x t r e m e l i m i t o f t h e e r r o r d i s t r i b u t i o n a t t h e f r e q u e n c i e s 6 0 , = O J 2 - n 7 r . A more u s e f u l m o d e l f o r e r r o r r e s p o n s e p r e d i c t i o n c a n be f o r m e d by a s s u m i n g s t a t i s t i c a l i n d e p e n d e n c e o f e a c h e r r o r c o e f f i c i e n t . T h i s a s s u m p t i o n , c o u p l e d w i t h t h e f a c t t h a t t h e e(m,n) a r e u n i f o r m l y d i s t r i b u t e d o v e r a f i n i t e i n t e r v a l , s a t i s f i e s t h e L i n d e b u r g c o n d i t i o n [ 4 7 , pp. 2 6 2 - 2 6 4 ] o f t h e c e n t r a l l i m i t t h e o r e m c a u s i n g E L , a sum o f many e ( m , n ) , t o be e s s e n t i a l l y G a u s s i a n . T h e r e f o r e a c o m p l e t e s t a t i s t i c a l d e s c r i p t i o n o f E L i s p o s s i b l e t h r o u g h i t s mean ( = 0 ) , and s t a n d a r d d e v i a t i o n . To f i n d t h i s s t a n d a r d d e v i a t i o n , f i r s t 53 e v a l u a t e t h e e n s e m b l e mean s q u a r e o f E L : E * ( e , w \ e i W 2 ) = (Q 2/1 2) [ 1 + 4L cos2u,m + N-1 N-1 N-1 41 c o s 2 w 2 n + 16L L cos 2o),m c o s 2 c j 2 n ] . ( 2 . 6 7 ) ns1 m=1 n i l D e f i n i n g : N-1 N-1 W n(O>,,<J 2) = ( 4 N - 3 ) " 1 [ 1 + 41 c o s 2 u , m + 41 c o s 2 c j 2 n + mr1 n>1 N-1 N-1 161 L cos 2co,m c o s 2 a ) | n ] 1 / 2 m=1 n»1 = ( 4 N - 3 ) " 1 [ 1 + 4Z 1 cos 2a),m] 1 , 2 [ 1 + 4Z c o s 2 u 2 n ] ' / 2 m=1 n r l = W M(w, ) W m ( C J 2 ) , M = 2N - 1 ( 2 . 6 8 ) w here Chan a n d R a b i n e r h a v e f o u n d W M(a>) = [1/2 + (2M-1 ) - 1 ( s i n M w / s i n w - 1 / 2 ) ] 1 ' 2 . (2. 6 9 ) S u b s t i t u t i n g ( 2 . 6 8 ) i n t o t h e s q u a r e r o o t o f ( 2 . 6 7 ) p r o v i d e s t h e e x p r e s s i o n f o r t h e s t a n d a r d d e v i a t i o n o f E L : a E L ( c j , , a j 2 ) = [ E 2 (w, ,CJ2 ) ] 1 ' 2 = ( 4 N - 3 ) Q W N («, , u 2 ) / ( 2 | / 3 ) . ( 2 . 7 0 ) W N (CJ,,CJ 2) a t t a i n s a maximum v a l u e o f u n i t y a t o>, = co2 = kir, i e . , m u l t i p l e s o f h a l f t h e s a m p l i n g f r e q u e n c y . I t c a n a l s o be shown t h a t l i m W n ( C J , , C J 2 ) = 1/2, 0 < CJ,, CJ2 < ir . ( 2 . 7 1 ) N -» °° T h e r e f o r e a E L i s bounded by a E L < ( 4 N - 3 ) Q / ( 2 / 3 ) , ( 2 . 7 2 ) b u t f o r l a r g e N, l i m o E L ( u , , w 2 ) = ( 4 N - 3 ) Q / ( 4 / 3 ) , 0 < u 1 ( a>2 < TT . ( 2 . 7 3 ) N-» « 54 S i n c e e q u a t i o n ( 2 . 7 2 ) r e p r e s e n t s a d e f i n i t e bound on o E L o v e r a l l f r e q u e n c y b a n d s , i t w i l l be u s e d t o e s t i m a t e a E L i n t h e r e m a i n d e r o f t h i s s e c t i o n . H o wever, e q u a t i o n ( 2 . 7 3 ) shows t h a t t h e r e s u l t s may be p e s s i m i s t i c by up t o a f a c t o r o f two i n some b a n d s o f i n t e r e s t . a E L r e p r e s e n t s an a b s o l u t e m e a s u r e o f t h e e r r o r s t a t i s t i c s t h a t c a n be e x p e c t e d f o r an a r b i t r a r y f i l t e r q u a n t i z e d w i t h l e v e l s p a c i n g Q. To be u s e f u l , t h i s r e s u l t must be f o r m u l a t e d i n t e r m s o f t h e e r r o r e x p e c t e d f o r a s p e c i f i c f i l t e r i n a c e r t a i n b a n d o f i n t e r e s t , b k . S i n c e Q w i l l be s e e n t o s p e c i f y N f o r t h e V 2 g f i l t e r , t h e c o e f f i c i e n t word s i z e c a n be d e s i g n e d f r o m t h i s e r r o r b ound. P r i o r t o q u a n t i z a t i o n , t h e b a s e b a n d r e s p o n s e o f t h e V 2 g f i l t e r peak s c a l e d t o u n i t y m a g n i t u d e ( i e . , V 2 g ( 0 , 0 ) = -1) i s g i v e n by G " ( u l f u 2 ) = - 7 r a f a ( 6 j 2 + C J 2 ) e x p [ - (OJ 2 + o j 2 ) a 2 / 2 ] / T 2 ( 2 . 7 4 ) T h i s w i l l r e p r e s e n t t h e m o d e l f o r t h e i d e a l V 2 g f r e q u e n c y r e s p o n s e . The e r r o r r e s u l t i n g f r o m a l i a s i n g i n t o t h e b a s e b a n d r e p r e s e n t s t h e f i r s t d e v i a t i o n f r o m t h e i d e a l r e s p o n s e , G". The a l i a s i n g e r r o r i n b a n d , bk, a t f r e q u e n c y CJ i s d e f i n e d by max|(T (e i c J\e | 6 J>) - G " ( a > 1 f w 2 ) | = 6 k . ( 2 . 7 5 ) we b k A f t e r q u a n t i z a t i o n , t h e e r r o r i n t h e r e s u l t a n t r e s p o n s e , G*", i n c r e a s e s : 55 | G * " ( e i W ' , e j W 0 - G " ( w l f w 2 ) | < | G*~" ( e i w ' , e'^1) - G" (e,uj< , e i W l ) | + |(p(ei wse i w*) - G M C J , ,u2) | < max|E L (e' wt , e j W l ) | + 6 k . cueb k ( 2 . 7 6 ) S i n c e E L i s G a u s s i a n d i s t r i b u t e d , t o 95.4% p r o b a b i l i t y , IE L ( e i < J | ,eiu}x) | < 2 a E L < (4N-3)Q//3 . ( 2 . 7 7 ) G i v e n t h a t V 2 g ( m , n ) i s peak s c a l e d t o u n i t y , w i t h a t - b i t w o r d s i z e , e x c l u d i n g s i g n , 0 = 2 " ' . ( 2 . 7 8 ) T h e r e f o r e , on s u b s t i t u t i n g ( 2 . 7 7 ) a n d ( 2 . 7 8 ) i n t o ( 2 . 7 6 ) , t h e t o t a l e r r o r i n c l u d i n g q u a n t i z a t i o n i s b o u n d e d t o h i g h p r o b a b i l i t y by | G * " ( e j W , , e i a , i ) - G " ( w , , u 2 ) | ^ 2 " l ( 4 N - 3 ) / / 3 + 6 k , c j f b k . ( 2 . 7 9 ) D e f i n e t h e maximum i n - b a n d e r r o r a f t e r q u a n t i z a t i o n a s ek = 2 " ( 4 N - 3 ) / / 3 + 5 h , (2 . 8 0 ) t h e i d e a l s a m p l e d f i l t e r , G", must now r e m a i n w i t h i n a t o l e r a n c e o f |C"(e i"\e j u'*) - G " ( w l f w 2 ) | < e k - 2"' ( 4 N - 3 ) / / 3 (2 .81) i f t h e q u a n t i z e d f i l t e r i s t o m a i n t a i n an e r r o r bound o f e k t o G"(a>,,cj 2) i n band b k . T h i s e s s e n t i a l l y p r o v i d e s a new 5 k a b o u t w h i c h t o d e s i g n t h e p r e c i s e l y s a m p l e d f i l t e r . A more common r e p r e s e n t a t i o n o f t h e r e s p o n s e e r r o r i s i n t e r m s o f i n - b a n d r e j e c t i o n s i n d e c i b e l s , d e f i n e d f o r t h e 56 q u a n t i z e d a n d u n q u a n t i z e d f i l t e r s i n b k a s , DL* = -201og ) c[max IG* 7'(e i a ,',e i a J i) - G" (OJ, , O J 2 ) | ] ( 2 . 8 2 a ) D L k = ^ O l o ^ J m a x l G M e ^ ' ,e j u») - G " ( u , , u 2 ) | ] . ( 2 . 8 2 b ) The q u a n t i z e d i n - b a n d r e j e c t i o n c a n now be p r e d i c t e d f r o m t h e o r i g i n a l i n - b a n d r e j e c t i o n , D L k , and t h e q u a n t i z a t i o n e r r o r by s u b s t i t u t i n g ( 2 . 7 5 ) and ( 2 . 7 9 ) i n t o ( 2 . 8 2 a ) : DL* > - 2 0 1 o g f o [ 6 k + 2"' ( 4 N - 3 ) A / 3 ] = -201og f O[l0" D L k / 2° + 2~% ( 4 N - 3 ) / / 3 ] . ( 2 . 8 3 ) The minimum bound on ( 2 . 8 3 ) , DL*m k, f o r a g i v e n D L k i s e s t a b l i s h e d by t h e minimum w o r d s i z e t m i n = - l o g 2 [ v / 3 ( l O " D L " m k / a 0 - l O D L k / 2 V ( 4 N - 3 ) ] = t«, - l o g 2 (1 - lO" A k /"°) , ( 2 . 8 4 ) where t ^ = {DL*m k + 201og, o[ ( 4 N - 3 ) / / 3 ] } / (201og, o2) ( 2 . 8 5 ) a n d A k = DLk - DL*m k . too r e p r e s e n t s t h e l o w e s t bound p o s s i b l e on t h e word s i z e , a t t a i n e d when 5 k a p p r o a c h e s z e r o ( i e . , D L k —> oo ) . S i n c e t h e V 2 g f i l t e r i s unbounded i n t h e f r e q u e n c y d o m a i n , tmin s e r v e s a s a more r e a l i s t i c e s t i m a t e o f t h e n e c e s s a r y w o r d s i z e , a t l e a s t f o r s m a l l af. F o r f i x e d N a n d A k , t m i„ i s s e e n f r o m ( 2 . 8 4 ) a n d ( 2 . 8 5 ) t o i n c r e a s e l i n e a r l y w i t h DL*m K a t a r a t e o f one b i t p e r 6 db, r e p r e s e n t i n g a h a l v i n g o f t h e q u a n t i z a t i o n - i n d u c e d e r r o r . L i k e w i s e , i t i s a l s o s e e n f r o m F i g u r e 2.6 t h a t an i n c r e a s e i n t m i n o f one b i t o v e r too p r o d u c e s a c h a n g e i n i n - b a n d r e j e c t i o n , A K , o f 6 db, i e . , t h e t o t a l e r r o r i s o n l y d o u b l e 6 K. 57 0-\ 1 1 1 1 1 1 1 1 0 4 8 12 16 A k ) db F i g u r e 2.6 A d d i t i o n a l b i t s , A t , r e q u i r e d t o p r o d u c e a g i v e n i n - b a n d r e j e c t i o n c h a n g e , A K , due t o q u a n t i z a t i o n 58 The f i l t e r i m p l e m e n t a t i o n d e s i g n p a t h i s now c l e a r . From t h e s e l e c t i o n o f af t h e maximum d e g r e e o f a l i a s i n g i n band b K f r o m t h e f i r s t h a r m o n i c d e t e r m i n e s D L K . The a c c e p t a b l e d e c r e a s e i n i n - b a n d r e j e c t i o n f o r b K a l s o d e t e r m i n e s A K . F i n a l l y , s u b s t i t u t i o n i n t o ( 2 . 8 4 ) y i e l d s t h e r e q u i r e d w o r d s i z e t o g u a r a n t e e A K t o 95.4% p r o b a b i l i t y . On t h e o t h e r h a n d , i f t h e s y s t e m a v a i l a b l e i s o f a f i x e d w o r d s i z e t , t h e n i t i s e a s i e r s i m p l y t o u s e e q u a t i o n ( 2 . 8 3 ) t o d e t e r m i n e i f t h e r e s u l t a n t DL*m K i s a c c e p t a b l e . The d e s i g n a p p r o a c h j u s t o u t l i n e d i g n o r e d one c r u c i a l p a r a m e t e r , t h e f i l t e r h a l f w i d t h N. The e x i s t e n c e o f N i n t h e r i g h t - h a n d s i d e o f many o f t h e e q u a t i o n s i n t h i s s e c t i o n c o m p l i c a t e s m a t t e r s somewhat. T h i s i s b e c a u s e N i s d e p e n d e n t on b o t h t and t h e f i l t e r q u a n t i z a t i o n p e r i o d 8af . The q u a n t i z a t i o n p e r i o d , i n t u r n , a l s o d e t e r m i n e s D L K . The s o l u t i o n o f e q u a t i o n s ( 2 . 8 3 ) a n d ( 2 . 8 4 ) s u d d e n l y r e q u i r e s f u r t h e r k n o w l e d g e o f t h e f i l t e r . Chan a n d R a b i n e r r e c o g n i z e d t h i s d i f f i c u l t y a n d p r o v i d e d a method o f a p p r o x i m a t i n g N f o r l o w - p a s s o p t i m a l f i l t e r s . H o wever, s i n c e t h e e x p l i c i t p o i n t s p r e a d r e s p o n s e o f t h e V 2 g f i l t e r i s known, N c a n r e a d i l y be d e t e r m i n e d n u m e r i c a l l y . I n p e a k - n o r m a l i z e d f o r m : V 2 g ( m , n ) = - [ l - (m 2 + n 2 ) 8 2 / 2 ] e x p [ - ( m 2 + n 2 ) 5 2 / 2 ] . ( 2 . 8 6 ) S i n c e t h e f i l t e r i s s y m m e t r i c a l a b o u t ( 0 , 0 ) , a n d we a r e i n t e r e s t e d i n t h e e x t e n t a l o n g t h e a x i s , s e t m = 0: V 2 g ( n ) = - ( 1 - n 2 5 2 / 2 ) e x p ( - n 2 5 2 / 2 ) . ( 2 . 8 7 ) R o u n d i n g o f ( 2 . 8 6 ) w i l l be u s e d t o d e t e r m i n e t h e f i l t e r 59 c o e f f i c i e n t s . T h e r e f o r e N i s d e t e r m i n e d f r o m t h e v a l u e o f n where ( 2 . 8 7 ) f i r s t d r o p s b e l o w 2"'"' a s N = n m a x + 1. T h i s p o i n t i s most r e a d i l y f o u n d by s u b s t i t u t i n g r = n 2 6 2 / 2 i n t o ( 2 . 8 7 ) a n d s o l v i n g O - r ) e x p ( - r ) + 2"t_1 = 0 . ( 2 . 8 8 ) G i v e n t , r c a n be s o l v e d n u m e r i c a l l y . N b e i n g an i n t e g e r , t h e t r u n c a t e d v a l u e o f n m a x f o u n d t h r o u g h ( 2 . 8 8 ) i s u s e d t o g i v e N = TRUNC (v/2r/6) + 1 . ( 2 . 8 9 ) T a b l e I I l i s t s t h e v a l u e s o f r a n d / 2 r f o r t = 2 t h r o u g h 15 f o u n d by s o l v i n g e q u a t i o n ( 2 . 8 8 ) by t h e N e w t o n - R a p h s o n method. The c u r v e s o f e q u a t i o n ( 2 . 8 9 ) p l o t t e d a g a i n s t 8 f o r t h e f o u r most p o p u l a r w o r d s i z e s o f 4, 8, 12, a n d 16 b i t s , i n c l u d i n g s i g n , a r e shown i n F i g u r e 2.7. The r e s u l t s o f T a b l e I I and e q u a t i o n ( 2 . 8 9 ) c a n now be u s e d i n t h e s o l u t i o n o f e q u a t i o n s ( 2 . 8 3 ) a n d ( 2 . 8 4 ) . S o l v i n g DL*m K i n e q u a t i o n ( 2 . 8 3 ) i s s t r a i g h t f o r w a r d . K n o w i n g t a n d 5, e i t h e r r e f e r t o T a b l e I I and e q u a t i o n ( 2 . 8 9 ) , o r f i g u r e 2.7 f o r N. S u b s t i t u t i n g N, t a n d D L k p r o d u c e s DL*m K. Some r e p r e s e n t a t i v e c u r v e s f o r D L K = 20, 40, 60, and 80 a r e shown i n F i g u r e 2.8. The i n v e r s e p r o c e s s o f s o l v i n g f o r tmin g i v e n D L K , DL*m K and 5 i s more c o m p l e x b u t s t i l l s t r a i g h t f o r w a r d . T h i s p r o c e s s i n v o l v e s two s t e p s . F i r s t i t must be r e c o g n i z e d t h a t tmin i s a d e s c r e t e i n t e g e r v a r i a b l e a n d c a n t h e r e f o r e o n l y c h a n g e i n d i s c r e t e s t e p s . The e x t r e m e minimum r e p r e s e n t a t i o n o f t m i n IS t oc w h i c h t h e r e f o r e s h o u l d a l s o be r e p r e s e n t e d a s an i n t e g e r . The c o n s e q u e n c e o f t h e s e two o b s e r v a t i o n s i s t h a t t m i n - too = A t c a n r e a l i s t i c l y o n l y c h a n g e i n t r • 2 r 2 2.4532 2.2151 3 3.8034 2.7580 4 4.8010 3.0987 5 5.7082 3.3788 6 6.5693 3.6248 7 7.4017 3.8475 8 8.2144 4.0533 9 9.0125 4.2456 10 9.7993 4.4271 1 1 10.577 4.5994 1 2 11.348 4.7639 1 3 12.112 4.9217 14 12.871 5.0738 1 5 13.626 5.2204 T a b l e I I . r and j/2r a g a i n s t u n s i g n e d w o r d s i z e F i g u r e 2.7 F i l t e r h a l f - w i d t h , N, r e s u l t i n g f r o m n o r m a l i z e d s a m p l e s p a c i n g 5, f o r 4, 8, 12, and 16 b i t c o e f f i c i e n t word s i z e s 62 F i g u r e 2.8 Q u a n t i z e d i n - b a n d r e j e c t i o n r e s u l t i n g f r o m u n s i g n e d w o r d s i z e t f o r u n q u a n t i z e d i n - b a n d r e j e c t i o n s o f ( a ) 20, (b) 40, ( c ) 60, and (d) 80 db 63 i n t e g e r a m o u n t s . T h e r e f o r e , t h e f i r s t s t e p i s , g i v e n D L K and DL*m K, c a l c u l a t e AK t h e n l o o k up At on F i g u r e 2.6, r o u n d i n g up t o t h e n e a r e s t i n t e g e r u n l e s s A K i s so l a r g e a s t o be e f f e c t i v e l y i n f i n i t e i n w h i c h c a s e A t ^ O . E q u i p p e d w i t h A t , t h e n e x t s t e p i n v o l v e s r e f e r e n c e t o an a p p r o p r i a t e p l o t o f e q u a t i o n ( 2 . 8 4 ) . T h e s e p l o t s a p p e a r i n F i g u r e 2.9 c a l c u l a t e d by s u b s t i t u t i n g t h e a p p r o p r i a t e A K i n t o e q u a t i o n ( 2 . 8 4 ) f o r A t = 0, 1, 2, 3 and 4. On c h o i c e o f t h e a p p r o p r i a t e p l o t , r e f e r e n c e DL*m K t o t h e a b s c i s s a , 5 w i l l s e l e c t t h e a p p r o p r i a t e c u r v e f r o m w h i c h t c a n t h e n be r e a d . F o r a f r a c t i o n a l t r o u n d up t o t h e n e x t i n t e g e r . The t o t a l w o r d s i z e , i n c l u d i n g s i g n , i s t h e n t + 1. T h i s i n d i r e c t , g r a p h i c a l a p p r o a c h t o s o l v i n g t m i n i s n e c e s s a r y l a r g e l y b e c a u s e N a p p e a r s on t h e l e f t - h a n d s i d e o f e q u a t i o n ( 2 . 8 4 ) . S i n c e N i s a f u n c t i o n o f t , d i r e c t s o l u t i o n o f ( 2 . 8 4 ) i s n o t p o s s i b l e . I n s t e a d t h e a p p r o a c h c h o s e n was s o l u t i o n o f t h e i n v e r s e p r o b l e m , DL*m K = 20f( t m i n - A t ) l o g l o 2 - l o g I 0 [ ( 4N-3 ) / • ! ] } ( 2 . 9 0 ) f o r t h e p r e v i o u s A t and t m m = 2,..., 15. I n t h i s c a s e t m i n a n d N a p p e a r on t h e same s i d e o f t h e e q u a t i o n so s o l u t i o n o f DL*m K i s s t r a i g h t f o r w a r d . T h e s e r e s u l t s were t h e n p l o t t e d a s shown i n F i g u r e 2.9, i g n o r i n g DL*m K < 0. S i n c e a g r e a t d e a l o f r o u n d i n g o f i n t e r m e d i a t e v a l u e s i s i n v o l v e d i n t h i s p r o c e d u r e , i t may p r o v e v a l u a b l e t o s u b s t i t u t e t h e tmin f o u n d , a n d t h e o t h e r p a r a m e t e r s i n t o e q u a t i o n ( 2 . 8 3 ) a s a c h e c k on DL*m K. I t may e v e n be d i s c o v e r e d t h a t t h e tmin f o u n d was t o o c o n s e r v a t i v e a n d may be r e d u c e d by a b i t and s t i l l 64 04 , , . , . , . , . . , . , . , , , „ j 0 20 4 0 6 0 8 0 DL-m k F i g u r e 2.9 Minimum u n s i g n e d word s i z e r e q u i r e d g i v e n t h e q u a n t i z e d i n - b a n d r e j e c t i o n f o r A t o f ( a ) 0, (b) 1, ( c ) 2, (d) 3, a n d ( e ) 4 F i g u r e 2.9 ( c o n t i n u e d ) F i g u r e 2.9 ( c o n t i n u e d ) 67 m a i n t a i n an a c c e p t a b l e i n - b a n d r e j e c t i o n . 2.8 F i l t e r D e s i g n E x a m p l e We w i l l now c o n s i d e r an e x a m p l e i n t h e a p p l i c a t i o n o f t h e p r e v i o u s t e c h n i q u e s t o t h e d e s i g n o f an a p p r o p r i a t e f i l t e r w o r d s i z e . To c h o o s e an e x t r e m e c a s e , i t i s d e s i r e d t h a t t h e u n q u a n t i z e d i n - b a n d r e j e c t i o n be a s s m a l l a s p o s s i b l e . T h i s i m p l i e s a maximum o f a l i a s i n g w h i c h was p o i n t e d o u t e a r l i e r t o o c c u r f o r t h e s m a l l e s t af c h o s e n f o r t h e s y s t e m . I f t h i s of i s c h o s e n t o p r o d u c e a minimum o f one p i x e l r e s o l u t i o n t h e n , w i t h u n i t p i x e l s p a c i n g , i t was f o u n d of = 0.8. T h e r e f o r e t h e p i x e l s p a c i n g i s 1,25a f g i v i n g 6=1.25. From t h e a l i a s e d e n e r g y p l o t 2.7% o f t h e b a s e b a n d e n e r g y i s a l i a s e d a t t h i s 8. To d e t e r m i n e t h e r e s u l t i n g i n - b a n d r e j e c t i o n e x a m i n e an a r b i t r a r i l y n a r r o w h i g h p a s s - b a n d , b K , c u t o f f a t fl. B e i n g t h e h i g h e s t f r e q u e n c y b a n d o f c o n c e r n , i t e x p e r i e n c e s t h e g r e a t e s t d e g r e e o f a l i a s i n g . R e c a l l Q = 2 7 r ( 0 . 3 2 5 ) / a f . To e s t i m a t e t h e m a g n i t u d e o f t h e a l i a s e d r e s p o n s e a t fi, c o n s i d e r o n l y t h e c o n t r i b u t i o n o f t h e f i r s t h a r m o n i c a l o n g e i t h e r a x i s . T h i s c o n t r i b u t i o n a t c o r r e s p o n d s t o t h e b a s e b a n d r e s p o n s e a t u> = 2n( 1 - 0 . 3 2 5 / a f ) , w h i c h when s u b s t i t u t e d i n t o ( 2 . 7 4 ) W,=CJ a n d C J 2 = 0 g i v e s 6 K = 4 7 r 3 [ a f 2 (1 - 0 . 325/a f ) ] 2 e x p [ - 2 T T 2 ( at - 0 . 325) 2 ] = 0.208 f o r a, =0.8. T h e r e f o r e , t h e u n q u a n t i z e d i n - b a n d r e j e c t i o n i s : 68 D L K = -201og, o(0.208) = 13.62 db. The i d e a l b a s e b a n d r e s p o n s e a t ft i s | G " ( 0 ) | = 47r 3o, 2 (0 . 325) 2 e x p ( - 2 7 r 2 0 . 3 2 5 2 ) , = 1.042. D L K , t h e r e f o r e , r e p r e s e n t s a 20% i n c r e a s e i n t h e r e s p o n s e m a g n i t u d e a t fi o v e r t h e i d e a l . S i n c e D L k i s a l r e a d y q u i t e l a r g e , p e r m i t o n l y a n o t h e r 5% i n c r e a s e i n r e s p o n s e m a g n i t u d e , i e . 2 5 % o f t h e i d e a l , a f t e r q u a n t i z a t i o n . T h e r e f o r e G*Mn) <. 1 .303, a n d e K ^ 0.261, g i v i n g DL*m K = -20 1 o g , o ( 0 . 261 ) = 11.67 db. T h e r e f o r e , A K = 13.62 - 11.67 = 1.95 w h i c h must be r o u n d e d down t o 1.16 t o c o r r e s p o n d t o A t = 3 . On r e f e r e n c i n g F i g u r e 2.9 f o r At=3 a n d c u r v e 5=1.25, t f o r DL*m K = 11.67 i s a b o u t 7.5 w h i c h must be r o u n d e d up t o 8 b i t s . T h e r e f o r e a t o t a l w o r d s i z e o f 9 b i t s i s n e c e s s a r y f o r a t l e a s t 11.67 db i n - b a n d r e j e c t i o n a t 0 f o r a f=0.8. From T a b l e I I a n d e q u a t i o n ( 2 . 8 9 ) , N i s f o u n d t o be 4 c a u s i n g t h e f i l t e r t o o c c u p y (2N-1) X (2N-1) = 7 X 7 p i x e l s . To v e r i f y DL*m K, s u b s t i t u t e D L K , t = 8 , a n d N=4 i n t o e q u a t i o n ( 2 . 8 3 ) . The r e s u l t i s DL*m K = 12.49 db. T h e r e f o r e , t h r o u g h t h e s e s u c c e s s i v e r o u n d i n g o p e r a t i o n s , t h e p r e d i c t e d e r r o r h a s i m p r o v e d by 0.82 db. A 9 - b i t word s i z e i s n o n - s t a n d a r d . I f an 8 - b i t s y s t e m were t o be a d o p t e d i n s t e a d , N w o u l d s t i l l be 4 b u t DL*m K w o u l d d e c r e a s e t o 11.48 db, f o r w h i c h e K=0.267. T h e r e f o r e , t h e a d d i t i o n a l p e n a l t y o f t h e l o s t b i t i s o n l y 0.19 db, p r o d u c i n g a 6S 25.6% i n c r e a s e i n r e s p o n s e m a g n i t u d e o v e r G " ( f t ) . n -3 1 0 0 0 2 12 7 1 0 1 -13 15 7 0 0 -128-13 12 1 0 1 2 3 m F i g u r e 2.10 V 2 g ( n , m ) f i l t e r c o e f f i c i e n t s f o r s a m p l e s p a c i n g 6 = 1.25 a n d 8 - b i t t o t a l w ord s i z e To t e s t t h i s p r e d i c t i o n o f e K f o r t h e 8 - b i t s y s t e m , e v a l u a t e t h e r e s p o n s e o f t h e f i l t e r a t fi f o r t=7. One q u a d r a n t o f t h e p o i n t s p r e a d r e s p o n s e o f V 2 g ( m , n ) f r o m e q u a t i o n ( 2 . 8 6 ) f o r 6 = 1.25 a n d t r u n c a t e d t o s e v e n b i t s p l u s s i g n i s shown i n f i g u r e 2.10. S u b s t i t u t i n g t h e s e v a l u e s i n t o e q u a t i o n ( 2 . 6 2 ) f o r CJ,=J2 a n d C J 2 = 0 g i v e s | G * " ( e j A , e i 0 )| = 1 .232. The a c t u a l e r r o r , eK , i s 0.190, o r 14.42 db. T h e r e f o r e , t h e 7 - b i t p r e d i c t i o n i s a c t u a l l y p e s s i m i s t i c by 2.94 db. As a f i n a l e x e r c i s e , l e t ' s c o m p a r e t h e i n - b a n d r e j e c t i o n s j u s t f o u n d t o t h o s e o f t h e f i l t e r w i t h t h e n e x t o c t a v e l o w e r p a s s b a n d , i e . , of=},6, 6=0.625. The t o t a l 8 - b i t w o r d s i z e o f t h e a f=0.8 f i l t e r w i l l be r e t a i n e d , b u t now 6=1/1.6=0.625, w h i c h g i v e s N=7. The m a g n i t u d e o f t h e a l i a s e d r e s p o n s e a t 0 i s a g a i n f o u n d by s u b s t i t u t i n g af i n t o ( 2 . 7 4 ) , t h i s t i m e r e s u l t i n g i n 5=5.983 X 1 0 " 1 2 f o r w h i c h D L K = 224.5 db w h i c h f o r a l l i n t e n t s a n d p u r p o s e s h e r e c a n be c o n s i d e r e d i n f i n i t e . T h i s r e a f f i r m s t h e e a r l i e r o b s e r v a t i o n t h a t a l i a s i n g e f f e c t s f o r of g r e a t e r t h a n u n i t y c a n be i g n o r e d . The e x p e c t e d i n - b a n d r e j e c t i o n a f t e r q u a n t i z a t i o n t h e r e f o r e s i m p l i f i e s t o 128 70 DL*m K — -201og ) O[ 2"' (4N-3)/»/3 ] = 18.96 db c o r r e s p o n d i n g t o e K=0.113. S i n c e t h e i d e a l m a g n i t u d e r e s p o n s e a t now i s 4.169, eK r e p r e s e n t s a 2.7% r e s p o n s e c h a n g e a t Q. T h i s r e p r e s e n t s a n e a r l y one m a g n i t u d e i m p r o v e m e n t i n a c c u r a c y o v e r t h e n e x t h i g h e s t o c t a v e c a s e . T h e r e f o r e , i f t h e w o r d s i z e o f t h e f i l t e r i s d e s i g n e d t o meet t h e t i g h t e s t i n - b a n d r e j e c t i o n c o n s t r a i n t s f o r t h e n a r r o w e s t f i l t e r o f i n t e r e s t , i t w i l l meet a t l e a s t t h o s e c o n s t r a i n t s f o r t h e o t h e r , w i d e r f i l t e r s a l s o . 2.9 T e s t Image E x a m p l e s To p r o v i d e e x a m p l e s o f t h e d e s i g n p r i n c i p l e s d i s c u s s e d , one o f t h e t i g h t l y - c o n t r o l l e d t e s t i m a g e s o f K i t c h e n a n d R o s e n f e l d [ 4 8 ] were c h o s e n . K i t c h e n a n d R o s e n f e l d had u s e d two k i n d s o f t e s t i m a g e s on w h i c h t o e v a l u a t e v a r i o u s edge d e t e c t o r s : a s e r i e s o f c o n c e n t r i c r i n g s ; a n d a s i n g l e s t e p e d g e . The r i n g s image w i l l be e x p l o r e d h e r e s i n c e i t i s more c o m p l e x a n d p e r m i t s s y s t e m a t i c s t u d y o f t h e f i l t e r s ' b e h a v i o r . The image was c o n s t r u c t e d o r i g i n a l l y a s . a 512 by 512 image c o n s i s t i n g o f o n l y two l e v e l s o f b r i g h t n e s s : 115 ( d a r k ) a n d 140 ( l i g h t ) . The image c o n t a i n s a d a r k c i r c l e o f r a d i u s 64 a t i t s c e n t e r s u r r o u n d e d by s i x c o n c e n t r i c r i n g s o f w i d t h 32 a n d a l t e r n a t i n g l i g h t a nd d a r k i n t e n s i t y . The i m p r e s s i o n i s t h a t o f a " b u l l ' s e y e " o f d a r k b a c k g r o u n d and c e n t e r . The f i n a l image i s 128 X 128, p r o d u c e d by r e p l a c i n g e a c h 4 X 4 p i x e l b l o c k by a s i n g l e p i x e l h a v i n g t h e a v e r a g e g r e y l e v e l o f t h e b l o c k . To i n c l u d e t h e e f f e c t s o f n o i s e , i n d e p e n d e n t z e r o mean G a u s s i a n n o i s e was a d d e d w i t h a v a r i a n c e t o p r o d u c e a SNR o f f i f t y . SNR i s d e f i n e d i n t h e manner c h o s e n by K i t c h e n a n d R o s e n f e l d : 71 SNR = h 2 / a n 2 where h i s t h e edge c o n t r a s t , g i v e n h e r e a s 25. The r i n g s t r u c t u r e o f t h i s image h a s t h e a d v a n t a g e o f b e i n g e x a c t l y p e r i o d i c a l o n g t h e r a d i u s w h i l e a t t h e same t i m e b e i n g b o u n d e d i n e x t e n t , a n d p r i m a r i l y t w o - d i m e n s i o n a l i n s t r u c t u r e . T h i s p e r m i t s c o n c l u s i o n s t o be drawn c o n c e r n i n g a p p l i c a b i l i t y o f t h e p r e v i o u s unbounded o n e - d i m e n s i o n a l m o d e l s t o more r e a l i s t i c t w o - d i m e n s i o n a l s t r u c t u r e s . The p r i m a r y p e r i o d i c i t y o f t h e t e s t image i s t h e edge s p a c i n g o f t h e r i n g s . I n t h e 128 X 128 image, t h i s p e r i o d i s e i g h t p i x e l s . The r e s u l t o f V 2 g f i l t e r i n g t h i s image s h o u l d be most c l o s e l y p r e d i c t e d by t h e s q u a r e wave edge m o d e l o f edge s p a c i n g T = 8. I f t h e e d g e s were i d e a l s t e p s , t h e f i l t e r j u s t a b l e t o r e s o l v e them w i t h maximum n o i s e r e j e c t i o n w o u l d h a v e a 0 o f 1.15 r e s u l t i n g i n a s t a n d a r d d e v i a t i o n o f ot = T/0 = 6.96. H o w e v e r , s i n c e t h e f i n a l image was r e d u c e d f r o m a l a r g e r one by l o c a l a v e r a g i n g , t h e r e i s some b l u r p r e s e n t . Though n o t G a u s s i a n , t h i s b l u r h a s a s t a n d a r d d e v i a t i o n o f a b o u t 0.29. C l e a r l y t h i s i s a g r e a t d e a l l e s s t h a n 0.51a f=3.55 f o r w h i c h s e r i o u s l y d e g r a d e d p e r f o r m a n c e i s e x p e c t e d . However, i n r e c o g n i t i o n o f t h e o v e r a l l n o n - i d e a l n a t u r e o f t h e image, a somewhat more c o n s e r v a t i v e 0 o f 1.25 i s c h o s e n , p r o d u c i n g of=6.i. R e f e r e n c e t o f i g u r e 2.2 shows t h a t no r e s p o n s e t o a p e r i o d i c s t r u c t u r e i s e x p e c t e d f o r 0=0.5. T h e r e f o r e , o n l y t h e g r o s s s t r u c t u r e o f t h e image i s e x p e c t e d t o be r e v e a l e d , a nd l i t t l e n o i s e , on f i l t e r i n g w i t h or = 16. I t i s a l s o s e e n t h a t f o r m i n i m a l b l u r , t h e s t e a d y s t a t e r e s p o n s e i s e s t a b l i s h e d a t 0=5. A f i l t e r o f of =1.6 i s t h e r e f o r e e x p e c t e d t o f u l l y r e s o l v e t h e r i n g e d g e s . 72 F u r t h e r m o r e , i t i s e x p e c t e d t o do s o t o t h e h i g h e s t p r e c i s i o n b u t t h e p o o r e s t n o i s e r e j e c t i o n o f t h e s e t h r e e f i l t e r s i z e s . The t e s t image was t h e r e f o r e f i l t e r e d by t h e peak s c a l e d V 2 g f i l t e r w i t h s t a n d a r d d e v i a t i o n s o f 16, 6.4, and 1.6. The r e s u l t s a r e shown i n F i g u r e 2.11. The f i l t e r i n g was done t h r o u g h f a s t c o n v o l u t i o n u s i n g a d o u b l e p r e c i s i o n f l o a t i n g - p o i n t 2-D FFT. The f i l t e r c o e f f i c i e n t s were a l s o r e p r e s e n t e d t o d o u b l e f l o a t i n g - p o i n t p r e c i s i o n . The edge p i x e l s a r e m a r k e d by t h e Freeman d i r e c t i o n numbers [ 4 9 ] p o i n t i n g i n t h e d i r e c t i o n o f maximum g r a d i e n t . The a c t u a l edge p o s i t i o n s a r e c h o s e n t o c o i n c i d e w i t h t h e p o s i t i v e s i d e o f t h e z e r o c r o s s i n g b e t w e e n h o r i z o n t a l l y o r v e r t i c a l l y a d j a c e n t p i x e l s . T h i s a l s o c o r r e s p o n d s t o t h e b o r d e r s o f t h e t e s t image d a r k r e g i o n s . From F i g u r e 2.11a, i t i s r e a d i l y a p p a r e n t t h a t o n l y t h e g r o s s d e t a i l o f t h e t e s t image i s r e s o l v e d . The f i n e s t r u c t u r e o f t h e r i n g s i s n o t d e t e c t e d , b u t t h e e x t r e m e i n n e r a n d o u t e r b o r d e r s a r e . S i n c e t h e c e n t r a l d a r k c i r c l e was 32 p i x e l s w i d e , g i v i n g a 0 o f 2, a n d t h e r i n g s t r u c t u r e was 40 p i x e l s w i d e , g i v i n g a 0 o f 2.5, t h i s b e h a v i o r i s e x p e c t e d . N o t e t h e c o m p l e t e a b s e n c e o f any e x t r a n o i s e d e t a i l . W i t h a r e s o l u t i o n i n t e r v a l o f 2crf=32, t h e e n t i r e image l i e s w i t h i n t h e o v e r l a p p i n g r e s o l u t i o n i n t e r v a l s o f t h e e d g e s s e e n r e s u l t i n g i n p e r f e c t n o i s e r e m o v a l . The f i l t e r o f o f 6.4 p r e d i c t s f u l l r e s o l u t i o n o f t h e r i n g s t r u c t u r e w i t h maximum n o i s e r e j e c t i o n . F i g u r e 2.11b v a l i d a t e s t h i s c l a i m . N o t e t h a t t h e r e i s no n o i s e w i t h i n t h e r i n g s t r u c t u r e . N o i s e , h o w e v e r , d o e s a p p e a r i n t h e f o r m o f e x t r a n e o u s edge s t r u c t u r e s b e y o n d t h e o u t e r e d g e . The c l o s e s t o f t h e s e s t r u c t u r e s l i e s 11 p i x e l s f r o m t h e o u t e r r i n g w h i c h i s c l o s e t o 73 (a) (b) "l . I. 3 (c) -..!---•- s:"-= i,, J !..«"•!...•- : •"•••V*;--I "v, !": ! » . « " . . " ' t ' : . . . . - — . . ; — • « . I • .-•,•-!..•• .-- t'°- v *l" -:• .»" ii; fi....8-".V if: J J ' i. •. I. F i g u r e 2.11 I d e a l V 2 g f i l t e r e d r i n g s image w i t h a, o f ( a ) 16, (b) 6.4, and ( c ) 1.6 74 t h e 2of n o i s e f r e e r e s o l u t i o n i n t e r v a l p r e d i c t e d . The a f = l . 6 f i l t e r e d image s h o u l d r e s o l v e t h e t e s t image b u t h a v e p o o r n o i s e r e j e c t i o n . F i g u r e 2.11c i n d e e d c l e a r l y shows t h e r i n g d e t a i l r e s o l v e d a s w e l l a s a g r e a t d e a l o f n o i s e . M o st o f t h e n o i s e r e s i d e s i n t h e s p a c e b e y o n d t h e o u t e r a n d w i t h i n t h e i n n e r r i n g s . O n l y one n o i s e f e a t u r e a p p e a r s w i t h i n t h e r i n g s t r u c t u r e i n t h e t h i r d r i n g . The c l o s e s t a p p r o a c h o f t h e n o i s e e d g e s t o t h e r i n g e d g e s i s two p i x e l s . T h i s l i e s one t h i r d o f t h e way w i t h i n t h e e x p e c t e d 3.2 p i x e l r e s o l u t i o n i n t e r v a l b u t e x a c t l y on t h e two p i x e l s e a r c h i n t e r v a l t o be u s e d i n m u l t i b a n d s y s t e m s . However, i t i s s e e n t h a t most n o i s e s t r u c t u r e s r e m a i n b e y o n d t h r e e p i x e l s f r o m t h e r i n g s s o t h e i n c i d e n c e o f e r r o r s c a u s e d by u n a c c e p t a b l y c l o s e a p p r o a c h e s i n m u l t i b a n d s y s t e m s i s e x p e c t e d t o be l o w . I n g e n e r a l , t h e e x p e c t e d i n c r e a s e i n edge p o s i t i o n p r e c i s i o n w i t h d e c r e a s i n g a( i s a l s o o b s e r v e d . I n f a c t , f o r a f=1.6, t h e d a r k image b o u n d a r i e s a r e l o c a t e d t o t h e b e s t p r e c i s i o n t h a t c a n be e x p e c t e d f o r a q u a n t i z e d i m a g e . The af =6.4 i m a g e , t h o u g h f u l l y r e s o l v e d , i s h o w e v e r q u i t e i n a c c u r a t e , t e n d i n g t o e x p a n d t h e b r i g h t r e g i o n s w h i l e c o n t r a c t i n g t h e d a r k o n e s . F o r i n s t a n c e , t h e c e n t r a l d a r k r e g i o n h a s c o n t r a c t e d by f o u r p i x e l s w h i l e t h e o u t e r l i g h t r i n g h a s w i d e n e d by t h r e e p i x e l s . I n t e r e s t i n g l y , t h e two r i n g s r e s o l v e d i n F i g u r e 2.11a d i f f e r i n a c c u r a c y . The o u t e r b o r d e r r e m a i n s w i t h i n 2.5 p i x e l s o f t h e c o r r e c t p o s i t i o n b u t t h e i n n e r b o r d e r i s t o o w i d e by up t o s i x p i x e l s . P e r h a p s t h i s b e h a v i o r i s a t t r i b u t a b l e t o t h e more g r a d u a l c u r v a t u r e o f t h e o u t e r r i n g w h i c h t h e r e b y more c l o s e l y r e s e m b l e s a o n e - d i m e n s i o n a l s t e p . A l s o n o t e t h a t a l l e d g e s f o r m 75 c l o s e d c u r v e s . The o n l y s e e m i n g v i o l a t i o n o f t h i s o c c u r s among t h e n o i s e r e g i o n s o f F i g u r e 2.11c. However, i n a c t u a l i t y , t h i s i n d i c a t e s t h e f o r m a t i o n o f one p i x e l w i d e d a r k r e g i o n s a f t e r f i l t e r i n g . S i n c e t h e edge p i x e l s a r e a s s o c i a t e d w i t h d a r k r e g i o n b o u n d a r i e s , t h e r e s u l t i s a p p a r e n t l y b r o k e n e d g e s . The p r e v i o u s r e s u l t s were g e n e r a t e d w i t h e s s e n t i a l l y i n f i n i t e p r e c i s i o n c o e f f i c i e n t s . F i g u r e s 2.12 a n d 2.13 show t h e r e s u l t s a f t e r t h e t e s t image was f i l t e r e d by t h e same s e t o f f i l t e r s , b u t w i t h t h e c o e f f i c i e n t s q u a n t i z e d t o e i g h t and s i x b i t s r e s p e c t i v e l y . The e x p e c t e d i n - b a n d r e j e c t i o n f o r t h e s e i m a g e s a t 0 a r e l i s t e d i n T a b l e I I I . When e x p r e s s e d i n p r o p o r t i o n t o t h e i d e a l f i l t e r m a g n i t u d e a t Q, i t i s s e e n t h a t t h e c h a n g e i n r e s p o n s e i s e x p e c t e d t o r a n g e f r o m 0.26% f o r a f = l 6 . 0 a t e i g h t b i t s up t o 9.1% f o r ^ = 1 . 6 a t s i x b i t s . I n F i g u r e s 2.12a a n d 2.12b, a l o s s o f p r e c i s i o n i n edge p o s i t i o n i s e v i d e n t . H owever, t h e c o r r e c t p r e c i s i o n i s r e - e s t a b l i s h e d i n F i g u r e 2.12c f o r a( =1.6, b u t t h e r e i s i n c r e a s e d n o i s e p r e s e n t w i t h i n t h e r i n g s t r u c t u r e . F i g u r e 2.12b shows t h e b e g i n n i n g o f a phenomenon t h a t h a s become w e l l - e s t a b l i s h e d i n t h e r e s u l t s o f F i g u r e 2.13. I n t h e d a r k c o r n e r s b e y o n d t h e , o u t e r b o r d e r , t h e r e r u n an e x t r a s e t o f e d g e s t o t h e image s i d e s . I f t h e image s i d e s a r e c o n s i d e r e d c i r c u l a r l y - c o n n e c t e d , t h e n t h e s e e d g e s f o r m a c l o s e d r e g i o n o f n e g a t i v e r e s p o n s e . The r e a s o n f o r t h i s r e g i o n i s t h e c o m b i n e d f i n i t e e x t e n t o f t h e f i l t e r a n d t h e p r e s e n c e o f a s t r o n g dc o f f s e t i n t h e f r e q u e n c y r e s p o n s e . The p r e s e n c e o f t h i s o f f s e t was p r e d i c t e d e a r l i e r i n e q u a t i o n ( 2 . 7 0 ) where W n ( C J , , C J 2 ) h a s a p eak m a g n i t u d e a t dc o f t w i c e t h e mean m i d b a n d a m p l i t u d e . The r e s u l t o f t h i s o f f s e t i s an e x p a n s i o n o f 76 F i g u r e 2.12 8 - b i t V 2 g f i l t e r e d r i n g s image w i t h a, o f ( a ) 16, (b) 6.4, a n d ( c ) 1.6 77 F i g u r e 2.13 6 - b i t (b) 6 V 2 . 4 , g f i l t e r e d a n d ( c ) 1 r i n g s 6 image w i t h of o f ( a ) 1 6 78 DL*m K ( DL*m K - G" ( w ) | d b ) Of | G " ( u ) | d b 8 - b i t 6 - b i t 8 - b i t 6 - b i t 16 -52.4 -0.868 -11.85 51.5 40.6 6.4 -36.5 -7.18 -3.71 43.7 32.8 1 .6 -12.4 -18.96 -8.43 31.4 20.8 T a b l e I I I . E x p e c t e d i n - b a n d r e j e c t i o n s a t Q f o r 6- a n d 8 - b i t q u a n t i z e d V 2 g f i l t e r s 79 t h e r e g i o n s w i t h t h e same s i g n a s t h e o f f s e t , a n d t h e c r e a t i o n o f i s l a n d s o f t h i s s i g n i n l a r g e r e g i o n s n o r m a l l y o f t h e o p p o s i t e s i g n . I n e a c h o f t h e e x a m p l e s o f F i g u r e 2.13, t h e r e s u l t o f t h e o f f s e t a n d s m a l l e r f i l t e r s i z e i s more p r o n o u n c e d . The o u t e r b o u n d a r y o f 2.13a i s s o d i s t o r t e d i t merged w i t h i t s c i r c u l a r i m ages a n d no l o n g e r f o r m s a r i n g a b o u t t h e c e n t e r . F i g u r e 2.13b no l o n g e r f u l l y r e s o l v e s t h e r i n g s t r u c t u r e . I n s t e a d , many o f t h e e d g e s a s s o c i a t e d w i t h d a r k r i n g s h a v e b r o k e n i n t o n a r r o w i s l a n d c r e s c e n t s . I n t e r e s t i n g l y , t h e r i n g s t r u c t u r e o f F i g u r e 2.13c i s i n t a c t . H o wever, t h e p r e c i s i o n o f t h e edge p o s i t i o n s h a s e v i d e n t l y d i m i n i s h e d somewhat, t h o u g h i n t h e mean t h e y a r e c o r r e c t l y p l a c e d . I t i s a l s o i n t e r e s t i n g t o n o t e t h a t i n F i g u r e 2.12c a n d e s p e c i a l l y 2.13c t h e r e i s a r e d u c t i o n i n t h e number o f n o i s e e d g e s o v e r t h o s e i n F i g u r e 2 . 1 1 c . E v i d e n t l y t h e m a g n i t u d e o f t h e n o i s e r e g i o n s i s l e s s t h a n t h a t o f t h e dc o f f s e t . S i n c e dc o f f s e t e f f e c t s h a v e d o m i n a t e d t h e q u a n t i z e d c o e f f i c i e n t e x a m p l e s , l i t t l e c a n be s a i d o f t h e e f f e c t s o f t h e d e c r e a s e d i n - b a n d r e j e c t i o n . The o f f s e t was t h e r e f o r e removed an d t h e t e s t s r e p e a t e d . To remove t h e o f f s e t , i t was f i r s t m e a s u r e d by summing a l l t h e q u a n t i z e d c o e f f i c i e n t s . The o f f s e t was t h e n s u b t r a c t e d o u t o f t h e f i l t e r by a t most one u n i t p e r c o e f f i c i e n t . T h i s s u b t r a c t i o n was begun a t a f i l t e r r a d i u s where i t was f e l t t h a t d e v i a t i o n f r o m a s i m p l e r o u n d i n g p r o c e s s w o u l d h a v e t h e l e a s t e f f e c t on t h e f i l t e r r e s p o n s e . T h i s r a d i u s c o r r e s p o n d s t o t h e l o c a t i o n where t h e c r o s s - s e c t i o n of t h e f i l t e r ' s p o i n t s p r e a d f u n c t i o n h a s t h e g r e a t e s t s l o p e . H e r e a one u n i t c h a n g e i n t h a t c o e f f i c i e n t w o u l d g e n e r a l l y s t i l l a g r e e 80 w i t h t h e f i l t e r m a g n i t u d e w i t h i n h a l f a p i x e l o f t h a t p o i n t . F o r t h e t w o - d i m e n s i o n a l V 2 g f i l t e r , t h e r a d i u s o f g r e a t e s t s l o p e i s 0.79a f . The s u b t r a c t i o n s a r e p e r f o r m e d a l t e r n a t e l y a b o u t t h e c e n t e r o f t h e f i l t e r a l o n g a x i s t h a t a r e m u t u a l l y p e r p e n d i c u l a r u n t i l t h e f o u r a x i s a t 22.5° t o t h e h o r i z o n t a l and v e r t i c a l a r e r e a c h e d . I f t h e o f f s e t i s o d d , one f u r t h e r s u b t r a c t i o n i s done on t h e c e n t r a l peak so t h a t t h e o t h e r s r e m a i n s y m m e t r i c a l a b o u t t h e o r i g i n . The r a d i u s a t w h i c h t h e s u b t r a c t i o n i s p e r f o r m e d i s t h e n a l t e r n a t e l y i n c r e a s e d a n d d e c r e a s e d by one p i x e l , a s t h e e i g h t p e r p e n d i c u l a r a x i s a r e e x h a u s t e d . F o r t u n a t e l y t h e amount o f o f f s e t i s much s m a l l e r t h a n t h e f i l t e r a r e a s o t h i s p r o c e s s d o e s n o t g r e a t l y d i s t o r t t h e f i l t e r . The r e s u l t s a f t e r r e m o v a l o f t h e f i l t e r o f f s e t a r e shown i n F i g u r e s 2.14 a n d 2.15. N o t e t h a t q u a l i t a t i v e l y t h e r e i s v e r y l i t t l e d i f f e r e n c e i n t h e two s e t s o f i m a g e s . E v e n t h e d e g r e e o f n o i s e p r e s e n t i s a b o u t t h e same. A l s o , t h e edge p o s i t i o n s a r e i n d i c a t e d t o c o m p a r a b l e a c c u r a c y i n b o t h s e t s o f i m a g e s . I n t e r e s t i n g l y t h e e d g e s a r e o f a b o u t t h e same a c c u r a c y o f t h o s e o f t h e i n f i n i t e p r e c i s i o n c o e f f i c i e n t s o f F i g u r e 2.11. The af =1.6 i m a g e s a r e a l m o s t i d e n t i c a l i n a l l c a s e s . I t c a n be c o n c l u d e d t h e r e f o r e t h a t t h e d e c r e a s e d i n - b a n d r e j e c t i o n s r e s u l t i n g f r o m c o e f f i c i e n t q u a n t i z a t i o n r i g h t down t o s i x b i t v i d e o r e s o l u t i o n d o e s n o t have a s i g n i f i c a n t e f f e c t on t h e r e s u l t i n g edge p o s i t i o n s a n d n o i s e r e j e c t i o n a f t e r t h e dc o f f s e t i s r emoved. 82 ( a ) F i g u r e 2.15 U n b i a s e d 6 - b i t V 2 g f i l t e r e d r i n g s image w i t h ( a ) 16, (b) 6.4, a n d ( c ) 1.6 o f 83 2.10 D e s i g n Summary and C o n c l u s i o n s The f o r e g o i n g a n a l y s i s h a s e s t a b l i s h e d t h e d u a l o p t i m a l i t y o f t h e D. M a r r V 2 g edge f i l t e r , a n d has p r o v i d e d a c o m p r e h e n s i v e d e s i g n s t r a t e g y f o r t h e s e l e c t i o n o f a f i l t e r s t a n d a r d d e v i a t i o n and c o e f f i c i e n t w ord s i z e a p p r o p r i a t e f o r t h e edge d e t e c t i o n t a s k c o n t e m p l a t e d . The p e r f o r m a n c e i n a d d i t i v e n o i s e was e x a m i n e d w i t h t h e r e s u l t t h a t minimum i n p u t s i g n a l t o n o i s e r a t i o b o u n d s were e s t a b l i s h e d . A l s o , i t was s e e n t h a t i n o r d e r t o r e s o l v e many l e v e l s o f d e t a i l , o r l o c a t e e d g e s embedded i n n o i s e p r e c i s e l y , a m u l t i b a n d s y s t e m must be e m p l o y e d where t h e i n d i v i d u a l p a s s b a n d s p a c i n g i s a t l e a s t one o c t a v e . I t was f o u n d t h a t t h e t i g h t e s t c o n t r a i n t s on t h e f i l t e r s t a n d a r d d e v i a t i o n , i n p u t s i g n a l t o n o i s e r a t i o , a nd q u a n t i z e d w o r d s i z e , a p p l y o n l y t o t h e h i g h e s t f r e q u e n c y p a s s b a n d . The r e m a i n i n g b a n d s s a t i s f y t h e s e c o n s t r a i n t s a u t o m a t i c a l l y . To r e v i e w , t h e f i l t e r d e s i g n p r o c e s s f o l l o w s a number o f d i s t i n c t s t a g e s . F i r s t i t i s i m p o r t a n t t o i d e n t i f y t h e edge f e a t u r e s t o be r e s o l v e d a n d t o d e t e r m i n e t h e s c a l e o f any p e r i o d i c i t y i n t h e s e f e a t u r e s . S e l e c t i o n o f t h e i d e a l edge model w h i c h most c l o s e l y r e s e m b l e s t h e f e a t u r e i n q u e s t i o n f o l l o w s . E s t i m a t e t h e d e g r e e o f b l u r p r e s e n t t h r o u g h i t s s t a n d a r d d e v i a t i o n , o b . T h i s s t e p may r e q u i r e some g u e s s w o r k , b u t i s n e c e s s a r y i f t h e e d g e s a r e t o be r e s o l v e d a t t h e 3 db p o i n t o f t h e Of c h o s e n . The i m p o r t a n c e o f r e s o l v i n g t h e e d g e s a t t h e f i l t e r 3 db p o i n t i s a r e s u l t o f t h e r e g i o n o f maximum n o i s e r e j e c t i o n c o i n c i d i n g w i t h t h e r e s o l u t i o n i n t e r v a l , w h i c h i n t u r n i n c r e a s e s d i r e c t l y w i t h af . T h e r e f o r e , t h e g r e a t e s t n o i s e r e j e c t i o n f o l l o w s f r o m t h e s e l e c t i o n o f t h e w i d e s t a l l o w a b l e af . 84 The s e l e c t i o n o f t h e f i l t e r v a r i a n c e on t h e b a s i s of t h e a b o v e i n f o r m a t i o n i s now p o s s i b l e . A f t e r r e f e r e n c e t o F i g u r e s 2.1 a n d 2.2 f o r t h e most s u i t a b l e m o d e l w i t h edge s p a c i n g T, t h e 3 db f i l t e r s t a n d a r d d e v i a t i o n f a l l s i n t h e r a n g e : S t a i r c a s e E d g e s - T/5.5 < af < T/2.75; S q u a r e Wave E d g e s - T/1.36 < of < T/1.15; The l o w e r l i m i t s o f a l l t h e s e m o d e l s presume t h e p r e s e n c e o f t h e maximum d e g r e e o f b l u r o f 0 . 5 l a f b e y o n d w h i c h f i l t e r r e s p o n s e r e m a i n s b e l o w 3 db o f s t e a d y s t a t e . R e f e r e n c e t o F i g u r e s 2.1 a n d 2.2 shows t h a t b l u r c e a s e s t o a s s e r t a s i g n i f i c a n t i n f l u e n c e b e l o w 0 . 2 a f . T h e r e f o r e , i f a f f a l l s w i t h i n o b /0 . 51 <of <ab /0 .2 a c e r t a i n amount o f i t e r a t i o n may be n e c e s s a r y b e f o r e t h e a p p r o p r i a t e af i s f o u n d . On s e l e c t i o n o f a( a number o f f u r t h e r c o n s t r a i n t s d e t e r m i n e i f i t i s p r a c t i c a l . T h e s e d e p e n d l a r g e l y on i t s r e l a t i o n t o t h e s a m p l e s p a c i n g T , w h e r e , n o r m a l i z e d , T = 8a f . I t was f o u n d t h a t 5 > 1.25 i s n o t p r a c t i c a l on two g r o u n d s : t h e 3 db p o i n t t h e n c o r r e s p o n d s t o edge s t r u c t u r e s t h a t a r e u n d e r s a m p l e d ; a n d t h e a l i a s e d f i l t e r e n e r g y e x c e e d s 2.7%, b e c o m i n g r a p i d l y e x c e s s i v e . F o r 5 < 1.0 t h e a l i a s e d e n e r g y d r o p s b e l o w 0.14%. U n d e r s a m p l i n g o f t h e f i l t e r i s t h e r e f o r e n o t a p r o b l e m s i n c e i t i s u n l i k e l y t h a t one w o u l d c h o o s e a o f m a t c h e d t o an u n d e r s a m p l e d image s t r u c t u r e . However, 6 d o e s p l a y a r o l e i n t h e minimum s i g n a l t o n o i s e r a t i o p e r m i s s i b l e i n t h e o r i g i n a l i mage. D e r i v e d on t h e b a s i s o f s q u a r e wave e d g e s , t h e p e r m i s s i b l e r a n g e o f t h e s i g n a l t o n o i s e r a t i o was f o u n d t o be SNRj > 2.666. T h i s i s a v e r y l i b e r a l r a n g e , a n d s i n c e 8 d e c r e a s e s w i t h i n c r e a s i n g a( t h i s bound o n l y c o n s t r a i n s t h e n a r r o w e s t f i l t e r i n a m u l t i b a n d s y s t e m . 85 Once Of h a s been s e l e c t e d t h e e x p e c t e d s t a n d a r d d e v i a t i o n o f t h e z e r o c r o s s i n g a b o u t t h e t r u e edge c a n be d e t e r m i n e d i f an e s t i m a t e o f t h e n o i s e power o r s i g n a l t o n o i s e r a t i o c a n be made. T h i s a c c u r a c y i s g i v e n by e q u a t i o n s ( 2 . 3 7 ) a n d ( 2 . 5 1 ) w h i c h show t h a t t h e s t a n d a r d d e v i a t i o n o f t h e z e r o c r o s s i n g i n c r e a s e s a s t h e s q u a r e r o o t o f of . To a t t a i n t h e a c c u r a c y a s s o c i a t e d w i t h a n a r r o w f i l t e r , b u t r e t a i n t h e n o i s e r e j e c t i o n o f a much w i d e r f i l t e r i t was s u g g e s t e d t h a t a m u l t i b a n d s y s t e m be u s e d . Two s u c h s y s t e m s were p r o p o s e d , one r e q u i r i n g e x p l i c i t k n o w l e d g e o f t h e image s i g n a l t o n o i s e r a t i o , a nd t h e o t h e r , n o t . S i n c e i t i s r a r e t h a t t h e s i g n a l t o n o i s e r a t i o i s a l w a y s known i n a d v a n c e , a n d u n i f o r m f o r a l l t h e i m a g e s t o be p r o c e s s e d by a g i v e n s y s t e m , o r e v e n u n i f o r m a c r o s s an image, t h e l a t t e r s y s t e m i s recommended. I n s u c h a s y s t e m , t h e f r e q u e n c y b a n d s a r e s p a c e d one o c t a v e a p a r t r a n g i n g f r o m t h e l a r g e s t d e t a i l s o f i n t e r e s t down t o t h e h i g h e s t l e v e l o f p r e c i s i o n d e s i r e d . S u c h an a p p r o a c h c a n a l s o be u s e d t o c l a s s i f y t h e f u l l r a n g e o f d e t a i l p r e s e n t i n an image a c c o r d i n g t o t h e edge model 3 db p o i n t f o r e a c h b a n d . M u l t i b a n d s y s t e m s c a n a l s o remove t h e p s e u d o - e d g e z e r o c r o s s i n g w h i c h o c c u r s b e t w e e n t h e t r u e e d g e s i n t h e s t a i r c a s e edge m o d e l . When f i n a l i m p l e m e n t a t i o n i n t o a h a r d w a r e s y s t e m i s c o n s i d e r e d , t h e f i l t e r c o e f f i c i e n t s must be q u a n t i z e d . The i n f l u e n c e o f t h i s was c o n s i d e r e d f o r t h e d i r e c t f o r m f i n i t e i m p u l s e r e s p o n s e i m p l e m e n t a t i o n . The i n f l u e n c e o f q u a n t i z a t i o n was shown t o be a G a u s s i a n e r r o r i n t h e f r e q u e n c y r e p o n s e . The e r r o r s t a n d a r d d e v i a t i o n was n o t u n i f o r m a c r o s s t h e s p e c t r u m b u t p e a k e d i n a m p l i t u d e a t i n t e g e r m u l t i p l e s of h a l f t h e s a m p l i n g f r e q u e n c y . T w i c e t h e s t a n d a r d d e v i a t i o n o f t h e peak e r r o r , i n 86 db, was c o n s i d e r e d t h e minimum e x p e c t e d i n - b a n d r e j e c t i o n a f t e r q u a n t i z a t i o n , DL*m K. The q u a n t i z a t i o n word s i z e i s d e t e r m i n e d , i n l a r g e p a r t , by f i x i n g t h i s q u a n t i t y a t an a c c e p t a b l e v a l u e i n a d v a n c e . F u r t h e r m o r e , s e l e c t i o n o f a f r e q u e n c y b a n d , b K , w i t h i n t h e f i l t e r r e s p o n s e where DL*m R i s most t i g h t l y c o n s t r a i n e d i s r e q u i r e d . I n t h e e x a m p l e g i v e n , t h i s was c h o s e n t o be n e a r fi s i n c e t h e f i l t e r b e h a v i o r i s l a r g e l y d e t e r m i n e d by t h e h i g h f r e q u e n c y c u t o f f . W i t h i n b K t h e i d e a l i n - b a n d r e j e c t i o n due s o l e l y t o a l i a s i n g w i t h i n f i n i t e p r e c i s i o n c o e f f i c i e n t s , D L K , must a l s o be c a l c u l a t e d . I t was shown t h r o u g h e x a m p l e t h a t f o r 6 l e s s t h a n 0.625, D L K i s so l a r g e a s t o be e s s e n t i a l l y i n f i n i t e . W i t h t h i s i n f o r m a t i o n a n d t h e n o r m a l i z e d s a m p l e p e r i o d , 5, a s i m p l e t w o - s t e p p r o c e d u r e was o u t l i n e d f o r d e t e r m i n i n g t h e minimum u n s i g n e d q u a n t i z e d c o e f f i c i e n t word s i z e , tmin . S i n c e , o f n e c e s s i t y , a c e r t a i n amount o f r o u n d i n g t a k e s p l a c e d u r i n g t h i s p r o c e s s , e q u a t i o n ( 2 . 8 3 ) c a n s e r v e a s a c h e c k on t h e r e s u l t -a n t DL*m K. A s e r i e s o f t e s t image r e s u l t s s u b s t a n t i a t e d many o f t h e i d e a s p r e s e n t e d i n t h i s c h a p t e r . I t was shown, f o r e x a m p l e , t h a t t h e p r e d i c t e d 3 db of f o r s q u a r e wave e d g e s m a t c h e d t o t h e d i f f e r e n c e i n r a d i i o f a f i n i t e s e r i e s o f c o n c e n t r i c r i n g s w i l l r e s o l v e s u c h an image e v e n t h o u g h i t s o n l y r e s e m b l a n c e t o a s q u a r e wave l i e s i n a p o r t i o n o f t h e c r o s s - s e c t i o n a l o n g t h e r a d i u s . I t was a l s o s e e n t h a t t h e a c c u r a c y o f t h e z e r o c r o s s i n g i n c r e a s e s w i t h d e c r e a s i n g af w h i l e t h e n o i s e r e j e c t i o n d e c r e a s e s . On q u a n t i z a t i o n o f t h e f i l t e r c o e f f i c i e n t s , t h e most n o t a b l e e f f e c t was t h e a p p e a r a n c e o f a s t r o n g dc o f f s e t p r e d i c t e d by W n ( C J 1 , 6 J 2 ) . The o f f s e t s e r v e d t o d e c r e a s e t h e edge p o s i t i o n a c c u r a c y , a n d , i n some c a s e s , t o b r e a k t h e e d g e s i n t o f i c t i t i o u s 87 c l o s e d r e g i o n s . A f t e r s u b t r a c t i n g o u t t h e o f f s e t , t h e q u a n t i z e d f i l t e r s p e r f o r m e d a l m o s t a s w e l l a s t h e p r e c i s e f i l t e r s , e v e n a t s i x b i t s . O n l y t h e n o i s e r e j e c t i o n d e c r e a s e d s l i g h t l y . An i m p o r t a n t o b s e r v a t i o n o f a l l t h e t e s t images i s t h e f a c t t h a t a l l t h e e d g e s f o r m e d c l o s e d r e g i o n s w i t h o u t any s p u r i o u s b r e a k s . T h i s was p a r t i c u l a r l y e v i d e n t when t h e f i l t e r was m a t c h e d t o image d e t a i l . T h i s i m p l i e s t h a t t h e r e i s no n e e d t o a p p l y a f u r t h e r r e l a x a t i o n p o s t - p r o c e s s i n g s t a g e t o r e p a i r edge s e g m e n t s . When D. M a r r a nd E. H i l d r e t h f i r s t p u b l i s h e d t h e V 2 g edge d e t e c t o r , t h e i r a r g u m e n t s a n d e x a m p l e s made i t c l e a r t h a t t h i s s h o u l d be t h e d e t e c t o r o f c h o i c e f o r u n a m b i g u o u s l y r e s o l v i n g edge d e t a i l . H owever, no c l e a r p r o c e d u r e was o u t l i n e d f o r s e l e c t i n g a a f a p p r o p r i a t e f o r t h e t a s k a t h a n d . I t was f e l t t h a t t h i s was a m a j o r d i s i n c e n t i v e t o a p p l y i n g t h e V 2 g f i l t e r i n a g e n e r a l manner. T h i s c h a p t e r ' s o b j e c t was t o remedy t h i s s i t u a t i o n by p r o v i d i n g a s y s t e m a t i c d e s i g n m e t h o d o l o g y f o r t h e s e l e c t i o n o f Of , and f i n a l f i l t e r i m p l e m e n t a t i o n . One r e m a i n i n g o b j e c t i o n t o t h e f i n a l i m p l e m e n t a t i o n o f t h e V 2 g f i l t e r i s i t s s i z e . A t e i g h t b i t s , t h e p r e v i o u s af = 6.4 f i l t e r r e q u i r e s 49 X 49 p i x e l s . H owever, f o r f a c i l i t i e s n o t o p e r a t i n g i n r e a l - t i m e a n d p e r f o r m i n g f a s t c o n v o l u t i o n u s i n g a t w o - d i m e n s i o n a l FFT, t h e f i l t e r s i z e i s no o b j e c t . Where r e a l - t i m e v i d e o r a t e p r o c e s s i n g i s r e q u i r e d , new t e c h n o l o g y i s r a p i d l y p r o v i d i n g t h e means f o r p e r f o r m i n g d i r e c t c o n v o l u t i o n u s i n g s u c h l a r g e f i l t e r s [ 5 0 ] , [ 5 1 ] , T h e r e f o r e , i t i s f e l t t h a t t h e V 2 g edge d e t e c t i o n f i l t e r w i l l p r o v e s u i t a b l e f o r a w i d e v a r i e t y o f image a n a l y s i s t a s k s . 88 I I I . OPTIMAL EDGE DETECTOR EVALUATION 3.1 I n t r o d u c t i o n I n t h e p r e v i o u s c h a p t e r t h e c l a i m was made t h a t t h e M a r r a n d H i l d r e t h V 2 g f i l t e r was more r i g o r o u s l y d e s i g n e d t o d e t e c t edge f e a t u r e s t h a n most o t h e r edge d e t e c t o r s . I t was a l s o c l a i m e d t h a t edge m a g n i t u d e t h r e s h o l d i n g was an u n r e l i a b l e m e t h o d o f i s o l a t i n g p r e f e r r e d o b j e c t e d g e s f r o m t h e b a c k g r o u n d n o i s e . I f t h e s e c l a i m s a r e t r u e t h e n t h e V 2 g f i l t e r s h o u l d o u t p e r f o r m o t h e r d e t e c t o r s i n a c o n t r o l l e d c o m p a r i s i o n , b u t l o s e i t s a d v a n t a g e a f t e r t h r e s h o l d i n g . The o b j e c t o f t h i s c h a p t e r i s t o p e r f o r m t h i s c o m p a r i s o n a n d s u b s t a n t i a t e t h e s e c l a i m s . To f a c i l i t a t e edge d e t e c t o r c o m p a r i s o n a s e r i e s o f e x p e r i m e n t s must be d e s i g n e d i n c o r p o r a t i n g a common s e t o f t e s t i m a g e s a n d f i x e d e v a l u a t i o n m e a s u r e ( s ) t o be a p p l i e d t o a l l edge o p e r a t o r s t e s t e d . B e f o r e e m b a r k i n g on t h e s e e x p e r i m e n t s one i s f a c e d w i t h a c h o i c e : w h e t h e r t o d e s i g n a new edge e v a l u a t i o n p r o c e d u r e , o r w h e t h e r t o a d o p t a p u b l i s h e d one t h a t h a s a l r e a d y p r o v e d s u c c e s s f u l . I t was t h e l a t t e r c o u r s e t h a t was c h o s e n h e r e . B e s i d e s t h e r e e x i s t i n g an e s t a b l i s h e d b a s e o f p r o c e d u r e s t o c h o o s e f r o m , t h i s a p p r o a c h h a s t h e a d v a n t a g e t h a t t h e l i t e r a t u r e w o u l d a l r e a d y c o n t a i n t h e e v a l u a t i o n s c o r e s o f most o f t h e p o p u l a r edge d e t e c t o r s , s o t h i s work n e e d n o t be r e p e a t e d . The e v a l u a t i o n p r o c e d u r e t h a t w i l l be t h e f o c u s o f t h i s s e c t i o n i s t h a t d e v e l o p e d by K i t c h e n a n d R o s e n f e l d [ 4 8 ] . B e f o r e p r e s e n t i n g t h e r e a s o n s b e h i n d t h i s c h o i c e , l e t us f i r s t r e v i e w a number o f o t h e r edge d e t e c t o r e v a l u a t i o n schemes p u b l i s h e d . 89 The e a r l i e s t q u a n t i t a t i v e e v a l u a t i o n o f edge d e t e c t o r p e r f o r m a n c e was t h a t o f Fram a n d D e u t s c h [ 5 2 ] , [ 5 3 ] . The t e s t image c o n s i s t e d o f a 36 X 36 p i x e l a r r a y c o n t a i n i n g f e a t u r e r e g i o n s . T h e s e were a r r a n g e d a s t h r e e v e r t i c a l p a n e l s t h e r i g h t a nd l e f t o f w h i c h c o n t a i n e d G a u s s i a n i n t e n s i t y s t a t i s t i c s o f d i f f e r i n g mean b u t a common s t a n d a r d d e v i a t i o n o f 24. A c e n t e r ramp, s i x c o l u m n s w i d e a n d f o u n d by i n t e r p o l a t i n g b e t w e e n t h e o t h e r two r e g i o n s , c o n s t i t u t e d t h e edge f e a t u r e . The G a u s s i a n i n t e n s i t i e s were t r u n c a t e d t o s i x b i t p r e c i s i o n . N i n e t y - s e v e n s u c h t e s t i m a g e s were g e n e r a t e d by a d o p t i n g t e n d i f f e r e n t l e v e l s o f c o n t r a s t ( d i f f e r i n g means i n t h e r i g h t a n d l e f t p a n e l s ) , a n d a p p r o x i m a t e l y t e n images p e r c o n t r a s t l e v e l . A f t e r f i l t e r i n g , t h e r e s u l t a n t o u t p u t was t h r e s h o l d e d t o p r o d u c e a b i n a r y image w h i c h was t h e n e v a l u a t e d u s i n g two p a r a m e t e r s , P, a n d P 2 . P i was s o m e t h i n g o f a s i g n a l t o n o i s e r a t i o i n v o l v i n g t h e p r o p o r t i o n o f p i x e l s g e n e r a t e d due t o t h e p r e s e n c e o f t h e edge f e a t u r e t o a w e i g h t e d sum o f a l l t h e edge p i x e l s f o u n d i n t h e i m a g e . P 2 was a c o n t i n u i t y m e a s u r e r e p r e s e n t i n g t h e f r a c t i o n o f rows w i t h i n t h e c e n t e r p a n e l w h i c h c o n t a i n e d s i g n a l p i x e l s . T h e s e e v a l u a t i o n s c o r e s r a n g e f r o m z e r o f o r t o t a l l y random edge f e a t u r e s u n i f o r m l y d i s t r i b u t e d o v e r t h e o u t p u t image t o u n i t y i f a l l t h e p i x e l s ' o u t p u t f a l l w i t h i n t h e c e n t e r p a n e l w i t h a t l e a s t one p i x e l p e r row. L a t e r , [ 5 3 ] , t h e o r i e n t a t i o n b i a s o f edge d e t e c t o r s was i n v e s t i g a t e d by r o t a t i n g t h e c e n t r a l edge p a n e l 15°, 30°, 45° a n d 60° w i t h r e s p e c t t o t h e v e r t i c a l . O n l y t h r e e edge o p e r a t o r s were e x a m i n e d : t h e H u e c k e l , M a c l e o d , a n d R o s e n f e l d - T h u r s t o n . The t h r e s h o l d f o r e a c h o f t h e s e o p e r a t o r s was c h o s e n h e u r i s t i c l y by i n s p e c t i n g a s m a l l s a m p l e o f 9 0 o u t p u t s f r o m t h e t e s t i m a g e s f o r e a c h o p e r a t o r a n d t h e n s e l e c t i n g a l e v e l a t w h i c h t h e number o f p i x e l s a b o v e t h r e s h o l d p r o d u c e a " w e l l f o u n d e d g e " . T h i s i s p e r h a p s t h e g r e a t e s t d i f f i c u l t y w i t h t h e Fram a n d D e u t s c h a p p r o a c h . Though t h e y c l a i m t h e i r m e t hod i s u n b i a s e d , t h i s t h r e s h o l d i n g p r o c e d u r e d o e s r e q u i r e a q u a l i t a t i v e j u d g e m e n t by t h e u s e r c o n c e r n i n g a c c e p t a b l e e d g e q u a l i t y w h i c h d o e s n o t f a c i l i t a t e t o t a l a u t o m a t i o n o f t h e p r o c e d u r e a n d makes c o m p a r i s o n o f t h e r e s u l t s b e t w e e n r e s e a r c h e r s d i f f i c u l t . A bdou a n d P r a t t [54] l a t e r d e v e l o p e d a more c o m p r e h e n s i v e edge d e t e c t o r d e s i g n a n d e v a l u a t i o n m e t h o d o l o g y . The edge e v a l u a t i o n component o f t h e i r p a p e r c o n s i s t e d o f t h r e e p a r t s : an edge d e t e c t o r s e n s i t i v i t y a n a l y s i s , a c o m p a r i s o n o f t h e p r o b a b i l i t i e s o f c o r r e c t a n d f a l s e edge d e t e c t i o n , a n d a f i g u r e o f m e r i t c o m p u t a t i o n . The s e n s i t i v i t y a n a l y s i s i n v o l v e d a d e t e r m i n i s t i c m easurement o f t h e edge f i l t e r o u t p u t a m p l i t u d e when a p p l i e d t o an i d e a l edge a t d i f f e r i n g o r i e n t a t i o n a n d l o c a t i o n s w i t h r e s p e c t t o t h e f i l t e r c e n t e r . I d e a l l y an edge o p e r a t o r s h o u l d show no o r i e n t a t i o n b i a s a n d a r a p i d l y d e c l i n i n g r e s p o n s e w i t h d i s p l a c e m e n t f r o m c e n t e r . The a b o v e a n a l y s i s was p e r f o r m e d i n t h e a b s e n c e o f n o i s e . The c o n d i t i o n a l p r o b a b i l i t i e s f o r c o r r e c t a n d f a l s e edge d e t e c t i o n were e v a l u a t e d by a s s u m i n g an i d e a l s t e p edge c o r r u p t e d w i t h a d d i t i v e z e r o mean w h i t e G a u s s i a n n o i s e . The r e s u l t s w e r e a l s o u s e d t o f o r m u l a t e a B a y e s minimum e r r o r d e c i s i o n r u l e f o r t h e s e l e c t i o n o f t h r e s h o l d t o m a x i m i z e t h e p r o b a b i l i t y o f m a k i n g a c o r r e c t d e c i s i o n a s t o w h e t h e r a g i v e n o u t p u t p i x e l c o n s t i t u t e s an edge o r n o t . The e v a l u a t i o n p r o c e d u r e o f p r i n c i p l e i n t e r e s t h e r e however i s t h e f i g u r e o f m e r i t c o m p a r i s o n . To p e r f o r m t h i s e v a l u a t i o n 91 t h e edge o p e r a t o r i s a p p l i e d t o an N X N t e s t image c o n t a i n i n g a v e r t i c a l s t e p o f f i x e d h e i g h t h s m o o t h e d t o a ramp by i n c l u s i o n o f a s i n g l e c o l u m n o f h e i g h t h/2 a t t h e s t e p , a n d c o r r u p t e d by t h e a d d i t i o n o f w h i t e G a u s s i a n n o i s e o f v a r y i n g s t a n d a r d d e v i a t i o n , a. The o u t p u t i s t h r e s h o l d e d t o p r o d u c e a b i n a r y edge map. The f i g u r e o f m e r i t i s d e f i n e d a s F = max{ I , , I A }" 1Z [ 1 + a d 2 ( i ) ] " 1 i= 1 where Ij a n d I A a r e t h e i d e a l a n d a c t u a l edge p o i n t s , d ( i ) i s t h e d i s t a n c e o f t h e i t h edge p i x e l d e t e c t e d t o t h e i d e a l edge p o s i t i o n , a n d a i s a s c a l i n g c o n s t a n t e m p e r i c a l l y s e t t o 1/9. C l e a r l y i f a l l t h e image e d g e s f a l l o n l y on t h e i d e a l edge p o s i t i o n F=1. T h i s t e c h n i q u e was a l s o e x t e n d e d t o d i a g o n a l e d g e s . The i n t e n t o f t h i s f i g u r e o f m e r i t i s s i m i l a r t o P, o f Fram a n d D e u t s c h w h i c h i s t o e s t i m a t e t h e p r o p o r t i o n o f s i g n a l p i x e l s p r e s e n t n e a r t h e e d g e . H o w e v e r , d ( i ) a d d s a more e x p l i c i t g o o d n e s s o f f i t a s p e c t t o F, t h a n t h e f i x e d p a n e l w i d t h o f P,. The c l a s s o f edge o p e r a t o r s e x a m i n e d was t h e e n h a n c e m e n t / t h r e s h o l d i n g t y p e w h i c h i n c l u d e d t h e d i f f e r e n t i a l o p e r a t o r s o f R o b e r t s [ 1 8 ] , P r e w i t t [ 5 5 ] a n d S o b e l [ 5 6 , p . 2 7 1 ] , a n d t h e t e m p l a t e o p e r a t o r s o f P r e w i t t [ 5 5 ] (compass g r a d i e n t ) , K i r s c h [ 5 7 ] a n d 3- and 5 - l e v e l t e m p l a t e masks. The f i g u r e o f m e r i t e v a l u a t i o n s were p l o t t e d a g a i n s t t h e s i g n a l t o n o i s e r a t i o w h i c h was d e f i n e d a s SNR = ( h / a )2 . ( 3 . 1 ) T h e s e e x a c t same o p e r a t o r s were a l s o e v a l u a t e d by K i t c h e n a nd R o s e n f e l d who, h o w e v e r , a d o p t a v e r y d i f f e r e n t f i g u r e o f m e r i t . 92 The p r i n c i p a l d r a w b a c k o f t h e Abdou a n d P r a t t e v a l u a t i o n m e a s u r e s i s t h a t edge c o n t i n u i t y i s n e v e r c o n s i d e r e d . T hus t h e r e i s no a n a l o g y t o P 2 . I n f a c t , P e l i a n d M a l a h [ 5 8 ] r e p o r t t h a t F c a n p r o d u c e a h i g h e r s c o r e f o r b r o k e n , t h i c k e d g e s t h a n f o r p e r f e c t b u t t h i c k e d g e s . They c l a i m t h a t t h e p r o b l e m i s t h a t F d o e s n o t t a k e t h e d i s t r i b u t i o n o f edge p o i n t s a l o n g t h e edge i n t o a c c o u n t . P e l i a n d M a l a h h a v e a l s o u n d e r t a k e n a s t u d y o f edge d e t e c t o r e v a l u a t i o n . I n d e e d t h e i r a p p r o a c h i s t h e most c o m p r e h e n s i v e o f t h o s e p u b l i s h e d , e v e n t h o u g h o n l y a s m a l l s u b s e t o f t h e i r r e s u l t s were p r e s e n t e d . Two b a s i c t e s t i m a g e s were u s e d : a s q u a r e , a n d a c i r c l e , b o t h o f g r e y - l e v e l 15 s u p e r i m p o s e d on a b a c k g r o u n d o f g r e y - l e v e l 0. The d i m e n s i o n s o f t h e i m a g e s were n o t g i v e n . T h r e e m e t h o d s were s e p a r a t e l y a p p l i e d t o c o r r u p t t h e t e s t i mage: t h e i d e a l i n t e n s i t y s t e p b e t w e e n o b j e c t a n d b a c k g r o u n d was r e p l a c e d by a f i v e p o i n t ramp; b i n a r y " s a l t a n d p e p p e r " n o i s e was a d d e d a t 5%, 10% a n d 20% p r o b a b i l i t y t o s i m u l a t e t e x t u r e ; z e r o mean G a u s s i a n n o i s e o f s t a n d a r d d e v i a t i o n 3, 6, 9, a n d 12 was a d d e d w i t h t h e r e s u l t a n t i n t e n s i t i e s c l i p p e d a t 0 a n d 15. The p e r f o r m a n c e m e a s u r e s d e v i s e d w e re g r o u p e d i n t o two b r o a d c a t e g o r i e s : q u a n t i t a t i v e , a n d q u a l i t a t i v e . T h o u g h s e v e n q u a n t i t a t i v e m e a s u r e s were c o n s i d e r e d t h e r e s u l t s o f o n l y two w ere p r e s e n t e d : Abdou a n d P r a t t ' s f i g u r e o f m e r i t ; a n d t h e v a r i a n c e o f a d e t e c t e d e dge p o i n t f r o m t h e i d e a l e d g e . The i d e a l edge p o s i t i o n was d e f i n e d t o a s i n g l e p i x e l c o i n c i d i n g w i t h t h e i d e a l s t e p d i s c o n t i n u i t y b e f o r e s m o o t h i n g t o a ramp. The q u a l i t a t i v e m e a s u r e s , on t h e o t h e r h a n d , i n v o l v e d s u c h o b s e r v a t i o n s a s t h e t y p e o f edge c o n t o u r p r o d u c e d ( p e r f e c t , b r o k e n , p e r f e c t b u t b r o k e n ) , s i n g l e o r d o u b l e e d g e , a n d 93 d i s t o r t i o n t h r o u g h s h i f t o f t h e e d g e . The q u a l i t a t i v e m e a s u r e s s u c c e e d i n f i l l i n g t h e gap b e t w e e n r i g i d e v a l u a t i o n s c o r e s a n d t h e s u b j e c t i v e i m p r e s s i o n o f image q u a l i t y . Edge d e t e c t i o n o p e r a t o r s were s e l e c t e d w h i c h d i d n o t r e q u i r e a p r i o r k n o w l e d g e o f t h e image s t r u c t u r e . On t h i s b a s i s , t h e R o b e r t s [ 1 8 ] , H a l e [ 2 3 ] a n d R o s e n f e l d - T h u r s t o n [ 1 9 ] o p e r a t o r s w e re c h o s e n , t h o u g h no s y s t e m f o r t h r e s h o l d i n g t h e r e s u l t s was g i v e n . G e n e r a l l y , t h e a p p r o a c h o f P e l i a n d M a l a h p a r a l l e l s a n d e x t e n d s t h a t o f Abdou a n d P r a t t . F o r i n s t a n c e , by c o n s i d e r i n g a c i r c u l a r o b j e c t t h e e f f e c t s on t h e e v a l u a t i o n m e a s u r e o f e d g e s a t a l l p o s s i b l e o r i e n t a t i o n s c a n be o b s e r v e d . A l s o by i n c l u d i n g a q u a l i t a t i v e a s p e c t t o t h e i r e v a l u a t i o n s , s u c h o b s e r v a t i o n s a s t h e p o o r c o n t i n u i t y s e n s i t i v i t y o f t h e Abdou a n d P r a t t r e s u l t s c o u l d be n o t e d . R e g r e t t a b l y t h e y c h o s e o n l y one o p e r a t o r i n common w i t h t h a t w o r k . However t h e q u a n t i t a t i v e a s p e c t o f t h e P e l i a n d M a l a h a p p r o a c h i s a l s o i t s g r e a t e s t d r a w b a c k . A f u l l y a u t o m a t i c a p p r o a c h , a m e n a b l e t o c o m p a r i s o n w i t h s i m i l a r w o r k , i s c e r t a i n l y p r e f e r a b l e . Shaw [ 5 9 ] p r e s e n t e d a f a i r l y s i m p l e edge d e t e c t o r e v a l u a t i o n . T h i s i n c l u d e d t h e c h a n g e o f o u t p u t s i g n a l t o n o i s e r a t i o a n d c h a n g e i n edge o r i e n t a t i o n p r o d u c e d by a d i s t o r t e d image when c o m p a r e d t o t h e i d e a l i m a g e . Compared t o t h e o t h e r m e t h o d s e x a m i n e d , t h i s a p p r o a c h was n o t v e r y u s e f u l . I t p r o v i d e d l i t t l e i n f o r m a t i o n on t h e g o o d n e s s o f f i t o r t h e c o n t i n u i t y o f t h e e d g e s f o u n d . T h r e e b a s i c f a i l i n g s i n a l l o f t h e a b o v e edge e v a l u a t i o n schemes were n o t e d by K i t c h e n a n d R o s e n f e l d . W i t h t h e e x c e p t i o n 94 o f Shaw, t h e y a l l r e q u i r e d p r i o r k n o w l e d g e o f t h e t r u e edge p o s i t i o n . W h i l e t h i s p r o v i d e s t h e o p p o r t u n i t y t o make d e f i n i t e s t a t e m e n t s c o n c e r n i n g s p a t i a l p r e c i s i o n , s i m i l a r t e c h n i q u e s a r e n o t a p p l i c a b l e t o r e a l w o r l d i m a g e s where t h e edge p o s i t i o n s a r e unknown. A n o t h e r f a i l i n g , a l s o n o t e d by Mero a n d V a s s y , i s t h e g e n e r a l l a c k o f a c o n t i n u i t y m e a s u r e . E d g e s t h a t a r e f r a g m e n t e d b u t c o n s i s t e n t l y d i s p l a c e d f r o m t h e t r u e e d g e , r e c e i v e s i m i l a r s c o r e s f r o m Abdou a n d P r a t t a s p e r f e c t l y c o n t i n u o u s b u t s i m i l a r l y d i s p l a c e d e d g e s . F i n a l l y , none o f t h e s e schemes u s e d c o n s i s t e n c y i n t h e d i r e c t i o n o f t h e d e t e c t e d e d g e s i n t h e i r e v a l u a t i o n s c o r e s . O n l y Shaw n o t e d edge d i r e c t i o n s , b u t o n l y t o compare t h e c h a n g e i n d i r e c t i o n o f edge s e g m e n t s b e t w e e n n o i s y a n d n o i s e - f r e e i m a g e s . I d e a l l y t h e edge g r a d i e n t d i r e c t i o n s h o u l d be e v e r y w h e r e p e r p e n d i c u l a r t o t h e edge a n d i n a manner c o n s i s t e n t w i t h a d j a c e n t edge p i x e l s . To a d d r e s s t h e s e c r i t i c i s m s a n d t h e e a r l i e r o n e s c o n c e r n i n g t h e u n d e s i r a b i l i t y o f human i n t e r v e n t i o n , K i t c h e n a n d R o s e n f e l d d e v e l o p e d a f u l l y a u t o m a t i c edge e v a l u a t i o n t e c h n i q u e b a s e d on t h e i d e a o f l o c a l edge c o h e r e n c e . 95 3.2 K i t c h e n - R o s e n f e l d E v a l u a t i o n The c o n c e p t o f l o c a l edge c o h e r e n c e i s f o u n d e d on t h e p r e m i s e t h a t i d e a l l y edge f e a t u r e s s h o u l d l o c a l l y be l i n e - l i k e . Edge c o h e r e n c e h a s t h e r e f o r e two c o m p o n e n t s : edge p i x e l s s h o u l d be a d j a c e n t a n d t h e r e f o r e c o n n e c t e d ; a n d t h e y s h o u l d be t h i n l i k e a l i n e , i d e a l l y one p i x e l w i d e . K i t c h e n a n d R o s e n f e l d t h e r e f o r e c h o s e t o i n c o r p o r a t e t h e s e two c o m p o n e n t s i n t o one edge e v a l u a t i o n scheme. The f i r s t c o m p o n e n t , c o n t i n u a t i o n , m e a s u r e s t h e d e g r e e t o w h i c h a d j a c e n t p i x e l s a g r e e i n t h e i r d e t e r m i n a t i o n o f t h e l o c a l edge d i r e c t i o n . The t h i n n e s s component s i m p l y m e a s u r e s t h e l o c a l edge d e n s i t y . No k n o w l e d g e o f " t r u e " edge p o s i t i o n i s e v e r r e q u i r e d . T h i s a p p r o a c h h o l d s two a t t r a c t i o n s . I n g e n e r a l t e r m s , i t p e r m i t s a d j u s t i n g edge o p e r a t o r p a r a m e t e r s t o o p t i m i z e p e r f o r m a n c e i n i mages a b o u t w h i c h l i t t l e i s known. The k e y p a r a m e t e r o f i n t e r e s t i s o f t e n t h e p r o p e r edge d e t e c t o r t h r e s h o l d s e t t i n g . T h r e s h o l d s e l e c t i o n i s a m a j o r theme u n d e r l y i n g t h i s e v a l u a t i o n t e c h n i q u e , a n d K i t c h e n a n d R o s e n f e l d p r o p o s e t h a t t h e o p t i m a l t h r e s h o l d s e t t i n g i s t h a t w h i c h m a x i m i z e s t h e edge e v a l u a t i o n m e a s u r e . Of more s p e c i f i c i n t e r e s t i n t h e e v a l u a t i o n o f t h e V 2 g edge d e t e c t o r i s t h e c l a i m , f r e q u e n t l y made i n t h e p r e v i o u s c h a p t e r , t h a t t h e V 2 g f i l t e r r e t u r n s o n l y p e r f e c t l y t h i n a n d c o n t i n u o u s e d g e s . T h i s edge e v a l u a t i o n a p p r o a c h i s t h e r e f o r e w e l l t u n e d t o t h e s t r e n g t h s o f t h e V 2 g f i l t e r , a n d t h e r e f o r e f a c i l i t a t e s c o m p a r i s o n w i t h s i m i l a r s t r e n g t h s i n o t h e r f i l t e r s . A l s o , b e c a u s e t h e V 2 g f i l t e r c l e a n s n o i s e t o 2of f r o m t h e o b j e c t e d g e , t h e r e i s some c o n c e r n t h a t an e v a l u a t i o n m e a s u r e , s u c h a s t h a t o f Abdou a n d P r a t t , w h i c h s c o r e s any n o i s e c l u t t e r f o u n d 96 n e a r t h e t r u e edge h i g h l y w o u l d p e n a l i z e t h e V 2 g f i l t e r f o r i t s m e r i t s . The K i t c h e n - R o s e n f e l d scheme c a n show no s u c h b i a s . The K i t c h e n - R o s e n f e l d e v a l u a t i o n e x a m i n e s e v e r y 3 X 3 p i x e l n e i g h b o u r h o o d i n t h e t h r e s h o l d e d edge f i l t e r e d i m a g e . E a c h p i x e l i n t h i s image must c o n t a i n i n f o r m a t i o n a s t o w h e t h e r o r n o t an edge i s p r e s e n t a n d what d i r e c t i o n t h e g r a d i e n t o f t h a t edge h a s . T h i s d i r e c t i o n i s s i g n i f i e d by r a d i a n s i n 7r/4 i n c r e m e n t s . I f t h e c e n t r a l p i x e l i n t h e 3 X 3 n e i g h b o u r h o o d i s an edge p i x e l t h e e i g h t p i x e l s s u r r o u n d i n g i t a r e c a l l e d t h e edge n e i g h b o u r h o o d . P i x e l s i n t h e edge n e i g h b o u r h o o d a r e i d e n t i f i e d by t h e i r d i r e c t i o n numbers r e l a t i v e t o t h e c e n t r a l p i x e l . . F i g u r e 3.1 shows an edge n e i g h b o u r h o o d and t h e p i x e l l a b e l i n g s y s t e m . 3 2 1 4 X 0 5 6 7 F i g u r e 3.1 Edge p i x e l n e i g h b o u r h o o d S c o r e s f o r c o n t i n u a t i o n and t h i n n e s s a r e f i r s t c o m p u t e d s e p a r a t e l y o v e r t h i s n e i g h b o u r h o o d and t h e n c o m b i n e d i n t o a s i n g l e e v a l u a t i o n m e a s u r e whose v a l u e r a n g e s f r o m 0 f o r a p o o r edge t o u n i t y f o r a p e r f e c t e d g e . The c o n t i n u a t i o n s c o r e i s g i v e n by C = ( L(k) m ax + R(k) m a < )/2 , k = 0,1,...,7 . ( 3 . 2 ) L(k) a n d R(k) m e a s u r e how w e l l t h e p i x e l a t l o c a t i o n k c o n t i n u e s t h e edge t o t h e l e f t o r r i g h t o f t h e edge a t t h e c e n t r a l p i x e l . T h e s e f u n c t i o n s a r e z e r o i f no edge i s l o c a t e d a t p o s i t i o n k, and a r e g i v e n e x p l i c i t l y b y : 97 ( a ( d , d K )a(7rk/4 ,d + 7 r/2), i f k i s an edge p i x e l L ( k ) = { 0, o t h e r w i s e ; ( 3 . 3 a ) a ( d , d K ) a ( 7 r k / 4 , d - 7 r / 2 ) , i f k i s an edge p i x e l 0, o t h e r w i s e ; ( 3 . 3 b ) a ( a , 0 ) = U - |a - 0| ) / T T , a n d d 0 , d 1 f d 7 = edge g r a d i e n t d i r e c t i o n a t n e i g h b o u r k; d = edge g r a d i e n t d i r e c t i o n o f t h e c e n t e r . a ( a , 0 ) m e a s u r e s t h e a g r e e m e n t b e t w e e n t h e a n g l e s a a n d 0 i n t e r m s o f t h e minimum a r c s e p a r a t i n g them. When t h e y a r e e q u a l , a=1; when t h e y d i f f e r by it r a d i a n s , a=0. T h e r e f o r e , i f n e i g h b o u r p i x e l k h a s an e d g e d i r e c t i o n i d e n t i c a l t o t h e c e n t r a l edge p i x e l t h e n a ( d , d K ) w i l l d r i v e L ( k ) a n d R ( k ) t o a p e r f e c t s c o r e . H o w e v e r , t h e p r e m i s e t h a t an edge s h o u l d be l o c a l l y l i n e - l i k e r e q u i r e s w e i g h t i n g n e i g h b o u r s p e r p e n d i c u l a r t o t h e c e n t r a l edge h i g h e r t h a n t h e r e s t . T h i s w e i g h t i n g i s p r o v i d e d by t h e a (7 r k/4 ,d± 7 r/2) t e r m , where 7 rk/4 i s t h e d i r e c t i o n t o n e i g h b o u r k an d d± 7 r/2 i s t h e l e f t - o r r i g h t - w a r d d i r e c t i o n p e r p e n d i c u l a r t o t h e c e n t e r . O n l y t h e t h r e e p i x e l s t o t h e i m m e d i a t e l e f t a n d r i g h t o f t h e c e n t r a l g r a d i e n t d i r e c t i o n a r e i n v o l v e d i n t h e e v a l u a t i o n o f L ( k ) a n d R ( k ) f r o m w h i c h t h e maximum v a l u e s , L ( k ) max and R ( k ) max , a r e c h o s e n . The t h i n n e s s s c o r e , T, i s s i m p l y d e f i n e d a s t h e f r a c t i o n o f t h e p i x e l s i n t h e n e i g h b o u r h o o d t h a t a r e non-edge p i x e l s . S i n c e a p e r f e c t l y t h i n edge h a s o n l y two o r l e s s p i x e l s a d j a c e n t t o t h e c e n t e r e d g e , t h i s f r a c t i o n i s g i v e n by R ( k ) where • 98 T = max{ 6, no. o f non-edge p i x e l s } / 6 . ( 3 . 4 ) C a n d T a r e t h e n c o m b i n e d i n t o t h e e v a l u a t i o n m e a s u r e f o r t h e c e n t r a l p i x e l : E = 7 C + ( 1 - 7 ) T, ( 3 . 5 ) where 7 i s a w e i g h t i n g c o e f f i c i e n t a d j u s t e d t o g i v e E a s u i t a b l e b a l a n c e o f t h i n n e s s a n d c o h e r e n c e . V a r i o u s v a l u e s o f 7 r a n g i n g f r o m z e r o t o u n i t y w i l l be e x a m i n e d . F o r t u n a t e l y s e l e c t i o n o f 7 i s t h e o n l y q u a l i t a t i v e a s p e c t t o t h i s e v a l u a t i o n p r o c e s s , a n d i s p e r f o r m e d a f t e r a l l t h e o t h e r r e s u l t s h a v e been c o m p i l e d . F i n a l l y , E i s a v e r a g e d o v e r a l l t h e edge p i x e l s f o u n d i n t h e image t o p r o v i d e an e v a l u a t i o n s c o r e f o r t h e image a s a w h o l e . T h r e e t e s t i m a g e s were e x p l o r e d by K i t c h e n a n d R o s e n f e l d . One was t h e " b u l l ' s e y e " r i n g image a l r e a d y i n t r o d u c e d i n t h e l a s t c h a p t e r , a n o t h e r was t h e s i n g l e v e r t i c a l s t e p ramp image u s e d by Abdou a n d P r a t t , a n d t h e l a s t was an image o f p u r e n o i s e . To r e v i e w , t h e r i n g image was o r i g i n a l l y c o n s t r u c t e d i n a 512 X 512 a r r a y . I t c o n s i s t e d o f a c e n t r a l d a r k c i r c l e o f g r e y l e v e l 115 s u r r o u n d e d by a s e r i e s o f f i v e r i n g s a l t e r n a t i n g b e t w e e n l i g h t ( g r e y - l e v e l 140) a n d d a r k ( g r e y - l e v e l 115) o f w i d t h 32 p i x e l s on an o v e r a l l d a r k b a c k g r o u n d . The image was r e d u c e d t o 128 X 128 by r e p l a c i n g e a c h 4 X 4 p i x e l b l o c k w i t h a s i n g l e p i x e l o f g r e y - l e v e l e q u a l t o t h a t o f t h e b l o c k . T h i s image was p r o p o s e d f o r s t u d y b e c a u s e i t s r i n g s o f d i f f e r i n g r a d i u s p r o v i d e d an e x c e l l e n t means o f s u b j e c t i n g t h e edge o p e r a t o r s t o e d g e s i n e v e r y c o n c e i v a b l e o r i e n t a t i o n b u t w h i c h r e m a i n a p p r o x i m a t e l y l o c a l l y l i n e - l i k e w i t h s i m i l a r c o n t r a s t t o t h e Abdou a n d P r a t t 99 image (due t o t h e b l o c k a v e r a g i n g ) . The v e r t i c a l s t e p image c o n s i s t e d o f a 64 X 64 p i x e l a r r a y w h ere t h e l e f t h a l f was g i v e n g r e y - l e v e l 115 a n d t h e r i g h t h a l f g r e y - l e v e l 140. To s i m u l a t e t h e ramp d i s c o n t i n u i t y o f A b d o u a n d P r a t t t h e s i n g l e c o l u m n a t t h e j u n c t i o n o f t h e d i s c o n t i n u i t y was g i v e n an i n t e r m e d i a t e g r e y - l e v e l o f 128. The f i n a l random n o i s e image was a l s o 64 X 64 p i x e l s b u t c o n t a i n e d o n l y i n d e p e n d e n t G a u s s i a n random n o i s e o f mean 128 a n d s t a n d a r d d e v i a t i o n 16. T h i s a l l o w e d i n s p e c t i o n o f edge d e t e c t o r p e r f o r m a n c e i n an image c o n t a i n i n g no w e l l - f o r m e d e d g e s , i n a s e n s e s i m u l a t i n g some r e a l w o r l d i m a g e s . To s t u d y t h e i n f l u e n c e o f n o i s e , i n d e p e n d e n t z e r o mean G a u s s i a n n o i s e was a d d e d t o t h e r i n g s ( a f t e r r e d u c t i o n ) a n d v e r t i c a l s t e p i m a g e s . The s t a n d a r d d e v i a t i o n o f t h e n o i s e , a, was a d j u s t e d t o p r o v i d e s e v e n s i g n a l t o n o i s e r a t i o s l o g a r i t h m i c a l l y s p a c e d w i t h v a l u e s : 1, 2, 5, 10, 20, 50, a n d 100. A b d o u a n d P r a t t ' s s i g n a l t o n o i s e r a t i o d e f i n i t i o n , e q u a t i o n ( 3 . 1 ) , was a d o p t e d where t h e i n t e n s i t y s t e p h e i g h t , h, i s 25. H o w e v e r , n o t e t h a t t h i s s i g n a l t o n o i s e r a t i o i s e x a c t l y d o u b l e t h a t d e r i v e d i n t h e p r e v i o u s c h a p t e r where t h e s i g n a l power was shown t o be h 2 / 2 f o r a s i n g l e s t e p i m a g e . The e x a c t same edge d e t e c t i o n schemes u s e d by Abdou a n d P r a t t were i n v e s t i g a t e d by K i t c h e n a n d R o s e n f e l d a l s o . T h i s p e r m i t t e d d i r e c t c o m p a r i s o n o f t h e r e s u l t s , a n d c o n c l u s i o n s a b o u t t h e r e l a t i v e m e r i t s o f t h e e v a l u a t i o n schemes t o be d r a w n . B a s i c a l l y , t h e i r f i n d i n g s were i n a c c o r d a n c e w i t h t h o s e o f Abdou a n d P r a t t i n s h o w i n g l a r g e l y t h e same m e r i t o r d e r i n g o f t h e edge 100 d e t e c t o r s t e s t e d . H owever, t h e Abdou a n d P r a t t s c o r e s a l l show a c o n v e r g e n c e a t h i g h a n d l o w SNR, w h e r e a s t h e s p r e a d o f t h e K i t c h e n - R o s e n f e l d s c o r e s t e n d s t o r e m a i n f a i r l y c o n s t a n t . T h i s seems t o i n d i c a t e t h a t l o c a l edge c o h e r e n c e i s a more i n d i v i d u a l a t t r i b u t e o f an edge d e t e c t o r t h a n t h e Abdou a n d P r a t t f i g u r e o f m e r i t . I n a s e n s e t h i s i s n o t s u p r i s i n g s i n c e E i s a s t r u c t u r a l m e a s u r e m o n i t o r i n g , l o c a l l y , how w e l l - f o r m e d t h e e d g e s a r e , w h e r e a s F i s more o f a s t a t i s t i c a l m e a s u r e i n d i c a t i n g an o v e r a l l g o o d n e s s o f f i t t o t h e i d e a l e d g e . An i m p o r t a n t q u a n t i t y u s e d t h r o u g h o u t i s t h e edge p i x e l f r a c t i o n ( e p f ) r e p r e s e n t i n g t h e p r o p o r t i o n o f t h e image p i x e l s e x a m i n e d t h a t a r e e d g e s . T h i s c a n s e r v e a s an i n d i c a t i o n o f how w e l l t h e t e s t e d g e s a r e r e s o l v e d , a nd t h e d e g r e e o f n o i s e p r e s e n t . The i d e a l e p f f o r t h e r i n g s image i s d i f f i c u l t t o e v a l u a t e a n a l y t i c a l l y . H o w e v e r , by c o u n t i n g t h e n e a r l y p e r f e c t l y r e s o l v e d edge p i x e l s o f F i g u r e 2 . 1 1 c , t h e i d e a l e p f c a n be e s t i m a t e d . The t o t a l r i n g c i r c u m f e r e n c e i s 1218 p i x e l s . W i t h a t o t a l image a r e a o f 1 2 8 2 p i x e l s t h e i d e a l e p f i s f o u n d t o be 0.074. F o r t h e v e r t i c a l s t e p image t h e i d e a l e p f i s s i m p l y 6 4 / ( 6 4 X 5 8 ) = 0.017 ( e x c l u d i n g t h e s i x c o l u m n s c e n t e r e d on t h e i d e a l edge a t t h e image s i d e s t o remove i t s i n f l u e n c e ) . One d r a w b a c k o f t h e K i t c h e n - R o s e n f e l d a p p r o a c h i s t h a t i t h a s an i n h e r e n t b i a s a g a i n s t c u r v e d e d g e s . T h i s i s a r e s u l t o f t h e p r e m i s e t h a t i d e a l edge f e a t u r e s s h o u l d be l o c a l l y l i n e - l i k e . H o w e v e r , t h i s p r e m i s e a c t s a g a i n s t t h e r i n g s t e s t image r e d u c i n g h i g h s c o r e s when t h e t e s t e d g e s a r e p e r f e c t l y r e s o l v e d . To i l l u s t r a t e , c o n s i d e r t h e m i n i m a l l y c u r v e d n e i g h b o u r h o o d o f F i g u r e 3.2 b e l o w . 101 TT/4 V//A F i g u r e 3.2 M i n i m a l l y c u r v e d n e i g h b o u r h o o d The a r r o w s i n d i c a t e t h e edge g r a d i e n t d i r e c t i o n s . The l e f t w a r d p i x e l i s a t k=3 w i t h d i r e c t i o n 7r/4 g i v e s l e f t w a r d m e a s u r e L ( k = 3) = a ( d , d 3 ) a ( k 7 r / 4 , d + r r / 2 ) , = a(0,*r/4) a ( 3 7 r / 4 , 7 r / 2 ) , = 0.75 X 0.75 = 0.5625 . The r i g h t w a r d p i x e l i s a t k=6 w i t h d i r e c t i o n 0 i n a g r e e m e n t w i t h t h e c e n t e r p i x e l g i v i n g r i g h t w a r d m e a s u r e R(k=6) = a ( d , d 6 ) a ( k 7 r / 4 , d - 7 r / 2 ) , = a (0,0) a(37r/2,-7r/2) , = 1.0 X 1.0 = 1.0 . The c o n t i n u a t i o n m e a s u r e o f t h i s n e i g h b o u r h o o d i s t h e r e f o r e : C = ( L ( k ) + R ( k ) )/2 = ( 0.5625 + 1.0 ) / 2 , = 0.78125 . G i v e n a 7 o f 0.8 ( t h e p r e f e r r e d v a l u e ) a n d T=1 ( t h i s n e i g h b o u r h o o d i s p e r f e c t l y t h i n ) , t h e f i n a l e v a l u a t i o n s c o r e f o r t h i s n e i g h b o u r h o o d w o u l d be E=0.825. The r i n g s t e s t image c u r v e s s u f f i c i e n t l y g e n t l y so a s n o t t o be d o m i n a t e d by s u c h c u r v e d n e i g h b o u r h o o d s , b u t t h e y do f o r m a s u b s t a n t i a l f r a c t i o n o f t h e n e i g h b o u r h o o d s p r e s e n t . T h i s f a c t s h o u l d be k e p t i n m i n d when a n a l y z i n g t h e r i n g s image s c o r e s . 1 02 3 . 3 E v a l u a t i o n E x p e r i m e n t P r o c e d u r e s S i n c e K i t c h e n a n d R o s e n f e l d p u b l i s h e d t h e c o m p l e t e e v a l u a t i o n s c o r e s o f t e n edge o p e r a t o r s , l i t t l e v a l u e was s e e n i n r e p r o d u c i n g a l l o f t h e s e r e s u l t s f o r c o m p a r i s o n t o t h e V 2 g r e s u l t s . H o wever, i t was c o n s i d e r e d p r u d e n t t o f u l l y r e - e v a l u a t e a t l e a s t one o f t h e g i v e n o p e r a t o r s t o a c t a s a r e f e r e n c e a n d i n d i c a t e t h a t t h e t e c h n i q u e h a d been p r o p e r l y u n d e r s t o o d a n d c o d e d . O n l y t h e t h r e e - l e v e l t e m p l a t e m a t c h i n g o p e r a t o r c o u l d be c h o s e n f o r t h i s t a s k s i n c e t h e c o m p l e t e s e t o f e v a l u a t i o n e x p e r i m e n t s were o n l y p u b l i s h e d f o r t h i s o p e r a t o r . K i t c h e n a n d R o s e n f e l d d e s i g n e d t h e s e e x p e r i m e n t s i n p a r t t o e x p l o r e t h e p r o c e s s o f t h r e s h o l d s e l e c t i o n a n d t o d e t e r m i n e t h e i d e a l c h o i c e f o r 7 . The r e p r o d u c t i o n o f t h e t h r e e - l e v e l t e m p l a t e e v a l u a t i o n e x p e r i m e n t s p r o d u c e d r e s u l t s i n e x c e l l e n t a g r e e m e n t w i t h t h o s e p u b l i s h e d . I t was t h e r e f o r e c o n c l u d e d t h a t t h e i m p l e m e n t a t i o n o f t h e K i t c h e n - R o s e n f e l d e v a l u a t i o n m e thod was e s s e n t i a l l y c o r r e c t . E v a l u a t i o n o f t h e V 2 g f i l t e r c o u l d t h e n p r o c e e d w i t h c o n f i d e n c e t h a t t h e r e s u l t s c o u l d be c o m p a r e d d i r e c t l y t o t h o s e p u b l i s h e d . The M a r r a n d H i l d r e t h V 2 g f i l t e r was a p p l i e d t o t h e t e s t i m a g e s o f t h e p r e v i o u s s e c t i o n t h r o u g h u s e o f f a s t c o n v o l u t i o n v i a t h e t w o - d i m e n s i o n a l f a s t F o u r i e r t r a n s f o r m . The f i l t e r c o e f f i c i e n t s were r e p r e s e n t e d t o d o u b l e p r e c i s i o n f l o a t i n g - p o i n t r e s o l u t i o n a c r o s s t h e e n t i r e image a r r a y . The f i l t e r s t a n d a r d d e v i a t i o n s c h o s e n were e x a c t l y t h o s e o f t h e l a s t c h a p t e r . The V 2 g f i l t e r was d e s i g n e d f o r t h e d e t e c t i o n o f e d g e s t h r o u g h t h e z e r o c r o s s i n g s i t g e n e r a t e s . H owever, t h i s 103 e v a l u a t i o n scheme a l s o r e q u i r e s t h a t a m a g n i t u d e a n d d i r e c t i o n be a s s i g n e d t o e a c h edge p i x e l . To f u l f i l l t h i s r e q u i r e m e n t , t h e c o n v e n t i o n s o f t h e p r e v i o u s c h a p t e r were r e t a i n e d . The m a g n i t u d e an d d i r e c t i o n o f a z e r o - c r o s s i n g segment was d e f i n e d a s t h e m a g n i t u d e a n d d i r e c t i o n o f t h e g r a d i e n t a t t h e s e g m e n t . Though t h i s i s a s t r a i g h t - f o r w a r d c o n c e p t i n a c o n t i n u o u s t w o -d i m e n s i o n a l p l a n e , i n a d i s c r e t e a r r a y c e r t a i n s p e c i a l a c c o m o d a t i o n s must be made. F i r s t , a z e r o c r o s s i n g i s a t r a n s i t i o n o f i n t e n s i t y f r o m p o s i t i v e t o n e g a t i v e b e t w e e n h o r i z o n t a l l y a n d v e r t i c a l l y a d j a c e n t p i x e l s . A s s u c h , i t i s n o t i n h e r e n t l y a s s o c i a t e d w i t h a n y p i x e l i n t h e o u t p u t a r r a y . I n l i e u o f c r e a t i n g a n o t h e r s e t o f a r r a y s o f s i z e 2N X 2N t o e x p l i c i t l y r e p r e s e n t t h e j u n c t i o n s b e t w e e n p i x e l s i n t h e o u t p u t a r r a y ( s i z e N X N ) , a c o n v e n t i o n was a d o p t e d t o a s s i g n edge m a g n i t u d e s a n d d i r e c t i o n s t o p i x e l s o f t h e o u t p u t a r r a y . T h i s c o n v e n t i o n was t o a s s i g n t h e edge a t t r i b u t e s t o t h e p i x e l on t h e p o s i t i v e s i d e o f t h e z e r o c r o s s i n g . The r e s u l t o f t h i s i s t h a t edge i n f o r m a t i o n w i l l be a s s o c i a t e d w i t h t h e b o r d e r s o f d a r k o b j e c t s i n t h e i n p u t i m a g e . S i n c e a b o r d e r p i x e l may h a v e up t o f o u r j u n c t i o n s w i t h t h e n e g a t i v e b a c k g r o u n d , an u n c o n v e n t i o n a l a p p r o a c h t o s o l v i n g i t s g r a d i e n t a t t r i b u t e s was t a k e n . Once s u c h a b o r d e r p o i n t was f o r m e d , t h e g r a d i e n t was c a l c u l a t e d i n t h e f o l l o w i n g manner. F i r s t t h e s l o p e o f a l l t h e z e r o c r o s s i n g s a d j a c e n t t o t h e b o r d e r p i x e l was c a l c u l a t e d u s i n g a s i m p l e two p o i n t d i f f e r e n c e o f t h e i n t e n s i t i e s a c r o s s t h e z e r o c r o s s i n g . T h i s c a l c u l a t i o n was c h o s e n b e c a u s e o f i t s s i m p l i c i t y , a n d b e c a u s e i t s f r e q u e n c y r e s p o n s e r e a s o n a b l y a p p r o x i m a t e s t h a t o f a d e r i v a t i v e a c r o s s t h e 104 V 2 g p a s s b a n d . I f two j u n c t i o n s a r e f o u n d i m m e d i a t e l y a d j a c e n t i n a c l o c k w i s e o r c o u n t e r - c l o c k w i s e s e n s e , t h e m a g n i t u d e o f t h e d i a g o n a l g r a d i e n t b e t w e e n them i s e s t i m a t e d w i t h t h e P y t h a g o r e a n t h e o r e m . F i n a l l y t h e g r a d i e n t a t t r i b u t e s a d o p t e d by t h e b o r d e r p i x e l w i l l be t h a t o f t h e g r a d i e n t c a l c u l a t i o n r e t u r n i n g t h e g r e a t e s t m a g n i t u d e . T h i s p r o v i d e s up t o e i g h t p o s s i b l e g r a d i e n t d i r e c t i o n s w h i c h a r e i d e n t i f i e d i n t h e s u b s e q u e n t o u t p u t i m a g e s by t h e i r F reeman d i r e c t i o n n umbers. The a b o v e a p p r o a c h p r o v e s a m b i g u o u s o n l y when v e r y n a r r o w o b j e c t f e a t u r e s , one p i x e l i n w i d t h , a r e p r o d u c e d i n t h e o u t p u t i m a g e . I n t h i s c a s e , t h e b o r d e r p i x e l s c o u l d be bounded by two o r more l e g i t i m a t e e d g e s o f w h i c h o n l y one c a n be r e c o r d e d . As a c o n s e q u e n c e , t h e c o n t i n u i t y m e a s u r e c a n be e x p e c t e d t o s u f f e r . H o w ever, a s was s e e n i n t h e l a s t c h a p t e r , s u c h t h i n f e a t u r e s o n l y o c c u r f o r v e r y l o w s t a n d a r d d e v i a t i o n f i l t e r s a n d so a r e n o t e x p e c t e d t o be a g e n e r a l p r o b l e m . The c h o i c e o f f i l t e r s t a n d a r d d e v i a t i o n s , a( , w i l l p a r a l l e l t h a t o f t h e l a s t c h a p t e r . The r e a s o n s a r e s i m i l a r ; t o o b s e r v e t h e i n f l u e n c e o f f i l t e r s w h i c h a r e t o o l a r g e , p r o p e r l y m a t c h e d , a n d t o o s m a l l . T h e r e f o r e , t h e e v a l u a t i o n t r i a l s w i l l be a p p l i e d t o t h e f i l t e r e d r i n g s i m a g es o f F i g u r e 2.11, where a, =16, 6.4, a n d 1.6. F o r t h e v e r t i c a l t e s t i m a g e , o n l y two s t a n d a r d d e v i a t o n s were a p p l i e d , a, =6.4, a n d 1.6. a, =16 was r e j e c t e d s i n c e i t i s h o p e l e s s l y t o o l a r g e ( i t s z e r o c r o s s i n g o c c u r s a t a r a d i u s o f 32 an d t h e image i s o n l y 64 X 6 4 ) . A c t u a l l y , a s i n g l e s t e p edge s h o u l d be r e s o l v a b l e by a n y f i l t e r w i d t h . H o w e v e r , t h e e x p e c t e d 105 d e c r e a s e i n n o i s e r e j e c t i o n w i t h d e c r e a s i n g of s h o u l d be r e f l e c t e d i n t h e e v a l u a t i o n s c o r e s . B e c a u s e o f t h e c i r c u l a r c o n n e c t i o n o f t h e image b o r d e r s by t h e c o n v o l u t i o n m e t h o d u s e d , t h e f i l t e r a c t u a l l y s e e s t h i s image a s an i n f i n i t e s e r i e s o f v e r t i c a l s t r i p e s o f a l t e r n a t i n g i n t e n s i t y a n d edge s p a c i n g o f T=32. The m a t c h e d f i l t e r s i z e f o r t h i s s p a c i n g w o u l d be of =25.6 w h i c h i s e v e n more i m p r a c t i c a l t h a n o f=16. i n t e r e s t i n g l y , t h e ot =6.4 f i l t e r a p p l i e d t o a s q u a r e wave o f T=32 h a s a 0 v a l u e o f f i v e w h i c h was shown t o be t h e s m a l l e s t 0 f o r w h i c h t h e f i l t e r c a n p r o d u c e an i d e a l s t e p edge r e s p o n s e f o r t h i s k i n d o f image. a f=1.6 w o u l d c o r r e s p o n d t o a 0 o f 20 a n d a r e s o l u t i o n i n t e r v a l , I , o f 6.4 i n d i c a t i n g t h a t most o f t h e image i s i s o l a t e d f r o m t h e o p t i m u m n o i s e r e j e c t i o n i n f l u e n c e o f t h e t e s t e d g e s . To m a i n t a i n c o m p a t i b i l i t y w i t h t h e a b o v e e x p e r i m e n t s , t h e p u r e n o i s e image was a l s o f i l t e r e d w i t h o( =6.4, a n d 1.6. The e v a l u a t i o n t r i a l s p e r f o r m e d p a r a l l e l e d t h o s e p u b l i s h e d by K i t c h e n a n d R o s e n f e l d f o r t h e t h r e e - l e v e l t e m p l a t e o p e r a t o r . T h i s f a c i l i t a t e s a d e t a i l e d a n a l y s i s o f t h e c o n t i n u i t y a n d t h i n n e s s o f t h e e d g e s p r o d u c e d a s w e l l a s t h e s e n s i t i v i t y t o a c h a n g i n g s i g n a l t o n o i s e r a t i o . 106 3.4. E v a l u a t i o n R e s u l t s 3.4.1 R i n g s Image E v a l u a t i o n F i g u r e s 3.3 t h r o u g h 3.5 d i s p l a y t h e r e s u l t s d e r i v e d f r o m f i l t e r i n g t h e r i n g s image a t t h e t h r e e s t a n d a r d d e v i a t i o n s . The t e s t image h a s z e r o mean G a u s s i a n n o i s e a d d e d t o p r o d u c e an SNR o f f i f t y . A n a l y s i s o f t h e r e s u l t s f o l l o w s ; r e f e r e n c e w i l l be made t o t h e u n t h r e s h o l d e d edge i m a g e s o f F i g u r e 2.11, c h a p t e r 2. of =16: The e d g e s p r o d u c e d , s e e n i n F i g u r e 2.11a, c o r r e s p o n d o n l y t o t h e e x t r e m e i n n e r a n d o u t e r b o u n d a r i e s o f t h t e s t p a t t e r n . The d e t a i l e d r i n g s t r u c t u r e a n d n o i s e a r e t o t a l l y s m o o t h e d away. I t i s t h e r e f o r e e x p e c t e d t h a t t h e edge p i x e l f r a c t i o n a l w a y s r e m a i n l o w , a n d t h a t t h i n n e s s s c o r e s p e r f e c t l y . The h i s t o g r a m o f edge m a g n i t u d e s , F i g u r e 3.3a, i n d i c a t e s a n e a r l y u n i f o r m d i s t r i b u t i o n o f p i x e l s a b o v e 54% maximum g r e y l e v e l . The a b s e n c e o f l o w i n t e n s i t y p i x e l s i s c o n s i s t e n t w i t h t h e a b s e n c e o f n o i s e i n d u c e d e d g e s . F i g u r e 3.3b shows t h a t t h e e v a l u a t i o n m e a s u r e b e l o w 54% t h r e s h o l d r e m a i n s a b o v e , a n d a p p r o x i m a t e l y i n c l u d i n g , 0.9 f o r a l l 7 . F o r 7=0, E r e m a i n s c o n s t a n t a t u n i t y , w h i c h i s c o n s i s t e n t w i t h t h e o b s e r v e d edge t h i n n e s s . The maximum e p f v a l u e o f t h i s r e g i o n , F i g u r e 3.3c, o f 0.027, a b o u t one t h i r d o f t h a t e x p e c t e d , r e f l e c t s t h e s c a r c i t y o f edge d e t a i l . Above 54%, t h e r e m a i n i n g c u r v e s d r o p i n a c o m p l e x manner r e f l e c t i n g t h e l o s s o f c o n t i n u i t y on b r e a k a g e o f o t h e r w i s e p e r f e c t e d g e s . N o t e t h a t t h e c o n t i n u i t y - o n l y c u r v e , 7 = 1 , p e a k i n g a t 0.9, r e f l e c t s t h e i n h e r e n t 107 F i g u r e 3.3 a, =16.0 V 2 g f i l t e r e d r i n g s image: (a) edge m a g n i t u d e h i s t o g r a m ; e v a l u a t i o n m e a s u r e a g a i n s t (b) t h r e s h o l d l e v e l ; ( c ) edge p i x e l f r a c t i o n 108 F i g u r e 3.4 of =6.4 V 2 g f i l t e r e d r i n g s image: ( a ) edge m a g n i t u d e h i s t o g r a m ; e v a l u a t i o n m e a s u r e a g a i n s t (b) t h r e s h o l d l e v e l ; ( c ) edge p i x e l f r a c t i o n 109 fraction of max. mag. F i g u r e 3.5 a4 = 1 .6 V 2 g f i l t e r e d r i n g s image: ( a ) edge m a g n i t u d e h i s t o g r a m ; e v a l u a t i o n m e a s u r e a g a i n s t (b) t h r e s h o l d l e v e l ; ( c ) edge p i x e l f r a c t i o n 110 b i a s o f t h i s method a g a i n s t c u r v e d e d g e s . a( =6.4: The edge i m a g e , F i g u r e 2.11b, i n d i c a t e s t h a t t h e f u l l s t r u c t u r e o f t h e r i n g s p a t t e r n was d e t e c t e d . W i t h i n t h e p a t t e r n , no n o i s e i s s e e n . A s m a l l amount o f n o i s e i n t h e f o r m o f c l o s e d p a t c h e s i s s e e n i n t h e image c o r n e r s . A l l e d g e s a r e p e r f e c t l y t h i n . The h i s t o g r a m , F i g u r e 3.4a, r e v e a l s t h e b e g i n n i n g s o f a b i m o d a l d i s t r i b u t i o n w i t h an empty b a n d b e t w e e n 9% a n d 5 0 % o f maximum l e v e l . The o n s e t o f t h e s m a l l mode b e l o w 9% i s an i n d i c a t i o n o f t h e p r e s e n c e o f n o i s e . The e v a l u a t i o n s c o r e s o f F i g u r e 3.4b h a v e s p r e a d s l i g h t l y b u t s t i l l r e m a i n a b o v e 0.88 up t o 56% t h r e s h o l d . The p e r f e c t t h i n n e s s o f t h e e d g e s i s a g a i n r e f l e c t e d i n t h e c o n s t a n t u n i t y v a l u e o f t h e 7=0 c u r v e . The n o i s e seemed t o h a v e l i t t l e e f f e c t on t h e l o w t h r e s h o l d r e g i m e o f t h e e v a l u a t i o n m e a s u r e s . F i n a l l y , t h e e p f v a l u e f o u n d j u s t a f t e r t h r e s h o l d i n g o u t t h e n o i s e was a l m o s t e x a c t l y t h a t e x p e c t e d a t 0.0741 d e s p i t e t h e e r r o r i n many o f t h e edge p o s i t i o n s . Of = 1 .6: The edge image o f F i g u r e 2.11c shows t h e f u l l r i n g p a t t e r n r e s o l v e d t o h i g h a c c u r a c y b u t embedded i n a f i e l d o f n o i s e . R e f l e c t i n g t h e p e r v a s i v e n o i s e , t h e h i s t o g r a m , F i g u r e 3.5a, h a s become s t r o n g l y b i m o d a l w i t h t h e peak p i x e l c o u n t now i n t h e n o i s e mode a t 9%. The many z e r o s i n t h e h i s t o g r a m a r e a r e s u l t o f a l l t h e edge m a g n i t u d e s h a v i n g i n t e g e r v a l u e s b e t w e e n 0 a n d 62 111 w h i c h do n o t map t o e v e r y l e v e l b e t w e e n 0 a n d 100%. The e v a l u a t i o n s c o r e s o f F i g u r e 3.5b peak o v e r t h e r a n g e o f 38% t o 44% t h r e s h o l d w i t h 7 = 1 r e t u r n i n g t h e l o w e s t peak s c o r e o f 0.865. T h i n n e s s i s s e e n f o r t h e f i r s t t i m e t o d r o p b e l o w 1.0, b e l o w 18% t h r e s h o l d , a t t a i n i n g a minimum o f 94%. I n t e r e s t i n g l y , t h e p e a k s c o i n c i d e w i t h t h e v a l l e y b e t w e e n t h e h i s t o g r a m mode a r e s u l t c o n s i s t e n t w i t h t h a t f o u n d i n K i t c h e n - R o s e n f e l d ' s t h r e e - l e v e l t e m p l a t e e v a l u a t i o n s . F i g u r e 3.5c d r a m a t i c a l l y i l l u s t r a t e s t h i s peak o c c u r i n g a t e p f = 0 . 0 7 5 j u s t a b o v e t h a t e x p e c t e d f r o m t h e r i n g s t h e m s e l v e s . C l e a r l y t h e c o n c l u s i o n h e r e i s t h e same a s t h a t o f K i t c h e n a n d R o s e n f e l d : i f t h e image must be t h r e s h o l d e d , t h e o p t i m a l l e v e l c o i c i d e s w i t h t h e p eak e v a l u a t i o n s . I n g e n e r a l , i t i s o b s e r v e d t h a t t h e e v a l u a t i o n s c o r e s a t l o w t h r e s h o l d r e m a i n h i g h f o r a l l 7 i n c o n t r a s t t o t h e d i v e r g e n c e s e e n i n t h e t h r e e - l e v e l t e m p l a t e r e s u l t s . I t c a n t h e r e f o r e be c o n c l u d e d t h a t t h e V 2 g f i l t e r e d g e s e x h i b i t a l o c a l c o n t i n u i t y q u a l i t y c o m p a r a b l e t o t h e i r t h i n n e s s . The n e x t s e r i e s o f t e s t s c o m p a r e d t h e s c o r e s a g a i n s t t h r e s h o l d s e t t i n g f o r s e v e n d i f f e r e n c t s i g n a l t o n o i s e r a t i o s ( 1 , 2, 5, 10, 20 50, 1 0 0 ) . T h i s r e q u i r e d c h o o s i n g a f i x e d 7 s e t t i n g . The s e t t i n g c h o s e n was 7 = 0 . 8 , t h e same a s t h a t u s e d by K i t c h e n a n d R o s e n f e l d . C o m p a t i b i l i t y w i t h p u b l i s h e d r e s u l t s was a f a c t o r i n t h i s c h o i c e , b u t n o t a d o m i n a n t o n e . The p r i n c i p a l r e a s o n was t h a t t h e e d g e s were o b s e r v e d t o be p e r f e c t l y t h i n . The t h i n n e s s component o f t h e s c o r e t h e r e f o r e p r o v i d e d l i t t l e new i n f o r m a t i o n a n d w o u l d t e n d t o u p w a r d l y b i a s t h e c o n t i n u i t y 1 12 c o m p o n e n t . C o n t i n u i t y , h o w e v e r , was o f s e r i o u s c o n c e r n p a r t i c u l a r l y f o r t h e a p p l i c a t i o n s e n v i s i o n e d w h i c h r e q u i r e c o n t i n u o u s e d g e s f o r r e g i o n s e g m e n t a t i o n . The p u r e c o n t i n u i t y s c o r e d o e s , h o w e v e r , h a v e a c u r v e d edge b i a s . A 7 o f 0.8 was t h e r e f o r e f e l t t o c o m p e n s a t e f o r t h e b i a s , a c k n o w l e d g e t h e g e n e r a l edge q u a l i t y , a n d p r o v i d e g ood i n d i c a t i o n o f t h e d e g r e e o f edge c o n t i n u i t y . SNR v a r i a t i o n : T h e s e images were o n l y t h r e s h o l d e d t o t h e l e v e l where e p f d r o p p e d b e l o w 0.02, a t w h i c h p o i n t t h e t e s t i m a g e s a r e q u i t e t h o r o u g h l y b r o k e n . F i g u r e 3.6a shows t h e r e s u l t s f o r =16. The e v a l u a t i o n s c o r e s a r e s e e n t o be l a r g e l y SNR i n d e p e n d e n t e x h i b i t i n g s i m i l a r s h a p e a n d s m a l l v e r t i c a l v a r i a t i o n . S i n c e t h e e p f r a n g e was t h e same f o r a l l t h e c u r v e s , b e g i n n i n g a t 0.027 t h e same l e v e l o f edge d e t a i l was r e s o l v e d a t e a c h SNR. T h i s n o i s e i m u n i t y i s e x p e c t e d b e c a u s e t h e r e s o l u t i o n i n t e r v a l , I , o f 64 a b o u t t h e two r e s o l v e d r i n g s c o v e r s t h e e n t i r e i m a g e . The maximum e v a l u a t i o n m e a s u r e was r o u g h l y c o n s t a n t a t 0.925 a n d was a t t a i n e d a t maximum e p f . The max. E v e r s u s SNR c u r v e o f F i g u r e 3.6b r e i t e r a t e s t h e n o i s e i m m u n i t y f o u n d . The a, =6.4 r e s u l t s o f F i g u r e 3.7a a r e s t i l l s e e n t o be l a r g e l y SNR i n d e p e n d e n t i n b o t h s h a p e a n d v e r t i c a l s p r e a d , t h o u g h some d i v e r g e n c e o c c u r s a t l o w e p f . The i n c r e a s e i n edge d e t a i l i s r e s p o n s i b l e f o r i n c r e a s i n g t h e e p f r a n g e . The peak s c o r e s a l l o c c u r a b o u t epf=0.74 p r o d u c e d by t h e r i n g s . The max. E c u r v e , F i g u r e 3.7b, d i s p l a y s t h i s SNR i n d e p e n d e n c e by r e m a i n i n g f l a t a t 1 1 3 50 100 F i g u r e 3.6 ar =16 V 2 g f i l t e r e d r i n g s image e v a l u a t i o n r e s u l t s : ( a ) SNR= 1, 2, 5, 10, 20, 50, and 100 ( f r o m b o t t o m c u r v e t o t o p ) , 6=0.8; (b) peak e v a l u a t i o n s c o r e s a g a i n s t SNR 1 14 1.0 06-I as 10 SNR 20 so 100 F i g u r e 3.7 a, =6.4 V 2 g f i l t e r e d r i n g s image e v a l u a t i o n r e s u l t s : ( a ) SNR= 1, 2, 5, 10, 20, 50, and 100 ( f r o m b o t t o m c u r v e t o t o p ) , 5=0.8; (b) peak e v a l u a t i o n s c o r e s a g a i n s t SNR 1 1 5 1.0 OA i 0.2] 0-I - r . 1 , 1 1 , . -r- 1 1.0 0.40 0.16 a06 0.03 0.01 epf E IJO-09- (b) 08 07-ae as 1 i 1 1 1 -I 1 — I , , , 1 1 2 S 10 20 50 100 SNR F i g u r e 3.8 a( =1.6 V 2 g f i l t e r e d r i n g s image e v a l u a t i o n r e s u l t s : ( a ) SNR= 1, 2, 5, 10, 20, 50, and 100 ( f r o m b o t t o m c u r v e t o t o p ) , 6=0.8; (b) peak e v a l u a t i o n s c o r e s a g a i n s t SNR 1 16 a b o u t 0.9. When af was d e c r e a s e d t o 1.6 i n F i g u r e 3.8a, t h e SNR i n d e p e n d e n c e v a n i s h e d . I n s t e a d , t h e c u r v e s now show a b r o a d h o r i z o n t a l a n d v e r t i c a l s p r e a d . The h i g h SNR c u r v e s show a d e f i n i t e i n c r e a s e a n d peak a b o u t t h e c r i t i c a l e p f a t 0.074. However, t h e o b s e r v a t i o n t h a t t h e l o w SNR c u r v e s p eak a t h i g h e p f i n d i c a t e s t h a t t h e n o i s e h a s a s u f f i c i e n t l y w i d e r a n g e o f m a g n i t u d e s a s t o r e n d e r t h r e s h o l d i n g i n e f f e c t i v e i n r e m o v i n g i t w i t h o u t a l s o d a m a g i n g t h e r i n g s ' s t r u c t u r e . The max. E v e r s u s SNR c u r v e r e f l e c t s t h e new SNR d e p e n d e n c e by r a n g i n g 0.77 a t SNR=1 t o 0.90 a t SNR=100. As w i t h F i g u r e 3.5 t h e s e r e s u l t s a r e a l s o b e g i n n i n g t o r e s e m b l e t h o s e o f t h e t h r e e - l e v e l t e m p l a t e o p e r a t o r . I t i s g e n e r a l l y s e e n t h a t i f t h e af i s m a t c h e d t o t h e edge s t r u c t u r e o f t h e i m a g e , t h e n t h e n o i s e r e j e c t i o n c a n be v e r y h i g h . I f , h o w e v e r , of i s s m a l l e r t h a n r e q u i r e d , t h e n t h r e s h o l d i n g c a n o n l y s a f e l y remove t h e n o i s e i f t h e SNR i s h i g h a s w i t n e s s e d by t h e e v a l u a t i o n p e a k s n e a r t h e c r i t i c a l e p f . Ho w e v e r , i t i s a l s o s e e n t h a t i f t h e n o i s e l e v e l i s . h i g h a n d t h e f i l t e r t o o n a r r o w , t h e n i t i s p e r h a p s i m p o s s i b l e t o s e l e c t a g e n e r a l t h r e s h o l d t h a t w i l l remove t h e n o i s e a n d a l s o g u a r a n t e e edge c o n t i n u i t y . 3.4.2 V e r t i c a l S t e p E v a l u a t i o n The p r i n c i p a l i n t e r e s t i n p r o c e s s i n g t h e v e r t i c a l edge i s t h a t i t s h o u l d be d e v o i d o f t h e c u r v e d edge b i a s p r e s e n t i n t h e r i n g s t e s t s . T h i s p e r m i t s p e r f e c t c o n t i n u i t y a n d t h i n n e s s s c o r e s f o r p e r f e c t e d g e s . S i n c e d e c r e a s i n g af i n c r e a s e s t h e i n f l u e n c e 1 17 o f n o i s e on t h e f i l t e r r e s p o n s e w h i c h i n t u r n p r o d u c e s c u r v e d e d g e s , i t i s e x p e c t e d t h a t t h e c u r v e d edge b i a s w i l l d o m i n a t e o v e r t h e s m a l l v e r t i c a l edge f o r s m a l l af , h i g h n o i s e i m a g e s . T e s t s a n a l o g o u s t o t h o s e o f F i g u r e s 3.4 t o 3.6 where SNR i s h e l d c o n s t a n t a t f i f t y a n d b o t h 7 a n d t h e t h r e s h o l d l e v e l c h a n g e d were n o t p e r f o r m e d . H a v i n g c o n c l u d e d t h a t t h e o p t i o n a l 7 i s 0.8, i t i s a d o p t e d h e r e a l s o p e r m i t t i n g t h e s i g n a l t o n o i s e r a t i o t r i a l s t o p r o c e e d i m m e d i a t e l y . o( =6.4: The p r i n t o u t o f t h e edge p o s i t i o n s a n d d i r e c t i o n s ( b e f o r e t h r e s h o l d ) , F i g u r e 3.9, f o r a l l SNRs r e v e a l s an image a l m o s t d e v o i d o f n o i s e . The two edge f e a t u r e s a l w a y s s t a n d o u t p e r f e c t l y t h i n a n d c o n n e c t e d . O n l y f o r SNR=1 i s t h e r e an a u x i l i a r y f e a t u r e i n t h e f o r m o f a s m a l l edge " i s l a n d " i n t h e m i d d l e o f t h e l e f t p a n e l . F o r a l l t h e o t h e r i m a g e s , o n l y t h e e d g e s a r e p r e s e n t . The p r i n c i p a l i n f l u e n c e o f t h e n o i s e a p p e a r s t o be on t h e s t r a i g h t n e s s o f t h e e d g e . The p l o t o f E a g a i n s t e p f , F i g u r e 3.10a, shows t h a t f o r SNR=5 a n d g r e a t e r , t h e e v a l u a t i o n p l o t s a r e n e a r l y i d e n t i c a l e a c h r e a c h i n g a peak o f 0.994 a t t h e maximum e p f o f 0.018. The s c o r e i s n o t p e r f e c t due t o t h e s l i g h t w i n d i n g o f t h e edge o b s e r v e d . The c u r v e o f SNR=1 d e v i a t e s m a r k e d l y f r o m t h e r e s t due t o t h e p r e s e n c e o f t h e n o i s e i s l a n d b u t s t i l l a t t a i n s an e x c e l l e n t s c o r e o f 0.958 a t e p f = 0 . 0 ! 8 . The max. E v e r s u s SNR p l o t o f F i g u r e 3.10b shows a n e a r i d e a l e v a l u a t i o n f o r a l l SNR. C l e a r l y , t h e e l i m i n a t i o n o f t h e c u r v e d e d g e s b i a s i s r e s p o n s i b l e f o r t h i s much i m p r o v e d 118 ( a ) <b) <d> ( e ) ( c ) ( f ) (g) F i g u r e 3.9 a( = 6.4 v e r t i c a l f o r ( c ) ( f ) SNR 5, 50, ! g f i l t e r e d s t e p edge = ( a ) 1 , (b) 2, (d) 10, ( e ) 20, a n d (g) 100 1 19 0.2-1 1.0 0.40 0.16 aoe ao3 0.01 epf 0u6H as 10 SNR 20 50 100 F i q u r e 3.10 a =6.4 V 2 g f i l t e r e d v e r t i c a l s t e p e v a l u a t i o n r e s u l t s : ( a ) SNR = 1, 2, 5, 10, 20, 50, and 100 ( f r o m b o t t o m c u r v e t o t o p ) , 8=0.8; (b) peak e v a l u a t i o n s c o r e s a g a i n s t SNR 120 p e r f o r m a n c e . of = 1.6: The r e s u l t s h e r e a r e m a r k e d l y d i f f e r e n t f r o m t h o s e o f a, =6.4. The edge image p r i n t o u t , F i g u r e 3.11, shows t h e a b s e n c e o f a d i s c e r n a b l e v e r t i c a l edge b e l o w SNR=5 t o t h e u n t r a i n e d e y e . T h i s i s s u b s t a n t i a t e d by t h e n o i s e a n a l y s i s o f t h e p r e v i o u s c h a p t e r . By e q u a t i o n ( 2 . 4 8 ) , t h e l o w e s t t o l e r a b l e SNR f o r o f=1.6 i s 1.6625, o r 3.325 by t h e d e f i n i t i o n u s e d h e r e . F o r SNR^5, t h e edge becomes i n c r e a s i n g l y i s o l a t e d f r o m t h e b a c k g r o u n d n o i s e , a n d s t r a i g h t e r . H o wever, e v e n a t SNR=100, t h i s b a c k g r o u n d n o i s e r e m a i n s s i g n i f i c a n t a n d a p p r o a c h e s t o w i t h i n two p i x e l s o f t h e e d g e , b u t g e n e r a l l y s t a y s b e y o n d t h r e e p i x e l s . The p l o t o f e v a l u a t i o n m e a s u r e a g a i n s t e p f , F i g u r e 3.12a, shows a g r e a t d i v e r s i t y o f s c o r e s . B e l o w SNR=10, t h e s c o r e s a r e s e e n t o d e c l i n e u n i f o r m l y f r o m a maximum o f 0.77. T h i s i s c o n s i s t e n t w i t h t h e p o o r image q u a l i t y s e e n i n F i g u r e 3.11. The t h r e e h i g h e s t SNR c u r v e s show t h a t t h e a c t o f t h r e s h o l d i n g i s e f f e c t i v e i n p e r f o r m i n g a n o i s e c l e a n i n g o p e r a t i o n . The peak s c o r e s a r e q u i t e h i g h , up t o 0.978, a n d o c c u r a t e p f = 0 . 0 l 8 , a b o u t t h a t f o r an i d e a l e d g e . The max. E v e r s u s SNR c u r v e o f F i g u r e 3.12b a l s o a p p r o a c h t h a t o f t h e t h r e e - l e v e l t e m p l a t e o p e r a t o r w i t h a s c o r e o f 0.77 a t SNR=10 an d s t e a d i l y c l i m b i n g t o 0.978 a t SNR=100. I n g e n e r a l , i t was o b s e r v e d t h a t t h e a b s e n c e o f a c u r v e d edge b i a s h a s r e s u l t e d i n g e n e r a l l y i n c r e a s e d s c o r e s a p p r o a c h i n g 1.0. E v e n t h o u g h t h e a, =6.4 f i l t e r was n o t i d e a l l y m a t c h e d t o t h i s edge i m a g e , i t p r o d u c e d a l m o s t t o t a l n o i s e i m u n i t y f o r a l l 121 . . • I . M . M M I . . . i : : : : : : :°i(a );;:;;g;;; : :>- ;^ :;; :,' : . .31.1.0.. -».0 MIT .4 0 M -. - 4T.J1. -•*..» •» 4M.3M.0 4.0.33  0. .3 O 4.7..4. ,tWt. .913  1 f 4.87. 4 0 JT 4 0 •'•••>••* ••.o 4.T 4 1 . o . . . » ? . . : » . > : : • j • 9.0 «. O NI.O 4.T. .40 9.0.. 4.ii '.'.it', ,i. .nit. . it'.'.'.%'. '.'.o'.'.i it"' 4o " .4.T.H3.1M3.7.9 0.4..0..4..1 9.'.. iiio" 4.7. ,4. .l.M. .O. . MM.0.1 O. . .4.M. 137. .90 4. . 440. . . 40 4.M.4.Q 40.M O »..t..O... 4. 4 7 41 .0. . .44M 4.0 1.0. . .4. . .O. BO 41 4 O 4441 ..4..Mmi.....»...."...».:.. 4 © : « : 5 : : ; i r ^ ; 4.0. .0. 4.7.90.133.0. .o..4.«m...T %.o.O. .9. . O. .t.O 31 0  . .. 97 3  4.1 •••W. . .0 4 . . . . 1 . . . 4 . . M I . . .33.. 13. 3O.9.0 T...4.. 3  4.1 M3.•« • m*m..JJ..4.,.0..,lll,.J,D 4.1 B. O44MJO . 4  1 4 .0. .4. . .T. .9. . .T. .00. . .39. .0 4.0. •• U *4 ,o §.«»..4. .o—4.o—4in ii\'.'.'..4o..'. f"J • «-0 4.0.3.0.4 0.T.4BT. 4. .0^. . .^1. . .9. . Ill* 4. .0..1. .0. .4.0. ,*.§.  T 4 r<JM0.4o.4t.. o—i.4.o'.'.'. \ .iUii.iii. .it'.. .'.'.'.'.i.o'.''.'.'. i'.'.'.Hi.'..V.'.9.\'.'.',%'.i'.'.'.4'.'.'.'.'.'.64°oi'aaa" 'V 0.4.MT.4H.T..4.M4T 4.'.O'.'.'.'.'.'.'.3..^.*'M' *•••*• •T *• •* 3.B.O 3.4.3333.13.7 4.6 «»• •<» • 31.0.4o 1 T 4 i r  4.O..  ",-3t..9.0.  ,B. . .BT 4.0.4 ..333.. . .43.4 40. -.1 0 1.4W B.. . .SO 40. 40 4. .0. . . JM». . .40 9. . I  . .94 91. .134. .3. 40 M. 1.1.0 40 9.I. . .31 3. .1440 40 B. ». . .131. .4.33 4. . t. . .8.1. . 4 o 4 .0 4 4.1.4.34 4 at S  47 4 . ,111 44. . T , i, . T . B IB 79 "(j »m.#T..,n..iMiT,. 'sit' 4 O 37..9.0 B.i 11.. .43.11 . .34. . .4.0. . . . . a . . 1.33.J I. . .( . .0..9..7 .4..0. . • . . . •4^.0 40. . .4.311. , .414., .130.4.0 40 379Q..i\ • .4.0 40 3..0.40..Ml .4130 30.4 7.40 4.0 3 .B. 133.4S.0.31.3..4t.3. . M 441, .BO. . • - " • " ..90.3.31. O.3.t.1.0 4. ..t. .1. .0. .3. .1 9 OBiaaT.lt..*.» lit..4.0.. 4O.4,o 4.0B. .. .BT. . • o . . r . " 4 d)V::i .M3 0 3.t. 33. .9. .0 41 _ . .Mil. .7. .4.0 4.11 4.0. 4. .0.  . M 7 B. .0 4 O 4 7 4. .t. . .9. .47 4. .0 40 - 0 *• 0 * -1 " 4.'. .i'.','.'.'.4i'.'.i.'. .tin* 4.'.o'.'.'.'.'.4**.'t'.'.'..io'.'.'.'.'.'.'.'.'.'.'.'.'.'.'. ...0 0 4. . .0 4. .0 4. .9. I 431 It 4. .0. .M«7 4. . .0 4. .» 90 B. .1. .3. .  4.  .0.3.0 4MB.Ml 4. .0 Mt 4. .11 O 4 3. .O. .4117.4.0. .M. .0 1. - T. .4111. 9 O 4. .OB. . . . t. . .40. . . .4.BT. .3 I. . .BM 4.0. .4.BM. .BT 4.0. .4 t. .40 T. .3. .B O 4.0. B7.47 4. .31. , M . .11.0 3. . .1. .0.9. . .0 43  t O 4 T.4. .M.I3.1. 4.0.4.0 1. .4. . .SMO 33» I.. 4 T.3.0.4.1.B.11.I.3.0.30. . .MT. . .0 4.B7. . .». I . . 9. . .7. . .4. .0. .40. . .97.M. I  .0.  .8.1 0 47. t. . .B.. .4.0 BM7. .4.0 4 O B.I 30 O .4.0 40 9 0 M3I. . .3. .7. . M31M 4. . .11 3. .7. .3 9 O 91. .4.7. .3 1 4 Bil. . ,M7. . .0. . .4 4. . .0 411.7. . .44  O . .0. . .JO. . .* BO .37. . 1.133..0.  0. . . . .9.97 B.0.. , .M. .4.0. .3.0. , .941. . .13MT. . ,1. . .0 41 97 I O 4.13 311 I . . .4. .4331134. . . 4.It... 4. O. . . 94. .O. . . . .O. .9.O. . I 11.0. . . 4. . —41 O. 4. .0 MO 40 M. . .0. . .4.B.B 7.M. . I I I. . 4 ..Bt. . .40 B. .O. . .BT. . .MBBT 4, .13  O. .4. . .7 111111 4.0 9B. . .7 . Ml. .4. .0 4 11. . .4.0 1. .4.7 1. .0 1. . .7 4B B4. .4.0 ST. .90 30. 1.0 MT 31. .447. . .3. .0 Mil 130 O. . 1.0 9.0 M. . .7. .1 33.9. . . O. . . , 3t. . .0. . I. - i l i i . . .91 O. . .33* O BB7. . 944.1.4.0. .40. I. lit. . . .O. . , , .4.0.4 t. BT. . 4. O 4 . . . i i i i i . . .311.0. .. . 6 — . 4, . .4. ,T Mil. .. 34 0. 1 . ,4.41.40 4. .7. M. .33.3. T. .0 . .97. .10 MT. .B.3T.40 14 4.0 9. .47 4 . .0. . .4. . 4. .314 4. . .97 t . .0. .4. , .0. -M. . 4. . .41. . 3t 1.0 . .0. .4. .0 B. I  .90 3. . 1. . MT . .9.O. . .411. . . .14. .a 4...7 i.aaiT.. . . .411. . .334. .0 3.O.0 l.M . . .4. .11BT40 11. .0 9T. . . . . 4 . . .0 4.0 B 1. 14 134 I . 1.440 4.0 9.T.1.11..1I. . . .0. . .4 . .O. . .31 .. .SI  4.3.Lit.I...9..0 i. .B.3t. .B.O. .BI .T.T 40 -7 1.0 BT BT ». .0 II 3M3 I.. .0 1..I 4.M T.. 0.9.111.t.47.8.0 .1.9.BT.7 4.0 IMT. . .41'3131! "4! ! .0. '. '. 3. .0. . .B 1M. .0. .. .3.MO M T.B.O. . . .B7 4. .0. . .4. .0. . ,3.6 . . .0.. .97 . .4. . .O 40. .9 C I. . . 4 . 0 4T. . .BM. .0 4. .1130 4.0 . .M 7 4. . .4 7 4. . 4. .M4..0 3.M .4.79.0.4.30. • 40 40. .30. .3. .0. .40 M13.0. .4 .T. . 30 4M4.4 . .3.0 1.. T. .44.1 . . 4 . . 0 . . .Mil. .3. .0 . .MTMT 4, . . 3t 1...1 97 33...T. 11. .Ml. . . .11. .9 4t 30..  • - 7 a... .q. .iii!. .4.0. 9 4. .Ov .3. N i l . .0 97 .4.M1. . .30. . , .4. . .Til. . T. .4 . . ,T. 31 -«•••-'•»-0--..4 a.o...4..o...4.i....iii: 4 •W.T.4.B4M.9O.4.0.9.0.4.0.4O M3I 3.7.4.0 »«7 .3..MI.4.0.3.0..911.... ..0.4. .3. .4 9.0 4. .0. .9. .1. . .9.B.0. . .1   .7 .4.7. ..40 9M 0 B. .0. . SCO 47.MO. . .4 • *—i...4.•T;itii!!4o"!!io!!i4!o!;4!!!»T;;;4 . . 0 . ..9. . 0 .. ,tiaV!'.%'. .0'. .4.i! '.4.'.i.ti, ii^ ii"i ' i * _ 1 . . . 0 a,o. . 4 . 0 . . 4 . 0 4 33 o 9 o •«• -7 4.1,BT.4,0 4 O. . . .B.i3l] '. '. .M7.,3.9..0..4.3l..9BM.O M. . .0. . . O 44.1 40 4.0.. I B. .0 B.I 4. I. 4.0. .3 *• 0 40 4. . I 9. .0. .3 'y.4'.'.Ui. .y.'.'. .t'.'.i'.'.'.'.4'. .o'.'.'.i.Ul'.'.'.'.'.'. .3.'.'.'. .3. .O. ,4,BM 4.931.MM. 1.7 14 .4.BT, .40. .4. , .0. .4. .4 4.0 MT 3 .97. .40. .4. .T. .9. .0 4 . . 4. . JT IB 40. . .4.T 4.7 9. . .1.9T 33.39B. .M394 40. . .4.7 BT ga t  3 0 .4. ...«. J. .13.0 M.4 .I o. .4.BM.T.BBW.1 1111  4 O 4.0. . 9..0.. , . 7 . . 9 . . lit. . * 9. .1.0 113.B. • 331. . .BM. .O. . M . 4 . . .T. .a. I 9 . .11.44. . .T  -B.M.O. . .3 31. -0.4.B.t.T JI.I «. . .O.4 .0  . 31  .MT. '. .lO. . . . 9 . 7 . . . .97. .1.M10. . ..4.0../ v . . 40 4.0.4.1) 4..0J A •...4l...4..1..e ..4..0.\ C />...4.331 0 4 . .33.. .7, 040 • - - 4M7 4.M.0 . 0.. I . ,-9T. .97 .30. .O I . .40. .41   4 O 4T  7 3.1..1.4.  4 T.31 31. .4. . .B. . .0 3. 0.M7. .4. . .14 4 . .0 .4..  4. t.4. .O.B. .0 4. .7 4MB. .It. . . 1 4.  0. .9 .0 4.7.  0  .9.0 4. 30. .9.. t. .0 4 0..9..I.. .11MT. .BO 40 40 4T 4. .0.40 4 .0 4. .193. .0 BO 40 40. .11. .47 4. .0.4.0 4. . .0 M. . .444411 1. . t. . .4.0. . .9130 4. . .3M7 4.0 4.0 4  91.4.O.9.14.4.0 1.B.O 4 3* 4 O 30. .4 .0 M. .9. . .1.3.-0.B.O 4 0 .4.0 4. .3 7. .40 4. .0.B.14 4 0.. .4.0 4. .0.M7. , .4.0 9.09 0. .4.0 4 B.O. .4. .7. .33. .0 M. .0 M4. .40. .9.. .O. . .4.T 4 . .74 M7. .9BMT 4 O 3.0.4O. .0.40 4 .0.9 .0 3.7 3. .4 O 4. .0. -9T 90. .40 4O.B. ..4..47 1. t .4. . .0 B. .0 4130 4. . 0 — 4 o . . .9 4.4.4—6 M.o.. . i . i i i o 4. .7. .1.0 Mil. . .97. .4 O. .9 9.1.1 BM. .0.1 4.0.M.0 4. .7 MB. . .0 4.1. .MT. . .4. .3.30 4.0.9 t 4.0 4.0 4. .M M.3.0 4. .1. .M. .0 4.0 1131. .4.0 33. .4.0 4. .T 4 7. .4.7 4.0. . .4 1. .4.0 B.O. .4. .O. . .Ml 4.T 4.0 40..3..0..4 O MT.' .T.B.0 4..0.  .94. 3 4 1447, .*.<>'. 4.  .1 9.. .0.444M 4.0. . 4 t 4 .0 44...» i i . . 0 ! . i i . . ...!ii....0. . .7. .931 O. .M11. .1 O. 4.0. . .9 O 9. . . 1.9 O. 4.I.9M O 4.7.B O. 4.  MB 13. * .* a. . . .4. . .0. . 4. . .  9MT. .MT 4. . .0. . . . .7 lt.4. . .0. . . .0. .Ml I 4.3 O. .  O .4.0.11 30 BM O. . 4. .0 -B. .B. .0. .3. t 4. . .0. 4. .0. -.M.O. .4.0 4. . .0 4 4.. 1 40. -4.O. .3. .4 0 30 4  40 40. .4119. . .0 3.0 4 1 11. .1111,0.94, .0.4. .0 4.0. .31. . 4 13 BT. .M.l. . .0 4.0. .4..11 1 4 T.B .11. . . -O. . . . 1 . . . .0. - , .a .a . .s.i... 90 44  O.MT. . . .40..3. 1.11. .  ..4BT. . 1..30 4.0. . .9 O. . .3M. . .0.1111. .9.0 M. .O. . C ) M3.0. M .O. .90..3..MO. , .4 O 94 .30 4 0. .4.3131..9.9.O. .4 11)..M.9.0. -M 4447 40. 4 O. . .O. 0.4.0 311.40.0.3.  . M M . .7. .40 4, .9. .M.41. . .4.0 4 O.9.T. .7 4.0 4 0.-4 4.1 4.BBO. .M91 3 t 4.0 O. .4 1 9 0 4.7.11. B 131. .9. .9113.71. .1 3.94JM0.97.4.M.O. .4.0. " " 47. .9.31 4. .7. . .3. .0 4.T. 9. .0. . .3. . .O 40. . MOO. . .4. , .0. . .1.0. . . .94. 11. .0. 11 4MT. M M .0. . 9.  40 M. .8. . 1. .8.11.-4.0 4.91 . .4. 1.3. -O. . .3 97. . ..444 1 .O.1111111 4. . .0. . .3 O 4. .T 4M4. . . I MT 4. . .5441 , l.O 41. . '. '.it. . i i i i i . o '.i... ..11..11 o 1 — . .9 M. . a . . . 1 44441 4.M. .4.44.1310 40 4 0...3 . .40 4MB. . 4.1. . .0 3130. . .9. .3. . . .4.1. .1. .8. .0 4. .8.0. . 9. .3330. .9.0 4.B.90. . .87.431. i.S. .0. . .1133.3. . .7 ..4.4..1.4.1.4.33.7. .13333. IM O. . . . . ,M 7. . .MT.40 . . .7. . . . .7. . . 1 1.0. .lilt ,.m..'.i'.'.'. .49'.'. 0****4 ii'. . 0 4 . 4 . 0 . . . 4 . . . a 4.6.. .8. . .MO. .3.0. .. B.O M7, 413 O 40 4. . .0 4.19 4. . 441, . .  .33 -M31 4M . . .83. .7. .4, 1. .1.7 1 . MT. .33.0. . .4.9.3111.O. 191.3.. .0. . 4 . . . .4441.40. . .11. .414. .1.0. . . .41114. . .4 . . .0. . . . .9. .4. . .1. . .0 4. . .411 1,1) I . .8.1111. . . .9. .0. .9.4M. . . 1. .9. 0. . . .940..7.4 o ..9.0. . .BM.O. .1.0. . 4.11. . .0. -Ml 9. . .7. .4- .1.31. . 4.0. . .1.147. . . -B.O. .40 9 . . .4.11.0...33. 4.4. .M.O. . .434.47.9.4.0. . .BM.130. . .44.M.l .MM O. .1. O .973iO333.. 13M. < . .30 40.4. .0. .9 444.11. . .3.33..3..1 . .M4.13M. . 8.0.  . .0 9.0 9.0. .; . .94.47. nil, . . .0. . .40 .0 47 . . I . . .0. ..M . .3330..4. • 4. .0 4.1130. . . .4.0 4 4 M .  .0. . . . 4 . . n m a. . . 0 . BOO. .M.O. . . . . 4. . .0 40. . .3.4. .0 4.1. . .8.0.3.t..9..3 >. . .lO. .4 . . 0 . . . .8. ,1130. . . .0. . .3M.31. 4MT. . . -O. JO. .B. .14 . .0 .11 a 7. . 4 . . . . .Ml 91 4.B47. . . 4 . . . . 0 M . 7 4T 4. .0 131 4, . .0 M41. . . 1 40. . . . -O.MI. .B. . . I  .. . .0 4MT 4.14. I  .3. .0. . .9. . .334.9. .0 9 3. . .7. .9 O 9.B7..4.0 131.MT . 131 4.41  1. .3. . . .0.. .33M.4.1.M.3M. 99.3M. . 7 . . .4. .3. . . 7 . .9. F i g u r e 3.11 or = 1 . 6 7 2g f i l t e r e d v e r t i c a l s t e p edge f o r SNR = (a) 1 ,(b) 2, ( c ) 5, (d) 1 0 , ( e ) 20, ( f ) 50, and (g) 100 . .0. . -4T. ,80 4BM7. . . 4 . . . . M M 4. . .30. : 4. «44. . .1. . .4171. .0 4. 3. . .444.11.4 .M.l 4. 0 47. . .4.1. .Mlll. . 4 1.1..4. .4113.0 4 O MO 40 M.O. 4 11. . .7. ,4. . .0. . .1 0 41 4 .0.. 3 .O. * 4M.M.7. . .4. .40. . .4 O 40. .134. O %440 . • 1.B.0 4.0.411M4. . .0 40. .4.7.40 9. . 4 1 .4. .1. .1 4.0 40. .40 *-0 44..*. .Ml 4.0 40.40. .1.114 4. . .0 11.4.311. .1 4. .0 4.0.30. .33. .3 7 122 100 F i g u r e 3.12 of = 1 .6 V 2 g f i l t e r e d v e r t i c a l s t e p e v a l u a t i o n r e s u l t s : ( a ) SNR = 1, 2, 5, 10, 20, 50, and 100 ( f r o m b o t t o m c u r v e t o t o p ) , 6=0.8; (b) peak e v a l u a t i o n s c o r e s a g a i n s t SNR 123 SNR. The p r i n c i p a l i n f l u e n c e o f t h e n o i s e on t h e edge was t o c o n t o r t i t f r o m a p u r e v e r t i c a l l i n e . O n l y f o r a f=1.6 a t SNR=1 was t h e t e s t edge o b s e r v e d t o be b r o k e n . E v e n t h o u g h i t was o u t s i d e o f t h e e x p e r i m e n t , t h e s i d e edge was p a r t i c u l a r l y i n t e r e s t i n g t o o b s e r v e . B e i n g a p u r e s t e p , i t m a t c h e d t h e o r i g i n a l m o d e l u s e d t o d e s i g n t h e f i l t e r . I t i s n o t s u r p r i s i n g t h e n t o o b s e r v e t h a t t h i s edge i s p a r t i c u l a r l y s t r o n g a n d r e a d i l y i s o l a t e d f r o m t h e b a c k g r o u n d . I t i s s e e n t o become i s o l a t e d a t a l o w e r SNR a n d , u n l i k e t h e t e s t e d g e , becomes p e r f e c t l y s t r a i g h t e v e n a t i n t e r m e d i a t e SNR v a l u e s f o r b o t h f i l t e r v a r i a n c e s . 3.4.3 P u r e N o i s e E v a l u a t i o n : I t was n o t e d by K i t c h e n a n d R o s e n f e l d t h a t e v e n i n a p u r e n o i s e i m a g e , t h e r e w i l l be a c e r t a i n o c c u r e n c e o f w e l l - f o r m e d e d g e s a r i s i n g due t o s t a t i s t i c a l f l u c t u a t i o n s i n image d e n s i t y o r a c c i d e n t a l a l i g n m e n t s . The s m o o t h i n g p r o p e r t y o f t h e V 2 g f i l t e r h a s a l r e a d y b e e n o b s e r v e d . A t e n d e n c y h a s a l s o b een n o t e d t o c l u m p n o i s e i n t o random r e g i o n s o f d i a m e t e r on t h e o r d e r o f o( . T h e s e e d g e s a r e h i g h l y c u r v e d . They t h e r e f o r e p r e s e n t an o p p o r t u n i t y t o m e a s u r e t h e f i l t e r ' s p e r f o r m a n c e i n n a t u r a l i m a g e s w h e r e b o r d e r s may n o t be c l e a r l y d e f i n e d , e . g . i n r e m o t e s e n s i n g . a( =6.4: As f o r t h e r i n g s i m a g e , t h e c u r v e s , F i g u r e 3.13a, t e n d n o t t o o v e r l a p w i t h c h a n g i n g of . T h e y , h o w e v e r , p e a k e a r l y a t maximum e p f . The p e r f e c t s c o r e a t 7=0 i n d i c a t e s p e r f e c t t h i n n e s s 1 24 0.2 i.<H epf F i g u r e 3.13 V 2 g f i l t e r e d random n o i s e e v a l u a t i o n r e s u l t s f o r ( a ) af =6.4; (b) a, =1.6 125 t h r o u g h o u t . The d e c l i n e w i t h e p f o f t h e r e m a i n i n g c u r v e s i n d i c a t e t h e b r e a k a g e o f edge f e a t u r e s w i t h t h r e s h o l d i n g . N o t e t h a t t h e r e i s no o p t i m a l t h r e s h o l d p o i n t i n d i c a t e d h e r e , t h e d e c l i n i n g s c o r e s i n d i c a t e t h a t a l l t h e edge f e a t u r e s a r e e q u a l l y w e l l - f o r m e d . of =1.6: A g a i n , t h e c u r v e s , F i g u r e 3.13b, do n o t o v e r l a p w i t h c h a n g i n g 7 , b u t t h e y do c o n v e r g e somewhat a t h i g h e p f . T h i s i s due t o t h e l o s s o f t h i n n e s s , p r e v i o u s l y o b s e r v e d w i t h t h i s of , a b o v e e p f = 0 . 0 1 . A t h i g h 7 , t h e c u r v e s o n c e a g a i n peak a t t h e maximum e p f l e v e l . H e r e a l s o , t h e n , t h e r e i s no o p t i m a l t h r e s h o l d i n d i c a t e d . A l l o f t h e e d g e s a r e e q u a l l y w e l l - f o r m e d , t h o u g h p e r h a p s a b i t c l u t t e r e d b e f o r e t h r e s h o l d i n g . I n g e n e r a l , f r o m t h e h i g h i n i t i a l s c o r e s f o r a l l 7 a t l a r g e e p f , i t i s a p p a r e n t t h a t t h i s f i l t e r d o e s p r o d u c e w e l l - f o r m e d r e g i o n s i n p u r e n o i s e . From t h e d e c l i n e i n maximum e p f w i t h i n c r e a s i n g of i t i s c l e a r t h a t t h e w i d e s t r e g i o n s a r e p r o d u c e d by t h e w i d e s t f i l t e r . A l s o , a l l t h e s c o r e s e x h i b i t s i m i l a r t e n d e n c i e s s u c h a s an i n c r e a s e i n t h i n n e s s a n d d e c l i n e i n c o n t i n u i t y a s t h e t h r e s h o l d l e v e l i s r a i s e d . H o w e v e r , t h e r e i s no i n d i c a t i o n o f an o p t i m a l t h r e s h o l d l e v e l b e c a u s e o f t h e a b s e n c e o f a n y p e a k s i n t h e e v a l u a t i o n m e a s u r e a f t e r t h r e s h o l d i n g i s a p p l i e d . T h i s s u b s t a n t i a t e s t h e c l a i m o f t h e l a s t c h a p t e r t h a t when c o n f r o n t e d w i t h an a r b i t r a r y image whose p r o p e r t i e s a r e n o t w e l l - k n o w n , o r a r e n e a r l y random, t h e n i t i s b e s t n o t t o a p p l y a n y t h r e s h o l d a t a l l a f t e r f i l t e r i n g w i t h t h e c h o s e n of . 126 3.5 C o m p a r i s o n t o o t h e r Edge O p e r a t o r s F i g u r e 3.14 shows t h e r e s u l t s o f t h i s c h a p t e r s u p e r i m p o s e d on t h e e v a l u a t i o n r e s u l t s o f K i t c h e n a n d R o s e n f e l d . The p l o t s show a l l o f t h e c u r v e s p r o d u c e d by t h e V 2 g f i l t e r r i d i n g w e l l a b o v e t h e o t h e r s . The n e a r - i d e a l r e s p o n s e s e e n when t h e f i l t e r s t a n d a r d d e v i a t i o n most c l o s e l y m a t c h e s t h e image d e t a i l s t o be r e s o l v e d , o f=6.4, i s n o t a p p r o a c h e d by any o f t h e o t h e r o p e r a t o r s . H owever, t h e f a c t t h a t t h e a f=16 c u r v e s c o r e s t h e h i g h e s t shows t h a t t h e good r e s u l t s o f t h e of =6.4 c u r v e a r e n o t so much t h e r e s u l t o f an i d e a l m a t c h t o image d e t a i l , b u t r a t h e r a r e a t t r i b u t a b l e t o t h e n o i s e c l e a n i n g i n f l u e n c e o f t h o s e w i d e f i l t e r s a n d t h e g e n e r a l l o c a l l i n e - l i k e c h a r a c t e r o f t h e t e s t image e d g e s . I t i s i n t e r e s t i n g t o n o t e how c l o s e l y t h e a f=1.6 c u r v e s m a t c h t h e g e n e r a l s h a p e o f t h e o t h e r s . E v i d e n t l y , t h e s h a p e a n d a m p l i t u d e o f t h e n o i s e r e s p o n s e c u r v e s p u b l i s h e d i s a c h a r a c t e r i s t i c o f a l l n a r r o w edge o p e r a t o r s . I t a p p e a r s r e a s o n a b l e t o p r e d i c t t h a t f u r t h e r r e d u c t i o n o f at w i l l p r o d u c e f u r t h e r a g r e e m e n t w i t h t h e r e s u l t s o f t h e o t h e r o p e r a t o r s , i n d i c a t i n g t h a t t h e V 2 g f i l t e r o f f e r s l i t t l e o r no a d v a n t a g e where e x t r e m e l y f i n e r e s o l u t i o n s a r e c o n c e r n e d . H o w e v e r , where a m a t c h t o image d e t a i l o f edge s p a c i n g g r e a t e r t h a n two p i x e l s ( ( 7 , ^ 1 . 6 ) i s d e s i r e d , t h e p e r f o r m a n c e o f t h e V 2 g f i l t e r i s o u t s t a n d i n g . 1 27 100 1.o> = 16.0 5. f i v e - l e v e l 9. S o b e l sumabs 13. R o b e r t s 2. Of = 6.4 6. K i r s c h 10. P r e w i t t sumabs sumabs 3. Of = 1.6 7. S o b e l s q r t 11. compass g r a d i e n t 4. t h r e e - l e v e l 8. P r e w i t t s q r t 12. R o b e r t s s q r t F i g u r e 3.14 S u p e r i m p o s i t i o n o f t h e V 2 g maximum e v a l u a t i o n s c o r e s upon t h o s e o f K i t c h e n a n d R o s e n f e l d : ( a ) r i n g s ; (b) v e r t i c a l s t e p . 128 3.6 C o n c l u s i o n s T h i s c h a p t e r s o u g h t t o p r o v e two a s s e r t i o n s : t h a t t h e V 2 g f i l t e r p r o v i d e s s u p e r i o r p e r f o r m a n c e o v e r t h e m a j o r i t y o f o t h e r edge o p e r a t o r s u s e d ; a n d t h a t t h r e s h o l d i n g i s an u n n e c e s s a r y o p e r a t i o n t h a t may s i m p l y d e g r a d e t h e p e r f o r m a n c e o f t h e V 2 g o p e r a t o r . The s u p e r i o r i t y o v e r o t h e r edge o p e r a t o r s was c l e a r l y s e e n i n t h e c o m p a r i s o n s o f t h e l a s t s e c t i o n s . T h i s s u p e r i o r i t y may be l o s t where r e s o l u t i o n b e l o w two p i x e l s i s s o u g h t . The e v a l u a t i o n s o f t h e r i n g a n d s t e p edge images show t h a t an o p t i m a l t h r e s h o l d p o i n t c a n be f o u n d w h e r e t h e e v a l u a t i o n s c o r e s p e a k . However, t h e a, =16 f i l t e r e d r i n g s e v a l u a t i o n a n d b o t h n o i s e image e v a l u a t i o n s showed t h i s p e ak t o o c c u r a t maximum edge p i x e l f r a c t i o n w i t h o u t t h r e s h o l d . I n g e n e r a l , t h e r f o r e , t h e r e i s no g u a r a n t e e t h a t an o p t i m a l t h r e s h o l d p o i n t c a n be f o u n d t h a t w i l l n o t d i s r u p t t h e V 2 g f i l t e r ' s s t r o n g e s t a s s e t , t h e f o r m a t i o n o f c l o s e d edge s e g m e n t s . T h r e s h o l d i n g i s t h e r e f o r e n o t recommended a s a n o i s e c l e a n i n g m e t h o d . M u l t i b a n d f i l t e r i n g w h i c h t a k e s a d v a n t a g e o f t h e 4a, w i d e n o i s e c l e a n s t r i p p r e d i c t e d a n d o b s e r v e d a b o u t s t r o n g edge f e a t u r e s w o u l d be more e f f e c t i v e . K i t c h e n a n d R o s e n f e l d n o t e t h a t t h e i r edge e v a l u a t i o n m e thod s h o u l d n o t be c o n s i d e r e d t h e l a s t w o r d i n j u d g i n g an edge o p e r a t o r . T h e r e i s a c e r t a i n v a l u e i n u n d e r s t a n d i n g t h e a c c u r a c y w i t h w h i c h an edge o p e r a t o r l o c a l i z e s an edge a b o u t i t s known p o s i t i o n . I n t h e c o n t e x t o f t h e V 2 g o p e r a t o r s u c h a m e a s u r e w o u l d s e r v e t o c o n f i r m t h e p r e d i c t e d d i s t r i b u t i o n o f t h e z e r o c r o s s i n g , az . However, i n s t e a d o f a d o p t i n g t h e a p p r o a c h o f Abdou an d P r a t t , o r P e l i a n d M a l a h , w h i c h w e i g h e v e r y edge p i x e l i n t h e image t o j u d g e t h e o v e r a l l g o o d n e s s o f f i t , a more r e s t r i c t i v e 1 29 t e s t i s recommended w h i c h r e c o g n i z e s t h a t t h e t e s t edge i s u s u a l l y f u l l y r e s o l v e d a n d i s o l a t e d f r o m t h e b a c k g r o u n d s e a o f n o i s e . T h i s more s o p h i s t i c a t e d method w o u l d s e a r c h f o r t h e o u t p u t o b j e c t edge n e a r t h e t r u e edge p o s i t i o n a n d t h e n f o l l o w i t a b o u t t h e image, k e e p i n g t o w i t h i n 2a( o f t h e t r u e e d g e . The s t a n d a r d d e v i a t i o n o f t h e edge d a t a w i l l t h e n s e r v e a s an i n d i c a t i o n o f t h e p r e c i s i o n o f t h e edge o p e r a t o r . S u c h a m e t h o d , l e f t t o f u t u r e w o r k , c o m b i n e d w i t h t h e r e s u l t s p r e s e n t e d h e r e s h o u l d s e r v e t o c o m p l e t e t h e p i c t u r e o f t h e V 2 g f i l t e r p e r f o r m a n c e . 1 30 I V . FAST BINARY-IMAGE SEGMENTATION 4.1 I n t r o d u c t i o n The p u r p o s e o f t h e V 2 g f i l t e r i n g s t a g e was t o r e d u c e t h e r a n g e o f s c a l e f o u n d i n t h e i n p u t image and e n h a n c e t h o s e f e a t u r e s whose edge s p a c i n g e x c e e d s t h e d e s i g n minimum. R a t h e r t h a n i s o l a t e t h e e d g e s o f t h e o u t p u t i m a g e , a s was done i n t h e p r e v i o u s c h a p t e r s , a more u s e f u l o p e r a t i o n i s t o u s e t h e r e s u l t t o b i n a r i z e t h e image i n t o " b l a c k " a n d " w h i t e " p i x e l s . B i n a r i z i n g t h e o u t p u t image e s s e n t i a l l y u s e s t h e z e r o l e v e l t o t h r e s h o l d t h e f i l t e r e d image f o r t r a n s l a t i o n o f p o s i t i v e " b l a c k " r e g i o n s t o u n i t y , a n d n e g a t i v e " w h i t e " r e g i o n s t o z e r o . S i n c e p r i n t e d c h a r a c t e r s c o r r e s p o n d t o d a r k o b j e c t s on a l i g h t b a c k g r o u n d , t h e y w i l l a p p e a r a s r e g i o n s o f u n i t m a g n i t u d e on a b a c k g r o u n d o f z e r o s . The p u r p o s e o f t h i s c h a p t e r i s t o p r e s e n t a s y s t e m t o s e p a r a t e , o r s e g m e n t , t h e i n d i v i d u a l c h a r a c t e r s s e e n f r o m t h e b a c k g r o u n d . I n t h e p r o c e s s , a d e s c r i p t i o n o f t h o s e c h a r a c t e r s w i l l a l s o be p r o d u c e d t o f a c i l i t a t e t h e i r r e c o g n i t i o n . T h i s d e s c r i p t i o n w i l l t a k e t h e f o r m o f p o s i t i o n a l a n d r e l a t i o n a l i n f o r m a t i o n o f t h e e x t e r n a l and i n t e r n a l b o r d e r s o f t h e c h a r a c t e r o b j e c t s f o u n d . A b i n a r i z e d i m a g e , a s o p p o s e d t o an edge image, i s e s s e n t i a l t o u n a m b i g u o u s l y d i s t i n g u i s h b e t w e e n , a n d p r o c e s s , t h e s e b o r d e r s . The t a s k o f s e g m e n t a t i o n c a n be d e f i n e d a s t h e o p e r a t i o n o f i d e n t i f y i n g t h o s e i n d i v i d u a l r e g i o n s r e p r e s e n t e d by "1"s i n t h e i m a g e . To be c o n s i d e r e d s e g m e n t a b l e , t h e c o m p l e t e o b j e c t must be p r e s e n t i n t h e image, s e p a r a t e d f r o m t h e image b o u n d a r i e s by a t l e a s t one row o r c o l u m n o f z e r o s . 131 S e g m e n t a b l e Not S e g m e n t a b l e S e g m e n t a b l e o b j e c t s w i l l a l s o be r e f e r r e d t o a s c l o s e d s i n c e t h e i r o u t e r b o r d e r s f o r m c l o s e d l o o p s . A number o f c o n s t r a i n t s w i l l be c o n s i d e r e d t o be i n f o r c e i n t h i s s y s t e m . The f o r e m o s t i s t h a t a l l p r o c e s s i n g be done i n r e a l - t i m e . T h a t i s , c l o s e d b o r d e r s must be d e t e c t e d , a n d t h e i r d e s c r i p t i o n r e l a y e d t o t h e r e c o g n i t i o n s y s t e m , c o n c u r r e n t w i t h t h e image r a s t e r - s c a n . T h o s e b o r d e r s f o u n d n o t s e g m e n t a b l e must be t o t a l l y i g n o r e d . The r a s t e r - s c a n w i l l be c o n s i d e r e d t o p r o c e e d a l o n g t h e l o c a l v e r t i c a l o f t h e p r i n t e d p a g e , a d v a n c i n g f r o m l e f t t o r i g h t . F o r e x a m p l e : The d i r e c t i o n o f t h e s c a n p r o c e e d s a l o n g c, w i t h new rows a d v a n c i n g a l o n g r . T h i s s c a n n i n g method and c o o r d i n a t e s y s t e m was c h o s e n f o r c o n s i s t e n c y w i t h a CCD image s c a n n i n g d e v i c e , one o f t h e a c q u i s i t i o n m e t h o d s s e r i o u s l y c o n s i d e r e d . The v e r t i c a l 1 32 e x t e n t o f c c u r r e n t l y s t a n d s u n d e f i n e d . H o w e v e r , 64 c o l u m n s , s p a n n i n g a b o u t two c h a r a c t e r h e i g h t s , w i l l f r e q u e n t l y be u s e d , a g a i n t o be c o n s i s t e n t w i t h t h e CCD d e v i c e c o n s i d e r e d . I t i s a l s o p o s s i b l e t h a t t h e e x t e n t o f c may i n c l u d e more t h a n one p r i n t l i n e . However, o n l y t h e c a s e o f a s i n g l e l i n e p e r s c a n w i l l be c o n s i d e r e d h e r e . A l s o n o t e t h a t t h e r e i s no bound i m p l i c i t i n t h e r o w - w i s e e x t e n t o f t h e s c a n , c i s c l e a r l y f i n i t e , h o w e v e r r may e x t e n d i n d e f i n i t e l y . The s o l u t i o n i s t o d e f i n e a m o v i n g image window a n d bound r t o t h e f i x e d d i m e n s i o n s o f t h e window. F o r e x a m p l e , bound r b e t w e e n 0 a n d N. Then a t d i f f e r e n t p e r i o d s o f t h e s c a n , t h e window a n d i t s row c o o r d i n a t e s w o u l d have t h e a p p e a r a n c e o f : 0 0 N/2 0 N O N / 2 r r r O b v i o u s l y r i s r e c y c l e d m o d u l o N+1. The e x t e n t o f r c h o s e n i s a f l e x i b l e d e s i g n d e c i s i o n . H owever, i t w i l l be shown t h a t i t must a t b e s t e q u a l t h e e x t e n t o f c f o r t h e s e g m e n t a t i o n method t o be o u t l i n e d t o o p e r a t e c o r r e c t l y . G e n e r a l l y , i t w i l l be assumed t h a t t h e e x t e n t o f r and c a r e e q u a l . B e f o r e p r o c e e d i n g f u r t h e r , some o f t h e t e r m s u s e d r a t h e r l o o s e l y t o t h i s p o i n t , s u c h a s " b o r d e r " , must be r i g o r o u s l y d e f i n e d . W i t h a s o l i d u n d e r s t a n d i n g o f t h i s image a n a l y s i s t e r m i n o l o g y , we t u r n t o a r e v i e w o f p a s t work and t h e n a d d r e s s t h e s e g m e n t a t i o n methods e n d o r s e d f o r t h i s s y s t e m . 1 3 3 4.2 P r e l i m i n a r y C o n c e p t s 4.2.1 C o n n e c t i v i t y D e f i n e a b i n a r y d i g i t a l p i c t u r e a s an i n t e g e r a r r a y o f p o i n t s ( i , j ) . E a c h o f w h i c h may assume o n l y t h e v a l u e 0 o r 1. I t i s g e n e r a l l y u n d e r s t o o d t h a t i n s u c h a b i n a r y p i c t u r e , 1s r e p r e s e n t o b j e c t p o i n t s a n d Os b e l o n g t o t h e b a c k g r o u n d . R o s e n f e l d [ 4 0 ] , [ 6 0 ] , h a s s t u d i e d , a t g r e a t l e n g t h , t h e p r o p e r t i e s o f s u c h i m a g e s . H i s d e f i n i t i o n s d e s c r i b i n g t h e i n t e r c o n n e c t i o n p r o p e r t i e s among o b j e c t and b a c k g r o u n d p o i n t s a r e now u s e d w i d e l y i n t h e f i e l d o f p i c t u r e a n a l y s i s . T h o s e d e f i n i t i o n s a n d p r o p e r t i e s most r e l e v a n t t o t h e i d e a s p r e s e n t e d i n t h e body o f t h i s p a p e r w i l l be o u t l i n e d h e r e . L e t A = { ( i , , j i ) , . . . , ( i t , j t ) } be a s e t o f ( i , j ) s w here t > 1 . A c a n be d e f i n e d a s one o f t h e f o l l o w i n g two p a t h s : 4 - p a t h - i f f o r e a c h r , 1 < r < t , | i r - i r + ,| + ] j r — j r + i | ^ 1 . I n o t h e r w o r d s , t h a t ( i r + i , j r * i ) e i t h e r e q u a l s ( i r , j r ) , o r i s one o f i t s h o r i z o n t a l o r v e r t i c a l n e i g h b o u r s . S u c h p o i n t s a r e c a l l e d 4 - n e i g h b o u r s a n d a r e s a i d t o be 4 - a d j a c e n t a s i l l u s t r a t e d b e l o w . m d i , j ///// w 4 - n e i g h b o u r s o f ( i , j ) 134 8 - p a t h - i f f o r e a c h r , 1 < r < t , we h a v e max ( | i , - i r + , | , I Jr _ J r * i | ) ^ 1 . T h a t i s , ( i r + i , j r + i ) e i t h e r e q u a l s ( i r , j , ) o r i s one o f i t s e i g h t h o r i z o n t a l , v e r t i c a l , o r d i a g o n a l n e i g h b o u r s . S u c h p o i n t s a r e c a l l e d 8 - n e i g h b o u r s a n d a r e s a i d t o be 8 - a d j a c e n t a s shown b e l o w . 8 - n e i g h b o u r s o f ( i , j ) L e t S be a s u b s e t o f p i c t u r e e l e m e n t s . D e f i n e ( h , k ) and (m,n) o f S a s b e i n g : 4 - c o n n e c t e d - i f t h e r e e x i s t s a 4 - p a t h w i t h ( h , k ) a s t h e f i r s t t e r m a n d (m,n) a s t h e l a s t , h a v i n g a l l i t s members i n S; 8 - c o n n e c t e d - i f a s i m i l a r 8 - p a t h e x i s t s b e t w e e n ( h , k ) a n d (m,n). The d a r k o b j e c t p o i n t s o f an image a r e c o n s i d e r e d t o b e l o n g t o S a n d a r e c o n s i d e r e d 8 - c o n n e c t e d . The b a c k g r o u n d t h e r e f o r e b e l o n g s t o S a n d i s d e f i n e d a s 4 - c o n n e c t e d . A l l p o i n t s o f S t h a t a r e n o t c o n n e c t e d t o t h e b o r d e r o f t h e p i c t u r e a r e c a l l e d h o l e s i n S. I f S i s c o n n e c t e d a n d h a s no h o l e s , i t i s c a l l e d s i m p l y c o n n e c t e d . The p r i n c i p a l a d v a n t a g e i n u s i n g d i f f e r e n t t y p e s o f c o n n e c t i v i t y i n S and S i s t h a t t h i s p r e v e n t s S f r o m b e i n g c o n n e c t e d a c r o s s a t h i n d i a g o n a l o f S. F o r e x a m p l e , c o n s i d e r t h e f o l l o w i n g image a r r a y : 1 35 I f S were d e f i n e d a s 8 - c o n n e c t e d , r e g i o n s A a n d B w o u l d be c o n s i d e r e d a s c o n n e c t e d by v i r t u e o f t h e two 8 - a d j a c e n t d i a g o n a l p o i n t s . T h e r e f o r e B c o u l d n o t be c o n s i d e r e d t o be a h o l e i n s i d e t h e s i m i l a r l y 8 - c o n n e c t e d r e g i o n S. However, i f S i s d e f i n e d a s 4 - c o n n e c t e d , B w o u l d t h e n become a h o l e i n s i d e S, d i s j o i n t f r o m A. T h i s i s i n k e e p i n g w i t h o u r i n t u i t i v e n o t i o n o f h o l e s i n i m a g e s . 4.2.2 B o r d e r s a n d E d g e s The o u t l i n e o f an o b j e c t c a n be d e s c r i b e d t h r o u g h two f e a t u r e s : i t s b o r d e r , o r i t s e d g e . A b o r d e r w i l l be d e f i n e d a s a s i m p l e , b o u n d e d , c l o s e d 8 - p a t h i n t h e o b j e c t S, w h i c h i s e v e r y w h e r e 4 - a d j a c e n t t o S. F o r v e r y t h i n o b j e c t s , one p i x e l a c r o s s , t h e b o r d e r a n d o b j e c t may be one a n d t h e same. An edge was d e f i n e d by R o s e n f e l d [ 6 0 ] a s a p a i r o f 4 - a d j a c e n t e l e m e n t s , one i n S a n d t h e o t h e r i n S. The d e f i n t i o n a p p l i e s r e g a r d l e s s o f t h e c o n n e c t i v i t y o f S. When a l l a d j a c e n t edge e l e m e n t s a r e l i n k e d i n t o a s i m p l e c l o s e d c u r v e , t h e y f o r m t h e edge o f an o b j e c t . An edge i s d i s t i n c t f r o m a b o r d e r i n t h a t i t l i e s n e i t h e r w i t h i n S n o r S b u t r a t h e r a t t h e j u n c t i o n b e t w e e n t h o s e r e g i o n s . T h i s r e s u l t s i n t h e r a t h e r d e s i r a b l e p r o p e r t y t h a t a l l edge p o i n t s a r e u n i q u e l y d e f i n e d . T h i s i s n o t a l w a y s t h e c a s e w i t h b o r d e r p o i n t s . 1 36 4.2.3 C h a i n Codes Once t h e b o r d e r p o i n t s o f t h e p i c t u r e o b j e c t s a r e f o u n d , t h e q u e s t i o n r e m a i n s a s t o how b e s t t o r e p r e s e n t t h e s e p o i n t s f o r s t o r a g e i n memory. Freeman [ 4 9 ] p r o p o s e d t h e u s e o f a s i m p l e c h a i n c o d e f o r t h e e f f i c i e n t c o d i n g o f a r b i t r a r y s h a p e s , o r c u r v e s . The m e t h o d , a s a p p l i e d t o a r e c t a n g u l a r image a r r a y , i s f a i r l y s i m p l e . E a c h 8 - c o n n e c t e d c u r v e p o i n t i s o v e r l a i d w i t h t h e f o l l o w i n g 3X3 r e c t a n g u l a r a r r a y : 3 2 1 4 X 0 5 6 7 C h a i n Code A r r a y The numbers i n s i d e t h e s q u a r e s , r e p r e s e n t i n g t h e p o i n t s i n t h e 8 - n e i g h b o u r h o o d o f X, a r e c a l l e d d i r e c t i o n n u m b e r s . T h e s e d i r e c t i o n numbers q u a n t i z e t h e d i r e c t i o n s o f t h e l i n e s e g m e n t s b e t w e e n n e x t p o i n t s i n t o 45° i n c r e m e n t s . S i n c e e a c h c u r v e p o i n t c a n be q u a n t i z e d i n t h i s manner, o n l y t h e c o o r d i n a t e s o f t h e f i r s t p o i n t o f t h e c u r v e n e e d be r e c o r d e d . The r e m a i n i n g p o i n t s c a n t h e n be s p e c i f i e d by t h e i r d i r e c t i o n numbers. The l i s t o f c o n n e c t e d d i r e c t i o n numbers so d e r i v e d f o r m s a c h a i n c o d e . T h i s r e p r e s e n t a t i o n i s more c o m p a c t t h a n s t r a i g h t f o r w a r d c o o r d i n a t e s t o r a g e s i n c e o n l y t h r e e b i t s a r e n e e d e d t o r e p r e s e n t e a c h p o i n t . F u r t h e r r e d u c t i o n i n s t o r a g e c a n be r e a l i z e d i f t h e c u r v e i s known t o be s l o w l y v a r y i n g . I n t h i s c a s e , o n l y c h a n g e s i n t h e c h a i n c o d e o f , s a y , ±45° n e e d be r e c o r d e d , r e q u i r i n g o n l y two b i t s p e r p o i n t . 137 4.2.4 T r a c e D i r e c t i o n A c o n c e p t t h a t w i l l be e m p l o y e d i n f i n d i n g b o r d e r s i s t h e i d e a o f an e d g e i n and e d g e o u t a s d e f i n e d by Zahn [ 7 0 ] , C o n s i d e r a p o i n t P on t h e b o r d e r ( o r e d g e ) o f a n o b j e c t S: d i r e c t i o n o f t r a c e I f a g l o b a l , s e q u e n t i a l method was u s e d t o f i n d P, a n d l a t e r t o p r o c e e d f r o m P, we must d e f i n e a d i r e c t i o n f o r t h i s t r a c e . A r i g h t - h a n d e d , c l o c k w i s e d i r e c t i o n , a s shown a b o v e , w i l l be u s e d . Now t h e edge o r b o r d e r p o i n t f r o m w h i c h t h i s t r a c e a r r i v e s a t P w i l l be d e f i n e d a s t h e e d g e i n t o P. L i k e w i s e , t h e n e x t p o i n t t o w h i c h t h e t r a c e p r o c e e d s f r o m P w i l l be d e f i n e d a s t h e e d g e o u t f r o m P. Freeman d i r e c t i o n numbers w i l l be u s e d t o d e s c r i b e t h e l o c a t i o n s o f t h e e d g e i n , e d g e o u t p o i n t s . You may n o t i c e t h a t t h e t e r m "edge" i s u s e d r a t h e r l o o s e l y h e r e . T h i s i s t o m a i n t a i n c o n s i s t e n c y w i t h t h e d e f i n i t i o n s o f Zahn. I n f a c t , t h e s e e d g e i n ( o u t ) p o i n t s w i l l l a t e r be d e f i n e d t o l i e on t h e o b j e c t ' s b o r d e r . 138 4.3 R e v i e w o f P a s t Work I n t h e s i m p l e s t c h a r a c t e r s e g m e n t a t i o n s y s t e m s , t h e c o n c e p t s of b o r d e r , e d g e , a n d c o n n e c t i v i t y p l a y l i t t l e r o l e . Some s y s t e m s s u c h a s t h a t o f Mason a n d C l e m e n s [ 6 1 ] s i m p l y s c a n t h e i m a g e , i n a p a t t e r n s i m i l a r t o t h a t p r o p o s e d i n t h e i n t r o d u c t i o n , s e a r c h i n g f o r b l a n k s c a n r o w s . O b j e c t p o i n t s f o u n d b o u n d e d b e t w e e n two s u c h rows a r e t r a n s m i t t e d t o t h e r e c o g n i t i o n c i r c u i t r y c o m p l e t i n g t h e s e g m e n t a t i o n p r o c e s s . I n t h e more s o p h i s t i c a t e d method o f H o f f m a n a n d M c C u l l o u g h [ 6 2 ] , i t i s r e c o g n i z e d t h a t c h a r a c t e r s may t o u c h o r o v e r l a p c a u s i n g a f a i l u r e r a t e o f up t o 3 5 % i n a Mason a n d C l e m e n s - t y p e s e g m e n t a t i o n a p p r o a c h f o r 12 p i t c h s h e r i f - t y p e f o n t s . The s o l u t i o n was t o d e v e l o p two t e c h n i q u e s t o o p t i m a l l y s e v e r c h a r a c t e r a s s e m b l i e s i f a b l a n k c o l u m n i s n o t f o u n d when e x p e c t e d . However, t h e n e t r e s u l t i s t h e same: t o p r o d u c e a p a i r o f p a r t i t i o n i n g c o l u m n s b e t w e e n w h i c h t h e d e s i r e d c h a r a c t e r i n f o r m a t i o n l i e s . C o l u m n - w i s e t r a n s m i s s i o n o f t h i s i n f o r m a t i o n c o m p l e t e s t h e s e g m e n t a t i o n p r o c e s s . T h e s e a p p r o a c h e s a r e n o t s a t i s f a c t o r y f o r two r e a s o n s . The f i r s t i s t h a t t h e y do n o t a d d r e s s t h e p r o b l e m o f u n s e g m e n t a b l e o b j e c t p o i n t s i n t h e image window. T h e s e c a n r e a d i l y o c c u r when p o r t i o n s o f c h a r a c t e r s f r o m a d j a c e n t p r i n t l i n e s p r o t r u d e i n t o t h e window. F o r e x a m p l e : I f a l l c o l u m n s c o n t a i n i n g t h e " a " a r e t o be t r a n s m i t t e d , t h e 1 39 p r o t r u d i n g a s c e n d e r a n d d e s c e n d e r must be t r a n s m i t t e d a s w e l l . T h i s p r o b l e m must be d e a l t w i t h by s u b s e q u e n t p r o c e s s i n g s t a g e s , o r by n a r r o w i n g t h e v e r t i c a l e x t e n t o f t h e s c a n and p r e c i s e l y g u i d i n g t h e s c a n n e r a l o n g t h e p r i n t l i n e . S i n c e i t i s d e s i r a b l e t o p l a c e a l l r e s p o n s i b i l i t y f o r c h a r a c t e r s e g m e n t a t i o n i n t o one s t a g e , a n d t o r e l a x h a r d w a r e o r o p e r a t o r t r a c k i n g p r o f i c i e n c y r e q u i r e m e n t s , n e i t h e r o f t h e s e s o l u t i o n s i s s a t i s f a c t o r y . A s e c o n d o b j e c t i o n t o c o l u m n - w i s e s e g m e n t a t i o n i s t h a t i t c a n n o t d e a l s a t i s f a c t o r i l y w i t h o v e r l a p p i n g c h a r a c t e r s . F o r e x a m p l e : The " a " a n d " t " a r e c l e a r l y s e g m e n t a b l e . H o w e v e r , no c o l u m n c a n s e p a r a t e them w i t h o u t l o s i n g i n f o r m a t i o n f r o m a t l e a s t one o f t h o s e c h a r a c t e r s . A s o l u t i o n t o t h e s h o r t c o m i n g s o f c o l u m n - w i s e s e g m e n t a t i o n i s t o s e a r c h t h e image window f o r c l o s e d b o u n d a r i e s i n s t e a d . The a p p r o a c h e s f o r a c q u i r i n g b o r d e r i n f o r m a t i o n f a l l i n t o two b r o a d c a t e g o r i e s : s e q u e n t i a l b o r d e r , o r e d g e , f o l l o w i n g t e c h n i q u e s , a n d n o n - s e q u e n t i a l b o r d e r , o r e d g e , p r o c e s s i n g t e c h n i q u e s . The f o r m e r i n v o l v e s s t o r a g e o f t h e image i n a r a n d o m l y a d d r e s s a b l e a r r a y , a s e a r c h f o r b o u n d a r y p i x e l s , a n d t h e n e x e c u t i o n o f an a l g o r i t h m t o s y s t e m a t i c a l l y f o l l o w t h e c u r v e of e a c h b o u n d a r y f o u n d . The l a t t e r m ethod i n v o l v e s r e c o r d i n g e a c h b o r d e r , o r e d g e , p o i n t f o u n d d u r i n g t h e r a s t e r s c a n , f o l l o w e d by l i n k a g e o f t h o s e p o i n t s i n t o c l o s e d b o r d e r s d u r i n g , 140 o r a f t e r , t h e r a s t e r s c a n . N e i t h e r o f t h e s e a p p r o a c h e s , h o w e v e r , a d d r e s s t h e i s s u e o f t h e s e p a r a t i o n o f t o u c h i n g c h a r a c t e r s . H o f f m a n a n d M c C u l l o u g h show t h i s t o be a c o m p l e x i s s u e , s o i t w i l l n o t be d i s c u s s e d u n t i l much l a t e r i n t h i s c h a p t e r . The s e q u e n t i a l b o r d e r f o l l o w i n g m ethods a r e t h e o l d e r o f t h e two c a t e g o r i e s , a n d t h o s e most o f t e n s e e n a p p l i e d t o c h a r a c t e r s e g m e n t a t i o n . T h e i r most n o t a b l e f e a t u r e i s t h e i r s i m p l i c i t y . Once t h e f i r s t b o r d e r p o i n t h a s been a c q u i r e d , a m u l t i t u d e o f methods c a n r e a d i l y be c o n c e i v e d f o r a c q u i r i n g t h e n e x t p o i n t a d j a c e n t t o i t and so on a r o u n d t h e b o r d e r t o p r o d u c e a r i g h t - h a n d e d t r a c e . A p i o n e e r i n g a p p l i c a t i o n o f t h i s i d e a was e x p l o r e d by G r e a n i a s e t a l . [ 1 3 ] . They d e v i s e d a l a r g e l y a n a l o g m e thod f o r t h e c o n t r o l o f a f l y i n g s p o t s c a n n e r t o f i r s t l o c a t e a p o t e n t i a l h a n d w r i t t e n c h a r a c t e r b o u n d a r y , a n d t h e n f o l l o w i t s o u t l i n e w i t h t i g h t c i r c u l a r a r c s c e n t e r e d on t h e l i g h t - d a r k b o u n d a r y t r a n s i t i o n . L a t e r , C l e m e n s [ 6 3 ] p r o p o s e d a p u r e l y d i g i t a l m ethod f o r c h a r a c t e r s e g m e n t a t i o n t h r o u g h b o r d e r f o l l o w i n g . The s e a r c h f o r a d j a c e n t b o r d e r p i x e l s was g u i d e d by a s e t o f s i m p l e r e c u r s i v e a r i t h m e t i c e x p r e s s i o n s . B eddoes a n d L u n s c h e r [ 6 4 ] e x p l o r e d t h i s s e g m e n t a t i o n t e c h n i q u e a n d f o u n d i t s p r i n c i p a l s h o r t c o m i n g t o be an i n c o n s i s t e n t v i e w o f b o r d e r c o n n e c t i v i t y . B o r d e r s were c o n s i d e r e d 4- o r 8 - c o n n e c t e d d e p e n d i n g on w h i c h o f t h e two p o s s i b l e d i a g o n a l d i r e c t i o n s was u n d e r c o n s i d e r a t i o n . As a c o n s e q u e n c e , n o t a l l t h i n , one p i x e l w i d e , d i a g o n a l l i n e s c o u l d be f o l l o w e d . B o t h b o r d e r a n d edge f o l l o w i n g m e t h o d s f o r 4- a n d 8 - c o n n e c t e d b o r d e r s were p r e s e n t e d by R o s e n f e l d [ 6 0 ] , The edge 141 f o l l o w e r e x a m i n e d a s i m p l e 2X2 p i x e l a r e a t o l o c a t e s u c c e s s i v e edge p o i n t s a l o n g a b o r d e r . The b o r d e r f o l l o w e r r e q u i r e d a l a r g e r 3X3 p i x e l n e i g h b o u r h o o d , t h e c e n t e r p i x e l o f w h i c h was t h e c u r r e n t b o r d e r p o i n t . The r i g h t - h a n d e d t r a c e r e q u i r e s t h e o u t e r e i g h t p i x e l s t o be e x a m i n e d i n a c l o c k w i s e manner t o s e a r c h f o r t h e n e x t b o r d e r p i x e l . R o s e n f e l d a n d Kak [ 4 0 ] m o d i f i e d t h i s m e thod t o i n c l u d e t h e l a b e l i n g o f t h e b o r d e r p i x e l s f o u n d . T h i s p e r m i t t e d t h e known b o r d e r s o f an image t o be i g n o r e d d u r i n g a r e s c a n i n s e a r c h o f new b o r d e r s . U n f o r t u n a t e l y , t h i s l a b e l i n g p r o c e s s r e q u i r e s a n e x t r a two b i t s p e r p i x e l o f memory. S o b e l [ 6 5 ] d e v e l o p e d a n o v e l , f a s t b o r d e r f o l l o w i n g t e c h n i q u e w h i c h i n v o l v e d a p p l y i n g a 3X3 o p e r a t o r o v e r t h e b i n a r y image t o p r o d u c e an e i g h t - b i t n e i g h b o u r h o o d c o d e w h i c h i n t u r n r e p l a c e d e a c h p i x e l o f t h e i n p u t i m a g e . T h i s n e i g h b o u r h o o d c o d e d e s c r i b e d t h e a r r a n g e m e n t o f o b j e c t p i x e l s a d j a c e n t t o t h e c e n t r a l p i x e l . A f t e r r e c o d i n g o f t h e image i s c o m p l e t e , t h e n e i g h b o u r h o o d c o d e s a r e r e a d a n d a t a b l e l o o k u p t e c h n i q u e i s u s e d t o q u i c k l y g u i d e t h e method a l o n g any b o r d e r s p r e s e n t , a n d p r o d u c e a c h a i n c o d e d e s c r i p t i o n a s o u t p u t . The t w o - p a s s n a t u r e o f t h i s t e c h n i q u e c o u l d p o s s i b l y be m o d i f i e d t o make i t s u i t a b l e f o r r e a l - t i m e a p p l i c a t i o n s . T h e r e a r e a number o f e v i d e n t d r a w b a c k s common t o a l l s e q u e n t i a l t e c h n i q u e s . F o r e m o s t i s t h e r e q u i r e m e n t t o s t o r e a c o m p l e t e c o p y o f t h e i n p u t image a n d p r o v i d e random a c c e s s t o a l l o f t h e p i x e l s . T h i s o b v i o u s l y i n c r e a s e s t h e memory r e q u i r e m e n t s o f t h e s y s t e m , e s p e c i a l l y when a S o b e l - t y p e s y s t e m i s e m p l o y e d . H o w e v e r , memory management a l s o becomes more c o m p l e x when t h e m o v i n g window o f a d y n a m i c image i s c o n s i d e r e d . C l e a r l y some 142 f o r m o f t w o - d i m e n s i o n a l c i r c u l a r l i s t must be e m p l o y e d t o s t o r e t h e window w h i c h i n t u r n r e q u i r e s c o m m u n i c a t i o n o f t h e c u r r e n t t o p and b o t t o m o f t h e l i s t t o t h e b o r d e r f o l l o w i n g s y s t e m . The methods c i t e d o p e r a t e d on s t a t i c i mages so memory management was n e v e r a c o n s i d e r a t i o n . B e c a u s e o f t h e f r e q u e n t memory r e f e r e n c e s i n v o l v e d i n t h e s e a r c h f o r b o r d e r p i x e l s , f r e q u e n t l y g u i d e d by a s m a l l s e q u e n t i a l a l g o r i t h m , t h e r e i s some c o n c e r n a s t o w h e t h e r t h e s e t e c h n i q u e s c o u l d meet t h e r e a l - t i m e s p e e d c o n s t r a i n t . H o wever, D'Amato e t a l . [ 6 6 ] r e p o r t a 100 c h a r a c t e r p e r s e c o n d r e c o g n i t i o n r a t e i n a s y s t e m t h a t u s e s a s e q u e n t i a l b o r d e r f o l l o w e r o f an u n s p e c i f i e d t y p e . E v i d e n t l y , t h e r e f o r e , t h e s e s y s t e m s c a n be a d a p t e d t o o u r n e e d s . The n o n - s e q u e n t i a l b o r d e r f i n d i n g m e t h o d s o p e r a t e v e r y d i f f e r e n t l y . They a d d r e s s t h e a b o v e m e n t i o n e d memory management p r o b l e m s by s i m p l y s t o r i n g no more t h a n 2 l i n e s o f t h e i n p u t image a t a t i m e . I n f a c t , t h e method o f P a v l i d i s [ 6 7 ] s t o r e s o n l y one l i n e . To e n c o d e t h e image d a t a , t h e end c o o r d i n a t e s o f r u n s o f o b j e c t - p o i n t s i n t h e c u r r e n t l i n e a r e e n t e r e d i n t o a l i n e a d j a c e n c y g r a p h ( L A G ) . On c o m p l e t i o n o f an image s c a n , t h e LAG d a t a i s mapped i n t o a c o n n e c t e d s t r i n g o f b o u n d a r y p o i n t s w h i c h c o m p l e t e l y d e s c r i b e s t h e i n p u t image. The i d e a o f u s i n g a s p e c i a l d a t a s t r u c t u r e t o c o n n e c t b o r d e r p o i n t s f o u n d n o n - s e q u e n t i a l l y was a l s o e x p l o r e d by C h a k r a v a r t y [ 6 8 ] . He p r o p o s e d t h a t t h e i n p u t image be s c a n n e d by a 3X3 o p e r a t o r , a p r o c e d u r e r e q u i r i n g s t o r a g e o f a t l e a s t two image r o w s , t o s e a r c h f o r 8 - c o n n e c t e d o b j e c t p i x e l s t h a t c a n be l i n k e d i n t o s t r a i g h t l i n e s e g m e n t s . T h e s e l i n e s e g m e n t s a r e s t o r e d i n a s p e c i a l l i s t d a t a s t r u c t u r e . C o n c u r r e n t w i t h t h e s c a n , t h e s e 143 l i s t s a r e l i n k e d t o g e t h e r t h r o u g h t h e u s e o f p o i n t e r s t o f o r m a d e s c r i p t i o n o f a l l b o r d e r s a n d l i n e s p r e s e n t i n t h e f o r m o f a c h a i n c o d e . No e f f o r t , h o w e v e r , i s made t o a c h i e v e c l o s e d b o r d e r s s i n c e t h e method s t o r e s t h i n l i n e s a s u n i q u e l i n e s e g m e n t s . A t r u e b o r d e r f o l l o w e r w o u l d m u l t i p l y d e f i n e t h e l i n e s egment p i x e l s a s i t t r a c e d i t s way a r o u n d them. The o p p o s i t e p r o b l e m i s f o u n d i n t h e a p p r o a c h o f B a t c h e l o r a n d Mar low [ 6 9 ] . A 3X3 window i s a l s o a p p l i e d t o t h e i n p u t image a s i t i s r a s t e r s c a n n e d , b u t t h i s t i m e t h i n l i n e s a r e i g n o r e d by t h e s y s t e m . T h i s i s b e c a u s e t h e s y s t e m s e e k s t o p r o c e s s o b j e c t b o r d e r s f o u n d i n t h e 3X3 window w i t h s p e c i a l p u r p o s e h a r d w a r e i n r e a l - t i m e , a n d t h i n l i n e s r e p r e s e n t an a m b i g u i t y t h a t had n o t been r e s o l v e d . D u r i n g t h e s c a n , t h e c h a i n c o d e o f t h e b o r d e r p o i n t s f o u n d i s s t o r e d i n a RAM memory a d d r e s s e d by t h e p o i n t s ' c o o r d i n a t e s . T h e r e f o r e , e v e n t h o u g h o n l y two rows o f t h e i n p u t image a r e s t o r e d , t h e i n i t i a l memory a d v a n t a g e o f t h i s s y s t e m i s s u b s e q u e n t l y l o s t . A l l o f t h e a b o v e s y s t e m s , i n a d d i t i o n t o t h e s h o r t c o m i n g s c i t e d , a r e two p a s s i n o p e r a t i o n . D u r i n g t h e f i r s t p a s s , t h e image i s s c a n n e d a n d p r o c e s s e d . D u r i n g t h e s e c o n d p a s s , t h e image b o r d e r d e s c r i p t i o n i s g e n e r a t e d . T h i s i s u n a c c e p t a b l e i n a d y n a m i c image i n c o r p o r a t i n g a m o v i n g window. B o r d e r d e s c r i p t i o n s must be p r o d u c e d "on t h e f l y " c o n c u r r e n t w i t h t h e r a s t e r - s c a n . M o d i f i c a t i o n s t o t h e t e c h n i q u e s c i t e d may remove t h i s a n d o t h e r d r a w b a c k s ; b u t i t was f e l t t h e a n s w e r l a y e l s e w h e r e , i n a s y s t e m t h a t i n h e r e n t l y d e t e c t s a l l b o r d e r s a n d p r e s e n t s no b a r r i e r s t o g e n e r a t i n g t h e i r d e s c r i p t i o n on t h e f l y . C.T. Zahn [ 7 0 ] d e v i s e d a b i n a r y - i m a g e d e s c r i p t i o n p r o c e d u r e 144 f o u n d e d on t h e d e t e c t i o n a nd l i n k a g e o f a l l e d g e - p o i n t s p r e s e n t . The r e s u l t was a c o m p l e t e , c h a i n c ode d e s c r i p t i o n o f any t w o - d i m e n s i o n a l p a t t e r n s s e e n . A p r e l i m i n a r y m e thod was e v e n p r o v i d e d t o show how t h e o b j e c t p a t t e r n s c o u l d be r e c o n s t r u c t e d f r o m t h e d e s c r i p t i o n . Though no s u g g e s t i o n a s t o t h e m e t h o d ' s s u i t a b i l i t y f o r r e a l - t i m e b o r d e r p r o c e s s i n g was made, i t was f e l t t h a t t h i s d e s c r i p t i o n method i n c o r p o r a t e d e n o u g h f l e x i b i l i t y t o meet t h i s o b j e c t i v e . I n t h e s u b s e q u e n t s e c t i o n s , Z a h n ' s m e t h o d w i l l be p r e s e n t e d a nd i t s a p p l i c a t i o n t o c l o s e d - o b j e c t s e g m e n t a t i o n e x p l o r e d . 4.4 Zahn's B i n a r y - I m a g e D e s c r i p t i o n M e t h o d C.T. Zahn d e v e l o p e d a m e t h o d of f o r m a l l y d e s c r i b i n g b i n a r y - i m a g e p a t t e r n s w h i c h i s r e a d i l y a d a p t e d t o s e g m e n t i n g s u c h i m a g e s i n a n o n - s e q u e n t i a l way. T h i s t e c h n i q u e i s b a s e d on i d e n t i f y i n g t h e edge p o i n t s b e t w e e n an o b j e c t a n d i t s b a c k g r o u n d a n d a s s i g n i n g them an e d g e i n - e d g e o u t d i r e c t i o n p a i r c o n s i s t e n t w i t h a r i g h t - h a n d t r a c e . T h r o u g h s i m p l e a r i t h m e t i c r e l a t i o n s h i p s t h i s i n f o r m a t i o n c a n be p r o c e s s e d t o p r o v i d e a c o m p l e t e d e s c r i p t i o n o f t h e b o r d e r s , b o t h e x t e r n a l a n d i n t e r n a l , o f any o b j e c t t o t a l l y c o n t a i n e d w i t h i n t h e i m a g e . T h i s d e s c r i p t i o n c a n be p r o v i d e d i m m e d i a t e l y a f t e r a r a s t e r s c a n l i n e a d m i t s t h e c o m p l e t e o b j e c t i n t o t h e c u r r e n t image window. F u r t h e r m o r e , e x p l i c i t s t o r a g e o f no more t h a n two image l i n e s i s r e q u i r e d . As a l r e a d y d e f i n e d , edge p o i n t s a r e l o c a t e d b e t w e e n p i c t u r e e l e m e n t s . To d e t e c t t h e e d g e i n - e d g e o u t d i r e c t i o n s , Zahn c e n t e r s e a c h edge p o i n t on a 2 X 3 window: 1 4 5 D 1 D4 D 2 <*> D 5 D 3 D 6 r i + i The e d g e - p o i n t a t A o c c u p i e s t h e c o o r d i n a t e s (c, , r, + 0 . 5 ) . By e x a m i n a t i o n o f t h e window, t h e e d g e i n - e d g e o u t d i r e c t i o n s c a n be r e a d i l y f o u n d u s i n g e l e m e n t a r y b o o l e a n f u n c t i o n s . T h e s e were f o u n d by Zahn t o be: n e i g h b o u r h o o d e d g e i n D 5 A D 1 A D 2 A D 4 1 D 2 A D 6 A D 5 3 D 2 A D 3 A D 5 A D 6 4 D 2 A D 3 A D 5 A D 6 5 D 1 A D 5 A D 2 7 D 4 A D 5 A D 1 A D 2 0 n e i g h b o u r h o o d D 3 A D 5 A D 2 D 2 A D 1 A D 4 A D 5 D 1 A D 2 A D 4 A D 5 D 2 A D 4 A D 5 _ D 5 A D 2 A D 3 A D 6 D 5 A D 6 A D 2 A D 3 e d g e o u t 1 3 4 5 7 0 I t s h o u l d be n o t e d t h a t t h i s p a r t i c u l a r window c a n n o t d e t e c t e d g e s a l o n g d i r e c t i o n s 2 - 6 . To remedy t h i s , an a d d i t i o n a l window i s o v e r l a i n n e a r A s i m i l a r t o t h a t a b o v e b u t r o t a t e d 9 0 ° : D2 D3 D5 n n D6 D7 D8 r i + i r ( T h i s t i m e t h e e d g e - p o i n t i s c e n t e r e d on B a t l o c a t i o n ( C i + 0 . 5 , r j ) . F o r t h i s window, a new t a b l e o f b o o l e a n f u n c t i o n s d e f i n e s t h e e d g e i n - e d g e o u t d i r e c t i o n s : 146 neighbourhood edgein D6AD7AD5 D6AD8AD5AD7 D6A D8A D5 A D7 D3 A D5 A D6 D2AD5AD3AD6 D5AD3AD6AD2 1 2 3 5 6 7 neighbourhood edgeout D6AD3A D2AD5 D3AD6AD2AD5 D6AD2AD5 D5A D6A D8 A D7 D5AD7A~D6A D8 D8 A D5 A D6 1 2 3 5 6 7 Since the two windows together cover a l l of the possible edge directions, the two windows can be combined into a single window of the shape: D1 D2 D3 D4 D5 (l P) D6 D7 D8 The positioning of the B point between D5 and D6 w i l l l a t e r be seen to be necessary to achieve dynamic linkage of edge-points during a raster scan. The p r i n c i p a l advantage of Zahn's approach l i e s in the fact that edge-points are uniquely defined. This s i m p l i f i e s the processing of detected edges and implies equal processing time for every edge-point. The p r i n c i p a l disadvantage here is that an extra b i t i s required to store the one half coordinate difference marking the edge p o s i t i o n . Since Zahn advocates only the storage of curvature points (edgein ? edgeout), t h i s may not be s i g n i f i c a n t in l i g h t of the storage saved. Another objection i s that 90° corners resulting from the intersection of horizontal and v e r t i c a l object sides are not detected d i r e c t l y . These corners are represented by two 45° corners. Therefore, these and sharper corners are e s s e n t i a l l y smoothed into a rounded-edge contour not e n t i r e l y representative of the border shape. This is 147 i l l u s t r a t e d i n t h e f o l l o w i n g e x a m p l e As w e l l a s t h e r o u n d i n g e f f e c t , i t i s a l s o s e e n t h a t c o r n e r s o f any t y p e c a u s e t h e d e t e c t i o n o f more e d g e - p o i n t s ( b l a c k d o t s ) t h a n b o r d e r p o i n t s . Trie l a s t o b j e c t i o n i s l a r g e l y an a e s t h e t i c o n e . T h i s t e c h n i q u e d o e s n o t g e n e r a t e b o r d e r p o i n t s w h i c h , a t h e a r t , i s r e a l l y what i s w a n t e d . A s i m p l e m o d i f i c a t i o n , h o w e v e r , c a n a c c o m p l i s h t h i s . The m o d i f i c a t i o n i s t o a s s o c i a t e t h e e d g e i n - e d g e o u t d i r e c t i o n s g e n e r a t e d n o t w i t h t h e b e t w e e n - p i x e l e d g e - p o i n t s , b u t w i t h t h e n e a r e s t o b j e c t b o r d e r p o i n t . T h i s i n i t i a l l y c a u s e s some m u l t i p l e d e t e c t i o n o f c e r t a i n b o r d e r p o i n t s , b u t t h a t ' s a c c e p t a b l e - . The b o r d e r p o i n t s a r e s t i l l o n l y d e t e c t e d two a t a t i m e . As an e x a m p l e , c o n s i d e r t h e f o l l o w i n g n e i g h b o u r h o o d : H e r e , e d g e i n = 4 and e d g e o u t = 5 a n d t h e s e v a l u e s w i l l be a s s o c i a t e d w i t h t h e p i x e l a t D2. On t h e o t h e r h a n d , t h e f o l l o w i n g n e i g h b o u r h o o d , 148 a s s o c i a t e s t h e edge d i r e c t i o n s w i t h p i x e l D5. A s i m i l a r m o d i f i c a t i o n w o u l d be done w i t h e d g e - p o i n t B. The n e t r e s u l t i s t h a t t h e edge d i r e c t i o n s become a s s o c i a t e d w i t h b o r d e r p o i n t s a l l o w i n g t h e o r i g i n a l c o o r d i n a t e w o r d l e n g t h s t o be m a i n t a i n e d . T h a t some r e d u n d a n t b o r d e r p o i n t d e t e c t i o n o c c u r s c a n be s e e n i n t h e f o l l o w i n g e x a m p l e . C o n s i d e r t h e image s e g m e n t : t 1 1 i '/// § 1 t The e d g e o u t c h a i n c o d e g e n e r a t e d f o r t h i s edge c u r v e w o u l d r e a d : 2 2 2 1 7 7 7 5 5 6 , w i t h p i x e l s 1 and 3 b e i n g r e c o r d e d t h r e e t i m e s . A b o r d e r f o l l o w i n g scheme w o u l d r e c o r d e a c h p i x e l o n c e a n d g e n e r a t e t h e c o d e : 2 2 2 7 5 6 . B r i e f e x a m i n a t i o n shows t h a t o n l y t h e f i r s t e d g e i n and t h e l a s t e d g e o u t n e e d be s t o r e d a t e a c h p i x e l . A l s o , i t i s s e e n t h a t t h e n e t r e s u l t o f t h e s e m u l t i p l y d e f i n e d b o r d e r s i s t h a t a p i x e l ends up p o i n t i n g a t i t s e l f v i a i t s edge d i r e c t i o n s a n d l i n k a g e s . B e f o r e p r o c e e d i n g , i t w o u l d be e x p e d i e n t t o t a k e a b r i e f l o o k a t how t h e a b o v e windows w o u l d be i m p l e m e n t e d i n h a r d w a r e . 1 49 Assume, f i r s t o f a l l , t h a t t h e b i n a r y image d a t a i s b e i n g d e l i v e r e d i n s e r i a l f a s h i o n . A l s o assume, f o r i l l u s t r a t i o n , t h a t t h e v i d e o image i s 64 p i x e l s w i d e and a t l e a s t 3 t a l l . The p r o p o s e d i m p l e m e n t a t i o n w o u l d c o n s i s t o f two t y p e s o f s h i f t r e g i s t e r s . One o f w h i c h w o u l d be 64 b i t s l o n g ; two o f t h e s e w o u l d be u s e d . The o t h e r w o u l d be t h r e e b i t s l o n g a n d p r o v i d e a c c e s s t o a l l t h r e e b i t s ; t h r e e o f t h e s e w o u l d be u s e d . The b a s i c i m p l e m e n t a t i o n w o u l d t h e n be: 3 - b i t s h i f t r e g s . Z1 Z2 Z3 D1 D2 D3 6 4 - b i t s h i f t r e g s . B i n a r y V i d e o I n D4 D5 D6 64 63 • • • 3 2 1 1 1 i D7 D8 64 63 • • • 3 2 1 S1 S2 N o n - s e q u e n t i a l H a r d w a r e A l l o f t h e s h i f t r e g i s t e r s a r e c l o c k e d a t t h e v i d e o b i t r a t e . The t h r e e - b i t s h i f t r e g i s t e r s h o l d t h e c u r r e n t window, o r n e i g h b o u r h o o d o f p o i n t s t o be e x a m i n e d . The Z a h n - b a s e d method w o u l d a c c e s s e i g h t o f t h e b i t s i n t h i s window. The two 6 4 - b i t s h i f t r e g i s t e r s d e l a y t h e v i d e o d a t a by two r o w s . T h i s c o n f i g u r a t i o n r e s u l t s i n a 3X3 window s w e e p i n g a c r o s s t h e image f r o m l e f t t o r i g h t . C l e a r l y , no t r u e image f r a m e b u f f e r i s m a i n t a i n e d . The f o l l o w i n g b o r d e r p o i n t l i n k a g e p r o c e d u r e w i l l make e x t e n s i v e use o f t h e o r d e r i n w h i c h t h i s s c a n n i n g window d e t e c t s t h e b o r d e r p o i n t s . 1 50 4.5 B o r d e r L i n k a g e and C l o s u r e The Zahn b o r d e r p o i n t d e t e c t i o n method j u s t o u t l i n e d c o n s i s t s o f a l o c a l o p e r a t o r a p p l i e d t o e v e r y p i x e l i n t h e image. However, i t was shown by M i n s k y a n d P a p e r t [ 7 1 ] t h a t a c o l l e c t i o n o f l o c a l o p e r a t i o n s c o u l d n e i t h e r d e t e r m i n e c o n n e c t e d n e s s n o r c l o s u r e o f s i m p l e c u r v e s . Some f u r t h e r , g l o b a l p r o c e s s i n g was n e e d e d . The n e c e s s a r y g l o b a l i n f o r m a t i o n f o r t h i s i s p r o v i d e d i n t h e b o r d e r p o i n t c o o r d i n a t e s a n d t h e e d g e i n - e d g e o u t d i r e c t i o n s . I n t h i s s e c t i o n , a method w i l l be p r e s e n t e d f o r u s i n g t h i s i n f o r m a t i o n t o d e t e r m i n e b o t h c o n n e c t e d n e s s a n d c l o s u r e . I t i s i m p o r t a n t t o n o t e t h a t i n t h e c o o r d i n a t e s y s t e m u s e d , r p o i n t s up i n t h e d i r e c t i o n o f new image rows w h i c h a l s o c o i n c i d e s w i t h t h e d i r e c t i o n o f t h e l o c a l h o r i z o n t a l o f t h e c h a r a c t e r l i n e s . c i s d i r e c t e d t o t h e r i g h t a l o n g a row a n d r e p r e s e n t s t h e c h a r a c t e r ' s l o c a l v e r t i c a l . L i n k a g e : U s i n g t h e a v a i l a b l e r , c , e d g e i n , a n d e d g e o u t v a l u e s , p a i r s o f c o n n e c t e d b o r d e r p o i n t s , ( r a , c a ) , ( r b , c b ) , c a n be p r o p e r l y l i n k e d by u s i n g t h e f o l l o w i n g p r o p e r t i e s o b s e r v e d by Zahn: (1) e d g e o u t a = e d g e i n b b e t w e e n a l l c o n n e c t e d p o i n t s . (2) r j + 1 > r, f o r c o n s t a n t c , a n d c i + 1 ^ Cj f o r c o n s t a n t r . T h i s i s a s t a t e m e n t o f t h e n a t u r e o f t h e s c a n n i n g p r o c e s s , i e . , new b o r d e r p o i n t s a r e a l w a y s d e t e c t e d a t p r o g r e s s s i v e l y l a r g e r c o o r d i n a t e v a l u e s . T h i s p r o p e r t y w i l l be c e n t r a l t o t h e p r o p e r o r d e r i n g o f l i n k e d p o i n t s . F o r s u c c e s s i v e l y d e t e c t e d b o r d e r p o i n t s , ( r , , c,) and 151 ( r 2 , c 2 ) , w i t h e d g e o u t a = e d g e i n b a l o n g t h e f o l l o w i n g d i r e c t i o n s : (3) 0-4: r , = r 2 a n d t h e r e c a n be no o t h e r p o i n t i n t h i s row w i t h Cj s u c h t h a t c , < C j < c 2 . T h e r e f o r e , c o n s e c u t i v e o c c u r e n c e s o f s u c h p o i n t s a l o n g t h e same row a r e a u t o m a t i c a l l y l i n k e d . ( 4) 1-5: r , - c , = r 2 - c 2 a n d t h e r e c a n be no o t h e r p o i n t ( r , , C| ) w i t h t h e same d i f f e r e n c e s u c h t h a t r , < r , < r 2 a n d c , < C j < c 2 . T h e r e f o r e c o n s e c u t i v e o c c u r e n c e s o f t h e same d i f f e r e n c e s a r e a u t o m a t i c a l l y l i n k e d . ( 5) 2-6: c , = c 2 and t h e r e c a n be no o t h e r p o i n t on t h i s c o l u m n w i t h r i s u c h t h a t r , < r , < r 2 . T h e r e f o r e , c o n s e c u t i v e o c c u r e n c e s o f s u c h p o i n t s i n t h e same c o l u m n a r e a u t o m a t i c a l l y l i n k e d . ( 6 ) 3-7: r 1 + c , = r 2 + c 2 a n d t h e r e c a n be no o t h e r p o i n t ( r ( , c i ) w i t h t h e same sum s u c h t h a t r , < r i < r 2 , c , < C j < c 2 . T h e r e f o r e , c o n s e c u t i v e o c c u r e n c e s o f t h e same sum a r e a u t o m a t i c a l l y l i n k e d . C o n d i t i o n (1) s i m p l y s t a t e s t h e f a c t t h a t e a c h b o r d e r p o i n t p o i n t s t o t h e n e x t b o r d e r p o i n t i n s u c c e s s i o n . C o n d i t i o n s ( 3 ) t o (6) p r o v i d e t h e means f o r d e t e c t i n g when a g i v e n p a i r b o r d e r p o i n t s s u c c e e d one a n o t h e r a l o n g t h e same b o r d e r . The p r o c e s s o f l i n k i n g a l l t h e b o r d e r p o i n t s i n t o a c l o s e d c u r v e i s a c c o m p l i s h e d t h r o u g h a s e r i e s o f l i s t s . C o n d i t i o n s ( 3 ) t o (6) a r e i m p l e m e n t e d t h r o u g h a s e t o f e i g h t t a b l e s w h i c h p e r f o r m t h e p a i r i n g o f l i n k e d p o i n t s . N o t e t h a t e x p l i c i t u s e o f c o n d i t i o n (2) i s made t h r o u g h o u t , i e . , t h a t new 152 p o i n t s a r r i v e w i t h a s c e n d i n g c o o r d i n a t e v a l u e s D i r e c t i o n 0-4: e d g e i n = 0 = e d g e o u t 2nd e n t r y 1 s t e n t r y r 2 , c 2 r 1, c , e d g e i n = 4 = e d g e o u t 1 s t e n t r y 2nd e n t r y f i r C, r 2 , c 2 T h e s e p o i n t s a r e a u t o m a t i c a l l y s o r t e d by t h e v i r t u e o f c i n c r e a s i n g w h i l e r i s c o n s t a n t i n t h i s d i r e c t i o n . T h e r e f o r e , t h e s e t a b l e s n e e d c o n t a i n o n l y one e n t r y e a c h . D i r e c t i o n 1-5: e d g e i n = 1 = e d g e o u t d i f f e r e n c e e d g e i n = 5 = e d g e o u t 2nd e n t r y 1 s t e n t r y r - c 1 s t e n t r y 2nd e n t r y -m -m • -m -m C l f c, * -min • —m —m t\ , c 2 -m -m r 2 f c 1 • r 2 r C 2 • • r 1 / c , * • 0 » r 1 i C 2 r 2 i C i • n> * m r 2 , c 2 • m * m C l / c , • • max m • m r , , c 2 m * m r 2 , c , T h e s e p o i n t s a r e a u t o m a t i c a l l y s o r t e d on c o n s e c u t i v e o c c u r e n c e s o f t h e same d i f f e r e n c e . S i n c e t h e s e d i r e c t i o n s p o i n t t o o r f r o m new rows ( i . e . , d a t a n o t y e t a r r i v e d ) , t h e y must be a c c u m u l a t e d i n t a b l e s much l a r g e r t h a n t h e 0-4 d i r e c t i o n . One s l o t i s p r o v i d e d f o r e a c h p o s s i b l e d i f f e r e n c e . I t w i l l be shown t h a t t h e s e d i f f e r e n c e s must be s u b j e c t t o m o d u l a r a r i t h m e t c w i t h t h e m o d u l o d e t e r m i n e d by t h e image w i d t h . T h e r e f o r e , e v e n f o r t h e l a r g e s t o f i m a g e s , s u c h a t a b l e i s c o m p a r a t i v e l y e a s y t o manage. A l s o , a c c e s s t o t h e e n t r i e s i s p o s s i b l e t h r o u g h h a s h - c o d i n g , i . e . , u s i n g t h e d i f f e r e n c e r e s u l t a s t h e a d d r e s s t o t h e t a b l e e n t r i e s . 153 D i r e c t i o n 2-6: e d g e i n = 2 . = e d g e o u t c e d g e i n = 6 = e d g e o u t 2nd e n t r y 1 s t e n t r y c o o r d . 1 s t e n t r y 2nd e n t r y r 2 r ° r 2 i c 2 r 0 r ° 0 • r 0 r 0 • r 2 r C 2 r 2 f C 2 _ m m r 1 f c , • c max • r 7 , c 7 r 2 i C 2 T h e s e p o i n t s a r e a u t o m a t i c a l l y s o r t e d on c o n s e c u t i v e o c c u r e n c e s o f t h e same c v a l u e s . L i k e t h e 1-5 t a b l e s , t h e s e t o o h a v e many e n t r i e s . T h i s t i m e , t h e number o f e n t r i e s c o r r e s p o n d s t o t h e maximum number o f c v a l u e s . D i r e c t i o n 3-7: e d g e i n = ; 3 = e d g e o u t sum e d g e i n = 7 e d g e o u t 2nd e n t r y 1 s t e n t r y r+c , 1 s t e n t r y 2nd e n t r y -m - m r 2 , C 2 r 7 -min • r 1 / c , • r 2 t c 2 • • r 2 i c 2 • r ? * 0 m * r° ' r° r i i C|• • r 2 f C 2 • • r 2 , c 2 r ? ' * max • r 1 i C ! • r m ' r m r 2 / c 2 T h i s c a s e i s s i m i l a r t o t h e 1-5 d i r e c t i o n , o n l y h e r e t h e e n t r i e s a r e o r d e r e d a c c o r d i n g t o t h e i r c o o r d i n a t e sum. A g a i n , c o n s e c u t i v e e n t r i e s a r e a u t o m a t i c a l l y s o r t e d . The t a b l e w o u l d a l s o h a v e t o c o n t a i n a s many s l o t s a s t h e m o d u l a r r a n g e o f sums. T h e r e a r e a number o f i m p l i c i t a s s u m p t i o n s u n d e r l y i n g t h e c o n s t r u c t i o n o f t h e s e t a b l e s . The most f u n d a t m e n t a l i s t h a t t h e r - c o o r d i n a t e i s l i m i t e d t o t h e same r a n g e o f v a l u e s a s t h e c - c o o r d i n a t e . However, r r e p r e s e n t s an u n r e s t r i c t e d number o f new rows o f image d a t a . r must t h e r e f o r e be r e c y c l e d i n a 154 m o d u l u s a t l e a s t e q u a l t o t h e maximum c v a l u e . I t w i l l be shown t h a t a l l o f t h e p r e v i o u s l i n k a g e r e l a t i o n s , p a r t i c u l a r l y a l o n g 1-5 a n d 3-7, s t i l l h o l d f o r a m o d u l a r r . A n o t h e r i m p o r t a n t a s s u m p t i o n i s t h a t p o i n t s d e t e c t e d a t B i n t h e window a r e e n t e r e d f i r s t . T h i s i s n e c e s s a r y b e c a u s e B v a l u e s l i e f a r t h e r down i n t h e image a n d t h e r e f o r e t e s t o l d e r p o i n t s t h a n d o e s A. A l s o , B c o o r d i n a t e s a n d e d g e s a l o n g ±45° d i a g o n a l s l i e b e t w e e n A p o i n t s a n d s o must be l i n k e d i n t o t h e b o r d e r f i r s t t o g u a r a n t e e p r o p e r l i n k a g e o f A p o i n t s . B was p o s i t i o n e d b e t w e e n D5 and D6 t o e n s u r e c o r r e c t l i n k a g e a l o n g d i r e c t i o n s 3 a n d 7. F i n a l l y , t h e r e p r e s e n t a t i o n o f t h e g i v e n t a b l e s i s somewhat d e c e p t i v e . I n a f u l l i m p l e m e n t a t i o n , t h e i n f o r m a t i o n s t o r e d i n t h e s l o t s may be o f a v e r y d i f f e r e n t c h a r a c t e r . F o r i n s t a n c e , p o i n t e r s f o r l i s t s t o be d i s c u s s e d n e x t may be s t o r e d i n s t e a d . A l s o , some o f t h e i n f o r m a t i o n shown i s r e d u n d a n t ; f o r i n s t a n c e , s i n c e t h e 2-6 d i r e c t i o n i s s t o r e d i n i n c r e a s i n g c v a l u e s , t h e r e i s no n e e d t o s t o r e r , a n d s i n c e a l l t h e s e d a t a s t r u c t u r e s p r o v i d e a u t o m a t i c s o r t i n g , t h e r e i s r e a l l y no n e e d t o s t o r e t h e s e c o n d e n t r y . C o n c u r r e n t w i t h t h e e n t r y o f p o i n t s i n t o t h e l i n k a g e t a b l e s , two o t h e r l i s t s a r e m a i n t a i n e d : l i s t - 1 - T h i s l i s t w o u l d c o n t a i n r , c , e d g e i n , a n d e d g e o u t d a t a f o r l a t e r a c q u i s i t i o n a n d p r o c e s s i n g . T h i s i s t h e p r i m a r y s t o r e f o r d e t e c t i o n d a t a u n t i l t h e b o r d e r p o i n t s a n d / o r c h a i n c o d e s a r e t r a n s m i t t e d t o t h e n e x t p r o c e s s o r a f t e r c l o s u r e d e t e c t i o n . D a t a i n t h i s l i s t i s s i m p l y s t o r e d i n s e q u e n t i a l o r d e r a s i t a r r i v e s . l i s t - 2 - T h i s l i s t c a n be c o n s i d e r e d a h o r i z o n t a l e x t e n s i o n o f l i s t - 1 s i n c e i t h a s t h e same number o f e n t r i e s , e a c h o f w h i c h i s i n t i m a t e l y a s s o c i a t e d w i t h one l i s t - 1 e n t r y . L i s t - 2 i s a l i s t o f 155 p o i n t e r s , t h e p o i n t e r s b e i n g a d d r e s s e s t o o t h e r l i s t - 1 - l i s t - 2 e n t r i e s r e p r e s e n t i n g s u c c e s s i v e b o r d e r p o i n t s a s t h e y w o u l d be l i n k e d i n a r i g h t - h a n d e d b o r d e r t r a c e i n t h e ima g e . By t r a c i n g t h r o u g h t h e s e p o i n t e r s , t h i s e n t i r e a p p r o a c h a c h i e v e s g l o b a l c l o s u r e d e t e c t i o n . The p h y s i c a l s t r u c t u r e o f t h e s e l i s t s i s t h e r e f o r e : A d d r e s s l i s t - 1 l i s t - 2 —> e n t r y a —> e n t r y b —> e n t r y c —> e n t r y x where "—>" r e f e r s t o " p o i n t e r t o " . I t w i l l be assumed t h a t a 0 i n l i s t - 2 s i g n i f i e s a n u l l p o i n t e r ( i . e . , t h e l i n k a g e h a s n o t b e e n r e s o l v e d ) . T h i s i s why t h e l i s t a d d r e s s e s a r e s t a r t e d a t 1 . The e n t r i e s o f l i s t - 2 a r e g e n e r a t e d by t h e l i n k a g e t a b l e s . I n f a c t , o n l y t h e l i s t - 1 - l i s t - 2 a d d r e s s n e e d be s t o r e d i n t h e l i n k a g e t a b l e s s i n c e l i s t - 1 i s u s e d t o s t o r e t h e g e n e r a l i n f o r m a t i o n on b o r d e r p o i n t s a s t h e y a r r i v e . A l s o , some o f t h e i n f o r m a t i o n i n l i s t - 1 may be r e d u n d a n t . F o r i n s t a n c e , i n g e n e r a t i n g a n d p r o c e s s i n g a c h a i n c o d e , o n l y one o f e d g e i n , e d g e o u t i s r e a l l y n e e d e d ( u s u a l l y e d g e o u t ) . The n e c e s s a r y s i z e o f t h e s e l i s t s i s i n d e t e r m i n a t e , a n d d e p e n d s on t h e s i z e o f t h e image a n d t h e c o m p l e x i t y o f t h e o b j e c t s c o n t a i n e d . An a t t e m p t w i l l be made t o a d d r e s s t h i s q u e s t i o n e m p i r i c a l l y l a t e r . When t h e e n d o f t h e s e l i s t s i s e n c o u n t e r e d , t h e a d d r e s s c o u n t e r w i l l r i , c 1 , e, , eo ei , e 0 c 3 / ei , eo * • • C N r ei , e 0 156 s i m p l y c y c l e b a c k t o 1 c a u s i n g o l d e n t r i e s t o be o v e r w r i t t e n . I n t h i s way, o b j e c t s t h a t c o u l d n o t be s e g m e n t e d w o u l d s i m p l y be f o r g o t t e n . The c o m p l e t e p r o c e s s i n g s e q u e n c e c a n now be o u t l i n e d : (1) B e f o r e a c q u i r i n g image d a t a , c l e a r a l l l i n k a g e t a b l e e n t r i e s a n d l i s t - 2 p o i n t e r s t o 0. T h i s s e r v e s a s a g e n e r a l r e s e t p r e v e n t i n g f a l s e d e t e c t i o n o f c l o s e d b o r d e r s . (2) On d e t e c t i o n , e n t e r t h e b o r d e r p o i n t s i n t o l i s t - 1 a n d t h e l i s t - 1 a d d r e s s e s i n t o t h e a p p r o p r i a t e l i n k a g e t a b l e s . (3) When a l i n k a g e i s f l a g g e d , p l a c e t h e l i s t - 1 a d d r e s s o f t h e e d g e i n p o i n t i n t o t h e l i s t - 2 s l o t o f t h e e d g e o u t p o i n t . When t h e e d g e i n p o i n t i s t h e f i r s t e n t r y , i t s l i s t - 1 a d d r e s s c a n be f o u n d i n t h e l i n k a g e t a b l e . When i t i s t h e s e c o n d e n t r y , t h e a d d r e s s o f t h e l i s t - 2 s l o t o f t h e e d g e o u t p o i n t i s f o u n d i n t h e l i n k a g e t a b l e . (4) On a n t i c i p a t i o n o f c l o s u r e ( a p r o c e s s d e f i n e d l a t e r ) , t r a c e t h r o u g h t h e two l i s t s u n d e r t h e d i r e c t i o n o f t h e l i s t - 2 p o i n t e r s . I f t h e t r a c e e n d s a t a n u l l p o i n t e r , t h e c u r r e n t b o r d e r i s n o t c l o s e d . I f t h e t r a c e e n d s a t i t s s t a r t i n g p o i n t , t h e b o r d e r i s c l o s e d a n d t r a n s m i s s i o n o f i t s p o i n t s may now t a k e p l a c e . A number o f p o i n t s c o n c e r n i n g t h i s p r o c e s s i n g s e q u e n c e d e s e r v e s p e c i a l a t t e n t i o n : (a) S t e p 4 i s a v e r y much s t r e a m l i n e d b o r d e r t r a c i n g method. By f o l l o w i n g p o i n t e r s i n memory, t h i s a p p r o a c h a c h i e v e s g l o b a l c l o s u r e d e t e c t i o n a t a s p e e d p r o p o r t i o n a l t o t h e b o r d e r p e r i m e t e r and t h e memory r e f e r e n c e r a t e . T h i s i s a l s o t h e o n l y 157 substantially sequential procedure in the entire processor and so may be the most c r i t i c a l in determining i t s o v e r a l l speed. (b) To ensure that unlinkable objects ( i . e . , those which touch the "sides" or o r i g i n a l "bottom" of the image) are not seen, special conventions must be invoked when the Zahn window i s at the image extremities. The scanning c i r c u i t r y must f l a g instances when these extremities are reached. A preferred convention is that when the window i s positioned with the A point on the extreme right or l e f t column of the image, or below the f i r s t row (at start up), set those window pixels overhanging the image to black. This w i l l cause unlinkable objects to merge with the image borders, and w i l l provide the detection c i r c u i t r y with consistent information for edge d i r e c t i o n decisions. However, to prevent the extreme right column from logging the image boundary and wasting l i s t memory, when on the right column, disable detection of the B point. The net result i s that those border points which touch the sides w i l l always point to, or from, n u l l e n tries. Therefore, i f l i s t - 2 entries are always cleared on transmission, unlinkable borders can never be detected in step 4. E.g. , untraceable could be accidentally linked i f l i s t - 2 entries are not f i r s t cleared In the long run, the unlinkable borders simply get overwritten as 1 58 t h e f i n i t e l i s t s l o t s a r e r e c y c l e d . ( c ) On a s i m i l a r n o t e , h o w e v e r , a l l l i n k a b l e , o r c l o s e d b o r d e r s a r e s e e n i m m e d i a t e l y when c o m p l e t e . T h i s f o l l o w s f r o m t h e f a c t t h a t c l o s e d b o r d e r s l e a v e no n u l l e n t r i e s i n l i s t - 2 . A n t i c i p a t i n g when a b o r d e r i s l i k e l y t o be c l o s e d w i l l be t h e t o p i c o f t h e n e x t s e c t i o n . (d) Due t o t h e r e c y c l i n g o f t h e l i s t - 1 - l i s t - 2 memory s l o t s , t h e r e i s a r e m o t e p o s s i b i l i t y o f e n t e r i n g an i n f i n i t e l o o p w h i l e t r a c i n g t h r o u g h l i s t - 2 . T h i s c a n o c c u r e v e n t h o u g h l i s t - 2 p o i n t e r s a r e c l e a r e d w i t h new e n t r i e s a n d d u r i n g b o r d e r t r a n s m i s s i o n . I f an o b j e c t i s u n c l o s a b l e o r o f s u c h an e x t e n t a l o n g r t h a t i t c a n n o t be c l o s e d b e f o r e r e c y c l i n g o f t h e l i s t s , t h e p o i n t e r s a t i t s d e e p o e s t l e v e l may p o i n t t o more r e c e n t e n t r i e s . I f t h e s e r e c e n t e n t r i e s f o r m a c l o s e d b o r d e r on t h e c u r r e n t s c a n t h e t r a c e w i l l e n c o u n t e r an i n f i n i t e l o o p w i t h no way o f s t o p p i n g . To p r e v e n t t h i s , a c o u n t e r c a n be m a i n t a i n e d i n p a r a l l e l w i t h t h e t r a c e , a n d i n c r e m e n t e d on e a c h t r a c e s t e p . S h o u l d t h e c o u n t e r v a l u e e x c e e d t h e l i s t l e n g t h , t h e t r a c e h a s e n t e r e d an i n f i n i t e l o o p and c a n be s t o p p e d w i t h o u t c l o s u r e b e i n g f l a g g e d . I n p r a c t i c e , t h i s was o b s e r v e d t o h a v e o c c u r r e d o n c e i n 6400 s c a n l i n e s o f 128 p i x e l s i n w i d t h w i t h a l i s t - 1 - l i s t - 2 l e n g t h o f 10,000 e n t r i e s . On v e r i f i c a t i o n o f c l o s u r e , t h e b o r d e r p o i n t s must be t r a n s m i t t e d t o a n o t h e r c i r c u i t f o r r e c o n s t r u c t i o n o f t h e o b j e c t a n d / o r r e c o g n i t i o n . T r a n s m i s s i o n i s a s i m p l e m a t t e r o f a g a i n t r a c i n g t h r o u g h l i s t - 2 a s o u t l i n e d i n s t e p 4, e x c e p t t h a t t h e l i s t - 1 c o o r d i n a t e s and d i r e c t i o n numbers a r e a l s o r e a d a n d t r a n s m i t t e d , a n d l i s t - 2 e n t r i e s a r e c l e a r e d i m m e d i a t e l y on b e i n g 159 r e a d . I t i s h e r e t h a t r e d u n d a n t b o r d e r p o i n t s c a n be r emoved. A s i m p l e c o m p a r i s o n c i r c u i t o r t e s t c a n be a p p l i e d t o d e t e r m i n e i f any b o r d e r p o i n t c o o r d i n a t e s a r e r e p e a t e d . I f t h e y a r e , a l l b u t t h e l a s t r e p e a t e d w i l l be i g n o r e d i n t h e t r a n s m i s s i o n . I t w i l l now be shown t h a t i f m o d u l a r a r i t h m e t i c i s e m p l o y e d , t h e p a i r i n g o f b o r d e r p o i n t s a l o n g t h e 1-5 a n d 3-7 d i r e c t i o n s i s a s s u r e d . L i n e s a l o n g t h e s e d i r e c t i o n s a r e l i n k e d t o g e t h e r t h r o u g h common c o o r d i n a t e d i f f e r e n c e , r - c , and sums r + c . I f t h e r e g i s t e r l e n g t h s a v a i l a b l e were i n f i n i t e , t h e s e t r i v i a l c a l c u l a t i o n s w o u l d p o s e no p r o b l e m , b u t t h i s i s n o t t h e c a s e . I n o u r t e n t a t i v e i m p l e m e n t a t i o n , t h e c d i m e n s i o n w o u l d be 64 p i x e l s . To m a i n t a i n symmetry i n t h e c o o r d i n a t e w o r d l e n g t h s , t h e r d i m e n s i o n w i l l t h e r e f o r e be f o r c e d t o c y c l e a t m o d u l o 64. The q u e s t i o n now a r i s e s : c a n t o p o l o g i c a l l y l i n k e d b o r d e r p o i n t s a l o n g t h e a b o v e two l i n e s , b u t f a l l i n g on rows r=+31 a n d r = - 3 2 , s t i l l be l i n k e d by t h e same s i m p l e e x p r e s s i o n s ? The a n s w e r i s y e s . To show t h i s , we w i l l u s e an a r b i t r a r y m o d u l o M ( p r e f e r a b l y a power o f 2) a n d F i g u r e 4.1. The f i g u r e w i l l be u s e d t o i l l u s t r a t e t h e b e h a v i o r o f t h e l i n e r+c=K. The r e g i o n s q u a r e d o f f i n b o l d i s t h e r e g i o n p h y s i c a l l y s e e n by t h e c a m e r a s c a n n e r . A l l p o i n t s o u t s i d e t h i s r e g i o n map b a c k o n t o p o i n t s w i t h i n i t by v i r t u e o f m o d u l a r a r i t h m e t i c . F o r e x a m p l e , p o i n t s i n r e g i o n 5 s h a r e a o n e - t o - o n e c o r r e s p o n d e n c e w i t h p o i n t s i n r e g i o n 6. T h e r e f o r e , u n s c a n n e d p o r t i o n s o f c h a r a c t e r s p r e s e n t l y r e s i d i n g i n r e g i o n 5 w i l l s u b s e q u e n t l y be w r i t t e n i n t o r e g i o n 6. F o r t h e e q u a t i o n r+c=K, t h e r e w i l l be c e r t a i n r e g i o n s i n t h e p l a n e where o v e r f l o w e r r o r s w o u l d o c c u r b e c a u s e t h e numbers a r e 160 F i g u r e 4.1 M o d u l a r image r e p r e s e n t a t i o n 161 t o o l a r g e ( l a b e l l e d Y///X 1 i n t h e f i g u r e ) . T h e s e r e g i o n s a r e d e f i n e d a s : I n r e g i o n 1: r + c > M/2 - 1. The r e s u l t a n t sum h e r e w o u l d be r e p r e s e n t e d a s a n e g a t i v e number. I n r e g i o n 2: r + c < -M/2. The r e s u l t a n t sum h e r e w o u l d be r e p r e s e n t e d a s a p o s i t i v e number. C a r e f u l e x a m i n a t i o n o f t h e s e r e g i o n s r e v e a l s t h a t t h e sums g e n e r a t e d i n r e g i o n 1 a r e e x a c t l y t h o s e g e n e r a t e d i n r e g i o n 4 w i t h a o n e - t o - o n e m a p p i n g ; a n d sums g e n e r a t e d i n r e g i o n 2 a r e e x a c t l y t h o s e g e n e r a t e d i n r e g i o n 3, a g a i n by o n e - t o - o n e m a p p i n g . T h e r e f o r e , p o i n t s on t h e o v e r f l o w i n g l i n e segment o f l i n e A i n r e g i o n 1 w i l l map e x a c t l y o n t o t h e n o n - o v e r f l o w i n g l i n e segment o f l i n e B i n r e g i o n 4, a n d y e t b o t h l i n e s w i l l s a t i s f y t h e r e l a t i o n r+c=K by v i r t u e o f m o d u l o M. F u r t h e r m o r e , p o i n t s i n r e g i o n 5 w h i c h r e p r e s e n t t h e c o n t i n u a t i o n o f t h e l i n e s o u t s i d e t h e p o s i t i v e m o d u l u s l i m i t w i l l map i n t o r e g i o n 6 a n d a g a i n d i r e c t l y o n t o l i n e B. T h e r e f o r e , e v e n i g n o r i n g o v e r f l o w , p o i n t s w h i c h l i e on t h e l i n e r+c=K i n r e g i o n 1 w i l l s t i l l s a t i s f y t h e e q u a t i o n r+c=K i n r e g i o n 5. A l s o i t m i g h t be s u p p o s e d t h a t i f a l i n e s e g m e n t , B, a l r e a d y e x i s t s a n d i s c u r r e n t l y u n l i n k e d , i t may i n a d v e r t a n t l y be l i n k e d t o a new l i n e s e g m e n t , A. T h i s w i l l i n f a c t h a ppen u n d e r o n l y s p e c i a l , t o l e r a b l e c i r c u m s t a n c e s . S i n c e l i n e s A and B a r e p a r a l l e l , o f s l o p e - 1 , a n d s e p a r a t e d i n b o t h d i m e n s i o n s by t h e m o d u l u s M, l i n e B w i l l a l w a y s be c o m p l e t e d , o r l i n k e d , b e f o r e l i n e A i s f i r s t d e t e c t e d . T h i s i s b e c a u s e l i n e B l e a v e s t h e 162 v i s i b l e r e g i o n a t r=X i f i t i s n o t f i r s t c o n n e c t e d , a n d l i n e A a l s o c a n s t a r t no e a r l i e r t h a n r=X b e c a u s e o f t h e a b o v e m e n t i o n e d c o n s t r a i n t s on t h e l i n e s . The o n l y e x c e p t i o n t o t h e a b o v e i s t h e s p e c i a l c a s e where t h e r e a r e two u n l i n k a b l e o b j e c t s p r e s e n t : one a t t h e t o p o f t h e image ( u s i n g t h e c u r r e n t l y d e p i c t e d o r i e n t a t i o n ) a n d one a t t h e b o t t o m , a n d t h e b o t t o m one h a s an e d g e o u t a l o n g l i n e B a t r=X a n d t h e t o p one h a s an e d g e i n a l o n g l i n e A a l s o a t r=X. Ho w e v e r , t h i s i s n o t a s e r i o u s s i t u a t i o n b e c a u s e , s i n c e b o t h p o l y g o n s a r e c l e a r l y u n l i n k a b l e , a t w o r s t , t h e a l g o r i t h m w i l l l i n k them i n t o one l a r g e u n l i n k a b l e o b j e c t . ( T h i s i s g u a r a n t e e d i f l i s t - 2 e n t r i e s a r e c l e a r e d a s new edge p o i n t s a r e e n t e r e d . ) F u r t h e r m o r e , s i n c e t h e l e n g t h o f t h e two l i s t s i s f i n i t e a n d a l s o m o d u l a r , a l a r g e u n l i n k a b l e o b j e c t w i l l become o v e r w r i t t e n i n t i m e l i k e a n y o t h e r a n d be f o r g o t t e n . I n summary t h e n , m o d u l a r a r i t h m e t i c c a n be u s e d i n t h e l a b e l l i n g a n d p r o c e s s i n g o f b o r d e r p o i n t s . O v e r f l o w e r r o r s o r f l a g s c a n be i g n o r e d i n t h e c a l c u l a t i o n o f r+c a n d r - c ( t h e ar g u m e n t i s t h e same a s ab o v e by s y m m e t r y ) f o r d e t e r m i n i n g b o r d e r p o i n t l i n k a g e , and y e t c o r r e c t r e s u l t s a r e a s s u r e d . 163 4.6 C l o s u r e D e t e c t i o n A c t u a l d e t e c t i o n o f b o r d e r c l o s u r e r e q u i r e s t h e l i s t - 2 t r a c e o u t l i n e d i n s t e p 3 p r e v i o u s l y . However, s i n c e t h i s s t e p i s t i m e - c o n s u m i n g , some r e l i a b l e method must s u p p l e m e n t t h i s t r a c e t o a n t i c i p a t e i f c l o s u r e d e t e c t i o n i s l i k e l y . The d i s c u s s i o n o f two s u c h t e c h n i q u e s f o r m s t h e t o p i c o f t h i s s e c t i o n . The f i r s t , a " r e g i o n c o u n t i n g " t e c h n i q u e , p h y s i c a l l y l a b e l s o r c o l o r s a l l o b j e c t r e g i o n s s e e n . When a c e r t a i n l a b e l i s no l o n g e r s e e n on a s c a n i t i s assumed c l o s e d a n d a l i s t t r a c e i s d o n e . The s e c o n d a p p r o a c h i s l e s s s o p h i s t i c a t e d a n d l e s s r e l i a b l e , b u t e a s i e r t o i m p l e m e n t . C a l l e d t h e E u l e r number a p p r o a c h , i t s t r i v e s t o d e t e c t p r o b a b l e c l o s u r e by d e t e c t i n g l o c a l c h a n g e s i n image t o p o l o g y w i t h i n a g i v e n row. B o t h t e c h n i q u e s o p e r a t e n o n - s e q u e n t i a l l y . 4.6.1 R e g i o n C o u n t i n g A p p r o a c h T h i s t e c h n i q u e was g i v e n i t s name b e c a u s e i t c o u l d be u s e d e f f e c t i v e l y a s a means o f c o u n t i n g t h e number o f c o n n e c t e d o b j e c t r e g i o n s i n t h e i m a g e . I t was a d a p t e d f r o m a method f o r d e t e r m i n i n g r e g i o n c o n n e c t i v e n e s s by R o s e n f e l d a n d P f a l t z [ 7 2 ] . However i t s v e r y a b i l i t y t o c o u n t r e g i o n s r e q u i r e s t h a t i t i s a b l e t o d e t e c t c l o s u r e , a n d i t i s i n t h i s c o n n e c t i o n t h a t i t i s a p p l i e d h e r e . The t e c h n i q u e r e q u i r e s t h e m a i n t e n a n c e o f a s m a l l image map (no l a r g e r t h a n t h e two s h i f t r e g i s t e r s n e e d e d f o r n o n - s e q u e n t i a l d e t e c t i o n ) o f a c e r t a i n f i x e d d e p t h , s a y f o u r b i t s p e r p i x e l . A c r o s s r e f e r e n c e t a b l e w i t h a s many e n t r i e s a s l e v e l s i n t h e image map ( 1 6 i n t h i s c a s e ) i s a l s o n e e d e d a n d a p a i r o f f l a g s p e r 164 l e v e l e n t r y . The method o p e r a t e s i n t h e f o l l o w i n g manner: 1. On s t a r t u p a c o u n t e r i s i n i t i a l i z e d t o some number, s a y i = 0 . 2. Image p o i n t s e n t e r t h e image map i n s h i f t r e g i s t e r f o r m a s b e f o r e b u t now t h e image i s a l s o v i e w e d t h r o u g h t h e f o l l o w i n g 2X3 window: r L A <— B C c <— i n d i c a t e s t h e s o u r c e o f new image p o i n t s . 3. P o i n t A i s c o n s i d e r e d t h e c u r r e n t p o i n t . Now e x a m i n e t h e l a s t p o i n t , L: ( a ) I f L=0 a n d A*0, a new o b j e c t p o i n t h a s been d e t e c t e d . E x a m i n e B and C: ( i ) I f B a n d C=0, i n c r e m e n t i a n d s t o r e i t i n t h e s h i f t r e g i s t e r a t A. A l s o l o o k up t h e v a l u e o f i i n t h e c r o s s r e f e r e n c e t a b l e a n d s e t a p a i r o f r e g i o n - s e e n a n d r e g i o n - a c t i v e f l a g s . ( i i ) I f B o r G*Q, g i v e A t h e number f o u n d i n B o r C a n d s e t t h e r e g i o n - s e e n b i t f o r t h a t number i n t h e c r o s s r e f e r e n c e t a b l e . (b) I f L * 0 , s e t A t o t h e v a l u e o f L and a l s o e x a m i n e B and C: ( i ) I f B and C=0, c a r r y o n . ( i i ) I f B o r C*0*L, l o o k up B o r C i n t h e c r o s s r e f e r e n c e t a b l e a n d s e t t h e i r r e g i o n - s e e n f l a g . A l s o s e t t h e C o r D c r o s s r e f e r e n c e f l a g s a l o n g s i d e A i n t h e t a b l e a n d A's f l a g a l o n g s i d e C o r D. T h i s i d e n t i f i e s b o t h numbers a s b e l o n g i n g t o t h e same r e g i o n . 165 4. On t h e c o m p l e t i o n o f t h e s c a n o f a row, t h e c r o s s r e f e r e n c e t a b l e i s s y s t e m a t i c a l l y e x a m i n e d t o l o c a t e w h i c h r e g i o n s were s e e n d u r i n g t h e s c a n . When a s e t r e g i o n - s e e n f l a g i s f o u n d , a t r a c e i s c o n d u c t e d t h r o u g h i t s c r o s s r e f e r e n c e s t o s e t t h e i r r e g i o n - s e e n f l a g s t r u e a l s o . C a u t i o n must be e x e r c i s e d t o p r e v e n t i n f i n i t e l o o p s d u r i n g t h i s t r a c e . When c o m p l e t e , t h e e n t i r e s e t o f r e g i o n - s e e n f l a g s i s a g a i n e x a m i n e d t o d e t e r m i n e i f any o f t h e p r e v i o u s l y a c t i v e r e g i o n s were n o t s e e n i n t h i s s c a n , a s i n d i c a t e d by a t r u e a c t i v e - r e g i o n f l a g b u t f a l s e r e g i o n - s e e n f l a g . I f t h i s i s t h e c a s e , t h e n a t r a c e t h r o u g h t h e l i s t - 2 e n t r i e s i s made t o f i n d t h e c l o s e d b o r d e r . On c o m p l e t i o n , c l e a r t h e c r o s s r e f e r e n c e t a b l e e n t r i e s t h a t were now f o u n d t o be c l o s e d . 5. C o n t i n u e t h e image s c a n . On i n c r e m e n t i n g t h e r e g i o n c o u n t e r , i , o b s e r v e a c e r t a i n m o d u l o ( i n t h i s c a s e 1 6 ) , h o w e v e r , s k i p i=0 s i n c e t h i s i s t h e n u l l l a b e l . The o p e r a t i o n o f t h i s t e c h n i q u e i s p e r h a p s b e s t s e e n w i t h an e x a m p l e . C o n s i d e r an image- w i t h a t most f o u r p o s s i b l e , a n d c r o s s r e f e r e n c e a b l e , r e g i o n s : 1. One row o f image d a t e ( 1 s ) f i r s t e n t e r s t h e image: ^ Cross | f Region Ref. Seen Active 1 X 0 0 0 1 1 2 0 X 0 0 0 0 3 0 0 X 0 0 0 4 0 0 0 X 0 0 Image C r o s s R e f e r e n c e T a b l e 2. A t a l a t e r t i m e , a n o t h e r r e g i o n row a p p e a r s i n t h e image: 166 Cross Region Ref. Seen Active 1 X 0 0 0 1 1 2 0 X 0 0 1 1 3 0 0 X 0 0 0 4 0 0 0 X 0 0 Image C r o s s R e f e r e n c e T a b l e 3. W i t h t h e a r r i v a l o f new image d a t a , r e g i o n 1 i s s e e n t o merge w i t h r e g i o n 2: Region Cross Ref. Seen Active 1 X 1 0 0 1 1 2 1 X 0 0 1 1 3 0 0 X 0 0 0 4 0 0 0 X 0 0 Image C r o s s R e f e r e n c e T a b l e The m e r g e r o f r e g i o n 1 w i t h 2 i s r e c o r d e d by c r o s s r e f e r e n c i n g r e g i o n 2 and s e t t i n g i t s " r e g i o n - s e e n " f l a g . 4. The o b j e c t now b r e a k s away f r o m t h e t o p image b o r d e r f o r m i n g a c l o s e d , s i m p l y c o n n e c t e d o b j e c t : Region Cross Ref. Seen Active 1 X 1 0 0 0 1 2 1 X 0 0 0 1 3 0 0 X 0 0 0 4 0 0 0 X 0 0 Image C r o s s R e f e r e n c e T a b l e H a v i n g b r o k e n away, no r e g i o n s a r e s e e n on t h i s s c a n , c a u s i n g ' t h e " r e g i o n - s e e n " f l a g s t o r e m a i n r e s e t . A s u b s e q u e n t e x a m i n a t i o n o f t h i s t a b l e by t h e p r o c e s s o r w i l l r e v e a l t h a t two a c t i v e r e g i o n s , l i n k e d by a c r o s s r e f e r e n c e , were n o t s e e n . A t r a c e t h r o u g h l i s t - 2 w i l l t h e n be o r d e r e d t o f i n d t h e c l o s e d b o r d e r . The m a i n a t t r a c t i o n o f t h i s method i s t h a t i t i m m e d i a t e l y f l a g s t h e a r r i v a l o f a c l o s e d o b j e c t . When i m p l e m e n t e d p r o p e r l y and t h o r o u g h l y , t h e r e i s no a m b i g u i t y a b o u t c l o s u r e . The p r i n c i p a l d i s a d v a n t a g e o f t h i s t e c h n i q u e i s i t s c o m p l e x i t y . To be w o r k a b l e w i t h r e a l c h a r a c t e r i m a g e s , many more 167 f e a t u r e s w i l l h a v e t o be i m p l e m e n t e d t h a n have been shown h e r e . On t h e s u r f a c e , we see t h a t t h e r e i s a ne e d t o u t i l i z e a number o f s h i f t r e g i s t e r s f o r s t o r a g e o f t h e r e g i o n n u m b e r s . T h e r e i s a l s o t h e n e e d t o s t o r e a n d m a i n t a i n t h e c r o s s r e f e r e n c e t a b l e a n d r e g i o n c o u n t e r . T r a c i n g t h r o u g h t h e c r o s s r e f e r e n c e t a b l e t o f i n d w h i c h a c t i v e r e g i o n s w e re n o t s e e n i s a s e q u e n t i a l o p e r a t i o n , a n d t h e r e f o r e t i m e - c o n s u m i n g . P r o v i s i o n must a l s o be made t o p r e v e n t i n f i n i t e l o o p s d u r i n g a t r a c e . T h e r e a r e a l s o a number o f d i s a d v a n t a g e s w h i c h a r e n o t i m m e d i a t e l y o b v i o u s . I t i s d i f f i c u l t t o f i x a m o d u l u s f o r i , t h e r e g i o n c o u n t e r . I n a s u f f i c i e n t l y c o m p l e x , d i s t o r t e d o b j e c t w i t h b a c k g r o u n d n o i s e , t h e number o f c o u n t e d a n d m e r g e d r e g i o n s c a n become q u i t e l a r g e . T h i s , i n t u r n , w o u l d f o r c e t h e c r o s s r e f e r e n c e t a b l e t o become q u i t e l o n g . S i n c e d e t e c t i o n o f c l o s u r e i s n o t c o n f i r m e d u n t i l a f u l l row ha s been s c a n n e d , t h e r e i s no optimum way t o s e a r c h l i s t - 2 t o f i n d t h e c o n n e c t e d o u t e r b o r d e r a n d t h e b o r d e r s o f a n y h o l e s i t may c o n t a i n . T h i s n e c e s s i t a t e s s c a n n i n g a l l o f l i s t - 2 a n d k e e p i n g a t h i r d , b i n a r y l i s t t o r e c o r d t h o s e l i s t - 2 e n t r i e s a l r e a d y e x a m i n e d . To c i r c u m v e n t t h e s e many i m p l e m e n t a t i o n p r o b l e m s a n o t h e r , somewhat l e s s r e l i a b l e , m ethod was d e v e l o p e d . H o w e v e r , what i t l a c k s i n r e l i a b i l i t y i t g a i n s i n s i m p l i c i t y . 4.6.2 The E u l e r Number A p p r o a c h 168 An E u l e r number i s a t o p o l o g i c a l p r o p e r t y o f b i n a r y i m a g es a n d i s one o f t h e few s u c h p r o p e r t i e s t h a t i s l o c a l l y c o u n t a b l e . A v e r y t h o r o u g h d i s c u s s i o n o f E u l e r number e v a l u a t i o n c a n be f o u n d i n G r a y [ 7 3 ] . B a s i c a l l y , an E u l e r number, E, r e p r e s e n t s t h e d i f f e r e n c e b e t w e e n t h e number o f o b j e c t s i n an i m a g e , B, a n d t h e number o f h o l e s , L. i e . , E = B - L . T h i s number c a n , h o w e v e r , a l s o be f o u n d u s i n g r e a d i l y c o u n t a b l e image e l e m e n t s . i e . , E = n 0 - n, + n 2 w h e r e : n 0 = t h e number o f v e r t i c e s , n, = t h e number o f l i n e s e g m e n t s , n 2 = t h e number o f o b j e c t r e g i o n s c o n t a i n e d by t h e l i n e s e g m e n t s . The v e r t i c e s a r e d e f i n e d a s p l a c e s where two o r more l i n e s e g m e n t s meet. The f o l l o w i n g two e x a m p l e s s h o u l d c l a r i f y t h e c o n c e p t : y. - v e r t e x - 1 i n e - r e g i o n S i n c e t h e r e i s o n l y one o b j e c t , w i t h o u t a h o l e , E=1 a s e x p e c t e d . 169 E g . 2: n 0 = 2 3 , n, = 35, n 2 = 12 E = 23 - 35 + 12 = 0 N o t e t h a t l i n e s e g m e n t s do n o t c r i s s - c r o s s h o l e s . The E u l e r number i s a l o c a l l y c o u n t a b l e p r o p e r t y a n d c a n be f o u n d f o r a c o m p l e t e image by summing t h e c o n t r i b u t i o n s f r o m a l l m u t u a l l y e x c l u s i v e image s e g m e n t s . I t i s known t h a t t h e E u l e r number, l i k e any l o c a l l y c o u n t a b l e p r o p e r t y , c a n n o t d e t e c t t h e i n d i v i d u a l v a l u e s o f B o r L. H o w e v e r , t h e c h a n g e o f t h e E u l e r number, AE, i n a d y n a m i c image c a n be r e a d i l y d e t e r m i n e d l o c a l l y . T h i s i n f o r m a t i o n c a n , i n t u r n , t h e n be u s e d t o s i g n a l t h a t a new c l o s e d o b j e c t o r h o l e may h a v e a p p e a r e d i n t h e i m a g e . To i m p l e m e n t AE d e t e c t i o n , two a p p r o a c h e s have been d e v e l o p e d f o r t h i s d y n a m i c image c a s e . I n m e t h o d A, 1s t o p p e d , t h e image i s c o n s i d e r e d t o be f r a m e d i n 1s r e g i o n s f r o m w h i c h t h e o b j e c t a p p e a r s a s d r o p l e t s t h a t l a t e r b r e a k f r e e . I n method B, 0 t o p p e d , t h e t o p o f t h e image i s c o n s i d e r e d t o c o n s i s t o f a row o f Os b e l o w w h i c h t h e o b j e c t a p p e a r s f r o m "nowhere". T h e s e methods a r e i l l u s t r a t e d i n F i g u r e 4.2. S e t t i n g t h e two l e f t a n d r i g h t s i d e s o f F i g u r e 4.2 t o 1 i s done t o p r e v e n t o b j e c t s w h i c h t o u c h t h e image s i d e s f r o m i n f l u e n c i n g t h e E u l e r number. T h i s i s b e c a u s e s u c h o b j e c t s a r e 170 Method A Method B 1 t o p p e d 0 t o p p e d E=0 E=0 E=0 E=1 ////// / / / / / / / / / / / / / / / / / / / HE=-1 yXA E=1 / E=0 E=0 \ C J E=1 E=0 E=1 y y s ; / / y y XX s y y y E=0 L 0 E=1 F i g u r e 4.2 E u l e r image number v a r i a t i o n i n 1s t o p p e d a n d 0 t o p p e d r e p r e s e n t a t i o n s 171 c o n s i d e r e d u n l i n k a b l e . E x a m i n a t i o n o f t h e E u l e r number a t t h e v a r i o u s s t e p s i n t h e e x a m p l e shows t h a t t h e two methods do n o t b e h a v e t h e same. The 0 t o p p e d m ethod B, f o r i n s t a n c e , o n l y d e t e c t s t h e a p p e a r a n c e o f a new f e a t u r e , body o r h o l e , b u t d o e s n o t d e t e c t i t s s e p a r a t i o n i n t o t h e f r a m e . The I s t o p p e d method A, h o w e v e r , d e t e c t s t h e f i r s t a p p e a r a n c e o f a new h o l e , a n d t h e s e p a r a t i o n o f a new body i n t o t h e image f r a m e . I t a l s o d e t e c t s t h e m e r g e r o f an i n t e r i o r h o l e w i t h t h e o u t s i d e i n a s i m i l a r way a s i t d e t e c t s s e p a r a t i o n . I n summary, t h e E u l e r number c h a n g e s a s : AE 1 t o p p e d 0 t o p p e d new o b j e c t a p p e a r s 0 +1 new h o l e a p p e a r s -1 0 h o l e b r o k e n +1 0 h o l e e s t a b l i s h e d 0 -1 o b j e c t s e p a r a t i o n +1 0 2 o b j e c t s merge 0 -1 I n c o m p a r i s o n i t i s s e e n t h a t t h e two m e t h o d s c o m p l e m e n t e a c h o t h e r . N e i t h e r ' s E u l e r number c h a n g e s i n t h e same manner a s t h e o t h e r d u r i n g an e v e n t , a n d a l l b u t o n l y two o f t h e AE p a i r s i s u n i q u e . U n f o r t u n a t e l y , i t i s t h e s e n o n - u n i q u e p a i r s , w h i c h r e d u c e t h e r e l i a b i l i t y o f t h e m e t h o d . Of c o u r s e , we h a v e n o t c o n s i d e r e d t h e c a s e o f m u l t i p l e o b j e c t s e n t e r i n g t h e image f i e l d . The n e t r e s u l t t h e n i s t h a t AE c a n be c o n f u s e d when i t i s e v a l u a t e d one row a t a t i m e . The o v e r a l l o b s e r v a t i o n i s t h a t m e t h o d A i s u s e f u l i n d e t e c t i n g a s e p a r a t e d , o r p o s s i b l y s e p a r a t e d , o b j e c t , and method B i s u s e f u l i n d e t e c t i n g e s t a b l i s h e d h o l e s . To d e t e c t t h e s e c h a n g e s i n t h e E u l e r number, a 2X2 s q u a r e l o c a l n e i g h b o u r h o o d i s e x a m i n e d : 172 A c b B C In each method, the evaluation of AE is done with respect to pix e l A, and the t o t a l AE for a row, or portion of a row, i s found by summing a l l the l o c a l values. AE is calculated by considering i f a vertex i s present at v, or v 2, whether a l i n e i s present at a, b, or c, and whether A i s 0 or 1. Methods A and B d i f f e r largely in how they consider a and v,. Method A always considers there to be a l i n e and vertex at a and v,. If A=0, method B never considers there to be a l i n e at a and considers v, to be a vertex only i f B=1. Occasionally, a l i n e or vertex must be cancelled in order to avoid being counted twice. Since there are sixteen possible boolean expressions for thi s window for each method, the detailed analysis w i l l not be presented. The f i n a l result, however i s : AE, = +1 for AE, = -1 for Method A ( 1s topped ) AE 0 = +1 for AE 0 = -1 for Method B ( 0 topped ) 77Z The beauty of the method rests with the fact that a l l of the above conditions can be determined with simple boolean tests, and AE accumulated using a simple up-down counter. 173 Since many objects, or segments of objects, can be detected on a single row scan, i t i s best to stop and test the accumulated AE at certain strategic locations. For the 1s topped case, t h i s place was chosen as the right corner of an object's boundary. This would be signa l l e d by ///// This configuration must be present on the right side of a separated object. If at t h i s point, the accumulated AE,=+1, then such a separation may be probable. Likewise for the 0 topped case, AE 0 would be tested i f the following configuration appears: ( X indicates don't care). This configuration must appear at the upper right corner of a closed hole. An accumulated AE 0 of -1 to th i s point indicates that a closed hole i s probable-. Since the two AE counters are bounded to the range of -1, 0, and +1, provision must also be made to ensure that they are not incremented or decremented outside of t h i s i n t e r v a l . This can happen with the presence of multiple unseparated objects or holes. For example, 1s topped: A AE, of -1 i s accumulated after t h i s unseparated hole has been scanned; 174 0 topped: fy A AE 0 of +1 i s accumulated a f t e r this unseparated object has been scanned. In each of the above examples, the method i s working correc t l y in that the correct AE per scan w i l l be accumulated. However, the true objectives of t h i s approach are being overlooked. That i s , accumulate the AE i n d i v i d u a l l y for each object encountered during a scan l i n e to detect closure. To accomodate the presence of multiple objects provision must be made to reset the Euler number counters whenever an incomplete object or hole has been encountered. This w i l l require one more boolean test for each method. Method A (1s topped): Reset AE, for This indicates that an unseparable object has been encountered, and that an unseparable hole may be encountered-. Method B (0 topped): Reset AE 0 for This indicates that an unseparable object has been encountered. Before summarizing the complete closure detection procedure, i t would be expedient to show how th i s method would integrate with the border detection scheme. The current 2X2 window would overlap the border detector's window as follows: 175 D1 D2 D3 D4 D5 (1 j) D6 D7 D8 The current window i s outlined in bold. The point to be noted i s that each of the two above stop and test conditions occurs when there i s a pi x e l 4-adjacent to the previous A edge. If either AE counter indicates the presence of a segmented object or hole, then i t i s a necessary condition that t h i s A edge also belongs to a corner where edgein i edgeout. Consequently, in a l l of the border representations to be discussed l a t e r , i t w i l l be recorded in the linkage tables and i t s l i s t - 1 address can be held available in a reg i s t e r . Therefore, when a closure test condition i s flagged, i n i t i a t e the trace through l i s t - 2 beginning at the previous A point entry. Since t h i s fast trace i s a sequential process, i t may be expedient to keep a short table of l i s t - 2 s t a r t points which are to be traced at the end of the row when more time is avai l a b l e . Either way, we have established a simple method of indicating possible closure, and finding the point i n . l i s t - 2 where the v e r i f i c a t i o n trace is to be begun. 4.6.3 Euler Number Closure Detection Procedure Summary: 1. On beginning the scan of a new image row, clear two AE counters (AE 0 = 0 topped, AE, = 1 topped). 2. On scanning the row, test the 2X2 Euler window simultaneous with border point detection: (a) On D5AD1AD2AD4 true, increment AE, . (b) On D 4 A D 2 A D 1 decrement AE,. 176 (c) On D2AD~1AD4AD5 increment AE 0. (d) On D1AD5AD4 decrement AE 0 . (e) On D1AD2 reset AE,. (f) On D1AD2AD5 reset AE 0. 3 . Record the l i s t - 1 - l i s t - 2 address of the previous point just detected at A in a short stack when: (a) D 4 A T T 1 A D 2 A D 5 AND AE, = + 1 , (b) D1AD5AD4 AND AE 0 = -1, then reset the AE responsible for one of these expressions returning TRUE. 4 . At the end of a row pop the l i s t addresses from the stack and, one at a time, trace through l i s t - 2 . Transmit the border points when closure i s detected. It should now be clear that the p r i n c i p a l advantage of t h i s method i s i t s s i m p l i c i t y . The additional hardware required by th i s method is two counters of only two bi t s each, a short stack of maybe ten entries, and some additional l o g i c . The exact same window registers used by the border detectors are used here. One disadvantage of thi s method i s that i t cannot guarantee the closure of the borders i t has detected. This i s because of the l o c a l nature of the method. It only has a memory for the topology of the row of points i t has seen up to step 3 above. It can say nothing about the body of the image, or the row points yet to a r r i v e . A simple example would be the following: 177 The scan here proceeds from l e f t to ri g h t . The 1s topped detector would fl a g an outer border at p i x e l X and the 0 topped detector would flag an inner border at pixe l 0. However, i t i s obvious that neither border i s closed, and so a l i s t - 2 trace would f a i l . It i s d i f f i c u l t to say how often such false alarms would occur per row. An attempt w i l l be made to count the false alarms produced by a series of test images. However, considering that many objects are not that complex in structure and in any case, a l i s t - 2 trace can be done very quickly, the delay resulting from false alarms i s not expected to be very great. There i s a p o s s i b i l i t y that t h i s closure detection scheme w i l l detect the same closed border more than once in a given row scan. It i s therefore important on transmitting the border points to not only clear the l i s t - 2 entries during transmission, but also to check whether they are clear before s t a r t i n g transmission. If they are clear, the transmission algorithm can proceed to the next closed-border stack entry. Fail u r e to check for cleared entries may lead to an i n f i n i t e loop, or erroneous data being transmitted. In conclusion, the Euler number closure detection method provides a cheap and easy method to anticipate whether a given border i s closed. 178 4.7 Border Point Representation To preserve generality, t h i s discussion has deliberately avoided the question of how the border points' are to be represented in storage and during transmission. Thus far, the information associated with border points has been somewhat redundant, consisting of both coordinates and di r e c t i o n numbers. In the interests of minimizing memory size and data-channel bandwidth, a more compact border point representation must be chosen. B a s i c a l l y , three methods are being proposed as feasible candidates: coordinate storage, chain code storage, and a hybrid of the two. Representing the border points by th e i r coordinates in the image window i s probably the most obvious approach. Here only the (r, c) coordinates of each point need be stored in l i s t - 1 , and once closure i s detected, the closed string of these points i s sequentially f i l e d in a subsequent storage buffer. The p r i n c i p a l drawback of thi s method i s the large volume of data involved. For a 64X64 b i t window, each r-c pair would require a twelve b i t word si z e . Besides being long, t h i s size i s intermediate between the 8 and 16 bi t word sizes in common use today. The idea of chain code representation was introduced in the fundamental concepts. The idea i s simple, instead of storing the r-c coordinates of each point, just store the edgeout dir e c t i o n number at each point. This number by d e f i n i t i o n points to the next p i x e l in the chain. At most only the coordinates of the f i r s t point in the chain need be stored. However, this i s not r e a l l y necessary since the readout of l i s t - 1 can start at any arbi t r a r y location. Therefore, the start point, for instance, in 1 79 border reconstruction, can be placed at some normalized p o s i t i o n . In either case, the advantage of chain code representation i s that each point i s simply characterized by a three-bit d i r e c t i o n number. It can even be argued that i f the border i s gradually curved only one or two b i t s i s needed to represent the change in d i r e c t i o n number. The net result i s that border point storage is now very compact. At most, only one quarter the memory of coordinate storage in a 64X64 image i s needed. A further advantage of t h i s approach i s that cer t a i n transformation operations on the border are greatly s i m p l i f i e d . Translations in the X or Y directions are simply a matter of moving the chain's anchor (the f i r s t point's coordinates) about by the appropriate amount. Rotation of the border by increments of 45° simply involves adding 1 to each chain code entry per increment. However, one should be cautioned that rotations by increments other than 90° results in s p a t i a l d i s t o r t i o n s of the border. Coordinate storage, on the other hand, would require these transformations be done to every point with rotations involving 2X2 tensor operations (though without attendant d i s t o r t i o n s ) . A combination of the two previous techniques forms the hybrid representation. This method of border point storage was f i r s t formulated by Zahn. He observed that borders are completely defined by those points where edgein * edgeout. These he c a l l e d "curvature points". This i s because a l l those points which have edgein = edgeout l i e along a straight vector directed between curvature points. Therefore, the storage of the coordinates and the edgeout of a l l curvature points would 180 completely characterize a border. This would require about 15 b i t s per point, but i f the border forms a very angular polygon, as many characters do, then curvature points would comprise about one-tenth of the points in a border. This would y i e l d a very compact 1.5 b i t s per border point. However, i f the border i s noisy or c i r c u l a r , t h i s advantage would be l o s t . The transformations applied to t h i s representation would also be a hybrid of the two preceeding. Translations would be performed only on the coordinate component of the data, whereas rotations would be applied to both. Rotations would be p a r t i c u l a r l y complex since the coordinate components can be rotated by a variety of degrees but the d i r e c t i o n numbers by only increments of 45°. This would probably y i e l d very irregular borders for non-90° rotations. The hybrid representation has one strong asset that makes i t the most a t t r a c t i v e of the three. The edgein * edgeout decision can be performed at the lowest l e v e l by dedicated hardware monitoring the edge directions found in the Zahn window. If edgein = edgeout, no further processing i s done and that edge-point does not get logged in l i s t - 1 and the linkage tables. A great deal of processing time and memory space can thereby be saved. Hybrid and chain coding can also provide elementary topological information about the border stored. This information in the form of change in curvature point d i r e c t i o n number with border length could f a c i l i t a t e character recognition. By providing information on curvature, the degree of bend at d i f f e r e n t positions on the border can be calculated and compared 181 to tabulated values from characters. Normalized, such information would be size and orientation independent. Structural information such as the area contained within a border i s also obtainable from coordinates of the curvature points in the hybrid representation. These coordinates are situated at the vertices of a polygon. When read out in the linked sequence, the contained area A can be calculated with, [66]: A = (1/2)2 (Ac, 8r, - Ar; 8c, ) where: N = the number of curvature points , AZj = Z j - z 0 , 5z i = Z j - z, . If area information i s v i t a l , dedicated hardware can readily evaluate the above expression. In conclusion, i t appears that the hybrid approach to border point representation and storage represents the most e f f i c i e n t u t i l i z a t i o n of memory, and the most useful scheme to supplement o p t i c a l character recognition. 182 4.8 Object Reconstruction After the detection of an exterior border confirms that a closed object has been found, the subsequent goal of a binary preprocessor i s frequently to reconstruct that object in an image buffer. This reconstruction process u t i l i z e s the border points as a guide to restoring the dark object i n t e r i o r points as 1s. A variety of procedures can be used to implement restoration depending to a large extent on the border information available, and the means used to represent this information. The method presented u t i l i z e s both internal and external curves and makes no reference to any information source other than those curves. Topological properties of simply connected objects are e x p l i c i t l y employed and any of the three previous border data representations can be used as input. The procedure presented here i s intended to supplement border tracing methods, such as the non-sequential schemes, which provide complete external and internal border information. Zahn showed that such information completely characterizes the object to be reconstructed and so no further reference to the o r i g i n a l image i s necessary. Three means were presented in the previous section for representing the border points. The method to be presented here was adopted from Zahn's proof and i s applicable to a l l three, but the chain code representation w i l l be used for i l l u s t r a t ion. The foundation for t h i s reconstruction method i s a c o r r o l l a r y of the Jordan Curve Theorem [74, pp. 13-16]. This states that i f P, is a point enclosed by a curve r and P 2 i s some other point in the plane, then P 2 is outside T i f a l i n e 183 drawn from P, to P 2 intersects r an odd number of times. Likewise, i f P 2 is inside T, such a li n e intersects r an even number of times. To see how this theorem offers a means for object reconstruction, the c o r o l l a r y i s rephrased in the following form: If P 2 i s external to T and P, i s internal to r, then an odd number of the li n e segments of the l i n e , 1, between P, and P 2 extend from r to P 2. If P, i s also external to r , then an even number of l i n e segments of 1 can be drawn from r to P 2, an odd number of which intersect r an even number of times, including the starting point on r . A simple example w i l l i l l u s t r a t e how t h i s c o r o l l a r y can be applied to object reconstruction. Consider a closed, simply connected object with external contour r. Also consider two points P,, P 2, both external to r with P, adjacent to r and P 2 far displaced from r . A l i n e segment drawn from P, to P 2 intersects f an even number of times;: P i l a "P 2 This l i n e is subdivided into two segments 1,, 1 2 ; 1 , t o t a l l y internal to r and 1 2 external to r . Now cause P, to trace the outline of r in a clockwise fashion. During t h i s trace, P, must cross 1 at least once. At t h i s point, the l i n e segment from P, 184 to P 2 i s i d e n t i c a l l y 1 2 . If this trace is stopped when P, is adjacent to but not occupying ' i t s i n i t i a l p o s ition, then the family of a l l l i n e segments from P, to P 2 generated during the trace w i l l include 1, exactly once and 1 2 exactly twice. If now a l l points in this plane are i n i t i a l l y l a b e l l e d 0, we can assign an operator to the P i - P 2 l i n e segment which complements a l l those points on the li n e ( i . e . changes 0 to 1 and vice versa). When such an operator accompanies the above trace, we find that, when complete, 1, points have been complemented once y i e l d i n g 1s and 1 2 points have been complemented twice and so remain 0. However, these l i n e s are simply examples of an i n f i n i t e family of lines generated during the trace. The net result produced by the operator, therefore, is to convert a l l points i n t e r i o r to r to 1 and leave a l l those exterior to T as 0. The object points inside r have therefore been reconstructed. Note also that i f r is a curve internal to some other curve T 2 which does not contain P 2 , then a similar trace about r 2 w i l l also complement the points inside i t reseting the i n t e r i o r of r to 0, revealing i t to be a hole inside the larger object outline, T 2. This then w i l l be the mechanism for reconstructing objects from border information. The previous example fixed the li n e from P, to a stationary anchor at P 2 . In fact, the theorem and i t s results apply just as well i f P 2 is permitted to move freely along, say, the bottom edge of the image in such a way that the lines from P, are a l l p a r a l l e l and v e r t i c a l downward. In this way, a l l points below r in the reconstruction window are complemented. This permits a 185 feasible proposal for object reconstruction. As the object outline i s written into the reconstruction buffer, following the right-handed trace convention, complement a l l of the buffer points below each new point u n t i l border reconstruction i s complete. Before proceeding, however, there are two problems in adapting the theorem ignored in the example, which must f i r s t be resolved. In the example, r was considered part of the object and P, part of the background. The convention was adopted that a l l points on the l i n e , 1 , excluding P, were complemented. On close examination, we now find the curious result that when P, i s between r and P 2 intersecting 1 2 , i t encounters points that w i l l be complemented an odd number of times ( i e . , set to 1). The net result i s that points on 1 2 adjacent to r are transformed to object points, e s s e n t i a l l y thickening r by one point over these regions. In the event that P, i s complemented along with a l l pints of 1 , then the thickening i s simply transferred to the top portions of f. If P, was allowed to ride on r , the result would be that: only portions of F would be transformed to object points. There i s no consistent way to remove this behavior. This problem was ignored in the example because P, was simply considered an i n f i n i t e s i m a l point. However, when points become p i x e l s , the problem cannot be ignored. The other problem was that P, was never considered to follow a path p a r a l l e l to L. That i s , a path where T forms a straight l i n e p a r a l l e l to 1 . This implies that points on 1 should be complemented an i n f i n i t e number of times as P, moves along T. The result of this operation is indeterminate. 186 Both problems can be solved by imposing a set of rules to guide the reconstruction. The nature of these rules is readily v i s u a l i z e d when using chain code border representation. Consider the following example displayed alongside our coordinate and di r e c t i o n number conventions: c r To reproduce the image segment on the right by complementing downwards, apply the following rules to the current border point: For external borders: complement the current point i f edgeout = 1 to 4, do not complement the current point i f edgeout = 5 to 0. For internal borders: do not complement the current point i f edgeout = 1 to 4, complement the current point i f edgeout = 5 to 0. The policy i s reversed for internal borders because the borders s t i l l belong to the object and not the hole. The above cures the T thinning problem. The problem of moving P, along a straight l i n e manifests i t s e l f here as a problem of moving the trace along a v e r t i c a l border segment. This is best i l l u s t r a t e d with the following example: 187 r Those pixels marked in bold correspond to the places where 1 is tangent to T at a l i n e . These are places that either already are or w i l l be complemented by a trace following the upper boundary. T can be further subdivided into two problem areas: T, representing convexities, and T 2 corresponding to concavit ies . To eliminate the problem in the v e r t i c a l l i n e s , don't complement when: edgein = 0 AND edgeout = 0 edgein = 4 AND edgeout = 4 The T 2 concavities pose a special problem since they are already complemented from above. The i n t e r i o r s of the v e r t i c a l l i n e s w i l l be dealt with by the previous method, however, to prevent complementing below the corner points in the concavity, don't complement when: edgein =5, 6 AND edgeout = 4 edgein = 4 AND edgeout = 2, 3 edgein = 1 , 2 AND edgeout = 0 edgein = 0 AND edgeout = 6, 7 Internal borders are processed using the exact same rules. Since a l l of these rules are simple boolean expressions, they can 188 be readily implemented in hardwired l o g i c . The only additional memory burden i s the storage of the old edgeout to be used as edgein above. When reconstruction in a f i n i t e , physical buffer i s considered, the problem of where to start the reconstruction traces a r i s e s . For an outer border in hybrid representation, t h i s i s not a serious problem. The buffer need only be designed to accomodate the largest expected character, and the characters are reconstructed u p p e r - l e f t - j u s t i f i e d in that buffer. Two pieces of information are required. These are the column position of the trace start point supplied by the closure detector and the left-most column position encountered during transmission of the curvature points. The difference in these values w i l l give the column position in the upper row from which reconstruction may s t a r t . Since internal borders are detected before outer borders, two complications a r i s e . The f i r s t i s where to position them. This i s best solved by storing internal border information u n t i l an external border a r r i v e s . The external border can then be reconstructed followed by the internal border(s) which start at a position determined by the difference in i n i t i a l trace point cooridinates. The second problem arises when the inter n a l border is inside an object which cannot be segmented. In t h i s case, the correct outer border w i l l never a r r i v e . To avoid t h i s internal border being added in c o r r e c t l y to a subsequent object, the values of i t s extreme upper, lower, l e f t and right coordinates must be compared to those of the outer border. If they- a l l f a l l within the outer border's extreme points, then reconstruction can 189 proceed normally. Otherwise, this internal border must be discarded. Situations can be envisioned where t h i s technique may f a i l . However, in character images, these situations are expected to be too rare to j u s t i f y the cost of a more sophisticated method. How the reconstructed image i s handled now i s up to subsequent processors. For instance, a recognizer may perform a template match on the image data and then find i t sa t i s f a c t o r y and so clear i t when fini s h e d . On the other hand, i t may decide something more i s needed, eg., the body below the dot on an " i " , and leave the image to have other parts added l a t e r , or i t may order some transformation on the image such as rotation or sc a l i n g . Since dedicated hardware can be devoted to reconstruction, the operation promises to be fast. However, many more points in the buffer must be referenced to perform complementing than there are points inside the object. Therefore, i t may be essential that the time i n t e r v a l between successive closed objects be very much larger than the memory reference period. Fortunately in o p t i c a l character recognition, t h i s seems to be the case. Further d e t a i l s concerning implementation of the reconstruc-tion procedure w i l l not be presented. Since such a system was not investigated through simulation, i t was f e l t that such a discussion would be too speculative, adding l i t t l e to what has been presented already. 190 4.9 Touching Characters A serious investigation of the segmentation of touching characters did not form a part of this thesis research. However, since Hoffman and McCullough [62] reported up to 40% incidence of touching characters in experiments involving 12-pitch type, i t was f e l t that the matter does deserve some discussion. Rather than attempt an exhaustive examination of possible methods to separate touching characters, only one possible solution w i l l be presented instead. This w i l l demonstrate that a solution to the problem could be incorporated into the preprocessor design. A h i e r a r c h i c a l approach i s proposed for the segmentation of the text in a l i n e . The f i r s t l e v e l of th i s hierarchy w i l l address the segmentation of words, the second l e v e l , the segmentation of characters. This i s a major departure from the concentration on characters that has dominated t h i s chapter. However, the segmentation of words as a unit produces at least two notable benefits. F i r s t , words, not characters, are the elemental semantic components of language. It i s the words on a page that a reading machine must a r t i c u l a t e accurately. Secondly, the segmentation of words provides a set of measurements whereby to group and parse the characters found at the high resolution l e v e l . Compared to characters, words are easy to segment. Even in the handwritten case, words are set apart by a clear space. The size of t h i s space for typewritten text i s at least one character-space. Therefore, there is no question of the foregoing segmentation scheme being able to segment words as a unit provided that a l l internal d e t a i l s could be forced to blend 191 together. From q u a l i t a t i v e experience, i t i s noted that the spacing between characters within a word, and disconnected components within a character (e.g., the dot on " i " ) , are of a distance comparable to the average limbwidth of a character. Therefore, i f the standard deviation of the V 2g f i l t e r i s chosen to resolve a minimum of, say, twice t h i s spacing, a l l d e t a i l s within the word are blurred together; but words as a unit, separated by more than two limbwidths, would be resolved. When processing t h i s blurred image, the segmentation system may ignore internal borders, retaining only the external borders. When a closed external border i s detected, the recognition system is signalled to indicate that a l l of the characters found by the high resolution system since the last closed border now constitute a word. The primary usefulness of t h i s information i s that the characters found can now be grouped with confidence into word units. Such a system could, for instance, d i s t i n g u i s h between a s o l i t a r y " I " representing the f i r s t person singular pronoun, and an " I " occurring in the f i r s t p osition of a word such as "International". Also, p o s i t i o n a l errors a r i s i n g during the separation of touching characters w i l l be prevented from accumulating beyond word boundaries. This f i l t e r i n g and segmentation of words must be done by a dedicated system operating in p a r a l l e l with a similar system dedicated to resolving characters. As the character boundaries are found by the high resolution system, they are passed on to the recognizer. In the event touching or poorly resolved characters occur, the recognizer should indicate a low recognition confidence. Those borders are 192 then stored for l a t e r processing. When a word is flagged, the s p a t i a l ordering of the characters found within i t immediately becomes known. In the case of poorly resolved characters, this knowledge could be used d i r e c t l y or coupled with d i - or trigram s t a t i s t i c s to improve recognition confidence. Similar knowledge could also be applied to a s s i s t in the parsing of touching characters. This parsing could proceed in the recursive manner outlined by Casey and Nagy [75]. For the case where the characters are reconstructed in a buffer, successive t r i a l s are made to s p l i t the characters at a column and send each segment to the recognizer in turn. If the result scores high confidence, including the p o s i t i o n a l and s t a t i s t i c a l information, for both characters then the segmentation i s accepted. However, i f low confidence i s indicated, then the column i s moved to increase the window on one character and decrease i t on the other, and the recognition process i s repeated u n t i l one of the characters i s parsed too narrowly. In t h i s case, the best guess must be taken. If more than two characters are connected, then some estimate of expected character width must be employed to select the multiple parsing columns. The method would then continue as before with, however, one column at a time being s h i f t e d to determine the optimal p o s i t i o n . This segmentation approach is subject to the same c r i t i c i s m that was directed at Hoffman and McCullough. There i s no optimal way to segment overlapping characters. To address t h i s c r i t i c i s m , the reconstruction step i s abandoned in favor of operating on the border representation d i r e c t l y . The outer 193 border can readily provide the extreme horizontal and v e r t i c a l dimensions of the character c l u s t e r . With th i s information, a variation of the Casey and Nagy method can be invoked. The row coordinate at a suitable d i v i s i o n point (usually the width of the narrowest character from the l e f t or right ) i s noted. The outer boundary of the cluster i s then scanned to f i n d the nearest point with row coordinate greater than or equal to t h i s value. Once found, a second search i s made for a similar point, but for which the trace i s proceeding in the opposite d i r e c t i o n . This i s indicated by the edgein-edgeout pair being directed into opposite half-planes from those of the f i r s t point. If the distance calculated between these points i s s u f f i c i e n t l y close to a limbwidth then these points represent a good guess for segmentation. Should they be too far apart, then t h i s segmentation row guess i s not near the touching point and so must be s h i f t e d . To complete the segmentation, the compound outer border i s s p l i t into two smaller borders. This i s done by " s p l i c i n g " together the two close points just found by placing them at the head and t a i l of two new border point l i s t s representing the borders on opposite sides of the s p l i c i n g region. These new borders are then transmitted to the recognizer to be assigned a confidence measure. This process i s outlined in Figure 4.3 below: 1 94 Parse row After s p l i c e Figure 4.3 Touching character separation If the segmented result i s rejected by the recognizer, then the operation must be performed again, but with the i n i t i a l row guess moved. For this reason, i t i s important that only a copy of the outer border data is spliced and the o r i g i n a l l e f t intact for subsequent t r i a l s . Note, however, that not as many recursions are expected from th i s approach because some prescreening already takes place in the judgement of suitable closeness between the two points to be s p l i c e d . In the event that the characters touch at two widely separated and v e r t i c a l l y displaced places, the above technique w i l l reject a l l t r i a l s p l i c i n g p a i r s . An internal border w i l l probably form in the gap between the two touching areas. This internal border must therefore be included in a subsequent repeat attempt at segmentation. This time, s p l i c i n g at both places simultaneously i s required. The above has been merely a preliminary glimpse at how to address the touching character problem. It i s hoped that i t w i l l serve as a f r u i t f u l s t a r t i n g point for further research. No doubt a more rigorous investigation, including simulation t r i a l s , w i l l produce refinements, or replace these suggestions e n t i r e l y 195 with a superior method. 4.10 Segmentation Summary The complete binary-object segmentation procedure advocated in t h i s chapter can now be summarized in the following steps: (1) Before scanning the input, i n i t i a l i z e a l l of the linkage tables, a l l of the l i s t - 2 e ntries, and the Euler number counters (AE 0, AE,) to zero. The two image-data and the three Zahn-window s h i f t registers are i n i t i a l i z e d to unity to frame the image bottom and sides with object points. Also, i n i t i a l i z e the current l i s t - 1 - l i s t - 2 address to unity. (2) Raster scan the image from l e f t to right s h i f t i n g the binarized pixels into the two sets of s h i f t r e g i s t e r s . Begin processing the image data only a f t e r s h i f t register S1 i s f i l l e d . Maintain a count of the row and column coordinates at pixels D2, D5, and D6 with the row count c y c l i n g at a modulo at least equal to the image width. Also maintain a set of flags to indicate when the f i r s t or last image column enters D2. For the f i r s t column, black out (set to unity) D1 and D4, at the l a s t column, black out D3, D6, and D8, and disable detection of a B point. (3) Using the modified Zahn border point detection procedure, log the coordinate and edgeout value of a l l points where edgein edgeout into l i s t - 1 , simultaneously clearing the l i s t - 2 s l o t . B points are processed before A points. (4) Log the l i s t - 1 address of the current point into the appropriate linkage table where i t i s designated as a f i r s t entry. 196 ( 5 ) If a linkage is flagged as a result of the current point also being a second entry, then i f the f i r s t entry being linked to i s an: (a) edgeout - log the current point's l i s t - 1 address in the l i s t - 2 s lot pointed to by the f i r s t entry. (b) edgein - log the l i s t - 1 address found in the f i r s t entry into the l i s t - 2 s l o t of the current point. Clear the linkage table s l o t just flagged. (6) Increment the l i s t - 1 - l i s t - 2 address when processing of each A or B point i s complete. When the available addresses are used up, cycle back to unity. (7) Perform the closure a n t i c i p a t i o n operations on D1, D2, D4, and D5 to a l t e r the Euler number counters and/or detect possible closed-border points. (8) If a possible closed-border point i s i d e n t i f i e d , then retrieve the l a s t A point found from i t s delay buffer and push i t onto a trace stack. It may be appropriate to maintain separate stacks for internal and external borders. (9) When processing of the current Zahn-window i s complete, place the current A point's ( i f there i s one) l i s t - 1 address into the special delay buffer used in (8). (10) Continue s h i f t i n g the pixels and repeating steps (2) to (9) u n t i l the fl a g indicates the l a s t column has been processed. (11) At the end of the scan, pop the trace stack entries and use each to i n i t i a t e a trace through l i s t - 2 . Maintain a count of the number of entries traced. I f : 197 (a) the trace leads to a n u l l pointer, then discard the current trace stack entry. (b) the trace leads back to the i n i t i a l address, the current border i s closed. Push th i s trace entry onto a transmission stack. (c) the counter exceeds the maximum l i s t - 1 - l i s t - 2 address, then the trace i s caught in an i n f i n i t e loop. Discard the current trace entry. (12) Pop the transmission stack entries and trace through l i s t - 2 again. This time retrieve and transmit the information in l i s t - 1 to the recognition/reconstruction c i r c u i t r y while also clearing the l i s t - 2 pointers. If the l i s t - 2 pointer i s found to be n u l l before the transmission i s complete, abort the transmission and flag the error. (13) On reception, the border information can be buffered and the object reconstructed when i t s outer border a r r i v e s , or the border information can be processed d i r e c t l y for recognition. (14) Continue scanning the document u n t i l complete. Then (a) Terminate the s h i f t i n g of image data to ensure that any remaining unclosed objects are not closed a c c i d e n t a l l y . (b) Return to step (1) to perform a complete system reset. At f i r s t sight, t h i s segmentation procedure may seem excessively complex to at t a i n raster-rate performance. However, the complexity i s reduced by observing that a number of these processing stages are mutually exclusive and thereby admit to p a r a l l e l execution. Furthermore, th i s entire procedure consists largely of simple logic operations and data transfers which are 198 id e a l l y suited to implementation on fast, dedicated hardware. Once the system has begun to deliver image data, the processing of the Zahn window can be represented by the following state diagram: edge-point detect ion and linkage Figure 4.4 Segmentation state diagram The edge-point detection and linkage, and closure detection sequences, are the most c l e a r l y p a r a l l e l operations. There i s no sharing of memory or processing resources between them. Within the edge-point detection and linkage branch, the operations of logging the edge data in l i s t - 1 , (3), and logging of the l i s t - 1 address into the linkage tables, (4), can also proceed concurrently. What the dashed l i n e attempts to show i s that i f both an A and a B edge is present in the current window, steps (3) to (6) must be performed twice in succession. When processing of the window i s complete, the buffering of the A point, (9), and the s h i f t of image data, (10)—(2), can also proceed concurrently. When a given row scan is complete, the system must dedicate 199 i t s e l f to the v e r i f i c a t i o n of boundary closure and i t s transmission, (11) and (-12). It appears unavoidable that these steps must be executed sequentially. It may be possible to overlap these operations with those of processing the Zahn window through interleaving of the l i s t - 1 - l i s t - 2 references. However, this has the one serious drawback that closed boundaries found during step (11) may become overwritten before or during transmission in step (12). It therefore appears that s u f f i c i e n t delay must be allowed between row scans to permit steps (11) and (12) to run to completion. What constitutes s u f f i c i e n t delay depends on the size of the image array, the length of l i s t - 1 - l i s t - 2 , and the speed of the technology employed. The processing of border data in step (13) i s an operation t o t a l l y exclusive of a l l the others. It e s s e n t i a l l y constitutes the second processor in t h i s image analysis p i p e l i n e , with stages (2) to (12) constituting the f i r s t . Since t h i s stage involves no reference to the memory resources of the e a r l i e r stages, and since i t i s expected that there are less segmentable objects present than image rows, processing can proceed, at a more l e i s u r e l y pace than before. If new border data is transmitted before processing or reconstruction of previous data i s complete, then i t can simply be buffered u n t i l i t i s needed. The exact timings of t h i s stage depend on the implementation of the border analysis/reconstruction system and on the expected complexity of the objects to be processed. 200 4.11 Segmentation Simulations Throughout t h i s chapter, discussion of the segmentation system's hardware requirements has been purposely vague. Partly t h i s i s due to the fact that these issues are implementation dependent. That i s , they depend on the input image width, the maximum scan rate, and the bandwidth of the technology employed. However, i t i s also due to the fact that the complexity and size of the objects scanned can have a major influence on the system's requirements. Because so many contributing factors are present, i t i s d i f f i c u l t , i f not impossible to a n a l y t i c a l l y predict what those requirements are. Some empirical insights, however, may be gained through simulations. In t h i s section, such simulations w i l l be performed by implementing the segmentation system in software, and then applying i t to a set of binarized images. The simulation involved implementing the segmentation procedure, excluding reconstruction, in PASCAL to accept 128X128 binary images as input and produce a l i s t of a l l segmented-border curvature points as output. Since t h i s simulation was designed to measure such quantities as the necessary l i s t - 1 - l i s t - 2 memory sl o t s , and stack depths required by these images, these resources were made exceptionally large to ensure that they would not overflow. In the case of l i s t - 1 - l i s t - 2 , ten thousand memory slots were made ava i l a b l e . The stacks were each given t h i r t y s l o t s . Concurrent with the segmentation-related a c t i v i t y , the following s t a t i s t i c s were also gathered: (a) Total number of A points, B points, and simultaneous 201 detections of A and B points. (b) Total number of anticipated outer and inner borders, the v e r i f i e d number of outer and inner borders which together provides the number of false alarms. (c) Total number of closed border points transmitted. (d) Image s t a t i s t i c s : t o t a l image area; t o t a l edge points present. (e) Record of the occupancy (number of memory slot s used) of l i s t - 1 - l i s t - 2 at the end of each row scan. (f) Histogram record of the number of points traced while testing for closure at the end of each row. (g) Histogram record of the number of segmented points transmitted at the end of each row. (h) Histogram record of the occupancy at the end of each row of the three stacks used: stack of anticipated outer borders; stack of anticipated inner borders; and a stack for v e r i f i e d closed borders to be transmitted. The choice of test images i n i t i a l l y presented some d i f f i c u l t y . Foremost, these images were to present as general a set of objects as possible to provide a comprehensive understanding of the segmentation method's operation. Further-more, these images were also to be indicative of the range of scale and image quality expected of the V 2g operator. This l a s t point required that the V 2g operator be applied to binarize the input image, which in turn l e f t open the question of the appropriate f i l t e r standard deviation. Since this system was designed to process character images, these i n i t i a l l y seemed suitable. However, printed characters come in many shapes and sizes, so choosing any one would bias the re s u l t s , and choosing a 202 wide selection of fonts, including a l l characters and a range of print sizes, would generate a vast number of test images, more than would seem necessary for the issues addressed here. Besides, i t would be desirable i f the results could r e f l e c t the system performance for any kind of image, including real world scenes. In the interests of generality, then, the test images should contain a complex set of borders enclosing objects of a variety of sizes, but with no p a r t i c u l a r bias to any p a r t i c u l a r class of images. Only pure noise binarized by a range of V 2g f i l t e r s appeared able to meet these requirements. F i f t y such binarized noise images were generated for these simulations. These were produced by i n i t i a l l y generating ten 128X128 images containing independent Gaussian noise of mean 128 and standard deviation 16. These noise s t a t i s t i c s were chosen simply to be compatible with those used during the evaluation t r i a l s of the l a s t chapter. Five V 2g standard deviations, of , were applied to binarize the images: 0.8, 1.6, 2.4, 3.2, and 4.0. Referencing the square wave edge model, these f i l t e r s w i l l resolve edge d e t a i l with a minimum spacing (for 0=1.25) of: 1.0, 2.0, 3.0, 4.0, and 5.0 p i x e l s . These edge spacings present as wide a range of object sizes as can be expected in character, or real-world images. Since these images are derived from random noise, i t was observed that these spacings are in fact close to the average values obtained. Therefore the results produced during segmentation can be c l a s s i f i e d as a r i s i n g from fiv e d i s t i n c t levels of input image complexity. Figure 4.5 reproduces two representative candidates from each of these fiv e test image classes. The severe complexity of 203 Figure 4.5 Sample test images: (a) a, =0.8; (b) af =1.6; ( c ) a, =2.4; (d) a, =3.2; (e) a, =4.0 204 the af-0.B image i s immediately apparent. This complexity far exceeds that expected in text images, and exceeds that of most real-world images. At the other extreme, the a( =4.0 image contains far larger, less structured objects than expected in text images, but i t i s consistent with cert a i n low resolution real-world images. The af=1.6 image i s probably the most representative of the object complexity expected in text and real-world images. Though the amount of d e t a i l present i s s t i l l much higher than text images are l i k e l y to produce, i t contains object limb widths and boundary curvatures similar to those which compose printed characters. Together, these f i v e test image classes present 6400 l i n e s of image data to the segmentation algorithm. The s t a t i s t i c s w i l l be grouped according to class with each grouping therefore representing the results seen in 1280 image l i n e s . The results of the number of points traced and transmitted, and the stack occupancies at the end of each row w i l l be combined to provide an indication of the system operating requirements across a l l l e v e l s of input image complexity. Before examining the results of the simulation experiments, l e t ' s examine the system requirements imposed by a worst-case s i t u a t i o n . Such a s i t u a t i o n would be produced by a checkerboard image at the p i x e l l e v e l as shown below for even N: 205 C= 1 2 3 4 . . . N-2 N-1 N Figure 4.6 "Checkerboard" worst-case image Even though th i s image has no closed outer borders, i t contains a maximum density of holes, and inner borders. A number of observations can be made immediately: (1) Every junction of two pix e l s i s an edge point with edgein * edgeout, so a l l Zahn window positions, except at C=N, produce both an A and a B point to be logged. Therefore 2N-1 points are logged into l i s t - 1 - l i s t - 2 at the end of each scan. (2) Every hole, except at C=N, i s detected as a possible inner border; therefore the internal-border trace-stack contains a maximum of N/2 entries at the end of a row scan. (3) With four border points per hole, an average of ( 2N - 2.5 ) points would have to be traced and 2N-4 points transmitted at the end of each row. A maximally detailed image containing only closed outer borders would be less dense than the above worst case, but the densest rows w i l l contain the same number of closed borders and border points as (2) and (3) above. It is important to note that i t i s readily possible that a given row scan in another image may close a border that contains more points to be traced and 206 transmitted than indicated in (3). Substituting N=128 w i l l permit comparison of t h i s worst-case for the results actually obtained. Table IV presents some of the results obtained alongside those of the worst-case s i t u a t i o n . The decreasing image complexity with increasing a( i s re f l e c t e d throughout the table, most notably in the decrease of edge points despite a nearby constant dark image area. The worst-case i s revealed throughout to be an u n r e a l i s t i c model about which to design the system. It is also seen that the a, =0.8 image class i s sizably more demanding of the system than the other classes. It i s observed that in general, the A and B points occur with approximately equal incidence at a combined rate ranging from 0.58 points per column (ppc) down to 0.08 ppc. Simultaneous occurence of A and B points also declines from 24.8% of the points seen down to 3.2%. These results stand in contrast to the worst-case figures where 2 ppc are produced with e s s e n t i a l l y 100% simultaneous occurence. The curvature point a r r i v a l rates suggest that there may be some merit to p i p e l i n i n g the edge-point detection and linkage process. In the f i r s t stage of such a pip e l i n e , the curvature points would be detected and logged in l i s t - 1 . In the second stage, the l i s t - 1 addresses of the curvature points would be buffered for linkage processing. Provided that t h i s system could process an average of about 0.5 ppc (or one point every two p i x e l s h i f t s ), a l l points seen should be properly linked shortly a f t e r the end of the row scan, minimally delaying the subsequent closure v e r i f i c a t i o n stages. Such an implementation would permit 207 Worst -case af =0.8 1 .6 2.4 3.2 4.0 area 8192 8186.6 8196.7 8191.1 8190.9 8153.2 edges 3251 2 14645.7 7710.7 5229.0 3930.9 3183.1 edges/row 225 1 14.420 60.240 40.852 30.710 24.868 A pts 1 28 37.275 15.194 9.009 6.238 4.905 B pts 127 36.887 15.156 9.094 6.433 4.921 Total 255 74.162 30.350 18.103 12.671 9.827 A AND B 1 27 9. 198 1 .759 0.648 0.291 0. 159 anticipated outer 0 2.438 1 . 1 44 0.588 0.347 0.242 ant ic ipated inner 63.5 6.038 1 .369 0.672 0.377 0.255 actual outer 0 0.271 0. 186 0.096 0.044 0.043 actual inner 63 3.484 0.347 0. 105 0.046 0.030 false alarms 0.5 4.720 1 .980 1.059 0.634 0.423 closed pts transmitted 252 56.796 1 0.670 3.932 2.053 1 .963 unclosable pts 3 17.366 19.680 14.171 10.618 7.863 Table IV. Segmentation simulation results including "checkerboard" worst-case 208 use of slower hardware and would be more suited to cope with those few instances where A and B points arrive simultaneously. The results for the closed borders anticipated by the Euler number closure detection method show that the a, =0.8 image class exhibits a 2.5:1 bias in favor of internal borders. This may be a s t a t i s t i c a l anomaly since the bias rapidly disappears for the other classes. It i s observed that there i s an almost order of magnitude decrease in the borders anticipated per row from the worst-case (63.5) to af =0.8 (8.5) followed by a further order of magnitude decrease by af =4.0 (0.50). Of the borders anticipated, the percent that can actually be closed and transmitted ranges from 44% (a, =0.8) to 15% (a, =4.0) in contrast to 99% for the worst-case s i t u a t i o n . It would appear that the e f f i c i e n c y of the Euler number closure a n t i c i p a t i o n method declines markedly with a decrease in image complexity. However, t h i s apparent decline could also be attributed to the increase of unclosable curvature points in proportion to those forming closed borders with increasing af . This causes a decrease in the number of closed border points to t o t a l curvature points ranging from 76.6% (a f=0.8) to 20.0% (a, =4.0) which lends support to the premise that the method's e f f i c i e n c y i s not strongly related to the image's complexity. The largest data structure in the system i s the dual l i s t - 1 - l i s t - 2 array. It i s important that t h i s array log a l l the curvature points l i k e l y to be encountered in an image window before r e c y c l i n g . Otherwise, segmentable objects within that window may become over-written before being detected as closed. 209 10 ROW Figure 4.7 List-1 occupancy against row count 210 A record of the occupancy of l i s t - 1 at the end of each row for a l l of the test images i s shown in Figure 4.7. There are two important points to note about t h i s p l o t . The individual points, representing the results of a given image, scatter very narrowly about the l i n e s representing the average occupancies per c l a s s . The average occupancy, therefore, serves as a r e l i a b l e indicator of the l i s t - 1 - l i s t - 2 requirements of a given resolution c l a s s . Secondly, the occupancy shows an almost exactly linear dependence on the row count for a given c l a s s . This implies that for a given image complexity c l a s s , the l i s t - 1 - l i s t - 2 size requirement scales d i r e c t l y with the image area. Therefore, a 64X64 image window needs only one quarter of the l i s t - 1 - l i s t - 2 memory space of the 128X128 images. The maximum values attained in Figure 4.7 represent the l i s t size requirement for that image c l a s s . It does not mean, however, that objects are present with a size that extends across the entire length of the image. Rather, i t means that i f such objects were present, these l i s t sizes represent the minimum required to guarantee th e i r segmentation. The requirements extend from about 9500 memory entries at af =0.8 to 1300 entries for of =4.0, with 3900 entries for that expected from printed characters at af=1.6. The requirements for the worst-case equal that of the number of edges present at 32,512 entries. The choice of which l i s t size to adopt must be motivated largely by cost. That i s , the cost of the memory hardware, as compared to the cost of losing the occasional segmentable object. It i s evident from the narrow scatter of the results in Figure 4.7 about their average values that the of =0.8 requirements represent a maximum that i s unlikel y to be exceeded. Indeed, even the 21 1 worst-case requirements are deceptive since the image i s dominated by single p i x e l holes, so that segmentation i s actually guaranteed aft e r only 383 entries. The e f f i c i e n c y of logging only curvature points as opposed to a l l edge or border points i s evident on comparison of the maximum values of Figure 4.7 to the t o t a l edges present in these images as given in Table IV. As a percentage, the curvature points range from 65% of the t o t a l to 41%. This indicates that, in general, the intermediate storage requirements of t h i s form of border representation are about one half those of a more complete representation that logs every point. Consequently, also, half the delay while v e r i f y i n g closure and transmitting borders can be expected. In order to estimate the delay incurred at the end of each row scan, the number of points traced and transmitted at the completion of each row were recorded. The results are presented in histogram form in Figures 4.8 through 4.13. Since the closure v e r i f i c a t i o n trace and border transmission operations occur in sequence, the steps taken in these operations should be summed to provide a basis for a delay estimate. The maximum sums seen range from 1122 + 581 = 1703 for af=0.8 to 298 + 130=428 for of=4.0 . Interestingly, the steps counted for af=1 .6, 1177 + 411 = 1588, are not much d i f f e r e n t from the otherwise more complex af =0.8 image. The worst-case values of 255+252=507 are misleadingly small due to the edge-points being produced by a large number of single p i x e l holes rather than extended features. Examination of the histograms reveals that the maximum trace and transmission counts are rare events of a magnitude far above 212 Figure 4.8 of =0.8 histogram: (a) number of points traced per row; (b) number of points transmitted per row 213 % m a x . c o u n t Figure 4.9 of =1.6 histogram: (a) number of points traced per row; (b) number of points transmitted per row 214 10*T , % m a x . c o u n t Figure 4.10 a, =2.4 histogram: (a) number of points traced per row; (b) number of points transmitted per row 215 i o \ . Figure 4.11 af =3.2 histogram: (a) number of points traced per row; (b) number of points transmitted per row 216 Figure 4.12 a, =4.0 histogram: (a) number of points traced per row; (b) number of points transmitted per row 217 Figure 4.13 Total combined histogram: (a) number of points traced per row; (b) number of points transmitted per row 218 the mean values. In fact, the mean values are generally less than 10% of maximum. This is most succinctly i l l u s t r a t e d in the histograms of Figure 4.13 which combine the results of a l l the image classes. The maximum count of points traced after a row was found to be 1177 but the mean was 64.5, 5% of the maximum. Si m i l a r l y , the maximum points transmitted was 581 but with a mean of 15.1, only 2.6% of the maximum. However, the processing algorithm presented required that a l l points be traced and transmitted at the end of a given row scan. This requires designing the system solely about the maximum points expected to be encountered at the end of a given row scan. These simulations suggest that to be 1177+581=1758 or, with a safety margin, approximately 2000 points. The hardware employed must therefore be capable of processing 2000 memory references in the time between single row raster scans. An a l t e r n a t i v e approach allows advantage to be taken of the much lower mean values by abandoning the requirement to complete the closure v e r i f i c a t i o n and border transmission tasks between scans. This approach must, of course, involve concurrent execution of these tasks with the curvature-point detection and linkage task. As a re s u l t , the system architecture i s further pipel i n e d . The e a r l i e r observation that at most 0.5 curvature points w i l l be detected per raster s h i f t permits p a r a l l e l execution of tracing and transmission with detection and linkage since l i s t - 1 - l i s t - 2 memory references can be interleaved. The p r i n c i p a l objection of thi s approach was that the entries being traced or transmitted could be overwritten and lo s t due to new points entering l i s t - 1 - l i s t - 2 . However, the l i s t - 1 - l i s t - 2 size requirements are now understood, and seen to be very predictable 219 for a given image complexity c l a s s . Increasing the l i s t size above what is required for t h i s class can prevent unwanted data loss during p a r a l l e l execution. For example, the of =1.6 image class was seen to require at least 3900 l i s t - 1 - l i s t - 2 memory positions with about 30 positions being f i l l e d per row scan. Even though the maximum points traced and transmitted per row was 1177+411=1588, the means were 85+11=96. Therefore even i f the trace-transmit system averaged only one memory reference per s h i f t , with no processing between scans, i t would generally complete i t s task during the subsequent row scan. However, the rare maximum case would require 1588/128=12.4 raster scans. Therefore, to accomodate this eventuality the l i s t - 1 - l i s t - 2 size needs to be increased by 12.4X30=372 entries, or about 10%. Since the single memory reference per raster s h i f t may be u n r e a l i s t i c a l l y slow, and there may be time for processing between scans, the actual memory increase may be much le s s . Therefore, the cost saving of such a f u l l y p a r a l l e l system as associated with slower hardware and greater assurance that a l l operations w i l l run to completion without c o n f l i c t may be considerable. The only serious side-effect resulting from p a r a l l e l execution of tracing and transmission i s that the stacks storing the pointers to possible internal or external borders need to be referenced by both the tracing and closure-anticipation systems. Since, even for the af =0.8 image class, new entries for these stacks arrive r e l a t i v e l y infrequently memory reference c o n f l i c t s pose no serious d i f f i c u l t y . The d i f f i c u l t y a r i ses from the tracing system requiring access to the oldest points on the 220 stacks while at the same time the an t i c i p a t i o n system i s adding the newest points. There are b a s i c a l l y three solutions to this problem: (1) Ignore the problem and process the stacks as usual. Since on average, the borders must be traced faster than detected, the stacks w i l l always be emptied eventually. However, the addition of new points w i l l add to the delay in reaching the stack bottom which in turn may require a sizable increase in l i s t - 1 - l i s t - 2 memory to prevent these old borders from being lost during the interim. Also, the borders w i l l be transmitted a l l out of order in r e l a t i o n to their causal appearance creating havoc with the border post-processing system. (2) Employ multiple sets of stacks with the closure anticipation system switching to a new set at the begining of each new row scan. The closure v e r i f i c a t i o n system then processes the stacks in the usual way from the oldest to the newest. The stacks are recycled when the l a s t in the series is f i l l e d . The number of extra stacks needed i s determined in exactly the same manner as the extra l i s t - 1 - l i s t - 2 memory was determined: the number of image rows scanned while processing the row with the maximum points to trace and transmit equals the number of extra stacks needed. In the previous a, =1.6 example, that number would be 13 sets (rounded up from 12.4). This method has the attraction of processing the anticipated borders in the usual manner without modification, except for the addition of a system to change the stacks. The only drawback of the system is that a great deal of the memory reserved for the stacks w i l l be wasted since the stacks are seldom used to f u l l capacity. 221 (3) Replace the stacks with a set of c i r c u l a r l i s t s . The closure anticipation system w i l l now place new pointers on the top of each l i s t while the closure v e r i f i c a t i o n system removes old pointers from the bottom. The causal order of borders traced and transmitted w i l l remain correct and the system used to control the l i s t s i s similar to a stack except that two pointers are maintained for the top and bottom of the l i s t s , and these must be cycled in a f i n i t e block of memory. The amount of memory required for each l i s t would be determined by the product of the mean occupancy of i t s corresponding stack and, as before, the number of image rows scanned while processing the row with the maximum points to trace and transmit, plus a suitable buffer to accomodate large deviations from the mean. For example, i f the mean occupancy was 2 and the row count, for of=1.6, was 12.4, the requirement would be about 25 en t r i e s . Including a buffer of 10 gives a t o t a l size of 35 entries. Clearly, t h i s i s not a very demanding memory requirement. The drawback of t h i s system l i e s in maintaining the correct causal relationship between internal and external borders. Internal borders generally belong within the temporally next closed outer border. The reconstruction or analysis system may rely on thi s causal ordering to c o r r e c t l y process the borders. When tracing and transmitting a l l points between scans, t h i s ordering was guaranteed. However, to ensure t h i s ordering using c i r c u l a r l i s t s , the system must monitor the values of the pointers stored in those l i s t s . The most recent pointers have the highest l i s t - 1 - l i s t - 2 addresses, c y c l i n g at a fixed modulus. The c i r c u l a r l i s t for internal borders must therefore be read 222 f i r s t u n t i l the next pointer found exceeds the pointer of the next external border pointer. The external border l i s t w i l l then be processed u n t i l the next pointer exceeds the pointer of the next internal border, and so on. The closed borders w i l l then be detected in the correct order for transmission. Unlike the previous cases where closed-border pointers were stacked to await transmission, after the closure v e r i f i c a t i o n stacks had been read, t h i s system can transmit the borders as soon as closure i s v e r i f i e d . This i s because these c i r c u l a r l i s t s cannot be f u l l y read in a guaranteed i n t e r v a l of time since new pointers are always being added. Also, immediate transmission of closed borders provides extra assurance that the data in l i s t - 1 - l i s t - 2 w i l l not become overwritten. This s i m p l i f i e d transmission system may cancel out the extra complexity required by the v e r i f i c a t i o n system. Which of approaches (2) and (3) i s favored depends largely on the r e l a t i v e cost of the hardware employed. Approach (3) seems the most elegant, and the immediate transmission of closed borders i s very a t t r a c t i v e . However, system (2) i s b a s i c a l l y a simple extension of the e a r l i e r stack processing method, but the necessary waste of memory i t would e n t a i l may cause i t to be economically unattractive. The amount of memory required by each of these systems can be estimated by the stack occupancies found during the simulations. The simulation used a stack each for anticipated inner and outer borders and a single stack to store pointers to v e r i f i e d closed borders. Each stack was read and emptied afte r each row scan and the number of entries found recorded. The result was a 223 record of the stack occupancy in terms of the number of rows generating a given, number of entries within each image c l a s s . The results are shown in histogram form in Figures 4.14 to 4.19. The most remarkable observation i s that none of these stacks i s very long. The worst-case example would have required up to 64 internal-stack positions and 63 transmission-stack positions. However, the worst case in the simulations, af=0.8, Figure 4.14, requires only a maximum of 14 positions for the internal-stack and 13 for the tranmission stack. The o, =4.0 findings, Figure 4.18, show only three positions to be necessary for each of the three stacks. This small memory requirement for the stacks in any r e a l i s t i c s i t u a t i o n i s not worth optimizing. To declare a minimum of twenty entries to be needed for each stack would c e r t a i n l y prove adequate and provide a comfortable safety buffer for unexpectedly complex input images. For a simple three stack system without p a r a l l e l processing of v e r i f i c a t i o n and transmission, these stacks would only occupy 60 memory locations. For a p a r a l l e l system with multiple stacks, case (2), the example given would require 780 locations. Optimization could now be considered, but t h i s memory size i s s t i l l not serious. Design of the c i r c u l a r l i s t structures required an estimate of the average stack memory requirements. Figure 4.19 presents the combined occupancy results for a l l image classes. The means for the i n t e r n a l - , external-, and transmission-stacks was found to be 1.8, 1.0, and 1.0. These resu l t s are roughly comparable to the 0^=1.6 results but less than the af =0.8 r e s u l t s . Rather than adopt the ov e r a l l mean, for i l l u s t r a t i o n the af =0.8 figures w i l l be used, but with the external-stack mean equal to the internal-stack mean since their 224 Figure 4.14 at = 0.8 stack occupancy: (a) external border stack; (b) internal border stack; (c) transmission stack 225 4 8 12 1* 2 0 occupancy Figure 4.15 a, =1.6 stack occupancy: (a) external border stack; (b) internal border stack; (c) transmission stack 226 Figure 4.16 of =2.4 stack occupancy: (a) external border stack; (b) internal border stack; (c) transmission stack 227 Figure 4.17 a, =3.2 stack occupancy: (a) external border stack; (b) internal border stack; (c) transmission stack 228 Figure 4 . 1 8 a F=4.0 stack occupancy: (a) external border stack; (b) internal border stack; (c) transmission stack 229 occupancy Figure 4.19 Total combined stack occupancy: (a) external border stack; (b) internal border stack; (c) transmission stack 230 difference may be a s t a t i s t i c a l anomaly. With a 20 entry safety margin, the previous ca l c u l a t i o n w i l l require 12.4 X 6.1 + 20 = 95.64 or about 100 locations for the internal and external c i r c u l a r l i s t s . Since no transmission stack i s used, the t o t a l memory requirement i s only 200 locations. Therefore, this system produces an almost 4:1 memory advantage over the multiple stack system. However, regardless of the implementation chosen, i t i s clear that the l i s t - 1 - l i s t - 2 data structure w i l l dominate the memory requirements of the system. The simulations of the segmentation system have achieved their primary goal of providing empirical insight into the operation and hardware requirements of the system. The observation that the segmentation system can accomodate further p a r a l l e l i s m was unexpected, but welcome. The net result may be a more r e l i a b l e system in terms of reduced loss of segmentable borders which at the same time i s less demanding of hardware technology. Since a l l the test images were derived from noise, i t i s not guaranteed that the system w i l l operate in a similar manner on application to other images. However, the complexity of the test images within each resolution class suggests that these images were more demanding of the system than most real applications w i l l be. 231 4.12 Conclusions The objective of t h i s chapter was to develop a method for the detection and i s o l a t i o n of closed borders within a dynamic image in real time. The proposed system processed binary-image data in p a r a l l e l with the input raster scan in order to meet the real-time performance objective. It also took advantage of the dynamic nature of the image in the linkage of detected border points, and in the detection of possible closed borders by monitoring the l o c a l change in Euler number. The o v e r a l l design recommended for implementation uses a modified Zahn curvature point detector coupled to a m u l t i l i s t data structure to l i n k the curvature points into a closed border. Closure of a border i s detected (but not guaranteed) by an Euler number closure detection system which f i l e s the pointers to the expected borders on two stacks, one each for internal and external borders. Closure v e r i f i c a t i o n occurs at the end of the row scan. V e r i f i c a t i o n of border closure employs the global method of following pointers within the l i s t - 1 - l i s t - 2 curvature point storage in search of c y c l i c a l linked l i s t s . On discovery of a closed border, the curvature points, including their coordinate position and edgeout d i r e c t i o n , are transmitted to a subsequent processor. Though the nature of the subsequent processor i s not of concern to the segmentation system, a reconstruction procedure was investigated to show how the segmented objects detected could be reconstructed from the border information alone. In addition a preliminary procedure was outlined for the separation of touching characters. S t a t i s t i c s gathered from a software simulation of the 232 complete system provided the necessary data to f a c i l i t a t e the prediction of memory requirements and estimate the time required to complete each processing stage. The f i n a l configuration of the system w i l l be governed largely by the incoming video data rate and the image width in p i x e l s . However, the simulations underscored the fact that much f l e x i b i l i t y i s possible in the system architecture. It i s envisioned that the f i n a l implementation w i l l include a r i c h blend of p a r a l l e l and s e r i a l processes acting in concert. 233 V. DISCUSSION AND CONCLUSIONS This thesis has presented the design d e t a i l s of the edge f i l t e r i n g , b i n a r i z a t i o n , and segmentation components of a proposed d i g i t a l preprocessor for o p t i c a l character recognition. After the camera device has acquired the image data, i t i s to be f i l t e r e d with the two-dimensional V 2g optimal edge detection f i l t e r . This edge f i l t e r was shown to be optimal in the sense of maximizing output signal energy about the character edges. This resulted in' a large degree of noise rejection within two f i l t e r standard deviations of the edges. The smoothing aspect of the f i l t e r also removed any roughness from the character boundaries. Both of these features eliminated the need for an additional noise cleaning stage after b i n a r i z a t i o n . The resolution response of the V 2g f i l t e r was determined for two edge models. The square wave model i s most suitable for predicting when the edge spacings within characters l i k e "m" or "s", or h o r i z o n t a l l y between multiple characters l i k e "un", can be resolved. The staircase model i s not as useful, but i t does predict that words l o c a l l y highlighted by a d i f f e r e n t color (a practice common in p r i n t advertizing) are resolvable. However, i t also predicts formation of a psuedo-object associated with the highlight background. If segmentable, t h i s psuedo-object may confuse the recognizer. The necessary f i l t e r width for optimal noise rejection, but matched to the character d e t a i l , has a of equal to the observed 234 edge spacing in pixels divided by the appropriate 0. For Dr. Beddoes' CCD scanner, the edge spacing was generally observed to be two p i x e l s . Allowing for moderate blurr, the square wave model predicts a minimum 0 of 1.25. Therefore, the best af i s 2/1.25=1.6. It was further found that the sample spacing should be less than 1.25af. For a, =1.6, the maximum spacing i s two p i x e l s ; c l e a r l y , there i s no danger of undersampling. The f i l t e r was also found to be largely insensitive to c o e f f i c i e n t quantization down to at least a low of six b i t s per word excluding sign. However, i t was seen to be important that any resultant dc bias be removed. Since the implementation envisioned w i l l incorporate at least an eight b i t t o t a l word size, underquantization i s unlikely to be a problem. Bias removal proceeds by adding or subtracting a unit from the c o e f f i c i e n t s near the maximum f i l t e r slope at a radius of 0.8af u n t i l a l l c o e f f i c i e n t s sum to zero. The implementation of t h i s f i l t e r i s a subject which merits further study. However, some suggestions can be made at this point. The most obvious implementation i s a simple direct-form discrete convolution. Special purpose hardware i s c e r t a i n l y the only means to achieve t h i s at video acq u i s i t i o n rates. To supply a growing demand for t h i s type of operation, special purpose CCD convolution integrated c i r c u i t s have been manufactured able to support up to a 26X26 operator [76]. With the current image data held in a similar CCD l i n e such a system could readily accomodate a V 2g f i l t e r with ar as large as 3.2 at eight b i t resolution. An inte r e s t i n g a lternative approach was developed by Orbach [51] incorporating hybrid d i g i t a l - a n a l o g c i r c u i t r y . The video delay 235 l i n e was implemented with d i g i t a l RAM memory to achieve a faster data transfer rate than was possible with a CCD l i n e . However, the convolution i s performed with multiplying d i g i t a l to analog converters (MDACs) whose output i s then summed by an operational amplifier. The p a r t i c u l a r a t t r a c t i o n of t h i s system i s that the output signal i s c a r r i e d on a single l i n e whose sign can be determined with a comparator for b i n a r i z a t i o n . This contrasts with the eight l i n e d i g i t a l output of an eight b i t system where a l l but the sign b i t l i n e are subsequently discarded. Once the image has been f i l t e r e d , b i n a r i z a t i o n i s a simple matter of l a b l i n g the posi t i v e p i x e l s (dark regions) "1", and the negative pixels ( l i g h t background) "0". The result i s then passed to the segmentation stage. The segmentor's task was to separate characters from the background provided they do not touch the image window sides, and are surrounded by "0" background p i x e l s . Border pixels were detected through boolean operations performed on a 3X3 window convolved over the binary image at the video rate. To achieve the real-time performance requirement, the border pixels found were logged into linked l i s t s immediately on detection. Simultaneously, an Euler number based technique recorded those pi x e l s suspected of pointing to closed borders. V e r i f i c a t i o n of closure involved following the pointers l i n k i n g the stored border pixels at the end of each row scan. On closure confirmation, a l l external and internal borders were subsequently transmitted to the reconstruction/recognition c i r c u i t r y . The simulation t r i a l s performed indicated that, even for the 236 most complex images that could reasonably be expected, the processing load is l i g h t enough to allow new-found points to be processed in p a r a l l e l with closure v e r i f i c a t i o n and border transmission. Any resultant memory reference c o n f l i c t s were seen as unlikely to result in serious delays. After transmission, a method was outlined whereby the binarized image of the segmented characters could be reconstructed from the border data. However, i t should be noted that t h i s i s not the only avenue to recognition that could be taken. Since the border data f u l l y describes the character i t contains, i t could be analyzed d i r e c t l y without the intervening reconstruction step. Some s p e c i f i c algorithms to perform such shape analysis from chain coded borders were presented by Pa v l i d i s [77, pp. 185-215] and Freeman [78]. Both these authors have also published general surveys d e t a i l i n g the progress in feature extraction and shape recognition from border descriptions [79], [80]. The major at t r a c t i o n of t h i s approach i s that the border data, processed to remove redundant points and normalize the p i x e l positions, could prove a f u l l y scale- and rotation-invarient representation. That i t can also be fast and e f f i c i e n t i s demonstrated by the 100 character per second recognition rate reported by D'Amato et a l . [66] where shape matching against features extracted from a chain code f a c i l i t a t e s recognition. The design of the OCR preprocessing system i s by no means complete; considerable opportunities remain for further work. The need was already outlined for a system component to accurately parse touching characters. However, at the other end 237 of the resolution scale, an accurate, autonomous method i s needed for the tracing of p r i n t l i n e s . This w i l l guide the correct causal a c q u i s i t i o n of words and characters from a current print l i n e , and, subsequently, the correct a c q u i s i t i o n of gramatically connected text l i n e s . A method of signaling and/or ignoring non-text material such as i l l u s t r a t i o n s may also prove necessary. Both these methods would require f i l t e r i n g the image at lower resolutions, choosing of so that p r i n t l i n e s would be resolved as a unit, blurring the component words. I l l u s t r a t i o n s would represent non-segmentable objects at t h i s low resolution l e v e l . The character tracking and a c q u i s i t i o n stages could then be signalled to ignore the high resolution data generated by non-text input. Such an expanded system would seem to favor new imaging devices capable of acquiring more than a single text l i n e per scan. A l l of these extensions however would s t i l l include the same system components outlined in t h i s report: a V 2g f i l t e r to highlight the desired l e v e l of d e t a i l ; and a non-sequential object-border segmentation method to acquire the necessary image information. Since these components have, in t h i s thesis, been shown capable of real-time, autonomous operation, i t i s l i k e l y that such an expanded preprocessor w i l l also operate s a t i s f a c t o r i l y . 238 REFERENCES [I] The B r i t i s h Computer Society, "Character recognition," Gresham press, Unwin Brothers Ltd., London, 1967. [2] Auerbach Info. Inc., "Auerbach on o p t i c a l character recognition," Auerbach Publishers, Princeton N.J., 1971. [3] L.D. Harmon, "Automatic recognition of p r i n t and s c r i p t , " Proceedings of IEEE, Vol. 60, No. 10, pp. 1165-1176, Oct. 1972. [4] J.R. Ullmann, "Pattern recognition techniques," Crane, Russak and Co. Inc., New York, 1973. [5] J.R. Ullmann, "Picture analysis in character recognition," D i g i t a l Picture Analysis (ed. A. Rosenfeld), Springer-Verlag, pp. 295-343, 1976. [6] J.R. Ullmann, "A r e l a t i o n a l view of text image processing," Issues in D i g i t a l Image Processing (eds. R.M. Haralick and J.C. Simon), S i j t h o f f and Noordhoff, pp. 139-169, 1980. [7] J. Schurmann, "Reading Machines," 6th International Conf. on Pattern Recognition, Munich, Germany, pp. 1031-1044, Oct. 19-22, 1982. [8] K.Y. Wong, R.G. Cassey, F.M. Wahl, "Document analysis system," IBM J. Research and Development, Vol. 26, No. 6, pp. 647-656, Nov. 1982. [9] M.R. Bartz, "The IBM 1975 o p t i c a l page reader part I I : video thresholding system," IBM J . Research and Development, Vol. 12, No. 5, pp. 354-363, Sept. 1968. [10] N. Otsu, "A threshold selection method from gray-level histograms," IEEE Trans. Syst. Man. and Cybern., Vol. SMC-9, No. 1, pp. 62-66, Jan. 1979. [II] J.T. Tou, D. Lu, J . McCarthy, "Automatic detection of document f a l s i f i c a t i o n , " Proc. PRIP83 - IEEE Computer Soc. Conf. Pattern Recognition and Image Processing, Las Vegas, Nevada, pp. 158-164, June 14-17, 1982. [12] A. Rosenfeld and CM. Park, "Noise cleaning in d i g i t a l p i ctures," EASCON'69 record - IEEE Electronics and Aerospace Systems Conv., Washington, D.C., pp. 264-273, Oct. 27-29, 1969. [13] E.C. Greanias, P.F. Meagher, R.J. Norman, P. Essinger, "The recognition of handwritten numerals by contour analysis," IBM J . Research and Development, Vol. 7, pp. 14-21, Jan. 1963. 239 [14] D.O. Clayden, M.B. Clowes, J.R. Parks, "Letter recognition and the Segmentation of running text," Information and Control, Vol. 9, pp. 246-264, 1966. [15] International Business Machines, "IBM System/360 Component Description. IBM 1275 Optical Reader Sorter," F i l e No. S 360-03, Form A19-0034-0, Jan. 1969. [16] D. Marr and E. Hildreth, "Theory of edge detection," Proc. R. Soc. Lord. B, Vol. 207, pp. 187-217, 1980. [17] F.M. Dickey and K.S. Shanmugam, "Optimum edge detection f i l t e r , " Applied Optics, Vol. 16, No. 1, pp. 145-148, Jan. 1977. [18] L.G. Roberts, "Machine perception of three-dimensional s o l i d s , " Optical and Electro-Optical Information Processing (eds. J.T. Tippett et a l . ) , MIT Press, Cambridge, MA., pp. 159-197, 1965. [19] A. Rosenfeld and M. Thurston, "Edge and curve detection for v i s u a l scene analysis," IEEE Trans. Comput., Vol. C-20, No. 5, pp. 562-569, May 1971. [20] I.D.G. Macleod, "On finding structure in pictures," Picture Language Machines (ed. S. Kaneff), pp. 231-256, New York: Academic, 1970. [21] M.H. Hueckel, "An operator which locates edges in d i g i t i z e d pictures," J . Ass. Comput. Mach., Vol. 18, pp. 113-125, Jan. 1971 . [22] M.H. Hueckel, "A l o c a l v i s u a l operator which recognizes edges and l i n e s , " J . Ass. Comput. Mach., Vol. 20, pp. 634-647, Oct. 1973. [23] J.A.G. Hale, "Detection of elementry features in a picture by non linear l o c a l numerical processing," Proc. 3rd Int. Joint Conf. Pattern Recognition, Coronado, C a l i f o r n i a , pp. 764-768, Nov. 8-11, 1976. [24] F.W. Campbell, "The physics of v i s u a l perception," P h i l . Trans. R. Soc. Lond. B, Vol. 290, pp. 5-9, 1980. [25] H.R. Wilson and S.C. Giese, "Threshold v i s i b i l i t y of frequency gradient patterns," Vision Res. Vol. 17, pp. 1177-1190, 1977. [26] D. Marr and T. Poggio, "A computational theory of human st e r i o v i s i o n , " Proc. R. Soc. Lond. B, Vol. 204, pp. 301-328, 1979. [27] R. Leipnik, "The extended entropy uncertainty p r i n c i p l e , " Information and Control, Vol. 3, pp. 18-25, 1960. 240 [28] B.F. Logan J r . , "Information in the zero crossings of bandpass signals," B e l l Sys. Tech. J . , Vol. 56, No. 4, pp. 487-510, A p r i l 1977. [29] D. Marr, S. Ullman and T. Poggio, "Bandpass channels, zero crossings, and early v i s u a l information processing," J . Opt. Soc. Am., Vol. 69, No. 6, pp. 914-916, June 1979. [30] C. Flammer, "Spheroidal wave functions," Stanford University Press, Stanford CA., 1957. [31] J.C. Dainty and R. Shaw, "Image science: p r i n c i p l e s , analysis and evaluation of photographic - type imaging processes," London: Academic, 1974. [32] K.S. Shanmugam, F.M. Dickey and J.A. Green, "An optimal frequency domain f i l t e r for edge detection in d i g i t a l pictures," IEEE Trans. PAMI, Vol. PAMI-1, No. 1, pp. 37-49, Jan. 1979. [33] W.H.H.J. Lunscher, "The asymptotic optimal frequency domain f i l t e r for edge detection," IEEE Trans. PAMI, paper no. 83-2-21, in press. [34] R. Paley and N. Wiener, "Fourier transforms in the complex domain," Amer. Math. Soc. Colloq. Publ. XIX, New York, 1934. [35] W.E.L. Grimson, "A computer implementation of a theory of human stereo v i s i o n , " P h i l . Trans. R. Soc. Lond. B, Vol. 292, pp. 217-253, 12 May 1981. [36] J . Clark, private communication, Univ. of B r i t i s h Columbia, Dept. of Elec. Eng., Vancouver, B.C., Canada. [37] G.F.D. Duff and D. Naylor, " D i f f e r e n t i a l equations of applied mathematics," J . Wiley and Sons Inc., 1966. [38] P.H. Smith, B.J. McCartin and D.L. Davies, "Software concepts useful for i n d u s t r i a l image processing," Proc. PRIP79-IEEE Computer Soc. Conf. Pattern Recognition and Image Processing, Chicago, 111., pp. 653-659, 1979. [39] R.E. Ziemer and W.H. Trantor, "Principles of communications; systems, modulation, and noise," Houghton M i f f l i n Co., 1976. [40] A. Rosenfeld and A.C. Kak, " D i g i t a l Picture Processing," second editon, Vol. 2, New York: Academic, 1982. [41] S.W. Zucker, "Local structure, consistency, and continuous relaxation," Issues in D i g i t a l Image Processing (eds. R.M. Haralick and J.C. Simon), S i j t h o f f and Noordhoff Int., The Netherlands, pp. 195-220, 1980. [42] J.M. Prager, "Extracting and l a b e l l i n g boundary segments in natural scenes," IEEE Trans. PAMI, Vol. PAMI-2, No. 1, pp. 16-27, Jan. 1980. 241 [43] A.R. Hanson and E.M. Riseman, "Processing cones; a computational structure for image analysis," Structured Computer V i s i o n : machine perception through h i e r a r c h i c a l computation structures (eds. S. Tanimoto and A. Klinger), New York: Academic, pp. 101-131, 1980. [44] M.D. Kelly, "Edge detection in pictures by computer using planning," Machine Intelligence, Vol. 6, pp. 397-409, 1971. [45] W.B. Green, " D i g i t a l image processing: a systems approach" New York: Van Nostrand Reinhold Co., 1983. [46] D.S.K. Chan and L.R. Rabiner, "Analysis of quantization errors in the di r e c t form for f i n i t e impulse response d i g i t a l f i l t e r s , " IEEE Trans. Audio and Electroacoustics, Vol. AU-21, No. 4, pp. 354-366, August 1973. [47] W. F e l l e r , "An introduction to pr o b a b i l i t y theory and i t s applications," second e d i t i o n , V ol. 2, J . Wiley and Sons Inc., 1971. [48] L. Kitchen and A. Rosenfeld, "Edge evaluation using l o c a l edge coherence," IEEE Trans. Sys. Man, and Cybern. Vol. SMC-11, No. 9, pp. 597-605, Sept. 1981. [49] H. Freeman, "On the encoding of a r b i t r a r y geometric configurations," IRE Trans. Electron. Comput., Vol. EC-10, pp. 260-268, June 1961. [50] T. Mimaroglu, "A high speed two-dimensional hardware convolver for image processing," Proc. PRIP82-IEEE Computer Soc. Conf. Pattern Recognition and Image Processing, Las Vegas, Nevada, pp. 386-389, June 14-17, 1982. [51] Z. Orbach, "Real-time video image enhancement using hardware convolver," Proc. PRIP82-IEEE Computer Soc. Conf. Pattern Recognition and Image Processing, Las Vegas, Nevada, pp. 390-392, June 14-17, 1982. [52] J.R. Fram and E.S. Deutsch, "On the quantitative evaluation of edge detection schemes and the i r comparison with human performance," IEEE Trans. Comput., Vol C-24, No. 6, pp. 616-627, June 1975. [53] E.S. Deutsch and J.R. Fram, "A quantitative study of the orientation bias of some edge detector schemes," IEEE Trans. Comput., Vol. C-27, No. 3, pp. 205-213, Mar. 1978. [54] I.E. Abdou and W.K. Pratt, "Qantitative design and evalutation of enhancement/thresholding edge detectors," Proceedings of IEEE, Vol. 67, No. 5, pp. 753-763, May 1979. [55] J.M.S. Prewitt, "Object enhancement and extraction," Picture Processing and Psychopictories (eds. B.S. Lipkin and A. Rosenfeld), New York: Academic, 1970. 242 [56] R.O. Duda and P.E. Hart, "Pattern c l a s s i f i c a t i o n and scene analysis," New York: Wiley, 1973. [57] R. Kirsch, "Computer determination of the constituent structure of b i o l o g i c a l images," Comput. Biomed. Res., Vol. 4, No. 3, pp. 315-328, 1971. [58] T. P e l i and D. Malah, "A study of edge detection algorithms," Computer Graphics and Image Processing, Vol. 20, pp. 1-21, Sept. 1982. [59] G.B. Shaw, "Local and regional edge detectors: some comparisons," Computer Graphics and Image Processing, Vol. 9, pp. 135-149, 1979. [60] A.Rosenfeld, "Connectivity in D i g i t a l Pictures," J . of A.CM., Vol. 17, No. 1, pp. 146-1 60, Jan. 1970. [61] S.J. Mason and J.K. Clemens, "Character Recognition in an experimental reading machine for the b l i n d , " Recognizing Patterns; studies in l i v i n g and automatic systems (eds. P.A. Kolers and M. Eden), pp. 156-167, M.I.T. press, Cambridge, MA., 1968. [62] R.L. Hoffman and J.W. McCullough, "Segmentation methods for recognition of machine-printed characters," IBM J . of Research and Development, Vol. 15, No. 2, pp. 153-165, Mar. 1971. [63] J.K. Clemens, "Optical character recognition for reading machine applications," Ph.D. Thesis, M.I.T., September, 1965. [64] M.P. Beddoes and W. Lunscher, "A microcomputer-based l e t t e r recognizer: discussion of some problems and solutions and results obtained with an 8085," Int. Congress on Applied Systems Research and Cybernetics, Acapulco, Mexico, 1980. [65] I. Sobel, "Neighborhood coding of binary images for fast contour following and general binary array processing, "Computer Graphics and Image Processing, Vol. 8, No. 1, pp. 127-135, Aug. 1978. [66] D. D'Amato, L. Pintsou, H. Koay, D. Stone, J . Tan, K. Tut-t l e , D. Buck, "High speed pattern recognition system for alphanumeric handprinted characters," Proc. PRIP82 - IEEE Computer Soc. Conf. Pattern Recognition and Image Processing, Las Vegas, Nevada, pp. 165-170, June 14-17, 1 982. [67] T. P a v l i d i s , "A minimum storage boundary tracing algorithm and i t s application to automatic inspection, "IEEE Trans. Syst. Man, and Cybern., Vol. SMC-8, No. 1, pp. 66-69, Jan. 1978. 243 [68] I. Chakravarty, "A single-pass, chain generating algorithm for region boundaries," Computer Graphics and Image Processing, Vol. 15, pp. 182-193, 1981. [69] B.G. Batchelor and B.K. Marlow, "Fast generation of chain code," IEEE P r o c , Pt. E, Vol. 127, No. 4, pp. 143-147, July 1980. [70] C.T. Zahn, "A formal description for two-dimension patterns," Proc. Int. Joint Conf. on A r t i f i c i a l I n t e l -ligence, pp. 621-628, May 1969. [71] M. Minsky and S. Papert, "Perceptrons, an introduction to computational geometry," M.I.T. press, Cambridge, MA., 1969. [72] A. Rosenfeld and J.L. P f a l t z , "Sequential operations in d i g i t a l picture processing," J . of A.CM., Vol. 13, No. 4, pp. 471-494, Oct. 1966. [73] S.B. Gray, "Local properties of binary images in two-dimensions," IEEE Trans. Comput., Vol. C-20, No. 5, pp. 551-561 , May 1971. [74] A. Rosenfeld, "Picture languages, formal models for picture recognition," New York: Academic, 1979. [75] R.G. Casey and G. Nagy, "Recursive segmentation and c l a s s i f i c a t i o n of composite character patterns," 6th Int. Conf. on Pattern Recognition, Munich, Germany, 1023-1026, Oct. 19-22, 1982. [76] S. Ullmann, "Interfacing the one-dimensional scanning of an image with the application of two-dimensional operators," Computer Graphics and Image Processing, Vol 16, pp. 150-157, 1981. [77] T. P a v l i d i s , "Structural Pattern Recognition," Springer-Verlag, 1977. [78] H. Freeman, "Use incremental curvature for describing and analyzing two-dimensional shape," Proc. PRIP79 - IEEE Computer Soc. Conf. Pattern Recognition and Image Processing, Chicago, 111., pp. 437-444, Aug. 6-8, 1979. [79] T. P a v l i d i s , "A review of algorithms for shape analysis," Computer Graphics and Image Processing, Vol. 7, pp. 243-258, 1978. [80] H. Freeman, "Computer processing of line-drawing images," A.CM. Computing Surveys, Vol. 6, No. 1, Mar. 1974. 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0095819/manifest

Comment

Related Items