MELJUN CORTES's - THESES WRITING on "Graph Theory for Image Analysis, An Approach Based on the Shortest Spanning Tree"

Embed Size (px)

Citation preview

  • 8/9/2019 MELJUN CORTES's - THESES WRITING on "Graph Theory for Image Analysis, An Approach Based on the Shortest Spa

    1/7

    Graph theory for image analysis: anapproach based on the shortest spanningtreeO.J. Mo rris, B.A., M . de J. Lee, B.Sc.(Eng.), A .C.G .I., and A.G .Constantinides, B.Sc.(Eng.), Ph.D., C.Eng., M.I.E.E.

    Indexing terms: Image processing, Mathematical techniques, Graph theory and topologyAbstract: The paper describes methods of image segmentation and edge detection based on graph-theoreticrepresentations of images. The image is mapped onto a weighted graph and a spanning tree of this graph is usedto describe regions or edges in the image. Edge detection is shown to be a dual problem to segmentation. Anumber of methods are developed, each providing a different segmentation or edge detection technique. Thesimplest of these uses the shortest spanning tree (SST), a notion that forms the basis of the other improvedmethods. These further methods make use of global pictorial information, removing many of the problems ofthe SST segmentation in its simple form and of other pixel linking algorithms. An important feature in all of theproposed methods is that regions may be described in a hierarchical way.

    1 IntroductionA common and fundamental problem in image analysisand understanding is the partitioning of a picture intoregions that are in some sense homogeneous, and differentfrom neighbouring regions. A number of properties of theimage, such as shade, hue, texture or contrast, could beused to define the measure of homogeneity. In this paperpixel intensity will be used for the sake of simplicity,although other more complex pictorial properties are justas valid.There are essentially two ways of describing a partitionof an image. Regions can either be defined by the union oftheir component pixels, forming the basis of segmentationmethods, or, alternatively, they can be described by theboundaries around them, resulting in edge detection tech-niques. To date many different methods of image segmen-tation and edge detection have been propo sed [1 , 2]. Thispaper unifies segmentation and edge detection by usinggraph theory to show that they are dual problems. Seg-mentation is considered initially.A problem with any method of segmentation is to definethe level of detail which is of interest. Sometimes fine detailis important, while in other cases larger-scale features aremore significant. This variation in the 'scale of interest'means that most methods developed and currently used todate that are suitable for one situation may not be so forano ther . Tn ord er tha t segm entation techniqu es be effectivein all cases, they must be able to describe regions in a hier-archical order of importance. For example, if two regionsare required then the image must be partitioned in such amanner that the two most significant regions are found. Ifa third region is desired, a further partition must be madeso that the next most significant region is obtained. Conse-quently, if only a few regions are generated, global featuresof the image are represented and, as more regions are gen-erated, more detail in the image signal is uncovered.In solving this problem only two aspects of the imageare available for monochrome images: the intensity of eachpixel (or some other pixel-related pictorial property) andthe spatial relationship between one pixel, or group ofpixels, and another. Many algorithms that use globalinformation in the image for segmentation, such as histo-Paper 4390F (E4), first received 5th June and in revised form 18th November 1985The authors are with the Department of Electrical Engineering, Imperial College ofScience & Technology, Exhibition R oad, London SW7 2BT, United Kingdom146

    gram clustering methods, ignore the all-important spatialrelationship. In this paper graph theory will be used toanalyse images using both of these aspects.Graph theory has been used previously by someauthors for image analysis. Zahn [3] has shown that hisminimum spanning tree, a concept equivalent to the short-est spanning tree (SST), can be used for cluster analysis ingraphs to produce connected groups of vertices. Thespatial Euclidean distance between these vertices was usedas the weight function to be minimised by the tree.However, the problem of mapping images onto graphs wasnot addressed. Suk and Song [4] have used SSTs, basedon Zahn's approach, to design boundary-following algo-rithms for joining edge points found by normal edge detec-tors. Indeed, the SST was not used for edge detection itself,but as a method of connecting the isolated pixels pre-viously found by a Sobel operator. Narendra and Gold-berg [5] have used directed graphs to define regions inedge-detected images. Again, the SST is not used, but thema ppin g of images on to grap hs (albeit a different ma pp ingfrom those used in this paper) was investigated. In aninteresting paper, Cross and Jain [6] have used SSTs ofeight-way connected graphs of images in order to find ameasure of image homogeneity. However, no attempt wasmade at segmentation or edge detection. In a contributionoften quoted in the literature, Horowitz and Pavlidis [7]used quadtrees in a graph-theoretic framework to obtainsegmentations. However, the mapping they have adoptedand the quadtrees that result from their approach are fun-damentally different from work contained in this paper.In this paper spanning trees are used to partitionimages, new hierarchical segmentation techniques areintroduced that describe the image for all 'scales of inter-est', and it is shown that segmentation and edge detectionare dual problems, thereby introducing a new class of edgedetection methods.Section 2 introduces some basic graph-theoreticmethods. In Section 3 it is shown that the SST exhibitsuseful properties for describing images, but also has someshortcomings in its most simple form. In Section 4methods are developed for the removal of these short-comings, and which produce hierarchical descriptions ofimages by incorporating global pictorial informationabout the image. Section 5 adapts the segmentationmethods for edge detection. Finally, in Section 6 someapplications of these techniques are discussed.

    IEE PRO CEEDINGS, Vol. 133, Pt. F, No. 2, APRIL 1986

    Authorized licensed use limited to: IET STEVENAGE AND LONDON OFFICES. Downloaded on June 11, 2009 at 05:03 from IEEE Xplore. Restrictions apply.

  • 8/9/2019 MELJUN CORTES's - THESES WRITING on "Graph Theory for Image Analysis, An Approach Based on the Shortest Spa

    2/7

    2 Graph theoryThis Section introduces the terminology of graph theoryand all the relevant methods needed to understand the seg-mentation and edge detection techniques presented in thispaper.2.1 DefinitionsGraph theory is the study of graphs and their applications.A graph G = (V, E) is composed of a set of 'vertices' V {connected to each other by 'links' E (j, where J^ and Vj ar ethe terminal vertices that the link connects. In a weightedgraph the vertices and links have weights associated withthem, y, and ei% j, respectively. Each vertex need not neces-sarily be linked to every other, but if they are then thegraph is complete. A partial graph has the same number ofvertices but only a subset of the links of the original graph.A subgraph has only a subset of the vertices of the originalgraph, but contains all the links whose terminal verticesare within this subset.A 'chain' is a list of successive vertices in which eachvertex is connected to the next by a link in the graph. A'cycle' is a chain whose end links meet at the same vertex.A 'tree' is a connected set of chains such that there are nocycles. A 'spanning tree' is a tree which is also a partialgraph. A 'shortest spanning tree' of a weighted graph is aspanning tree such that the sum of its link weights, orsome other monotonic function of its link weights, is aminimum for any possible spanning tree. A 'forest' is a setof trees, and a 'spanning forest' is a forest which is also apartial graph.

    A graph is planar if it can be drawn on a plane with nolinks crossing. The dual of a.planar graph is obtained byplacing a vertex in each space between the links (includingthe space outside the graph), and joining them with newlinks such that each old link is crossed by a new one.Fig. 1 shows an ex ample of a grap h and one of its two

    possible shortest spanning trees. A fuller explanation ofthese terms can be found in Reference 8.2.2 Mapping images onto graphsIn order to analyse images using graph theory, the originalimage must be mapped onto a graph ready for processing.There are a number of possible mappings, but the mostobvious one is to map each pixel in the image onto avertex in the graph. The vertex weights can be made equalto the corresponding pixel intensities, or a more complexweight function can be used. Thus, if the image intensity ata point (x, y) is 7 ^ , then the correspo nding vertex weightis

    V; = (1)where x, y is mapped onto i in a one-to-one mapping.If the link weights are defined as the absolute value ofthe difference between the vertex weights that they join , i.e.

    eu = \vi- Vj | (2 )then the link weight is a measure of similarity between thetwo vertices, and hence between the corresponding twopixels.

    A vertex could be linked to any other, but a useful sim-plification is only to link vertices to their nearest neigh-bours. Either four or eight neighbours may be considered.Fig. 2 shows the mapping of an image onto an eight-way-connected graph.

    Fig. 1 Example of a graph and its SSTa Example graphb SST of graph

    pixe l vertex linkFig. 2 Mapping an image onto an eight-way-connected graph2.3 Obtaining shortest spanning treesA formal de scrip tion of the SST is given in R eference 9. Amore informal description is given here. For any tree in aforest, if an link with the lowest weight which connectsthat tree to another is added, then the link will be in theSST. This is true even if there are links in the forest not inthe SST [8, 9]. If the forest forms part of an SST then thecomplete SST can be found by successively adding thesenew links to it. The SST, therefore, tends to include linkswith low weights. More costly links are only includedwhen there is no alternative.Algorithms for finding an SST of a graph are wellknown [8-12] . As the graphs to be considered in thispaper are very sparse, there being only a few links pervertex, Kruskal 's algorithm is used [12]. This algorithmhas an execution time proportional to O( log (V)), whereE is the number of links and V is the number of vertices inthe graph. Faster algorithms have been proposed [9]which would be useful if speed were a limiting factor.

    Kruskal 's algorithm works as follows:(1) Initially the forest contains no links.(2) R epeat:(3) Find the next least-weighted link.(4) If the link would not form a cycle with the forest:1EE PROCEED INGS, Vol. 133, Pt. F, No. 2, APRIL 1986 147

    Authorized licensed use limited to: IET STEVENAGE AND LONDON OFFICES. Downloaded on June 11, 2009 at 05:03 from IEEE Xplore. Restrictions apply.

  • 8/9/2019 MELJUN CORTES's - THESES WRITING on "Graph Theory for Image Analysis, An Approach Based on the Shortest Spa

    3/7

    (5) Add the link to the forest.(6) Else:(7) Disca rd the link.(8) Until the forest becomes a tree spanning the graph.2.4 Forming segmentations from spanning treesA spanning tree of a graph can be used to form a partitionby cutting its links. This is because the forest so producedconsists of a set of disjoint trees which are used to defineeach partition. Vertices in each tree of the forest describethe pixels in that partition. The forest still spans the graph,so that no vertices are left out of the segmentation. If T isa tree in a forest, then it defines a partition

    to illustrate many properties of this method. The processworks well for large numbers of regions. Fig. 36 shows an

    1, if V { e T0, otherwise (3)

    Once a partition of the graph has been obtained, th ereverse problem must be considered; that is the mappingof the graph back onto an image.A method of doing this to generate a segmentationimage S v y , such that each pixel in any one region isassigned a constant intensity value which is the mean of allthe pixels within that region. Thus, let p(T) be the partitionweight, such that

    (4)

    (5)If Mx y is the mapping from (x, y) to T, then

    Sx,y =

    SST segm entationNow that all the necessary principles have been intro-duced, we proceed to the explanation of the SST segmen-tation, give an example and discuss its properties.3.1 Principles of SST segmentationThe object of the segmentation method is to grouptogether pixels that are similar in some sense, and toseparate pixels that are dissimilar according to the samemeasure. A simple measure of similarity between pixelvalues is to take the absolute value of the difference used ineqn. 2. In the graph the most similar vertices are linked bylocating the lowest link weights. This is done for the wholegraph by finding an SST. As the link weight function is tobe minimised, any monotonically increasing distance func-tion can be used, but the function of eqn. 2 is a simple oneto implement. Once the SS T has been found it ca n be usedto form a segmentation by cutting it at its highest linkweights, so forming partitions that differ from their neigh-bours by the maximum amount. This guarantees that eachpixel has neighbours in its own region which have valuescloser to its own than any neighbouring pixel in a differentregion. If a further region is required by making a furthercu t in the SST, then the next most contrasting region isfound. This means that the segmentation is hierarchical,providing regions in order of maximum contrast .A simple segmentation algorithm can now be envisagedto form N regions:(1) Map the image onto a weighted graph.(2) Find an SS T of the graph.(3) Cut the SST at th e N - 1 most costly links.

    (4) Map the forest onto a segmentation image.3.2 Example of SST segmentationFig. 3 shows the result of the SST segmentation on a 1282pixel image with 256 grey levels. The example was chosen

    c dFig. 3 SS T segmentation examplea Original image c Region map of Fig. 3bt ixcgiun inup ui rig. jvd 825-region SST segmentationa Original imageb 826-region SST segmentation826-region segmentation image. Many of the regions arenot immediately apparent, because the intensities of neigh-bouring regions are very similar. Fig. 3c is a region map ofthe segmentation image, such that each region is contrast-ed from its neighbours, revealing many very small regions.When the number of regions is small the SST segmen-tation does not fare as well, becau se no global informationabout th e image is used. Indeed, neighbouring regionswhich are apparently different may have adjacent pixelswhich are very similar, and so will be merged. This is illus-trated by Figs. 3b an d d, which differ by only one region. Itca n be seen that the two regions of the face and hair havemerged into one.3.3 Properties of SST segmentationFrom the example, various important features of the SSTsegmentation are apparent:(a) Spatial information about neighbouring pixels isused, unlike most histogram segmentation methods [2,13], which group pixels together if they share a commonfeature, without requiring these pixels to be connected.(b) Region boundaries are defined very accurately.Jagged edges are not produced as they are, for example, bysplit-merge algorithms [2, 7].(c) The regions produced are closed. There is no need touse edge-following procedures to convert edge points intoboundaries.(d) The SST contains all the information needed forsplitting the image into any number of regions defined in ahierarchical order of contrast. Consequently the additionor removal of a region is a simple operation.(e ) When a new region is added, only that specific regionwhich is split in two is changed. This means that estab-lished boundaries do not move as more detail is includedin the segmentation when regions are added.The SST segmentation method in its present form,however, has some problems that limit its usefulness:( / ) No global information is used in finding the SST.Spikes in the image, which may be isolated pixels, are iden-tified as separate regions. This means that the segmen-tation does not fare well when the image is very noisy.(g) If a single link is left connecting two regions thatought to have been separated, they will be merged

    148 IEE PROCEEDINGS, Vol. 133, Pt. F, No. 2, APRIL 1986

    Authorized licensed use limited to: IET STEVENAGE AND LONDON OFFICES. Downloaded on June 11, 2009 at 05:03 from IEEE Xplore. Restrictions apply.

  • 8/9/2019 MELJUN CORTES's - THESES WRITING on "Graph Theory for Image Analysis, An Approach Based on the Shortest Spa

    4/7

    together. Fig. 2 shows that this can cause unexpectedresults. Similarly, regions which are very different may bemerged if they are connected by a series of pixels whichdiffer only slightly from each other, but form a largeoverall difference. For example, a black region and a whiteregion may be connected by a series of pixels rangingevenly from black to white, so that the weights of the linksconnecting them are all very small. These two regions arelikely to be merged together.All of the problems in the SST segmentation algorithm arecaused by the weight functions making no use of globalinformation. Similar results have been found with singlelinkage region growing schemes [2]. Any improvement onthe basic method must take account of features that coverlarge areas of the image, and this is done in Section 4.4 Improved segmentation methods based on theSSTThree distinct methods for improving the SST segmen-tation are now described which make more complex use ofthe SST in order to use the global information in theimage. These are:

    (i) Recursive SST segmentation.(ii) Minimax SST segm entation.(iii) Local averaging SST segmentation.4.1 Recursive SS T segmen ta tionThe recursive SST segmentation presents a powerful solu-tion to the problem of incorporating global informationinto the segmentation method. If an image has M pixels,then a simple algorithm to find N regions is:(1) Copy the image into an image buffer.(2) Fo r / = M - 1 down to N, d o :(3) Generate an /-region segmentation using the SSTsegmentation from the image buffer.(4) Copy the segmen tation image into the image

    buffer.The algorithm expressed in this form is inefficient, but itnevertheless illustrates an important principle. At eachstage of the recursion a segmentation image is generatedwith one fewer region than the stage before. Pixel valuesfor each region in the segmentation image are constant,and equal to the mean of the pixels that the region coversin the original image. As the pixel values are modifiedaccording to all the pixels in the region, it is possible forone pixel to affect another which is not necessarily itsnearest neighbour. The link weights between regions willalso be altered to take account of all the pixels in both theregions that the link connects, so that global region infor-mation is incorporated into the link weights. Initially, onlylocal information is used as each region consists of onlyone pixel, but as the recursion progresses and the regionsenlarge in size the graph co ntains mo re global information.As every pixel in each region is the same, the graph canbe simplified so that a vertex represents a whole region.When the SST is cut into a forest to describe the partition,each tree can now be thought of as a single entity, whichbecomes a single vertex. The graph-to-image mapping isnow a one-to-many mapping, and the partition P(i)xydefined by a single vertex V { is redefined as

    1, if V; maps onto (x, y)[0, otherwise

    The vertex weight function is now(6)

    (7)

    The initial mapping from the image to the graph is thesame as before, but the structure of the graph is alteredduring the recursion.An improved recursive SST segmentation can now beenvisaged using the new graph. Initially, each pixel is con-sidered to be a separate region, and each iteration of therecursion merges two regions together. At each stage thetwo most similar vertices, V { an d V i, are merged across theshortest link. The new vertex Vk that is formed is assignedthe mean value of the new partition:

    v,, = " Lw w + n/w Vx'y' (8)*.>'nd the new partition P(k)xy is the union of two mostsimilar partitions:

    P(k)x,y = P(i)x,y (9)

    X,yIEE PR OCEEDING S, Vol. 133, Pt. F, No. 2, APRIL 1986

    The link that joined vertices V { and Vj is removed andsaved for use when mapping the graph back to the imagedomain. All the other links that had vertices V t an d Vj attheir ends have their weights re-evaluated using the newvertex weight. If there are now any links which are identi-cal then the redundant ones are removed. This stage isrepeated until there are no links left.Since the terminal vertices of each of the saved links aremerged at each stage of the recursion, the next stored linkcan never form a circuit with links previously saved. Theselinks thus form a spanning tree of the original graph,although not necessarily an SST. They can be used toobtain a recursive SST segmentation of the image rapidlyfor any number of regions N by cutting the tree at the lastN 1 links found by the recu rsion.The recursive SST segmentation algorithm for obtain-ing N regions is therefore:(1) Map the image onto a weighted graph.

    (2) While there is mo re than one vertex in the gra ph :(3) Find the next least weighted link.(4) Save the link.(5) Merge the two vertices joined by this link.(6) Recalculate the new vertex weight and linkweights.(7) Remove duplicated links.(8) Form a spanning tree with the saved links.(9) Cut the spanning tree at the N 1 most costly linksto form a spanning forest.(10) M ap the forest o nto a segm entation image.Fig. 4 illustrates the result of applying the recursive SSTsegmentation to the image that was used in Fig. 3. Themost important improvement over the SST segmentationis that global information about the image is used moreand more as the regions are merged. The result is that if asegmentation with many regions is required, then regionsare found which are locally significant. Segmentations withfewer regions will provide more globally significantregions. Segmentations are produced that find equally con-trasting regions for a given number of regions N. The'scale of interest' is automatically adjusted to the requirednumber of regions. The recursive SST segmentation istherefore hierarchical with respect to the 'scale of interest'of the image, as well as to the contrast between regions asin the SST segmentation. Globally contrasting regionstake precedence over locally contrasting regions as thenumber of regions is reduced.Fig. Ad illustrates how region boundaries do not moveas regions are merged. At each stage of the recursion theboundary common to the two regions to be merged is

    149

    Authorized licensed use limited to: IET STEVENAGE AND LONDON OFFICES. Downloaded on June 11, 2009 at 05:03 from IEEE Xplore. Restrictions apply.

  • 8/9/2019 MELJUN CORTES's - THESES WRITING on "Graph Theory for Image Analysis, An Approach Based on the Shortest Spa

    5/7

    new boundaryd

    F i g . 4 Recursive SST segmentation examplea 826-region recursive SST segmentationb 20-region recursive SST segmentationc 5-region recursive SST segmentationd Boundary map of 20- and 21-region recursive segmentation, showing how pre-vious boundaries remain stationaryremoved, but the rest of the segmentation boundariesremain unaltered.As the vertex weight is an average of all the pixel inten-sities in the partition, noise becomes less of a problem asthe segmentation progresses.4.2 Minimax SS T segmen tationThe recursive SST segmentation is one way that globalinformation may be incorporated into the segmentation.Another is to partition the graph into subgraphs, such thata suitable objective function evaluated on each of theresulting subgraphs is minimised. Unfortunately, algo-rithms for the solutions of this problem require evaluationof all possible partitions of the graph [14]. This is imprac-ticable for a graph representing an image of any reason-able size. The minimax SST segmentation finds asuboptimal solution to this problem in a computat ional lyefficient way.If the SST is cut into a spanning forest F of trees T,then a cost function for each tree, c(T), is defined:

    c(T) = max (10)The minimax SST segmentation algorithm for obtainingan N-region segmentation is:(1) Map the image onto a weighted graph.(2) Find an SS T of the graph.

    (3) Rep eat N times:(4) Find the tree Tma x with the largest cost c(Tma x),such that :

    (5) Cut Tma x at the link E itJ which minimises themaximum value of the costs of T{ and 7} , the two subtreesso created:(12)in [max [c(7J), c(T})]] V,-tJ- e Tmax

    (6) Map the forest onto an image.Fig. 5 shows the result of applying this algorithm. It pro-vides a hierarchical segmentation, as does the recursive

    F i g . 5 Minimax SST segmentation examplea 826-region minimax SST segmentation b 20-region minimax SST segmentationSST segmentation, finding large-scale features first andadding more detail as more regions are found. The costfunction used enables images with a gradual change inintensity between two regions to be segmented. Theminimax cost function is one of the simplest that can bedefined for a region of the picture. Cost functions thatmodel other features of the image, such as texture, forexample, could be used.4.3 Local averaging SST segmentationIn previous Sections global information was introducedinto the algorithms, either by modifying the graph as thesegmentation progressed in the recursive SST segmen-tation, or by cutting the original SST so as to optimise acost function defined over the resultant trees in theminimax SST segmentation. Regional information can bebuilt into the original graph directly by making the vertexweights depend on an area around the corresponding pixelin the image. A consequence of this is that the algorithm ismore stable when the image is noisy. The only differencebetween this method and the SST segmentation or therecursive SST segmentation is in the assignment of vertexweights in the graph. The new vertex weight function is

    x+ N y+N.- Z Z ix=x-Ny=y-N

    iy (13)

    c(Tma x) = max [c(7)] VT e F (11)F i g . 6 Local averaging SST segmentation examplea Original with 10 dB white noise b 1300-region SST segmentationc 1300-region local average SST segmentation

    150 IEE PROCEEDINGS, Vol. 133, Pt. F, No. 2, APRIL 1986

    Authorized licensed use limited to: IET STEVENAGE AND LONDON OFFICES. Downloaded on June 11, 2009 at 05:03 from IEEE Xplore. Restrictions apply.

  • 8/9/2019 MELJUN CORTES's - THESES WRITING on "Graph Theory for Image Analysis, An Approach Based on the Shortest Spa

    6/7

    so that Vi is the local mean of the region around pixel (x, y)for an area of 2N + 1 pixel squ are.Fig. 6 uses the original image with white noise added(signal/noise ratio of 10 dB) to com pare the local averag-ing SST segmentation (with N = 1) with the SST segmen-tation. The local averaging method has the disadvantagethat it may produce spurious regions along real bound-aries, because the edge is spread out by the averaging. Thismeans that for noiseless images it is not as good as takingthe difference between pixel values. However, when theimage is noisy, it performs considerably better than theoriginal method, as the segmentation image is much lessspeckled.4.4 Comparison of segmentation methodsThe three improvements to the SST segmentation methodproposed in Sections 4.1 to 4.3 are not unrelated. The localaveraging SST segmentation method differs only in themapping from an image to a graph, and so could be incor-porated into the other two methods. The minimax SSTsegmentation varies in its method of cutting the spanningtree, and so could also be applied to the recursive SSTsegmentation method, which is the only method to find adifferent spanning tree from the basic SST segmentation.Fig. 5 shows how the minimax SST segmentation givesresults comparable to those of the recursive SST segmen-tation shown in Fig. 4. The results are not as good, but themethod is much simpler and faster to run. It illustrates theimportance of cutting the SST in an intelligent way. Table1 lists the main properties of the four SST Segmentationmethods.Table 1: Comparison of SST segmentation methodproperties

    SST Recursive Minimax LocalSST SST averageSSTNumber of regions definable YesNoise immunity PoorRegion accuracy GoodSpeed FastNeighbourhood ofinformation Local

    YesOKExcellentSlowYesOKGoodOK

    YesGoodBlurredFastGlobal Global Mask

    Fig. 7 shows two different segmentation methods forcomparison. Fig. la is a segmentation of the original

    Fig. 7 Alternative segmentation methodsa 584-region Ohlander segmentationb 23-region split-merge segmentationimage using Ohlander's recursive region splitting method[2 , 13]. Each region is split using histograms of a numberof its properties such as intensity or variance. The parti-tions to be made in the histograms are found using a set ofsix heuristics. The regions so produced are themselves splitrecursively until an end condition is met. The main proper-ties of this segmentation are:(a ) When splitting a region no use is made of therelationship between the region and its neighbours, and sono global information outside the region is used.

    (b) Large features are found roughly, but smaller fea-tures are not located accurately. The histograms are apoorer estimate of the probability density functions as theregions become smaller.(c) At each stage of the segmentation the method pro-duces a variable number of regions which cannot be speci-fied beforehand. The number of regions produced cannotbe controlled directly.(d) Noise blurs the region histograms, resulting in lessaccurate region splitting. The method therefore has a lownoise immunity.Fig. 1b is a split-merge segmentation [2, 7] of the sameimage. The image is described by quarters, which arethemselves made up of quarters in a recursive fashion.These quarters are represented by a quadtree in whichnodes are split or merged depending on which would bestsatisfy a minimax cost function. Properties of the split-merge method are given here for comparison:(i) The segmentation is made up of block-like regionsbecause of the rigidly defined structure of the quadtree.(ii) The method has a higher noise immunity, becausethe weight function is a minimax function defined over thetotal area of each region.(iii) The number of regions required can be defined.5 Dua lity and edge det ectio n using SSTIf the image is mapped onto a graph using four-way con-nectivity, then the graph is planar and its dual can befound. The mapping is shown Fig. 8. The links of the dual

    pixel dual graph gra phFig. 8 Mapping an image onto a four-way-connected dual graph

    graph lie along the boundaries between the pixels in theimage, and so can be used to describe edges. Edge detec-tion algorithms must locate edges between pixels that havevery different intensities. The original graph link weightsrepresent the similarity between pixels. Thus, if the dualgraph links are made to be the negative of the links in theoriginal graph that they cross, then an SST of the dualgraph will locate the most different boundaries betweenpixels.

    The SST edge detection algorithm is therefore the sameas the SST segmentation, except that a dual graph is used.Links are taken from the SST in order of lowest weight todraw an edge image for as many edge elements N as arerequired. The algorithm is:(1) Map the image onto a weighted graph.(2) Find the dual weighted graph.(3) Find the SST of the dual graph.(4) Draw a line in the edge image at the co-ordinatesthat the N least costly links represent.

    Fig. 9 illustrates the result of the SST edge detector com-pared to a Sobel operator edge detector. The Sobel oper-IEE PRO CEEDINGS, Vol. 133, Pt. F, No. 2, APRIL 1986 151

    Authorized licensed use limited to: IET STEVENAGE AND LONDON OFFICES. Downloaded on June 11, 2009 at 05:03 from IEEE Xplore. Restrictions apply.

  • 8/9/2019 MELJUN CORTES's - THESES WRITING on "Graph Theory for Image Analysis, An Approach Based on the Shortest Spa

    7/7

    o bFig. 9 SST edge detection examplea 2624-point SST edge detection b 2624-point Sobel operator edge detectionator edge detection was found using a suitable threshold,and the number of edge points counted. The SST edgedetection was then found using the same number of edgepoints. The SST edge detector does not give the more boldfeatures such thick lines as does the Sobel operator edgedetector, and so is able to find more detail for the samenumber of edge points.In the above algorithm the edge detection is defined bythe number of edge points to be found. Alternatively, athreshold on the largest link weight to be examined couldbe specified in a manner comparable to the usual oper-ation of the Sobel operator edge detector. More complexalgorithms could be developed for edge detection in asimilar way to the more advanced SST segmentationmethods. For example, the minimax SST cutting algorithmcould be applied to the dual graph to find edges betweenregions of similar dynamic range in order to obtain anedge detection that would be more robust in the presenceof noise.6 Discussion of SST segm entations and the irappl icationsSegmentation and edge detection form the foundation ofmany problems in image analysis and understanding. Theproperties of the SST segmentation and edge detectionmethods allow solutions to a few problems that requirespecial mention. These are:(a) Composite source model image coding and resto-ration.(b ) Depth estimation using stereo image analysis.(c) Image understanding.Composite image models using segmentation images formthe basis of advanced image coding and restoration tech-niques [15, 16]. These methods rely on accurate segmen-tation of the image so that regions can be modelled closely.The accuracy of the SST segmentation methods, coupledwith the fact that they produce bounded regions, meansthat they are well suited to these applications. Significantimprovements in coding rates and restoration qualitywould be possible using these new techniques.As the recursive SST segmentation provides a hierarchi-cal description of regions in an image, it could be used as amethod of solving the correspondence problem in stereoimage analysis. The most globally significant regions in animage could be matched by starting with an image parti-tion of only two regions. These would be split successivelyby finding the next most globally contrasting regions, andthen matched with the equivalent regions in the otherimage. This could be done recursively to match all regionsin the image on an increasingly detailed level, until thewhole image is matched. Special care would need to betaken with poorly matched regions, as these may resultfrom occlusions in the scene.

    The hierarchical description of images has an importantimplication for image understanding techniques. Patternmatching algorithms could be used recursively on the

    regions, starting at the most global level and workingdown to the smallest region, until a match is found (if oneexists). This eliminates the need to correlate a pattern overthe whole image for all possible pattern sizes. Images areoften transformed into the frequency domain so thatposition- and scale-invariant recognition algorithms canbe used. These complex processes, which are incapable ofseparating different objects in the same scene, appear to beunnecessary if the recursive SST segmentation is used. Thestructure of the graph defined by the interaction of linksand vertices could also be used, as the spatial relationshipbetween regions is an important aspect in image under-standing.7 ConclusionsMethods of segmentation and edge detection based ongraph-theoretic descriptions of images have been devel-oped in this paper. In this context, edge detection and seg-mentation are shown to be dual problems. The mainfeatures of these methods are that region boundaries arefound very accurately, and that the description of images ishierarchical. Comparisons of these methods are made withothers, and some implications for other areas of researchhave been outlined.8 AcknowledgmentsWe would like to thank the UK Science & EngineeringResearch Council for financing this research. We wouldalso like to thank Prof. N. Christofides for his valuablecomments on the graph-theoretic content of this paper.9 References

    1 RO SE NF EL D, A., and KA K, A.C.: 'Digital picture processing, vol. 2'(Academic Press, 1982, 2nd edn.)2 HARALICK, R.M., and SHAPIRO, L.G.: ' Image segmentat ion tech-niques' , Comput. Vision, Graphics & Image Process., 1985, 29, pp.100-1323 ZAHN, C.T.: 'Graph-theoretic methods for detecting and describinggestalt clusters', IEEE Trans., 1971, C-20, pp. 68-864 SUK , M., and SO NG , O.: 'Curvilinear feature extraction usingminimum spanning trees' , Comput. Vision, Graphics & Image Process.,1984, 26, pp. 400-4115 NA REN DR A, P.M., and GO LD BE RG , M.: 'A graph-theoreticapproach to image segmentation'. Proceedings of IEEE ComputerSociety conference on pattern recognition and image processing, 1977,pp . 248-2566 CROSS, G.R., and JAIN, A.K.: 'Measures of homogeneity in tex-tures' . Proceedings of IEEE Computer Society conference on com-puter vision and p attern recognition, June 1983, Washing ton, D C, pp.211-2167 HOROWITZ, S.L., and PAVLIDIS, T.: 'Pic ture segmentat ion by atree traversal algorithm', J. Assoc. Comput. Mach., 1976, 23 , pp .368-3888 CH RIS TO FID ES, N .: 'Graph theory: an a lgori thmic approach '(Academic Press, 1975)9 CHE RIT ON , D., and TARJAN , R.E.: 'Finding minimum spanningtrees', SI AM J. Comput., 1976, 5, pp. 724-4210 PA PA DIM ITR IOU , C.H., and STEIG LITZ , K.: 'Combinator ia loptimization: algorithms and complexity'(Prentice-Hall, 1982)11 SEDGEWICK, R.: 'Algorithms' (Addison-Wesley, 1983)12 KRUSKAL, J.B. Jun.: 'On the shortest spanning subtree of a graphand the traveling salesman problem', Proc. Am. Math. Soc, 1956, 7,pp . 48-5013 OH LAN DER , R., PRICE, K., and RE DDY , D.R.: 'Pic ture segmen-tation using a recursive region splitting method', Comput. Graphics &Image Process., 1978, 8, pp. 313-33314 BEL LM ORE , M ., and JE NS EN, P.A.: 'An implic i t enumerat ionscheme for proper cut generation', Technometrics, 1970, 12, pp .775-78815 MITRA KOS, D.K., and CO NST AN TINID ES, A.G. : 'Non linearimage processing for optimum composite source coding', IEE Proc.F., Commun., Radar & Signal P rocess., 1983, 130, (5), pp. 441-45116 MORRIS, O.J . , and CONSTANTINIDES, A.G.; 'Segmented f i l ter-ing: a new technique for image restoration'. IEE Colloquium digestno . 1985/51, 1985

    152 IEE PROCE EDINGS, Vol. 133, Pt. F, No. 2, APRIL 1986