6 Analysis of Shape Several human organs and biological structures possess readily identi able shapes The shapes of the human heart, brain, kidneys, and several bones are well known, and, in normal cases, not deviate much from an \average" shape However, disease processes can a ect the structure of organs, and cause deviation from their expected or average shapes Even abnormal entities, such as masses and calci cations in the breast, tend to demonstrate di erences in shape between benign and malignant conditions For example, most benign masses in the breast appear as well-circumscribed areas on mammograms, with smooth boundaries that are circular or oval some benign masses may be macrolobulated On the other hand, malignant masses (cancerous tumors) are typically ill-de ned on mammograms, and possess a rough or stellate (star-like) shape with strands or spicules appearing to radiate from a central mass some malignant masses may be microlobulated 54, 345, 403] Shape is a key feature in discriminating between normal and abnormal cells in Pap-smear tests 272, 273] However, biological entities demonstrate wide ranges of manifestation, with signi cant overlap between their characteristics for various categories Furthermore, it should be borne in mind that the imaging geometry, 3D-to-2D projection, and the superimposition of multiple objects commonly a ect the shapes of objects as perceived on biomedical images Several techniques have been proposed to characterize shape 404, 405, 406] We shall study a selection of shape analysis techniques in this chapter A few applications will be described to demonstrate the usefulness of shape characteristics in the analysis of biomedical images 6.1 Representation of Shapes and Contours The most general form of representation of a contour in discretized space is in terms of the (x y) coordinates of the digitized points (pixels) along the contour A contour with N points could be represented by the series of coordinates fx(n) y(n)g, n = : : : N ; Observe that there is no gray level associated with the pixels along a contour A contour may be depicted as a binary or bilevel image © 2005 by CRC Press LLC 529 530 Biomedical Image Analysis 6.1.1 Signatures of contours The dimensionality of representation of a contour may be reduced from two to one by converting from a coordinate-based representation to distances from each contour point to a reference point A convenient reference is the centroid or center of mass of the contour, whose coordinates are given by x = N1 NX ;1 n=0 x(n) and y = N1 NX ;1 n=0 y(n): The signature of the contour is then de ned as p d(n) = x(n) ; x]2 + y(n) ; y]2 (6.1) (6.2) n = : : : N ; see Figure 6.1 It should be noted that the centroids of regions that are concave or have holes could lie outside the regions A radial-distance signature may also be derived by computing the distance from the centroid to the contour point(s) intersected for angles of the radial line spanning the range (0o 360o ) However, for irregular contours, such a signature may be multivalued for some angles that is, a radial line may intersect the contour more than once (see, for example, Pohlman et al 407]) It is obvious that going around a contour more than once generates the same signature hence, the signature signal is periodic with the period equal to N , the number of pixels on the contour The signature of a contour provides general information on the nature of the contour, such as its smoothness or roughness Examples: Figures 6.2 (a) and 6.3 (a) show the contours of a benign breast mass and a malignant tumor, respectively, as observed on mammograms 345] The `*' marks within the contours represent their centroids Figures 6.2 (b) and 6.3 (b) show the signatures of the contours as de ned in Equation 6.2 It is evident that the smooth contour of the benign mass possesses a smooth signature, whereas the spiculated malignant tumor has a rough signature with several signi cant rapid variations over its period 6.1.2 Chain coding An e cient representation of a contour may be achieved by specifying the (x y) coordinates of an arbitrary starting point on the contour, the direction of traversal (clockwise or counter-clockwise), and a code to indicate the manner of movement to reach the next contour point on a discrete grid A coarse representation may be achieved by using only four possible movements: to the point at the left of, right of, above, or below the current point, as indicated in Figure 6.4 (a) A ner representation may be achieved by using eight possible movements, including diagonal movements, as indicated in Figure 6.4 (b) The sequence of codes required to traverse through all the points along the © 2005 by CRC Press LLC Analysis of Shape y 531 z(1) = x(1) + j y(1) z(2) = x(2) + j y(2) d(2) z(0) = x(0) + j y(0) d(1) d(0) z(N-1) = x(N-1) + j y(N-1) d(N-1) *_ _ (x, y) x FIGURE 6.1 A contour represented by its boundary points z (n) and distances d(n) to its centroid contour is known as the chain code 8, 245] The technique was proposed by Freeman 408], and is also known as the Freeman chain code The chain code facilitates more compact representation of a contour than the direct speci cation of the (x y) coordinates of all of its points Except the initial point, the representation of each point on the contour requires only two or three bits, depending upon the type of code used Furthermore, chain coding provides the following advantages: The code is invariant to shift or translation because the starting point is kept out of the code To a certain extent, the chain code is invariant to size (scaling) Contours of di erent sizes may be generated from the same code by using di erent sampling grids (step sizes) A contour may also be enlarged by a factor of n by repeating each code element n times and maintaining the same sampling grid 408] A contour may be shrunk to half of the original size by reducing pairs of code elements to single numbers, with approximation of unequal pairs by their averages reduced to integers The chain code may be normalized for rotation by taking the rst difference of the code (and adding or to negative di erences, depending upon the code used) © 2005 by CRC Press LLC 532 Biomedical Image Analysis (a) 160 150 distance to centroid 140 130 120 110 100 100 200 FIGURE 6.2 300 400 contour point index n 500 600 700 (b) (a) Contour of a benign breast mass N = 768 The `*' mark represents the centroid of the contour (b) Signature d(n) as de ned in Equation 6.2 © 2005 by CRC Press LLC Analysis of Shape 533 (a) 240 220 200 distance to centroid 180 160 140 120 100 80 60 500 1000 FIGURE 6.3 1500 2000 contour point index n 2500 3000 (b) (a) Contour of a malignant breast tumor N = 281 The `*' mark represents the centroid of the contour (b) Signature d(n) as de ned in Equation 6.2 © 2005 by CRC Press LLC 534 Biomedical Image Analysis With reference to the 8-symbol code, the rotation of a given contour by n 90o in the counter-clockwise direction may be achieved by adding a value of 2n to each code element, followed by integer division by The addition of an odd number rotates the contour by the corresponding multiple of 45o however, the rotation of a contour by angles other than integral multiples of 90o on a discrete grid is subject to approximation In the case of the 8-symbolpcode, the length of a contour is given by the number of even codes plus times the number of odd codes, multiplied by the grid sampling interval The chain code may also be used to achieve reduction, check for closure, check for multiple loops, and determine the area of a closed loop 408] Examples: Figure 6.5 shows a contour represented using the chain codes with four and eight symbols The use of a discrete grid with large spacings leads to the loss of ne detail in the contour However, this feature may be used advantageously to lter out minor irregularities due to noise, artifacts due to drawing by hand, etc 3 (a) (b) FIGURE 6.4 Chain code with (a) four directional codes and (b) eight directional codes 6.1.3 Segmentation of contours The segmentation of a contour into a set of piecewise-continuous curves is a useful step before analysis and modeling Segmentation may be performed by locating the points of in ection on the contour Consider a function f (x) Let f (x) f 00 (x) and f 000 (x) represent the rst, second, and third derivatives of f (x) A point of in ection of the function or © 2005 by CRC Press LLC Analysis of Shape 535 0 o 3 −1 0 −2 −3 −4 −5 −6 −4 −3 −2 −1 Chain code: 3 0 3 3 2 1 1 0 3] Figure 6.5 (a) curve f (x) is de ned as a point where f 00 (x) changes its sign Note that the derivation of f 00 (x) requires f (x) and f (x) to be continuous and di erentiable It follows that the following conditions apply at a point of in ection: f 00 (x) = f (x) 6= 0 f (x) f 00(x) = and f (x) f 000 (x) 6= 0: (6.3) Let C = f(x(n) y(n)g n = : : : N ; 1, represent in vector form the (x y) coordinates of the N points on the given contour The points of in ection on the contour are obtained by solving C0 C00 = C0 C000 =6 (6.4) where C0 , C00 and C000 are the rst, second, and third derivatives of C, respectively, and represents the vector cross product Solving Equation 6.4 is equivalent to solving the system of equations given by x00 (n) y0 (n) ; x0 (n) y00 (n) = © 2005 by CRC Press LLC 536 Biomedical Image Analysis 1 o 6 −1 −2 −3 −4 −5 −6 −4 −3 −2 −1 Chain code: 6 6 4 2 1 ] (b) FIGURE 6.5 A closed contour represented using the chain code (a) using four directional codes as in Figure 6.4 (a), and (b) with eight directional codes as in Figure 6.4 (b) The `o' mark represents the starting point of the contour, which is traversed in the clockwise direction to derive the code © 2005 by CRC Press LLC Analysis of Shape 537 x0 (n) y000 (n) ; x000 (n) y0 (n) 6= (6.5) where x0 (n) y0 (n) x00 (n) y00 (n) x000 (n) and y000 (n) are the rst, second, and third derivatives of x(n) and y(n), respectively Segments of contours of breast masses between successive points of in ection were modeled as parabolas by Menut et al 354] Di culty lies in segmentation because the contours of masses are, in general, not smooth False or irrelevant points of in ection could appear on relatively straight parts of a contour when x00 (n) and y00 (n) are not far from zero In order to address this problem, smoothed derivatives at each contour point could be estimated by considering the cumulative sum of weighted di erences of a certain number of pairs of points on either side of the point x(n) under consideration as x0 (n) = m x(n + i) ; x(n ; i)] X i=1 i (6.6) where m represents the number of pairs of points used to compute the derivative x0 (n) the same procedure applies to the computation of y0 (n) In the works reported by Menut et al 354] and Rangayyan et al 345], the value of m was varied from to 60 to compute derivatives that resulted in varying numbers of in ection points for a given contour The number of in ection points detected as a function of the number of di erences used was analyzed to determine the optimal number of di erences that would provide the most appropriate in ection points: the value of m at the rst straight segment on the function was selected Examples: Figure 6.6 shows the contour of a spiculated malignant tumor The points of in ection detected are marked with `*' The number of in ection points detected is plotted in Figure 6.7 as a function of the number of di erences used (m in Equation 6.6) the horizontal and vertical lines indicate the optimal number of di erences used to compute the derivative at each contour point and the corresponding number of points of in ection that were located on the contour The contour in Figure 6.6 is shown in Figure 6.8, overlaid on the corresponding part of the original mammogram Segments of the contours are shown in black or white, indicating if they are concave or convex, respectively Figure 6.9 provides a similar illustration for a circumscribed benign mass Analysis of concavity of contours is described in Section 6.4 6.1.4 Polygonal modeling of contours Pavlidis and Horowitz 361] and Pavlidis and Ali 409] proposed methods for segmentation and approximation of curves and shapes by polygons for computer recognition of handwritten numerals, cell outlines, and ECG signals Ventura and Chen 410] presented an algorithm for segmenting and polygonal modeling of 2D curves in which the number of segments is to be prespeci ed © 2005 by CRC Press LLC 538 FIGURE 6.6 Biomedical Image Analysis Contour of a spiculated malignant tumor with the points of in ection indicated by `*' Number of points of in ection = 58 See also Figure 6.8 © 2005 by CRC Press LLC 568 Biomedical Image Analysis (a) (b) FIGURE 6.21 Filtering of the benign-mass contour in Figure 6.2 (a) using Fourier descriptors (a) Using coe cients for k = (smaller circle in dashed line), k = ;1 (larger circle in dashed line), and k = f;1 1g (ellipse in solid line) (b) Using coe cients for k = ;2 2] (dashed line) and k = ;3 3] (solid line) The original contour is indicated with a dotted line for reference (a) FIGURE 6.22 (b) Filtering of the malignant-tumor contour in Figure 6.3 (a) using Fourier descriptors (a) Using coe cients for k = (smaller circle in dashed line), k = ;1 (larger circle in dashed line), and k = f;1 1g (ellipse in solid line) (b) Using coe cients for k = ;10 10] (dashed line) and k = ;20 20] (solid line) The original contour is indicated with a dotted line for reference © 2005 by CRC Press LLC Analysis of Shape et al 274] as 569 PN=2 k=;N=2+1 jZo (k)j=jkj : ff = ; P N=2 k=;N=2+1 jZo (k)j (6.58) The advantage of this measure is that it is limited to the range 1], and is not sensitive to noise, which would not be the case if weights increasing with frequency were used ff is invariant to translation, rotation, starting point, and contour size, and increases in value as the object shape becomes more complex and rough Other forms of weighting could be used in Equation 6.58 to derive several variants or di erent shape factors based upon Fourier descriptors For examjkj could be used to provide weights ple, the normalized frequency given by N= increasing with frequency, and the computation limited to frequencies up to a fraction of the highest available frequency (such as 0:2) in order to limit the e ect of noise and high-frequency artifacts High-order moments could also be computed by using powers of the normalized frequency Subtraction from unity as in Equation 6.58 could then be removed so as to obtain shape factors that increase with roughness The values of ff for the contours of the objects in Figures 6.15 and 6.16 are listed in Tables 6.1 and 6.2 The values of ff not demonstrate the same trends as those of the other shape factors listed in the tables for the same contours Several shape factors that characterize di erent notions of shape complexity may be required for e cient pattern classi cation of contours in some applications see Sections 6.6 and 6.7 for illustrations Malignant calci cations that have elongated and rough contours lead to larger ff values than benign calci cations that are mostly smooth, round, or oval in shape Furthermore, tumors with microlobulations and jagged boundaries are expected to have larger ff values than masses with smooth or macrolobulated boundaries Shen et al 274, 334] applied ff to shape analysis of mammographic calci cations The details of this application are presented in Section 6.6 Rangayyan et al 163] used ff to discriminate between benign breast masses and malignant tumors, and obtained an accuracy of 76% see Section 6.7 Sahiner et al 428] tested the classi cation performance of several shape factors and texture measures with a dataset of 122 benign breast masses and 127 malignant tumors ff was found to give the best individual performance with an accuracy of 0:82 6.4 Fractional Concavity Most benign mass contours are smooth, oval, or have major portions of convex macrolobulations Some benign masses may have minor concavities and © 2005 by CRC Press LLC 570 Biomedical Image Analysis spicules On the other hand, malignant tumors typically possess both concave and convex segments as well as microlobulations and prominent spicules Rangayyan et al 345] proposed a measure of fractional concavity (fcc ) of contours to characterize and quantify these properties In order to compute fcc , after performing segmentation of the contour as explained in Section 6.1.3, the individual segments between successive in ection points are labeled as concave or convex parts A convex part is de ned as a segment of the contour that encloses a portion of the mass (inside of the contour), whereas a concave part is one formed by the presence of a background region within the segment Figure 6.9 shows a section of a mammogram with a circumscribed benign mass, overlaid with the contour drawn by a radiologist specialized in mammography the black and white portions represent the concave and convex parts, respectively Figure 6.8 shows a similar result of the analysis of the contour of a spiculated malignant tumor The contours used in the work of Rangayyan et al 345] were manually drawn, and included artifacts and minor modulations that could lead to ine cient representation for pattern classi cation The polygonal modeling procedure described in Section 6.1.4 was applied in order to reduce the e ect of the artifacts The cumulative length of the concave segments was computed using the polygonal model, and normalized by the total length of the contour to obtain fcc It is obvious that fcc is limited to the range 1], and is independent of rotation, shift, and the size (scaling) of the contour The performance of fcc in discriminating between benign masses and malignant tumors is illustrated in Sections 6.7, 12.11, and 12.12 Lee et al 429] proposed an irregularity index for the classi cation of cutaneous melanocytic lesions based upon their contours The index was derived via an analysis of the curvature of the contour and the detection of local indentations (concavities) and protrusions (convexities) The irregularity index was observed to have a higher correlation with clinical assessment of the lesions than other shape factors based upon compactness (see Section 6.2.1) and fractal analysis (see Section 7.5) 6.5 Analysis of Spicularity It is known that invasive carcinomas, due to their nature of in ltration into surrounding tissues, form narrow, stellate distortions or spicules at their boundaries Based upon this observation, Rangayyan et al 345] proposed a spiculation index (SI ) to represent the degree of spiculation of a mass contour In order to emphasize narrow spicules and microlobulations, a weighting factor was included to enhance the contributions of narrow spicules in the computation of SI © 2005 by CRC Press LLC Analysis of Shape 571 For each curved part of a mass contour or the corresponding polygonal model segment, obtained as described in Sections 6.1.3 and 6.1.4, the ratio of its length to the base width can represent the degree of narrowness or spiculation A nonlinear weighting function was proposed by Rangayyan et al 345], based upon the segment's length S and angle of spiculation , to deliver progressively increasing weighting with increase in the narrowness of spiculation of each segment Spicule candidates were identi ed as portions of the contour delimited by pairs of successive points of in ection The polygonal model, obtained as described in Section 6.1.4, was used to compute the parameters S and for each spicule candidate If a spicule includes M polygonal segments, then there exist M ; angles at the points of intersection of the successive segments Let sm m = : : : M , be the polygonal segments, and n n = : : : M ; 1, be the angles subtended Then, the segment length (S ) and the angle of narrowness ( ) of the spicule under consideration are computed as follows: If M = 1, the portion of the contour that has been delimited by successive points of in ection is relatively straight see Figure 6.10 Such parts are merged into the spicules that include them, thus enhancing the lengths of the corresponding spicules without a ecting their angles of spiculation The merging process discards the redundant points of in ection lying on relatively straight parts of the contour This may be veri ed by comparing the initial points of in ection present on the contour in Figure 6.10 with the points of in ection that are retained to compute SI in the corresponding contour shown in Figure 6.23, specifically in the spicule with the angle of spiculation labeled as 116o If M = 2, then the length of spicule is S = s1 + s2 , and the angle subtended by the linear segments at the point of intersection represents the angle of narrowness ( ) of the spicule P If M > 2, then the length of the spicule is S = M m=1 sm In order to estimate the angle of narrowness, an adaptive threshold is applied by using the mean of the set of angles n n = : : : M ; 1, as the threshold ( th ) for rejecting insigni cant angles (that is, angles that are close to 180o ) The mean of the angles that are less than or equal to th is taken as an estimate of the angle of narrowness of the spicule Figure 6.24 illustrates the computation of S and using the procedure given above for two di erent examples of spicules with M = and M = 5, respectively Figure 6.23 shows the spicule candidates used in the computation of SI for the contour of the spiculated malignant tumor in Figure 6.8 the corresponding polygonal model is shown in Figure 6.10 The angles of spiculation computed are indicated in Figure 6.23 for all spicule candidates some of the candidates © 2005 by CRC Press LLC 572 Biomedical Image Analysis may not be considered to be spicules by a radiologist (Note: Visual assessment of the angles of spicules may not agree well with the computed values due to the thresholding and averaging process.) Observe that most of the angles computed for narrow spicules are acute on the other hand, the angles computed are obtuse for large lobulations and relatively straight segments The procedure described above adapts to the complexity of each spicule and delivers reliable estimates of the lengths and angles of narrowness of spicules required for computing SI , following polygonal modeling The computation of SI for a given mass contour is described next Let Sn and n n = : : : N be the length and angle of N sets of polygonal model segments corresponding to the N spicule candidates of a mass contour Then, SI is computed as PN SI = n=1P(1N+ cos n )Sn : n=1 Sn (6.59) The factor (1+cos n ) modulates the length of each segment (possible spicule) according to its narrowness Spicules with narrow angles between and 30 get high weighting, as compared to macrolobulations that usually form obtuse angles, and hence get low weighting The majority of the angles of spicules of the masses and tumors in the MIAS database 376], computed by using the procedure described above, were found to be in the range of 30o to 150o 345] The function (1 + cos n ) in Equation 6.59 is progressively decreasing within this range, giving lower weighting to segments with larger angles Relatively at segments having angles ranging between 150o and 180o receive low weighting, and hence are treated as insigni cant segments The denominator in Equation 6.59 serves as a normalization factor to take into account the e ect of the size of the contour it ensures that SI represents only the severity of the spiculated nature of the contour, which in turn may be linked to the invasive properties of the tumor under consideration The value of SI as in Equation 6.59 is limited to the range 2], and may be normalized to the range 1] by dividing by Circumscribed masses with smooth contours could be expected to have low SI values, whereas sharp, stellate contours with acute spicules should have high SI values The performance of SI in discriminating between benign masses and malignant tumors is illustrated in Sections 6.7, 12.11, and 12.12 © 2005 by CRC Press LLC Analysis of Shape 573 113 116 91 83 87 133 119 59 128 100 95 164 120 97 71 77 99 94 92 73 108 60 34 111 76 167 60 28 77 88 54 170 94 36 FIGURE 6.23 The polygonal model used in the procedure to compute SI for the spiculated malignant tumor shown in Figure 6.8 (with the corresponding polygonal model in Figure 6.10) The 0 marks correspond to the points of in ection retained to represent the starting and the ending points of spicule candidates, and the 0 marks indicate the points of intersection of linear segments within the spicules in the corresponding complete polygonal model The numbers inside or beside each spicule candidate are the angles in degrees computed for the derivation of SI Reproduced with permission from R.M Rangayyan, N.R Mudigonda, and J.E.L Desautels, \Boundary modeling and shape analysis methods for classi cation of mammographic masses", Medical and Biological Engineering and Computing, 38: 487 { 496, 2000 c IFMBE © 2005 by CRC Press LLC 574 Biomedical Image Analysis s3 s2 Θ1 s1 s2 s1 Θ2 Θ3 Θ1 s4 Θ4 s5 Μ=2 Μ=5 θ = Θ1 Θth = (Θ1+Θ2+Θ3+Θ4) / S = s1+ s2 Θ2 < Θth ; Θ3 < Θth θ = (Θ2 + Θ3) / S = s1+ s2+ s3+ s4+ s5 FIGURE 6.24 Computation of segment length S and angle of spiculation for two examples of spicule candidates with the number of segments M = and M = 5, respectively th is the threshold computed to reject insigni cant angles (that is, angles that are close to 180o ) Reproduced with permission from R.M Rangayyan, N.R Mudigonda, and J.E.L Desautels, \Boundary modeling and shape analysis methods for classi cation of mammographic masses", Medical and Biological Engineering and Computing, 38: 487 { 496, 2000 c IFMBE © 2005 by CRC Press LLC Analysis of Shape 575 6.6 Application: Shape Analysis of Calci cations Because of the higher attenuation coe cient of calcium as compared with normal breast tissues, the main characteristic of calci cations in mammograms is that they are relatively bright This makes calci cations readily distinguishable on properly acquired mammograms However, calci cations that appear against a background of dense breast tissue may be di cult to detect see Sections 5.4.9 and 5.4.10 for illustrations Malignant calci cations tend to be numerous, clustered, small, varying in size and shape, angular, irregularly shaped, and branching in orientation 430, 431] On the other hand, calci cations associated with benign conditions are generally larger, more rounded, smaller in number, more di usely distributed, and more homogeneous in size and shape One of the key di erences between benign and malignant calci cations lies in the roughness of their shapes Shen et al 274, 334] applied shape analysis to the classi cation of mammographic calci cations as benign or malignant Eighteen mammograms of biopsy-proven cases from the Radiology Teaching Library of the Foothills Hospital (Calgary, Alberta, Canada) were digitized with high resolution of up to 2560 4096 pixels with 12 bits per pixel using the Eikonix 1412 scanner Sixty-four benign calci cations from 11 mammograms and 79 malignant calci cations from seven mammograms were manually selected for shape analysis Multitolerance region growing (see Section 5.4.9) was performed, and the shape factors (mf ff cf ) based upon moments (Section 6.2.2), Fourier descriptors (Section 6.3), and compactness (Section 6.2.1) were computed from their boundaries Figures 5.26 and 5.27 illustrate parts of two mammograms, one with benign calci cations and the other with malignant calci cations, along with the contours of the calci cations that were detected A plot of the shape factors (mf ff cf ) for the 143 calci cations in the study of Shen et al is shown in Figure 6.25 It is evident that most of the malignant calci cations have large values, whereas most of the benign calci cations have low values for the three shape factors The bar graph in Figure 6.26 indicates that the means of the three features possess good levels of di erences between the benign and malignant categories with respect to the corresponding standard deviation values The three measures represent shape complexity from di erent perspectives, and hence could be combined for improved discrimination between benign and malignant calci cations The three features permitted classi cation of the 143 calci cations with 100% accuracy using the nearest-neighbor method (see Section 12.2.3) as well as neural networks (see Section 12.7) © 2005 by CRC Press LLC 576 Biomedical Image Analysis 0.9 0.8 0.7 compactness cf 0.6 0.5 0.4 0.3 0.2 0.1 0.5 0.15 0.4 0.1 0.3 0.2 Fourier factor ff FIGURE 6.25 0.05 0.1 0 moment factor mf Plot of the shape factors (mf ff cf ) of 143 calci cations The + symbols represent 79 malignant calci cations, and the symbols represent 64 benign calci cations © 2005 by CRC Press LLC Analysis of Shape 577 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 b m moment factor mf FIGURE 6.26 b m Fourier factor ff b m compactness cf Means of the shape factors (mf ff cf ) of 64 benign calci cations (`b') and 79 malignant calci cations (`m') The error bars indicate the range of mean plus or minus one standard deviation © 2005 by CRC Press LLC 578 Biomedical Image Analysis 6.7 Application: Shape Analysis of Breast Masses and Tumors Rangayyan et al 163, 345] applied several shape factors to the analysis of a set of contours of 28 benign breast masses and 26 malignant tumors The dataset included 39 mammograms from the MIAS database 376] and 15 images from Screen Test: Alberta Program for the Early Detection of Breast Cancer 61] The contours were drawn on digitized mammograms by an expert radiologist Figure 6.27 shows the 54 contours arranged in order of increasing shape complexity as characterized by the magnitude of the feature vector (cf fcc SI ) Figure 6.28 shows a scatter plot of the three features Each of the three features has, in general, the distinction of re ecting low values for circumscribed benign masses and high values for spiculated malignant tumors In benign-versus-malignant pattern classi cation experiments using linear discriminant analysis 163], ff , cf , and mf provided accuracies of 76%, 72%, and 67%, respectively the moment-based shape factors provided classi cation accuracy of up to 75% chord-length statistics provided accuracy up to 68% only The use of the parameters obtained via parabolic models of segments of the contours separated by their points of in ection led to a classi cation accuracy of 76% 354] In a di erent study 345], the shape factors fcc and SI provided classi cation accuracies of 74% and 80%, respectively the set (cf fcc SI ) provided the highest accuracy of 82% The MIAS database was observed to include an unusually high proportion of benign masses with spiculated contours, which led to reduced accuracy of benign-versus-malignant classi cation via shape analysis In pattern classi cation experiments to discriminate between circumscribed and spiculated masses, several combinations of the shape factors mentioned above provided accuracies of up to 91% 163, 345] However, the classi cation of a contour as circumscribed or spiculated is a subjective decision of a radiologist on the other hand, benign-versus-malignant classi cation via pathology is objective Furthermore, circumscribed-versus-spiculated classi cation is of academic interest, with the discrimination between benign disease and malignancy being of clinical relevance and importance For these reasons, circumscribed-versus-spiculated classi cation is not important Sections 7.9, 8.8, 12.11, and 12.12 provide further details on pattern classi cation of breast masses and tumors © 2005 by CRC Press LLC Analysis of Shape 579 b b b b b b b b b b b b b b b m m b b m m m b m b b m b m m b m m b m b m m m m m m b m m b m m m b m m m b FIGURE 6.27 Contours of 54 breast masses `b': benign masses (28) `m': malignant tumors (26) The contours are arranged in order of increasing magnitude of the feature vector (cf fcc SI ) Note that the masses and their contours are of widely di ering size, but have been scaled to the same size in the illustration © 2005 by CRC Press LLC 580 Biomedical Image Analysis 1.4 1.2 0.8 SI 0.6 0.4 0.2 0 0.2 0.7 0.6 0.4 0.5 0.4 0.6 0.3 0.2 0.8 cf FIGURE 6.28 0.1 fcc Feature-space plot of cf , fcc , and SI : for benign masses (28) and * for malignant tumors (26) SI: spiculation index, fcc: fractional concavity, and cf: modi ed compactness See Figure 6.27 for an illustration of the contours © 2005 by CRC Press LLC Analysis of Shape 581 6.8 Remarks In this chapter, we have explored several methods to model, characterize, and parameterize contours Closed contours were considered in most of the discussion and illustrations, although some of the techniques described may be extended to open contours or contours with missing parts Regardless of the success of some of the methods and applications illustrated, it should be noted that obtaining contours with good accuracy could be di cult in many applications It is not common clinical practice to draw the contours of tumors or organs Malignant tumors typically exhibit poor de nitions of their margins due to their invasive and metastatic nature: this makes the identi cation and drawing of their contours di cult, if not impossible, either manually or by computer methods Hand-drawn and computerdetected contours may contain imperfections and artifacts that could corrupt shape factors furthermore, there could be signi cant variations between the contours drawn by di erent individuals for the same objects It should be recognized that the contour of a 3D entity (such as a tumor) as it appears on a 2D image (for example, a mammogram) depends upon the imaging and projection geometry Above all, contours of biological entities often present signi cant overlap in their characteristics between various categories, such as for benign and malignant diseases The inclusion of measures representing other image characteristics, such as texture and gradient, could complement shape factors, and assist in improved analysis of biomedical images For example, Sahiner et al 428] showed that the combined use of shape and texture features could improve the accuracy in discriminating between benign breast masses and malignant tumors Methods for the characterization of texture and gradient information are described in Chapters and The use of the fractal dimension as a measure of roughness is described in Section 7.5 See Chapter 12 for several examples of pattern classi cation via shape analysis 6.9 Study Questions and Problems Selected data les related to some of the problems and exercises are available at the site www.enel.ucalgary.ca/People/Ranga/enel697 Prove that the zeroth-order Fourier descriptor represents the centroid of the given contour Prove that the rst-order Fourier descriptors (k = or k = ;1) represent circles © 2005 by CRC Press LLC 582 Biomedical Image Analysis A robotic inspection system is required to discriminate between at (planar) objects arriving on a conveyor belt The objects may arrive at any orientation The set of possible objects includes squares, circles, and triangles of variable size Propose an image analysis procedure to detect each object and recognize it as being one of the three types mentioned above Describe each step of the algorithm brie y Provide equations for the measures that you may propose 6.10 Laboratory Exercises and Projects Using black or dark-colored paper, cut out at least 20 pieces of widely varying shapes Include a few variations of the same geometric shape (square, triangle, etc.) with varying size and orientation Lay out the objects on a at surface and capture an image Develop a program to detect the objects and derive their contours Verify that the contours are closed, are one-pixel thick, and not include knots Derive several shape factors for each contour, including compactness, Fourier descriptors, moments, and fractional concavity Rank-order the objects by each shape factor individually, and by all of the factors combined into a single vector Study the characterization of various notions of shape complexity by the di erent shape factors Request a number of your friends and colleagues to assign a measure of roughness to each object on a scale of ; 100 Normalize the values by dividing by 100 and average the scores over all the observers Analyze the correlation between the subjective ranking and the objective measures of roughness Synthesize a digital image with rectangles, triangles, and circles of various sizes Compute several of the shape factors described in this chapter for each object in the image Study the variation in the shape factors from one category of shapes to another in your test image Is the variation adequate to facilitate pattern classi cation? Study the variation in the shape factors within each category of shapes in your test image Explain the cause of the variation © 2005 by CRC Press LLC [...]... mpq = Z +1 Z +1 ;1 ;1 xp yq f (x y) dx dy (6.21) for p q = 0 1 2 : : : A uniqueness theorem 128] states that if f (x y) is piecewise continuous and has nonzero values only in a nite part of the (x y) plane, then moments of all orders exist, and the moment sequence mpq , p q = 0 1 2 : : :, is uniquely determined by f (x y) Conversely, the sequence mpq uniquely determines f (x y) 8] The central moments... by summations for example, Equation 6.22 becomes MX ;1 NX ;1 = (6.24) (m ; x)p (n ; y) q f (m n): pq 00 m=0 n=0 © 2005 by CRC Press LLC 00 Analysis of Shape 557 The central moments have the following relationships 8]: 00 10 20 11 02 30 21 12 03 = m00 = = 01 = 0 = m20 ; x2 = m11 ; x y = m02 ; y2 = m30 ; 3m20 x + 2 x3 = m21 ; m20 y ; 2m11 x + 2 x2 y = m12 ; m02 x ; 2m11 y + 2 x y2 = m03 ; 3m02 y + 2 y3 ... (s) cos + y0 0 (s) sin Y 00 (s) = ;x00 (s) sin + y0 0 (s) cos : (6.12) Combining Equations 6.11 and 6.12, we get X 00 (s) = 0 = x00 (s) cos + y0 0 (s) sin (6.13) which, upon multiplication with sin , yields x00 (s) sin cos + y0 0 (s) sin sin = 0: (6.14) Similarly, we also get Y 00 (s) = 2A = ;x00 (s) sin + y0 0 (s) cos (6.15) which, upon multiplication with cos , yields 2A cos = ;x00 (s) sin cos + y0 0 (s)... proposed by Rangayyan et al 345], the polygon formed by the points of in ection detected on the original contour was used as the initial input to the polygonal modeling procedure This step helps in automating the polygonalization algorithm: the method does not require any interaction from the user in terms of the initial number of segments Given an irregular contour C as speci ed by the set of its (x y) coordinates,... 496, 2000 c IFMBE © 2005 by CRC Press LLC Analysis of Shape 547 We also have the following relationships: X (s) = x(s) ; c] cos + y( s) ; d] sin Y (s) = ; x(s) ; c] sin + y( s) ; d] cos X (s) = s Y (s) = A s2 : (6.8) (6.9) Taking the derivatives of Equation 6.9 with respect to s, we get the following: X 0 (s ) = 1 Y 0 (s) = 2As (6.10) X 00 (s) = 0 Y 00 (s) = 2A: (6.11) Similarly, taking the derivatives... the image as Z +1 Z +1 = (x ; x)p (y ; y) q f (x y) dx dy (6.22) pq where ;1 ;1 10 x= m m m01 : y= m (6.23) Observe that the gray levels of the pixels provide weights for the moments as de ned above If moments are to be computed for a contour, only the contour pixels would be used with weights equal to unity the internal pixels would have weights of zero, and e ectively do not participate in the computation... re ection may also be desirable in some applications Shape factors that meet the criteria listed above can e ectively and e ciently represent contours for pattern classi cation © 2005 by CRC Press LLC 550 Biomedical Image Analysis (a) FIGURE 6.13 (b) (a) Binarized image of blood vessels in a ligament perfused with black ink Image courtesy of R.C Bray and M.R Doschak, University of Calgary (b) Skeleton... of (c d) between the (x y) and (X Y ) spaces, we have x(s) = X (s) cos ; Y (s) sin + c y( s) = X (s) sin + Y (s) cos + d: © 2005 by CRC Press LLC (6.7) 544 Biomedical Image Analysis (a) FIGURE 6.10 (b) Polygonal modeling of the contour of a spiculated malignant tumor (a) Points of in ection (indicated by `*') and the initial polygonal approximation (straight-line segments) number of sides = 58 (b) Final... limits imposed by representation on a discrete grid), and have © 2005 by CRC Press LLC 558 Biomedical Image Analysis been found to be useful for pattern analysis Rangayyan et al 163] computed several versions of the factors M1 through M7 for 54 breast masses and tumors, using the mass ROIs with and without their gray levels, as well as the contours of the masses with and without their gray levels The... 146 See also Figure 6.8 Reproduced with permission from R.M Rangayyan, N.R Mudigonda, and J.E.L Desautels, \Boundary modeling and shape analysis methods for classi cation of mammographic masses", Medical and Biological Engineering and Computing, 38: 487 { 496, 2000 c IFMBE © 2005 by CRC Press LLC Analysis of Shape 545 150 140 Number of polygonal segments 130 120 110 100 90 80 70 60 0 1 FIGURE 6.11 2 3