image filtering, edge detection, edge tracing using fuzzy reasoning

Upload: muhammadwaqasnawaz

Post on 30-May-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 image filtering, edge detection, edge tracing using fuzzy reasoning

    1/11

    IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL. 18, NO. 5, MAY 1996 481

    Image Filtering, Edge Detection,and Edge Tracing Using Fuzzy ReasoningTodd Law, Student Member, /E, Hidenori Itoh, and Hirohisa Seki, Member, /E

    Abstract-We characterize the problem of detecting edges in images as a fuzzy reasoning problem. The edge detection problem isdivided into three staged: filtering, detection, and tracing. Images are filtered by applying fuzzy reasoning based on local pixelcharacteristicsto control the degree of Gaussian smoothing. Filtered images are then subjected to a simple edge detectionalgorithm which evaluates the edge fuzzy membership value for each pixel, based on local image characteristics. Finally, pixelshaving high edge membership are traced and assembled into structures, again using fuzzy reasoning to guide the tracing process.The filtering, detection,and tracing algorithms are tested on several test images. Comparisori is made with a standard edgedetection technique.Index Terms-Fuzzy reasoning,filtering, edge detection, tracing, joins.

    1 INTRODUCTIONMAGES of real scenes very frequently contain data whichI s incomplete and ambiguous. In particular, the problemof determining what is and what is not an edge in an image

    is confounded by the fact that edges are often partially hid-den (incomplete) or distorted (ambiguous) by various ef-fects such as uneven lighting. Furthermore, images fre-quently contain data with edge-like characteristics, such ashigh gradient, but a confident classification of such data canbest be resolved when high-level constraints are imposedon the interpretation of an image.

    Human beings are able to make some sense of even un-familiar objects, which necessarily have an imperfect highlevel representation. We suggest that this is possible be-cause our visual systems have built up much experienceviewing different objects under a wide variety of condi-tions. For edge detection, it appears that the eye-brain isfamiliar with different types of edges, and how these edgesappear under different conditions.To perceive unfamiliar objects, or to perceive familiar ob-jects in imperfect images, it appears that humans are apply-ing heuristic algorithms to understand such images. Al-though these algorithms may be "implemented in the wet-ware of our visual systems, we believe that it is possible tocharacterize an equivalent process systematically. We submitthat fuzzy reasoning is a suitable framework for expressingheuristic processes applied to incomplete and imperfect data.

    To extract rules for detecting edges, it is helpful to havesome familiarity with different kinds of edges in order toconstruct a suitable characterization. Typically, researchershave characterized edges as a step function or as a slopebetween two flat regions (see Fig. 1).

    e The authors are with the ltoh Laboratory, Department of Artificial Intelli-gence and Computer Science, Nagoya Institute of Technology, Gokiso-cho,Showa-ku, Nagoya 466, Japan. E-mail: [email protected] ript received Jun e 27,1 994 ; revised Feb. 5,19 96 . Recommended for accep-tance by K. Boyer.For information on obtaining reprints of this article, please send e-mail to:[email protected],and reference IEEECS Log Number P96014.

    Fig. 1 . Some common naive idealizationsof edges.

    In reality however, edges may deviate from these casesin any number of manners. Fig. 2shows some examples ofhow (continuous) edges may manifest themselves in thereal world. Edges may be

    1) gradual in transition,2) between areas of non-uniform intensity,3 ) between areas of similar intensity,4) noisy, or5) any combination of these problems.6) If these deviations from the ideal are severe enough,

    edge data may become nearly indistinguishable fromnoise.

    Furthermore, effective edge detection must go beyondlocal shape characteristics to reflect structural constraints.Edges appear not only as a local phenomenon, but as partof larger structures which can also be characterized heuris-tically. Again, we argue that it is possible to express struc-tural constraints heuristically in a systematic way.

    We employ fuzzy reasoning for these tasks because thenature of the data is indeterminate at a low-level stage ofprocessing. Fuzzy reasoning, as outlined by Zadeh [30],with the power to model and respond usefully to approxi-mate situations, is ideally suited to these problems.

    0162-8828/96$05.00 01996 IEEE

    Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.

    mailto:[email protected]:[email protected]:[email protected]:[email protected]
  • 8/14/2019 image filtering, edge detection, edge tracing using fuzzy reasoning

    2/11

    482 IEEE TRANSACTIONSON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VO L 18, NO 5, MAY 1996

    Fig. 2. Cross-sections of some nonideal (continuous) edges.

    In the following sections, we attempt to characterize realedges, then develop algorithms based on fuzzy reasoningto enhance edges (filtering), detect edge points, and assem-ble edge points into edge structures.

    2 FUZZY GAUS SIAN FILTERINGImage blurring/sharpening is a common technique in theedge detection process, with the objective of removingnoise and enhancing edges Furthermore, good filteringpreserves shape for high curvature edge structures such asat corners and T-junctions Typical algorithms adjust thevalue of each pixel according to a weighted average of thepixels in a surrounding neighborhood For example, Gra-ham [7] used an algorithm which blurred images acrossedges but not along edges, in order to preserve edge infor-mation Recent versions of such filtering are by Perona andMalik [21] who formulate smoothing as a diffusion process,and Nitzberg et a1 [18]who extend this idea to includepreservation of cornerness (high curvature edges)For any algorithm, it is difficult to know where to blurand where to sharpen without some idea of where edgesmay be located Overblurring can eliminate edge informa-tion, while oversharpening can produce edges in unex-pected places Many algorithms have arbitrary parameters,which must be judiciously selected for a given image, andmay perform poorly with a different image

    Consequently, we seek a blurring/sharpening algorithmwhich is immune to the particular information content in animage The algorithm should reduce noise as much as pos-sible, while not assuming the existence of edges, and si-multaneously preserving dominant shape

    Below, we present a technique for blurring and sharp-ening images with these objectives in mind Our techniqueis a form of controllable Gaussian filtering, where the size,shape, and direction of the filter are selected to achieve thegoals of reducing noise while bringing out edges Thistechnique, which we refer to as fuzzy Gaussian filtering isdocumented in [13]2.1 Determining GradientBefore we can select a suitable filter shape, it is necessary tohave an accurate idea of the direction and magnitude of the

    gradient in a local region und a pixel Due to the pres-ence of noise in an image, s usually quite difficult to ac-curately determine the direction of the gradient. Simplychoosing the direction of greatest ascent is unsatisfactory,because such a method is vulnerable to minute noise varia-tions, which have a particularly strong effect in small-scaleregions of a few pixels Furthermore, this method is alsounsatisfactory because there may be several directions withthe same gradient.

    Consequently, we offer a new notion of gradient, whichis determined by the characteristics of two regions one ei-ther side of a dividing line (see Fig. 3) in the digitized im-age. First, to ignore noise effects as much as possible, weconsider the average value of pixels in each region, ignor-ing pixels directly on the dividing line. The difference in thetwo averages gives us an idea of steepness between the tworegions. Second, to settle the issue of several directions pos-sibly having the same steepness between their respectiveregions, we also measure the symmetry of both regionsacross the line of the candidate gradient In Fig.3, it can beseen that choosing a direction with high reflective symme-try means choosing the tangent to the surface of an edge. Inother words, we claim that the direction of significant gra-dient is a measure of high steepness between regions, andhigh reflective symmetry across the line of gradient. Weexpress this using fuzzy rules, as expressed in Table 1Theexact method of fuzzy calculation is specified in Appendix A.The method of symmetry evaluation is defined precisely inSection 3.1.Using this method to select the gradient direction,the gradient magnitude is simply the difference in the aver-age values of pixels on either side of the dividing line.

    plane In directiondirection with highest of considerationdegree of gradienlmagnitude and symmetryis selected

    Fig 3. Evaluating gradient.TABLE 1DETERMININGRADIENT ITH FUZZY RULES

    radientsmallsmalllarge medium

    Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.

  • 8/14/2019 image filtering, edge detection, edge tracing using fuzzy reasoning

    3/11

    LAW ET AL.: IMAGE FILTERING, EDGE DETECTION, AND EDGE TRACING U$ING FUZZY REASONING 483

    2.2 Controllable Gaussian FilteringRegular Gaussian filtering can be expressed as the convolu-tion of the original image I with a Gaussian shaped kernel W

    P = I * W (1)where W has the (discrete) form

    oeffectively determines he breadth of W, and the value of Wis constant for a given radius from the center of the function.

    Controllable Gaussian filtering permits the size of thefilter, dictated by 0 and the shape of the filter, which werefer to as squashing (see Section 2.3.11, to be determineddynamically according to local data characteristics.2.3 Filter DimensionsControlling the value of o effectively determines the degreeof smoothing of the image. We wish to smooth the pixel inconsideration with pixels having similar values, i.e., in thesame region, but must avoid smoothing with pixels ofgreatly differing values which may belong to different re-gions. In other words, we wish to smooth away small dis-tortions caused by noise, but preserve dominant shape, i.e.edges, locally.

    Allowing o o fluctuate over a useful range (set between0.1 and 5.25), we fixed the size of our filter to 7 x 7 pixels.However, we must recognize that pixels dont always lie ineven approximately uniform regions, but are often situatedin regions of changing intensity, due to shape, lighting con-ditions, or other optical effects. Therefore, we loosen therestriction of smoothing with similarly valued pixels to arestriction of smoothing with pixels having similar dope.Consequently, we choose to make our filter directional toemphasize smoothing across the dominant slope and de-emphasize along the dominant gradient. We do this by de-forming the filter, or squashing, as explained in the nextsubsection.

    Our algorithm considers concentric square regionsaround the pixel in question, and measures the gradient forall opposing pairs of pixels on the perimeter square. Thisgradient measurement technique is illustrated in Fig. 3.2.3. Filter Shape SquashingWithin the selected region, we choose to shape the Gaus-sian smoothing function according to local data. If the datahas meaningful shape information in the direction of thegradient (i.e., edge or slope point), then it is preferable tosmooth only perpendicular to the gradient so as to preservethat information. Our Gaussian smoothing function shouldbe squashed in the direction of the gradient, so thatsmoothing occurs along the edge or slope, not across it. Ifthe data has meaningful shape information both in the di-rection of the gradient, and perpendicular to the gradient(i.e., corner or T-junction), then it is preferable to tightlylimit smoothing in both directions; the Gaussian functionshould be squashed in both in the direction of the gradientand perpendicular to the gradient. Rewriting W in polarcoordinates,

    1 ( 3 )Rotating W to the angle of the gradient, we can define anew coordinate axis system U and v,with W separated as

    where o, and o, control the squashing in the directionsalong and across the edge respectively. We control the twoos using fuzzy control based on local shape information.We determine the nature of the shape in the local area fromtwo parameters: gradient magnitude, and straightness.These two parameters are determined as follows.

    As mentioned above, the gradient magnitude is deter-mined by the difference in average values of pixels on ei-ther side of a dividing line.

    The straightness is determined by comparing pixelstranslated along the direction of the edge. Similar to thedetermining of symmetry above, we expect that a pixeltranslated in the direction of a straight edge will line upwith a pixel of similar value. Performing such comparisonsfor each of the pixels lying within the evaluation region andthen averaging the deviation from the expected values pro-duces a statistical measure of straightness.

    The reason for choosing these two parameters are as fol-lows. High gradient magnitude indicates the strong possibil-ity of an edge, where smoothing along the edge should bedone as much as possible, but smoothing across the edgeshould be limited to preserve this dominant shape. However,if the edge segment xs curved, sharply angled, or at a triplepoint, then smoothing along the edge will only smear mean-ingful edge information, and should also be limited. If thegradient magnitude is low, this indicates the region is flat,and smoothing should be in all directions as much as possi-ble. To increase the degree of smoothing in a particular di-rection, we simply increase the value of o in that direction,where the U direction is along the edge, and the v direction isacross the edge. The idea of controlling o,and o,accordingto the gradient magnitude and straightness are expressed asfuzzy rules in Table 2.The calcuation of the two os is deter-mined according to the procedure in Appendix A.

    TABLE 2FUZZY RULES OR BLURRINGNTENSITY4mall large largesmall high large largelarge small smalllar e small lar eIn Table 2, o, nd o, re relative values, with the final 0,

    and on eing set in (direct) proportion to the filter dimen-sion, the size of surrounding square area selected as ex-plained above.2.4 Experimental EvaluationWe stated that the objective of our filter was to smooth inaccordance with the particular information in an image. Toevaluate success in achieving these objectives, we created

    Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.

  • 8/14/2019 image filtering, edge detection, edge tracing using fuzzy reasoning

    4/11

    Image added errorper pixel SN RFig.5-2 10 0 15.5Fig. 4 10.0 15.5Fig 5-1 10.0 155Fig.5-3 10.0 15.5

    having an average value of 10.0 to each pixel (Fig. 4b), cor- (all ( h i ) (Cl) (dl)

    error after Gauss error after fuzzy Gaussper pixel SN R imp per pixel SN R imp. (dB)7 ( ~ = 0 5 ) 2.45 2.40 10.49.1 g=0 ) 0.58 0.61 84

    7.9 0= 0.5) I.40 278 8580 g=05) 1 40 2.64 91

    ues of 0 and evaluated the result (Fig. 4d) when compared (a2J ( C 2 ) (d2)

    Fig 4 Smoothing edges of different sizes (a) original image, (b) withadded noise, (c) smoothed by fuzzy Gauss, (d) smoothed by regularGauss (o= 5)Second, we created three test images with high curvature

    and triple points to evaluate the response of our filter(similar images were used by Nitzberg et al. [18] o evaluatethe same objective) Fig. 5shows the images for these ex-

    (a3) (b3) (c3)Fig. 5. Smoothing images with high curvature eages, (b ) with random added noise, (c ) fuzzy Gabest Gaussian smoothing

    The table shows that om algorithm ising noise consistently better than Gaussioptimized value of 0 Furthermore, as it caFig. 5, our filter clearly preserves sharpnessners and triple points, while providing smoothing else-where.version of the well-known Lena image shown in Fig. 6Since the image contains inherent noise, no comparison canbe made to an idealized image. However,interesting regions of the image to see theter Fig. 6a shows the original image, andthree-dimensional close-up view of a 50 x 50white-bordered square in Fig. 6a) Figs. 6c andsame after fuzzy Gaussian filtering. Note that the triplepoint is left largely intact while flat regions are well

    Lastly, we applied our filter to a real i

    and the triple point is largely obscured.

    Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.

  • 8/14/2019 image filtering, edge detection, edge tracing using fuzzy reasoning

    5/11

    LAW ET AL.: IMAGE FILTERING, EDGE DETECTION, AND EDGE TRACING USING FUZZY REASONING 485

    gradient direction

    '\\\,\yl -\ niformityevaluationregionsFig. 7. Corners and triple points do not satisfy a refined edge definition

    Fig. 6. Filtering applied to Lena image (a) original image, (b) partial 3Dview, (c) fuzzy filtered, (d) partial 3D view, (e) Gaussian filtered, IS= 0.4,(f) partial 3D view, (9) Gaussian filtered, IS= O, (h) partial 3D view.

    3 DETECTION3.1 Edges, Co rners, TriplesThe edge detection problem necessitates an adequate char-acterization of an edge. Intuitively an edge corresponds tosignificant intensity change in an image. This leads to at-tempts to detect edges by locating local gradient maxima.Unfortunately, because of various image phenomena, suchas noise or distortion from various sources, this is a poordefinition for meaningful edge detection. To effectivelycharacterize edges, we require a more effective definitionwhich identifies the various attributes of an edge.

    A more refined definition for an edge would appear tobe a point of high gradient between two uniformly flat re-gions. Such a definition excludes many undesirable would-be edge-points (such as noise), but may also exclude severalpoints which are important in edge structures. Namely,such points occur as sharp corners and triple points. Inother words, corners and triple points may be points ofhigh gradient, but may not satisfy the condition of uniformflatness on either side of the edge point, as shown in Fig. 7(continuous case shown).

    Consequently, it is useful to detect corners and triplepoints separately from edge points which occur along rela-tively straight segments. Yet, at such an early stage of proc-essing, we cannot definitely say whether a point is an edge,a corner, or a triple point. Therefore, we chose to assignfuzzy membership values to each pixel for each category.This allows us to delay confident identification until a later

    processing stage.To identify the degree of membership in the fuzzy sets

    edge, coyner, and triple, we examine several local shape pa-rameters. We have found that gradient, symmetry, andstraightness are useful parameters for this purpose. Anideal edge point along a straight segment will have highgradient, high reflective symmetry, and a high level ofstraightness in a local neighborhood of pixels. An ideal cor-ner point will have high gradient, high reflective symmetry,but a low level of straightness in a local neighborhood ofpixels. An ideal triple point will have high gradient, lowsymmetry, and a low level of straightness in a local neigh-borhood of pixels. These ideas are summarized in Table 4.

    TABLE 4EDGEFUZZY EMBERSHIPULESgrad- sym- straight-ient metry nesslow low lowlow low highlow high lowlow high highhigh low lowhigh low highhigh high lowhigh high high

    highhigh

    Gradient (magnitude) was determined as in the previoussection, i.e., as a difference in averages of neighboring re-gions, with the gradient direction selected for the highestdegree of edgeness, as defined in Section 2.1.

    Symmetryy was determined by reflecting pixels across aline in the direction of the gradient passing through thecenter pixel, and then comparing pixel values (see Fig. 8).Comparisons are made for all possible pixel pairs which fallin the region of evaluation, which is an n x n square. Thesum total of differences for all pairs of compared values isthen used as a measure of symmetry, y. To make y a posi-tive value which increases with symmetry, we subtract itfrom the largest possible value.

    nl 2 n12 (5)where p l l y is the value of the reflected pixel across the linein the direction of the gradient.

    Straightness t is defined similarily to symmetry, exceptthat pixels are translated rather than reflected (see Fig. 9).Pixels are translated a random distance in the edge direc-tion, within a limited range so as to fall within the region ofevaluation. Again, comparisons are made for all possible

    Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.

  • 8/14/2019 image filtering, edge detection, edge tracing using fuzzy reasoning

    6/11

    486 IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VO L 18, NO 5, MA Y 1996

    pixel pairs which fall in the region of evaluation. The sumtotal of differences for all pairs of compared values is thenused as a measure of straightness, t . To make t a positivevalue which increases with symmetry, we subtract it fromthe largest possible value.

    (6)where p l I , is the value of the pixel translated in the directionof the edge.

    pixel

  • 8/14/2019 image filtering, edge detection, edge tracing using fuzzy reasoning

    7/11

    LAW ET AL.: IMAGE FILTERING, EDGE DETECTION, AND EDGE TRACING USING FUZZY REASONING 487

    ness plane is also less pronounced than the tripleness planesimply because corners tend to occur less frequently thantriple points in real images.

    4 TRACINGND JOINSThe algorithm of the previous sections produces fourplanes of information, one for each of edgeness, cornerness,tripleness, and direction. In this section, we present an al-gorithm for tracing edge segments and for assembling edgesegments into larger structures based on the information inthese four planes.4.1 Tracing Edge SkeletonTo trace the basic outline of edge segments, we chose astandard text book algorithm, as outlined in 1261. Briefly,this algorithm examines the edgeness at each pixel, and theedgeness of two neighboring pixels on either side of the linein the direction of edge at that point. If the edgeness of thecenter pixel exceeds the edgeness of the two neigboringpixels, we mark the pixel as a crisp edge point. Neigh-bouring pixels are determined by the direction of the edge,as determined in the previous section. In a 3 x 3 block ofpixels, there are only four possible pairs of (opposing)neigbouring pixels, which divide the unit circle into 45"sections, as shown in Fig. 11.

    I / I 1'. I

    Fig. 1 1 . Neighbor pixels assigned o 45' segments.This algorithm only compares relative edgeness, which

    we use as an initial guide for finding edge traces. Further-more, we remove very weak edge points by thresholding,in order to simplify the tracing process.

    After this detection process, we also remove any spuri-ous patterns which can affect the tracing process, namelyany T-, Y-, or cross-shaped patterns. Besides simplifying hetracing process, this cleaning of the edges also removes anytriple points, which we choose to detect explicitly, and usefor assembly of edge segments, as explained in the nextsection.4.2 Joining Edge SegmentsFinally, we wish to assemble the traced edges into largerstructures. Corners and triple points provide natural cuesfor such joinery, although we also consider joins which donot occur at corners and triple points. Altogether, we con-sider four possible kinds of joins,

    between two aligned segments(two end points)between two segments at a corner (two end points)between three segments at a triple point (three endpoints)

    between two segments at a triple point (one endpoint, one mid-point)

    which are illustrated in Fig. 12.

    \ A'/'

    . triplepoint point/(C) (4Fig. 12. Different kinds of joins: (a) tw o aligned edges, (b) two edges ata corner, (c) three edges at a triple point, (d) two edges at a triple point(mid-point oin).

    Of course, we cannot expect the ideal situation of perfectalignment between edge segments, corners, and triplepoints. Once again, fuzzy logic is well-suited for evaluatingsuch approximate situations. As before, we outline thequalifications for a good join.

    A simple edge-to-edge join (Fig. 12a) requires edge seg-ments to be well aligned, to have end points relatively closetogether, and to have pixels of at least medium edgeness inbetween. A corner join of two edges (Fig. 12b) requires edgesegments to intersect close to a strong corner point, and tohave end points relatively close together. A 3-edge triple join(Fig. 12c) requires three edge segments to intersect close to-gether to a strong triple point, and to have end points rela-tively close together. A 2-edge triple join (Fig. 12d) requiresthe end point of one edge segment to be relatively close toany point on another edge segment, and to have a strongtriple point between the end point and the edge segment.Once again, we express this fuzzy reasoning in tabular form(Tables5 to 8). In Tables 5to 8, alignment refers to the differ-ence in angle between two end points, and proximity refersto the Euclidean distance between two end points.

    TABLE 5FUZZY RULES OR ALIGNED-EDGEOINI alignment proximity interim I join-edgeness I nesslow I lowhighlow mediumhighhigh mediumhigh medium

    TABLE 6FUZZY RU LES OR CPRNER JOINintersectionlow high lowhigh low low

    Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.

  • 8/14/2019 image filtering, edge detection, edge tracing using fuzzy reasoning

    8/11

    IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL 18 , NO 5, MAY 1996

    low highhigh lowhigh high

    TABLE 7FUZZY RULES OR %EDGE TRIPLEJOIN

    I tripleness at proxlmlty I ioinnesslowIOWhigh

    intersectionlow low I low

    low highhigh lowhigh highlowlowhigh

    intersectionlow low I low

    We then implemented this fuzzy reasoning process in pro-gram form. To simplify the joining process, we only con-sider endpoints which were inside a common 10 x 10square. In the case of 3-edge triple joins, such joins can bedetected as a combination of any two of the 2-point joins(straight, corner, or 2-point triple join), and thus do not re-quire a separate implementation.

    Again using the Lena image as an example, results fromapplying our algorithm are shown in Fig. 13. Fig. 13a showsthe results of the tracing algorithm, with simple threshold-ing of edgepoints with very weak edgeness. Fig. 13b showsthe same image with short edges (less than three pixels)removed. Fig. 13c shows the same image with straight, cor-ner, and triple joins completed. Fig. 13d shows only segmentswhich have been connected by at least one kind of join.

    Fig 13 Final results of edge detector (a) basic edge skeleton, (b) withshort lines (< 3 pixels) removed, (c) with joins completed, (d) with un-connected lines removed

    In Fig. 14, the results of appl

    shown, where the parameter o is set to 1.5. in FiCannys edge detector is appl(specifymg the fraction of pixelborder one pixel in width has been adde

    (a) (b)

    Fig. 14. Other edge detection methods (a) Laplacian ofCannys edge detector.In practice, triple joins appear the most common,

    lowed by straight joins, and corner joins. For example,Lena image in Fig. 13c contains 74 triple joins, 37 strajoins, nd 19 corner joins. Since triple joins can appear as aCombination of corner joins and stra ight joins, however,these numbers can vary depending on the order in whichthey are detected.

    We noticed that points at the end of edge segments oftencontain the weakest edge information of the entire edge

    spurious joins can appefunction to refine the enspecifying that

    1) the edge-direction a

    If an end point did not satmoved. The emoval proceof four pixels, until a poithe end of each segmentjoining process.

    Figs. 15,16, 17, and 18 shthree-stage algorithm (filting/joins) to some other testage, Figs. 16, 17, and 18 arewhile Fig. 19 is 512 by 512 pilevel representation

    Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.

  • 8/14/2019 image filtering, edge detection, edge tracing using fuzzy reasoning

    9/11

    LAWETAL.: IMAGE FILTERING, EDGE DETECTION, AND EDGE TRACING USING FUZZY REASONING ~-489

    Fig. 15. (a) original image, (b ) after filtering, detection, racing, and joins.

    (a) (b)

    Fig. 16. (a) original mage, (b) after filtering, detection, racing, and joins.

    (a) (b)

    Fig. 17.(a) original mage, (b)after filtering, detection, tracing, and joins.

    Fig. 18. (a) original mage, (b)after filtering, detection, tracing, and joins.

    In many cases, close parallel edges appear due to shad-ows or subtle object shape, as seen in the thickness of the

    brim of the hat in the Lena picture. During the tuning of thejoining program, we noticed a tendency for parallel edgesto cross over and fuse to their neighboring edge. Thesecases are especially difficult to resolve since they are weak,yet closely located distinct sets of information. The weak-ness of the data produces gaps in the tracing of such edges,and makes joining a sensitive process.

    This dilemma suggests that a specialized detector fornearby parallel edges would be useful. Furthermore, ourjoining process results in some joins which are not intuitive,as can be seen in the eyes and hair of the Lena image. Thedecision of whether to join or not to join is linked to thebroader object recognition problem, and the problem ofrecognizing unfamiliar patterns in images.

    5 RELATED ESEARCHFuzzily controlled filters are related to the steerable filtersproposed by Freeman [5], [61. Other fuzzy research appliedto image processing include Pan and Kink 1191 who haveused the concept of fuzzy sets in order to enhance the con-trast between successive regions in x-ray images. In re-search by Bezdek [ l l , fuzzy versions of c-means clusteringhave been developed, and [29] shows an application to as-tronomical images, while Jung et al. [ l l ] show an applica-tion for classifying images of tire treads. Bezdek 121 alsodescribes fuzzy learning vector quantization clustering algo-rithms with an application to image segmentation. Kim et al.[12] apply fuzzy logic towards edge relaxation in the prob-lem of connecting detected edge segments. A nonfuzzy tech-nique for dealing with imperfect and incomplete data in im-ages have been developed by Rao and Nevatia [23]. Since ourresearch also uses simple textural statistical information(treated in a fuzzy way), it can be related to the various sta-tistical work summarized by Reed and Hans du Buf [24].

    Regarding edge detection in general, a large number ofpapers have been published. A discussion of edge detectionmethods can be found in Heijden [9], which includes refer-ences to several prominent and recent papers in the field.A fuzzy edge detection technique was also introducedby Tao and Thompson [27]. In this technique, sixteen possi-ble edge structures in a 3 x 3 area are considered, and fuzzyedge membership is determined by fuzzy if-then rules. Af-ter redundant edge pixels are discarded, remaining edgepixels are thresholded based on a noise factor. Filtering andenhancement possibilities are not considered.

    A fuzzy filtering and edge detection technique was in-troduced by Tyan and Wang [28]. Tyan and Wang usefuzzy rules for contrast enhancement, requiring arbitrarydefinitions of dark and bright pixels, which the authorsadmit require adjustment by a human operator. Images arefurther enhanced by an interesting fuzzy low-pass filter.The edge detection scheme also relies on arbritary dark andbright definitions (again requiring user adjustment), andoperates on a 2 x 2 area. A single test image is presented.

    Neither of the techniques in [271 and [28] acknowledgethe possibility of various edge shapes such as corners andtriple points, leaving gray-level differences among immedi-ate neighbors as the only determining factor in edge extrac-tion. Furthermore, in both techniques edge direction is ig-

    Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.

  • 8/14/2019 image filtering, edge detection, edge tracing using fuzzy reasoning

    10/11

    490 I TRANSACTIONS ON PA ITE RN ANALYSIS AND MACHINE INTELLIGENCE, VO L 18, N O 5 MAY 1996

    nored completely Also, both techniques operate on verysmall regions, ignoring the possibility of broader edges inthe process The relation between neighboring edge pointsand connecting edge segments are also not considered.

    This research has unique merit for the following reasons.Our techniques acknowledge the existence of imperfectedges and of ambiguous edges, and then elaborates a lin-guistic framework for characterizing these ambiguihes andimperfections These characteristics are then approximatedfrom local statistical parameters, and fuzzy rules based onheuristics are introduced to evaluate these parameters. Thisprocedure is performed for image filtering, edge detection,and edge tracing Our research is the first to attack the edgedetection problem with a fuzzy reasoning approach, and isthe only research to apply fuzzy reasoning to multistage(1 e , filtering, detection, and tracing) edge detection

    6 DISCUSSION/CONCLUSIONSIn this research, fuzzy algorithms have been developed forthe purpose of filtering images, detecting edge points, andassembling edge structures These algorithms have beenimplemented and tested on a variety of real images withpositive results. Comparisons were made with standardimage processing techniques.

    Current trends in image analysis show a shift towardstop-down image processing techniques. (See for example,141.) While our algorithm begins with bottom-level detail,we think of it as a bottom-middle algorithm, since it takesinto account intermediate-level structural characteristics.Furthermore, we feel that our algorithm appropriately in-terprets low level results at an intermediate level, withoutpremature assignment. Based on experience with commonedge structures, our algorithm begins to assemble edge in-formation in a meaningful way

    APPENDIXIn this paper, the calculation of a fuzzy variable is as fol-lows. A set of fuzzy rules are expressed as in Table A l .

    TABLE AIE XAM PL EUZZY ULESresult Csmallsmalllarge slow

    First the fuzzy membership values, k , for A and B are de-termined as shown graphically in Fig. Al .

    slow

    " P~ P., O K...._....................2 pa2 ...... -.-.. ..............x4 003 0.0 A' A

    small and large respectivB', we obtain fuzzy memfuzzy sets low and high respecti

    The result C is determined b

    fuzzy membership

    method of simplified fuzzy reasoninto this example givesU,, =

    which is a simultaneous versiproducing a final value for tconstants- (determined empirically) for Slow C and F a s t Crespectively, and each term in the numerator correspondsto a rule in Table Al.APPENDIXCalculation of signal-to-noise ratiSNR n this research was perforis the original image, and g(n,then the normalized mean squa

    After the image has been filtered, the processed imagep(n,, E,) has NMSE of

    The SNR mprovement due to processing is given bySNR mprovement = 10 log,,

    which simplifies toSNR mprovement = 10 og,,,

    To calculate the SNR lone, if f(n,, n2) s the original signal,and v(n,, ,) is the added noise signal

    Fig A I . Determiningfuzzy membership values

    Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.

  • 8/14/2019 image filtering, edge detection, edge tracing using fuzzy reasoning

    11/11

    LAW ET AL.: IMAGE FILTERING, EDGE DETECTION, AND EDGE TRACING USING FUZZY REASONING 491

    ACKNOWLEDGMENT [25] R. Rodieck, Quantitative Analysis of Cat Retinal Ganglion Cell Re-sponse to Visual Stimuli, Vision Research, vol. 5, no. 11/12, pp. 583-- _601,1965.[261 R.J. Schalkoff, Digital Image Processing and Computer Vision-AnIntroduction to Theory and Implementations, Chap. 6, pp. 267-270.This research was by the Japanese Ministry OfEducation. The authors wish to thank the developers of the~ - -Vista [22]program library which was used for this research. New York: John Wiley & Sons, 1989.[27] C. Tao, W. Thompson, and J. Taur, A Fuzzy If-Then Approach to

    Edge Detection, Puoc. Second IEEE lntl Conf. Fuzzy Systems, vol.11 pp. 1,356-1,360, San Francisco, 1993.1281 C. Tyan and P. Wang, Image Processing-Enhancement, Filter-REFERENCES

    J.C. Bezdek, Pattern Recognition with Fu zzy Objective Function Algo -rithms. Plenum, 1981.J.C. Bezdek, Prototype Generating Clustering Algorithms, Proc.Fifth Intl Fuzzy Systems World Congress, pp. XXXVI-XLIII, Seoul,1993.J.F. Canny, Finding Edges and Lines in Images, Technical Re-port AI-TR 720, Massachusetts Artificial Intelligence Laboratory,June, 1983.P. Cavanaugh, Whats Up in Top-Down Processing? Representa-tions of Vision: Trends and Tacit Assumptions in V ision Research, A.Gorea. ed., pp. 295-304,1991,W., Freeman, Steerable Filters and Analysis of Image Structure,PhD thesis, MIT, Cambridge, Mass., 1992.W . Freeman and T. Adelson, Steerable Filters, Proc. Third IntlConf. Computer Vision , Osaka, 1990.R. Graham, Snow Removal: A Noise-Stripping Process for TVSignals, IRE Trans. Information Theory, vol. 8, pp. 129-144,1962,W. Grimson, A Computer Implementation of a Theory of Hu-man Stereo Vision, AI Memo 565, Artificial Intelligence Labora-tory, MIT, Cambridge, Mass., 1980.F. van der Heijden, Edge and Line Feature Extraction Based onCovariance Models, IEEE Trans. Pattern Analysis and Machine ln-telligence, vol. 17, no. 1,pp. 69-77, Jan. 1995.G. Kanisza, Organization in Vision. New York: Praeger, 1979.S . Jung, S. Bae, Y. Kang, G. Park, and G. Kim, Tire Tread PatternRecognition Using Hierarchical Fuzzy Pattern Matching AD-proarh, Proc. Fiftvh Intl Fuzzy Systems World Congress, P 1y7-130, Seoul, 1993.J.S.Kim,H.S. Cho, and S.K. Kim, An Edge Relaxation MethodBased on Fuzzy Logic and Neural Network Theory, Proc. FifthIntl Fuzzy Systems World Congress, pp. 143-146, Seoul, 1993.T. Law, H. Itoh, H. Seki, Filtering Images for Edge DetectionUsing Fuzzy Reasoning, Proc. Third Intl Conf. Automation, Robot-ics, and Computer Vision, Singapore, 1994.M. Levine, Vision in Man and Machine, Chap. 6, pp. 151-210. NewYork: McGraw-Hill, 1985.J.S. Lim, Two-Dimensional Signal and Image Processing, pp. 529-530.Prentice Hall, 1990.E.H. Mamdani, Advances in the Linguistic Synthesis of FuzzyController, lntl 1.Man-Machine Studies, vol. 8, no. 6 , pp. 669-679,1976.D. Marr and E. Hildreth, Theory of Edge Detection, Proc. RoyalSociety, (London), ser. B, vol. 207, pp. 187-217,1980.M. Nitzberg, D. Mumford, and T. Shiota, Filtering Segmentationand Depth, Lecture Notes in Computer Science, G. Goos, J. Hart-mannis, eds., Chaps. 1-3, pp. 1-49. Berlin: Springer-Verlag, 1991.S.K. Pal, and R.A. King, On Edge Detection of X-Ray ImagesUsing Fuzzy Sets, IEEE Tran s. Pattern Ana lysis and Machine Intel-ligence, vol. 5, no. 1, pp. 69-77,1983.S.K. Pal, A Note on the Quantitative Measurement of ImageEnhancement Through Fuzziness, IEEE T rans. Pattern Analysisand Machine Intelligence, vol. 4, no. 2, pp . 204-208,1982,P. Perona and J. Malik, Scale-Space and Edge Detection UsingAnisotropic Diffusion, I E E E Trans. Pattern Analysis and MachineIntelligence, vol. 12, no. 7, pp. 629-639, July, 1990.A.R. Pope and D.G. Lowe, Vista: A Software Environment forComputer Vision Research, Proc. IEEE CS Conf. Computer Visionand Pattern Recognition, 1994.K. Rao and R. Nevatia, Describing and Segmenting Scenes fromImperfect and Incomplete Data, CVGIP: Image Understanding,vol. 57, no. 1,pp. 1-23, 1993.T.R. Reed and J.M. Han s du Buf, A Review of Recent TextureSegmentation and Feature Extraction Techniques, CVGIP ImapeUnderstanding,vol. 7, no. 3, pp. 359-372, May, 1993.

    ing and Edge Detection Using the Fuzzy-Logic Approach, ProcSecond Intl Conf F uzz y Systems, vu1 I, pp 600-605, San Francisco,1993[291 X L Xie and G. Bmi, A Validity Measure for Fuzzy Clustering,I E E E Tran s Pattern Analys is and Mach ine Intelligence, vol. 13,no. 8,1301 L.A. Zadeh, The Concept of a Linguistic Variable and Its Appli-cation to Approximate Reasoning-I, 11,111, Information Science, 8,

    9,1975

    pp 841-847,Aug 1991

    Todd W. Law (S83) received the BEng(Honours) degree in electrical engineering fromMcGill University in Montreal, Canada, in 1987.From 1987 to 1990, he worked at Northern1-elecom Limited. In 1992, he received the MScdegree from the Nagoya Institute of Technology,and is currently a doctoral candidate at thatinstitution Mr. Law is a member of the JapaneseSociety for Information Processing.

    Hidenori ltoh received a BSc degree from Fu-kui University in 1969, and an MSEE degree in1971 and a PhD degree in 1974 from NagoyaIlniversity. From 1974 to 1985, he worked atNippon Telephone and Telegraph laboratories,developing operating systems. From 1985 to1989, he worked at ICOT, the Fifth GenerationComputer Project, developing knowledge basesystems. Since 1989, he has been a professorat the Nagoya Institute of Technology, and iscurrently head of the Department of Intelligenceand Computer Science. Dr. ltoh is a member of the Japanese Societyfor Information Processing

    Hirohisa Seki received the BEng, MEng, andDrEng degrees from the University of Tokyo in1979, 1981, and 1991, respectively. He joinedthe Central Research Laboratory of MitsubishiElectric Corporation n 1981 and engaged in theresearch on artificial intelligence. From 1985 to. 989, he was with the Institute for New Genera-tion Computer Technology (ICOT). Since 1992,he has been an associate professor in the De-partment of Intelligence and Computer Scienceat Nagoya Institute of Technology. His currentresearch interests include logic programming, deductive databasesand automated deduction. He is a member of ACM, IEEE ComputerSociety, IPSJ, and JSAI.