2D SHAPE SEGMENTATION : A NEW APPROACH Kenong Wu and Martin D. Levine TR-CIM-95-01 February 2 , 1995 Centre for Intelligent Machines McGill University Montr?eal , Qu?ebec , Canada Postal Address : 3480 University Street , Montr?eal , Qu?ebec , Canada H3A 2A7 Telephone : -LRB-514-RRB- 398-6319 Telex : 05 268510 FAX : -LRB-514-RRB- 283-7897 Email : cim@cim.mcgill.ca 2D SHAPE SEGMENTATION : A NEW APPROACH Kenong Wu and Martin D. Levine Abstract We propose a novel approach to 2D shape segmentation by simulating the electrical charge density distribution on a 2D contour . The method is unique and invariant with respect to scale , translation and rotation . It computes significant 2D shape features by considering global data and is easily extensible to the 3D case . R?esum?e Nous proposons une nouvelle approche au probl?eme de la segmentation 2D par une m?ethode de simulation de distribution de densit?e de charges ? electriques sur un contour bi-dimensionnel . La m?ethode reste unique et invariante par rapport aux changements d' ? echelles , aux translations et aux rotations . Elle calcule les caract?eristiques significatives des formes 2D en consid?erant l'ensemble des donn?ees . De plus , ce travail peut ^ etre facilement ? etendu aux formes tri-dimensionnelles . ontents i Contents List of Figures ii 1 . Introduction 1 2 . Method 3 2.1 . Physics 2.2 . Finite Element Solution 2.3 . Implementation 3 . Preliminary Results 8 3.1 . Using Synthetic Data 3.2 . Using Real Data 4 . Discussion 11 5 . Conclusion 14 References 14 ii 2D SHAPE SEGMENTATION : A NEW APPROACH Contents 1 The charge distribution on a cross section of a conductor . 2 2 Charge density distribution at a perfect corner . 3 3 Physical configuration 3 4 Polygonal approximation . 6 5 Comparison between the theoretical and computed charge density . 9 6 The charge density distribution along analytical contours . 9 7 Effect of a noisy contour . 11 8 Charge density distribution along an image contour . 12 1 . Introduction The problem of two-dimensional -LRB- 2D -RRB- contour segmentation is concerned with dividing a planar contour into meaningful segments . The key issue is how to determine the actual segmentation points . These are usually selected at \ corners '' , which can be detected at sharp changes in contour curvature -LSB- 8 , 3 , 7 -RSB- . The segmented contours can then be represented in terms of more concise descriptions , suitable for high level vision tasks -LSB- 4 , 9 -RSB- . All curvature-based approaches focus on local shape information . Often this local information is noisy so that curvature computations , usually based on the second derivative , may be inherently unstable . To reduce these effects , a larger contour segment , i.e. , a larger scale , may be employed . However , selecting a suitable scale is also a very difficult problem . In this paper we introduce a novel approach for detecting corners at which to segment 2D contours . The algorithm is interesting because it uses global shape information without directly addressing the scale problem . Nevertheless , the results elucidate both local corner features and the significance of contour protrusions relative to the global shape . Our idea is motivated by physics . When a charged conductor with an arbitrary shape is in electrostatic equilibrium , all charge will reside unevenly on the outer surface of the conductor -LSB- 6 -RSB- , as shown in Figure 1 . At sharp convex corners , the charge density is very high . Conversely , almost no charge accumulates at sharp concave points . Furthermore , the larger the protrusion of a contour segment , the higher the charge density at its tip . By ignoring secondary global effects , Jackson -LSB- 10 -RSB- has derived an approximate relationship governing the charge density ae at a corner 2 2D SHAPE SEGMENTATION : A NEW APPROACH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Figure 1 . The charge distribution on a cross section -LRB- shaded area -RRB- of a conductor . The larger the protrusion , the higher the charge density . Note that the contour can be divided into simple segments at corners defined by locations on the curve where charge density is a local extremum . formed by two conducting planes . Figure 2 shows ae as a function of the angle defining a corner and the distance ? from it . The charge density is assumed to be measured at P . The larger and the smaller ? , the greater the charge density . We observe that all sections are monotonic for constant ? . In the ideal case , the charge density at a corner -LRB- for ? = 0 -RRB- will be : ae = 8 >> >> > < >> >> > : 1 if > ss constant if = ss if < ss -LRB- 1 -RRB- In this paper , we show that the singular behavior of charge densities at corners can be used for corner detection . We construct a polygonal contour by connecting all discrete data points of an image contour and compute the simulated electrical charge density distribution along this polygonal contour . However , in distinction to the approximate Jackson theory , it is necessary to take into account all global effects to find the corners . We will show that a 2D object contour can then be segmented b h P -LRB- a -RRB- 0.02 0.04 0.06 0.08 0.1 2 4 6 8 0.1 0.2 0.3 0.4 0.5 0.6 charge density b -LRB- radians -RRB- h -LRB- meters -RRB- -LRB- b -RRB- Figure 2 . -LRB- a -RRB- a 2D corner with an angle . -LRB- b -RRB- The charge density at P -LRB- ? ; -RRB- . reference point r o r observed point source point r0 C Figure 3 . The electrical potential at r due to the line of charge at r0 . at points of very high and very low charge density , corresponding to sharp convex and concave corners , respectively . The resulting object description is unique with respect to contour shape and invariant to contour size , translation and rotation . The extension to 3D object surfaces is relatively straightforward . 2 . Method 4 2D SHAPE SEGMENTATION : A NEW APPROACH 2.1 . Physics . The physical model we have used is the charge density distribution on a 2D contour . To do this , we examine an infinitely long charged conductor having this 2D contour as a constant cross section . All of the charge on the conductor can only reside on its outer surface -LSB- 6 -RSB- . Thus the charge can only be located along the outer contour of the cross section . One can also show using Gauss ' law -LSB- 6 -RSB- that the charge density distribution is the same at any cross section along an infinitely long conductor . The charge on the contour is treated as line of charge ; that is , a uniformly charged infinitely long line perpendicular to the cross section . Let r1 be an observation point and r0 be a source on the contour with charge q , as shown in Figure 3 . The difference between the electrical potential OE at a reference point r0 and a point r caused by q at r0 is equal to -LSB- 5 -RSB- : OE -LRB- r -RRB- ? OE -LRB- r0 -RRB- = q 2ss ffl0 ln jr0 ? r0j jr ? r0j -LRB- 2 -RRB- Here ffl0 is a constant , known as the permitivity of free space . The charge is continuously distributed along the contour . Thus the electrical potential difference between r0 and r is contributed by all the charge on the contour C . It can be expressed as follows : OE -LRB- r -RRB- ? OE -LRB- r0 -RRB- = 1 2ss ffl0 Z C ae -LRB- r0 -RRB- ln jr0 ? r0j jr ? r0j dl0 -LRB- 3 -RRB- Here q = ae -LRB- r0 -RRB- dl0 , ae -LRB- r0 -RRB- is the charge density at r0 and l0 is the path along C. 1We use the notation in -LSB- 5 -RSB- According to physics -LSB- 6 -RSB- , every point on a charged conductor in equilibrium is at the same potential . Therefore , if we restrict r in Equation -LRB- 3 -RRB- to the conductor surface , referred to as an equipotential surface , OE -LRB- r -RRB- is constant . The potential at the reference point is usually taken to be zero . Accordingly , -LRB- 3 -RRB- may be rewritten as follows : V = Z C ae -LRB- r0 -RRB- ln jr0 ? r0j jr ? r0j dl0 -LRB- 4 -RRB- Here V = 2ss ffl0 -LRB- OE -LRB- r -RRB- ? OE -LRB- r0 -RRB- -RRB- is a constant . Two papers -LSB- 1 , 2 -RSB- on 2D shape analysis which use the electrical potential have come to our attention . Unfortunately , they arbitrarily specify an equipotential line as the initial condition of their algorithm , either on the image border which is far from the conductor -LSB- 1 -RSB- , or on the contour of a uniformly charged 2D object , which can not be in equilibrium -LSB- 2 -RSB- . However , it is known -LRB- see Equation -LRB- 3 -RRB- -RRB- that in general the potential difference is dependent on the charge density distribution . Only in the particular case of electrostatic equilibrium can one state that the 2D object contour is an equipotential line without knowing the charge density distribution . By failing to determine the equipotential surface based on the actual charge density distribution , the resulting algorithms employ a nonphysical initial condition . Thus , their method is physically incorrect . Nevertheless the results are quite reasonable but very slow to compute . This is because the mechanism underlying their algorithm is similar to the diffusion-based approach -LSB- 17 -RSB- . 2.2 . Finite Element Solution . Our objective is to obtain a relationship between the charge density distribution 6 2D SHAPE SEGMENTATION : A NEW APPROACH 2 C k C 2 C 1 k 1 f = 1 f = 0 f = 0 o -LRB- a -RRB- -LRB- b -RRB- r Figure 4 . Polygonal approximation -LRB- solid line -RRB- of a continuous contour -LRB- dashed line -RRB- . -LRB- b -RRB- The basis functions . and the arclength . Since C in -LRB- 4 -RRB- is an arbitrary contour , it is impossible to perform the integration in -LRB- 4 -RRB- . However , this integration can be solved by finite element methods -LSB- 16 -RSB- . To do this , we approximate the continuous contour C by a polygon . The polygon has N line segments , Ck ; k = 1 ; : : : ; N , each of which is assumed to have a constant charge density , aek , as shown in Figure 4 -LRB- a -RRB- . A set of basis functions fk ; k = 1 ; : : : ; N are defined on this polygon as follows : fk -LRB- r0 -RRB- = 8 > < > : 1 if r0 2 Ck otherwise -LRB- 5 -RRB- Thus the basis function , fk , is nonzero only when r0 is on the segment Ck , as shown in Figure 4 -LRB- b -RRB- . Therefore , the charge density ae -LRB- r0 -RRB- can be approximated by a piecewise constant charge density function as follows : ae -LRB- r0 -RRB- ss NX k = 1 aekfk -LRB- r0 -RRB- -LRB- 6 -RRB- Substituting -LRB- 6 -RRB- into Equation -LRB- 4 -RRB- , we have V = NX k = 1 aek Z Ck ln jr0 ? r0j jr ? r0j dl0 -LRB- 7 -RRB- Since the charge density is assumed to be constant on each segment of the polygon , we may take ri as the observation point on each segment i and rewrite Equation -LRB- 7 -RRB- as : V = NX k = 1 aek Z Ck ln jr0 ? r0j jri ? r0j dl0 i = 1 ; : : : : : : ; N : -LRB- 8 -RRB- Because of charge conservation , the sum of the charges on each segment equals the total charge on the contour . Let Q be the total charge on the contour and lk be the length of Ck . Then we have Q = NX k = 1 aeklk -LRB- 9 -RRB- Assuming Q is known and taking -LRB- 8 -RRB- and -LRB- 9 -RRB- , we obtain a set of linear equations with N + 1 unknowns , ae1 ; : : : ; aeN and V . Since the integral in -LRB- 8 -RRB- can be evaluated analytically -LSB- 19 -RSB- , the charge density distribution aek and the constant V can be obtained by solving the set of linear equations . 2.3 . Implementation . Since a contour in an image is composed of a sequence of discrete data points , a polygonal approximation can be formed simply by linking consecutive data points by line segments . The middle point on each segment is selected as the observation point ri . The position of the reference point r0 is selected far from the image origin . The set of linear equations is solved by a standard LU decomposition method -LSB- 12 -RSB- . 8 2D SHAPE SEGMENTATION : A NEW APPROACH 3 . Preliminary Results 3.1 . Using Synthetic Data . First , we tested our algorithm using a perfect ellipse to verify its correctness : r -LRB- ? -RRB- = d = -LRB- cos2 ? + d2 sin2 ? -RRB- 1 = 2 -LRB- 10 -RRB- Here d is the ratio of the major to minor axes of the ellipse . We compared the result to the analytical expression for the charge density along an ellipse , known to be proportional to -LSB- 15 -RSB- : ae -LRB- ? -RRB- = cos2 ? + d2 sin2 ? cos2 ? + d4 sin2 ? ! 1 = 2 -LRB- 2ss -RRB- ? 1 -LRB- 11 -RRB- Figure 5 contrasts the computed -LRB- solid curve -RRB- and theoretical charge density distributions -LRB- dashed curve -RRB- . It can be seen that the two curves are very similar . We also note that there exist two other algorithms in the literature for 2D charge density computation -LSB- 14 , 15 -RSB- . Since both ignored the potential produced at ri = r0 -LRB- see Equation -LRB- 8 -RRB- -RRB- , we have found that the error they produce is greater than that using the method proposed in this paper . In addition , we speed up the computation by evaluating the line integral analytically while they do this numerically . Next we show results from two other contours of analytical functions , the hypocycloid and the generalized epicycloid , containing either sharp convexities or concavities . Figure 6 shows that the charge density is very high at the sharp convexities and is close to at the sharp concavities . Figure 6 also reveals that the charge density curve is sharper at convexities than concavities . 50 100 150 200 250 300 350 400 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Arc length of the ellipse Charge density distribution Figure 5 . The theoretical -LRB- dashed line -RRB- and computed -LRB- solid line -RRB- charge density distributions along the contour of an ellipse . Both curves are normalized by their maximum values . The number of data points is 360 . -60 -40 -20 20 40 60 -40 -30 -20 -10 10 20 30 40 X Y Hypocycloid with four cusps 50 100 150 200 250 300 350 400 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Coordinates along arc length Charge density Charge density distribution -LRB- a -RRB- -200 -100 100 200 -100 -50 50 100 X Y generalized epicycloid 50 100 150 200 250 300 350 400 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Coordinates along arc length Charge density Charge density distribution -LRB- b -RRB- Figure 6 . The charge density distribution along analytical contours . The arclength starts at the most right point . 10 2D SHAPE SEGMENTATION : A NEW APPROACH 3.2 . Using Real Data . For data obtained from a real image , the actual contour is distorted by the image sampling process . Therefore , high frequency noise contaminates the contour -LRB- see Figure 7 -LRB- a -RRB- -RRB- and thereby , also the computed charge density distribution -LRB- see Figure 7 -LRB- b -RRB- -RRB- . Because of this , lowpass filtering was applied to the discrete Fourier transform of the curve data to remove the high frequency components2 and obtain a smoother charge density distribution , as shown in Figure 7 -LRB- c -RRB- . Here , we superimpose the original contour -LRB- solid line -RRB- on the smoothed contour -LRB- dashed line -RRB- . It can be seen that the two contours are almost identical but their charge density distributions are very different . This shows that a simple smoothing operation can significantly remove the high frequency noise in the charge density distribution , caused by the distorted contour , without greatly affecting the actual contour shape . Figure 8 presents experimental results obtained from another contour in an image . -LRB- a -RRB- shows the charge density on the object contour . The gray levels indicate charge densities , which are normalized in the range between 20 -LRB- darkest intensity -RRB- and 255 -LRB- white -RRB- . -LRB- b -RRB- shows the charge density distribution along the arclength of the contour . We observe that the peaks and valleys in the charge density distribution clearly indicate convex and concave curve segments , respectively . The results also confirm that the charge density is related to the significance of the various protrusions and indentations along the contour . We note that these are consistent with human intuition . 2Other smoothing strategies may also be used , such as convolution of the contour with a Gaussian function . -LRB- a -RRB- 50 100 150 50 100 150 2 4 6 8 10 12 x axis y axis charge density -LRB- b -RRB- 50 100 150 50 100 150 2 4 6 8 10 12 14 x axis y axis charge density -LRB- c -RRB- Figure 7 . Effect of a noisy contour . -LRB- a -RRB- The smooth contour in an image is distorted by the image sampling process . -LRB- b -RRB- The charge density distribution along the contour given in -LRB- a -RRB- . The charge density distribution along a smoothed contour -LRB- dotted curve -RRB- , overlapped by the original contour -LRB- solid curve -RRB- . 4 . Discussion In this section we briefly discuss some important characteristics of the charge density distribution for 2D shape . Uniqueness : It has been proved that the charge density distribution on a charged conductor in an electrostatic equilibrium is uniquely determined -LSB- 18 -RSB- . In consequence , given a specific contour and total charge on the contour , our method 12 2D SHAPE SEGMENTATION : A NEW APPROACH -LRB- a -RRB- 50 100 150 200 250 300 350 400 450 500 1 2 3 4 5 6 7 8 arc length charge density -LRB- b -RRB- Figure 8 . Charge density distribution along an image contour . -LRB- a -RRB- charge density along the contour . The brightest and darkest intensities indicate the maximum and minimum charge densities , respectively . -LRB- b -RRB- shows the charge density distribution along the arclength of the contour . The arclength starts at the top of the contour and goes counterclockwise . can obtain a unique indication of the corners -LRB- convexities and concavities -RRB- on the contour . Invariance : Since the charge density distribution depends completely upon the total charge , as well as the shape and size of a contour , it is independent of the coordinate system chosen for computation -LSB- 16 -RSB- . Therefore , the charge density distribution along a contour is invariant to object translation and rotation . If the object size changes , the total surface area will change , and the charge density will thus change with scale . However , the relative positions of the extrema in the charge density distribution will not change . Therefore , corner detection will also be invariant to object size . Local versus Global : We note that Jackson 's result -LSB- 10 -RSB- -LRB- see Section 1 -RRB- holds only locally . However , in order to accurately compute the charge density dis - tribution we must consider the influence of all charge on the contour . Although a monotonic relationship between angles that define corners and charge density does not strictly exist globally , we observe that charge densities do form local extrema at sharp corners . In our case , a 2D shape is represented by a polygonal approximation . However , only those polygonal vertices which result from sharp corners in the original curve actually produce singularities in the simulated charge density distribution . This is because we assume that charge density is constant along each segment of the polygon . We select as variables the charge density at the middle of these segments , rather than at their endpoints . Thus we do not obtain infinite charge density at every vertex of the polygonal approximation as would be the case with Jackson 's model . Curvature and Charge Density : The heuristic that charge density on smooth surfaces changes monotonically with curvature seems to be obvious and quite acceptable -LSB- 1 , 2 -RSB- . However , it appears that a strict relationship between these two quantities does not in fact exist -LSB- 13 -RSB- . This is because curvature is a local geometrical property , which is completely determined by local data . But the charge density distribution is affected by all points on the contour . Only in certain specific situations can an appropriate relationship be found between local curvature and charge density -LSB- 11 -RSB- . The interesting characteristic of our approach is that it uses the complete shape as input and produces -LRB- i -RRB- information which delineates local corner features and -LRB- ii -RRB- global significance of the protrusions . 14 2D SHAPE SEGMENTATION : A NEW APPROACH 5 . Conclusion We have presented a new approach to 2D shape segmentation by simulating the electrical charge density distribution along the cross section of an infinitely long conductor . The result is unique , and invariant to object size , translation and rotation . By taking the global shape into consideration , the algorithm determines both local corners and the significance of contour protrusions relative to the global shape . We have also developed an algorithm to compute the charge density distribution over the surface of a 3D object . The results will be presented in a separate paper . Acknowledgements We wish to thank Professor Jonathan Webb for his kind help with electrostatic problems , Professor Allen W. Glisson for pointing out his paper -LSB- 19 -RSB- , and Professor Gregory Dudek for making valuable comments on the manuscript . MDL would like to thank the Canadian Institute for Advanced Research and PRECARN for its support . This work was partially supported by a Natural Sciences and Engineering Research Council of Canada Strategic Grant and an FCAR Grant from the Province of Quebec . References -LSB- 1 -RSB- G. H. Abdel-Hamid and Y.-H . Yang , \ Electrostatic field-based detection of corners of planar curves , '' in Proceedings of the 1993 Canadian Conference on Electrical and Computer Engineering , -LRB- Vancouver , Canada -RRB- , pp. 767 -LCB- 770 , September 1993 . References 15 -LSB- 2 -RSB- G. H. Abdel-Hamid and Y.-H . Yang , \ Multiresolution skeletonization : an electrostatic fieldbased approach , '' in Proceedings of The IEEE International Conference on Image Processing , -LRB- Austin , USA -RRB- , pp. 13 -LCB- 16 , November 1994 . -LSB- 3 -RSB- H. Asada and M. Brady , \ The curvature primal sketch , '' IEEE Transactions on Pattern Analysis and Machine Intelligence , vol . 8 , pp . 2 -LCB- 14 , January 1986 . -LSB- 4 -RSB- F. Attneave , \ Some informational aspects of visual perception , '' Psychological Review , vol . 61 , pp. 183 -LCB- 193 , 1954 . -LSB- 5 -RSB- J. V. Bladel , Electromagnetic Fields . Hemisphere Publishing Corporation , revised printing ed. , 1985 . -LSB- 6 -RSB- F. J. Bueche , Introduction to Physics for Scientists and engineers . New York : McGraw-Hill Book Company , 3rd ed. , 1980 . -LSB- 7 -RSB- G. Dudek and J. K. Tsotsos , \ Shape representation and recognition from curvature , '' in Proceedings of the 1991 IEEE Computer Society Conference on Computer Vision and Pattern Recognition , -LRB- Hawaii -RRB- , pp . 35 -LCB- 41 , IEEE Computer Society , June 1991 . -LSB- 8 -RSB- H. Freeman , \ Shape descriptions via the use of critical points , '' Pattern Recognition , vol . 10 , no. 3 , pp. 159 -LCB- 166 , 1978 . -LSB- 9 -RSB- D. Hoffman and W. Rechards , \ Parts of recognition , '' Cognition , vol . 18 , pp. 65 -LCB- 96 , 1984 . -LSB- 10 -RSB- J. D. Jackson , Classical electrodynamics . New York : Wiley , 1975 . Secs. 2.11 and 3.4 . -LSB- 11 -RSB- I. W. McAllister , \ Conductor curvature and surface charge density , '' Journal of Physics D : Applied Physics , vol . 23 , pp. 359 -LCB- 362 , 1990 . -LSB- 12 -RSB- W. H. Press , S. A. Teukolsky , W. T. Vetterling , et al. , Numerical Recipes in C. Cambridge , UK : Cambridge University Press , 2nd ed. , 1992 . -LSB- 13 -RSB- R. H. Price and R. J. Crowley , \ The lightning-rod fallacy , '' American Journal of Physics , vol . 53 , pp. 843 -LCB- 848 , September 1985 . -LSB- 14 -RSB- J. B. Ross , \ Plotting the charge distribution of a closed-loop conducting wire using a microcomputer , '' American Journal of Physics , vol . 55 , pp. 948 -LCB- 950 , 1987 . 16 2D SHAPE SEGMENTATION : A NEW APPROACH -LSB- 15 -RSB- W. L. Schaich and S. Mahmud , \ On the distribution of charge over the surface of a conductor , '' American Journal of Physics , vol . 59 , pp . 656 -LCB- 658 , 1991 . -LSB- 16 -RSB- P. P. Silvester and R. L. Ferrari , Finite Elements for Electrical Engineering . Cambridge : Cambridge University Press , 2nd ed. , 1990 . -LSB- 17 -RSB- O. Skliar and M. H. Loew , \ A new method for characterization of shape , '' Pattern Recognition Letters , vol . 3 , pp. 335 -LCB- 341 , 1985 . -LSB- 18 -RSB- W. R. Smythe , Static and Dynamic Electricity . New York : McGraw-Hill , Inc. , third edition ed. , 1968 . page 124 . -LSB- 19 -RSB- D. Wilton , S. M. Rao , A. W. Glisson , et al. , \ Potential integrals for uniform and linear source distributions on polygonal and polyhedral domains , '' IEEE Transactions on Antennas and Propagation , vol . AP-32 , no. 3 , pp. 276 -LCB- 281 , 1984 .

B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O O O O B I B O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O B I I O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O B I O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O B I B O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O

2d shape
charge density distribution
corner detection
finite elements
segmentation