Polygonal approximation of digital planar curve using novel significant measure

This paper presents an iterative smoothing technique for polygonal approximation of digital image boundary. The technique starts with finest initial segmentation points of a curve. The contribution of initially segmented points towards preserving the original shape of the image boundary is determined by computing the significant measure of every initial segmentation points which is sensitive to sharp turns, which may be missed easily when conventional significant measures are used for detecting dominant points. The proposed method differentiates between the situations when a point on the curve between two points on a curve projects directly upon the line segment or beyond this line segment. It not only identifies these situations, but also computes its significant contribution for these situations differently. This situation-specific treatment allows preservation of points with high curvature even as revised set of dominant points are derived. The experimental results show that the proposed technique competes well with the state of the art techniques.


INTRODUCTION
Shape representation and shape classification are efficiently facilitated by polygonal approximation.This approach is popular due to its compact representation and insensitive to noise.These salient features are found useful in many applications [1][2][3][4][5][6][7][8].The main objective of polygonal approximation is to approximate the shape of a curve using a polygon whose vertices are specified by a subset of points on the curve.These points are referred to as dominant points and are often the points with high curvature.An example is illustrated in Fig. 1.A digital curve representing the shape of snowflake is displayed in Fig. 1 (a), and its identified dominant points are shown in Fig. 1 (b).The anticipated output of polygonal approximation using dominant point can be seen in Fig. 1(c).Broadly polygonal/closed curve approximation of a digital planar curve may be cast as min ε problem or min ≠ problem.In min ε problem, the techniques derive polygonal approximation with specified number of line segments or dominant points.These techniques ensure that the deviation between the curve and the approximate polygon is minimal, condition to the specified number of dominant points.Min # techniques derive polygonal approximation with a specified error.These techniques generate the approximate polygon with minimal number of dominant points while ensuring the measure of closeness is not larger than the specified error.In recent years, there are many dominant points based polygonal approximation techniques were presented in the literature [9][10][11][12][13][14][15][16][17][18][19].
And few older ones can be found in [20][21][22].The techniques presented in [9,10,12,20,21] use reverse polygonization, where instead of detecting the real points the techniques makes a search to detect redundant points and deletes points iteratively.The methods in [11,15] use breakpoint suppression, where the techniques apply criterion measure on the finest approximated set of points to suppress the redundant points and makes the approximation.The methods in [3,13,16,18] present a solution using dynamic programming, where the techniques makes exhaustive search to detect points on curve thereby makes final approximation.The method in [14] makes polygonal approximation by detecting ADSS (Approximate Digital Straight Segment).The method in [17] uses MIP (mixed integer programming) model.The method in [19] uses vertex relocation procedure around neighbors.In this method while approximating the output curve by detecting the dominant point, the technique allows neighbourhood points to become a dominant point provided that new dominant point facilitates in reduction of approximation error.The method in [22] uses split and merge, where the method make a search to find the points with maximum deviation in the splitting stage using the proposed criterion function and merge all the points identified in the splitting stage using the threshold value.Most of the dominant points [9][10][11][12] detecting methods use the magnitude of orthogonal projection of a point on the line segments which connect adjacent high curvature points to influence the process of detecting dominant points.The methods in the literature [9-12,14,15,,20,23] do not address the issue where the projection of point lies beyond its candidate line segment, where the situation may be often anticipated during approximation.The techniques which neglect to check this criterion may miss good curvature points which are critical for shape representation.The technique proposed in this paper measures the positions of projections of a point on the curve thereby invokes different metric for computing the significant measure of the dominant points.This practice makes the proposed technique to preserve the original shape of the curve even at very minimal number of dominant points.Such characteristic is very essential for compact representation.And it is very essential for object detection and shape classification applications.Rest of the paper is organized is as follows section 2 presents a brief review of some of the state of the art methods along with an insight of their demerits wherever possible.Section 3 presents the proposed work.Section 4 summarizes the experimental results.Section 5 concludes the paper.

2.BACKGROUND
Several polygonal approximation techniques have been proposed in the recent decades.Some of them use various optimization approach [3,13,16,17,18,19] On the other hand, there are other techniques that use local/global geometric features of a curve to influence the process of determining the polygon with minimal number of line segments.[9,10,11,12,23,24,25,26], and these techniques prove its competence against many real time datasets.Among these this section briefly analyse some of the bench mark techniques.
Prasad [23] proposed a non-parametric framework to detect points of high curvature.The framework uses the maximum deviation incurred between pixels from a digitized boundary as an upper bound, to make approximation.The authors proved that the analytical bound can be incorporated by dominant point detection framework to get rid of specification in terms of the tolerable error (for min # approaches) or the number of points (for min ϵ approaches).The authors established the robustness of their framework against scaling invariance as well as noise tolerance.However, there are applications in which the curve needs to be approximated using a specified number of dominant points, which is not possible through this framework.Though the approximation bounded below to digitization value, points detected on the curve seem to be redundant for human visual perception.Prasad [24] used metrics such as precision and reliability as measures to fit the polygon edges.Depending upon the threshold values for these measures, the technique produces coarser or finer approximation.Thus, this technique can flexibly control the degree of smoothness required for an application.And also the paper suggests some performance metrics to quantify the techniques.Parvez [19] obtained the digital boundary using contour extraction techniques.The objective of the method was to produce approximate polygon with minimal error possible.To attain this goal, the method relaxes the criteria that dominant points need not to be on the contour.The techniques computes neighbourhood points for every point p i on the contour C d and introduce a new point on the contour provided its presence should reduce the approximation error.The neighbourhood points are not the ones computed using 4 connected graph or 8 connected graph, instead the technique adaptively defines the width for every point on the curve, thereby it obtains the neighbourhood points.Fernandez [25] produced symmetric approximation for symmetric contours.The technique obtains first initial point p 1 as the farthest in terms of distance from the centroid of the curve.The next point p 2 is the farthest to p 1 .The method proceeds to find point p 4 which is farthest from p 2 and point p 3 which is farthest from p 1 .Likewise the technique obtains the all possible line segments such as {p 1 , p 2 }, {p 3 , p 4 }, until the maximum deviation from the curve does not exceed a threshold value which constitutes the boundary point set.The authors demonstrate that their method of choosing initial points ensures symmetricity.The technique then identifies all possible candidate points (q 1 , q 2 , ..., q m ) from the boundary point set between every two initial points and computes a significant value along with by ensuring symmetry property.Additionally, the technique presents various thresholding methods to normalize the significant values of the boundary points.Though the technique produces symmetric approximation for symmetric curve, it did not establish geometric invariance.And in real time data sets, most of the cases the points are always distributed asymmetrically on the planar curve.The main objectives of this paper are i) present a framework which considers the projection position of a point and thereby invokes the proper criterion measure to compute the contribution.ii) Produce output polygon without missing significant points.iii) Produce polygon with minimal possible number of points.iv) present a technique which is reasonably strong enough against rotation invariance.These objectives are achieved and demonstrated through experimentations of the proposed technique using bench marking data sets.

Problem formulation
The problem formulation is as follows.Let C d = {p 1 ,p 2 ,….p n } where p i = (x i ,y i ) is a digital curve consisting of n points in clockwise direction in the discrete 2-dimensional space.Such curves are the one extracted from the boundaries of the digital images using contour detection or edge detection methods.The coordinates of these n points are integers since these points are extracted from the digital boundary.The objective of polygonal approximation of C d is to derive a subset D = {p 1 , p 2 , …, p m } from the super set of C d , subject to the condition the polygon formed by the elements of D should represents the shape of the original curve.The technique starts with any three consecutive points p i , p j and p k on the curve C d , to detect the collinearity of these points (p i , p j , p k ), the distance measured from a point point p j to the line segment connecting p i and p k .The method shall conclude the three points are collinear, provided the measured distance very minimal.On the other side, the method shall concludes non-collinearity, provided the measured distance is not very minimal and thus p j become an element of D. Thereby, the polygonal approximation techniques finds all the elements of D. With this problem formulation, our paper focuses on the choice of the significant measure metric.Conventionally the distance metric is the length of the line dropped from the point p j on the line segment p i p k .This is being referred to as the perpendicular distance.This metric is generally good for smooth curves, but in some cases (explained later) it may miss significant points and rejects sharp turn, which are essential in shape representation applications.Dunham [27] makes initial approximation using distance to a line segment.Ramaiah [28] use distance to a line segment as a measure to make polygonal approximation but the metric used in the technique to compute deviation is capable of preserving sharp turnings but fails to preserve the original shape of digital curve.Apart from the criterion measure proposed in any technique the methodology is also an important factor to produce the output polygon without compromising its actual shape.This implies that the used metric in [28] is unsuitable for iterative smoothing.The framework proposed in this paper automatically chooses the suitable significant measure metric based on the candidate point projection, as explained next.

Proposed technique
In this section, we present our proposed method to make polygonal approximation of C d .The initial segmentation points are obtained using Freeman chain code [28], such as given in Algorithm 1.These initially segmented points are referred as initial set of dominant points.Example of initial segmentation for the snowflake curve is shown in Fig. 1 To compute the significant measure of every initial dominant point s k , the proposed method use the following steps.Consider the scenario in Fig. 2(a) where namely, s k-1 , s k and s k+1 are three dominant points on the curve with the following traversing sequence: s k-1 -> s k -> s k+1 .It may be interpreted as these three points are collinear by assuming the projections of a point s k is lies on the line segment which connects (s k-1 s k+1 ).As a consequence the approximation technique [9][10][11][12][14][15]20,23,[39][40] may decide to drop s k .In this scenario the projection of a point (s k ) not lies between the its candidate line segment (s k-1 s k+1 ) .The Fig. 3 shows the various anticipated position for possible projection of a dominant point (s k ) on the x-y plane.The proposed metric detects the position of projection.In order to predict the position of a projection, the proposed technique uses the following steps.Translate the line segment connecting s k-1 and s k+1 so that the point S i coincides with the origin of the xy coordinate system and measure the amount of angle produced by the translated line segment with the x axis.In order to align the translated line segment with the x axis, rotate the line segment with a computed amount angle.The actual x-y coordinates system and new transformed coordinate systems are displayed in Fig. 2(a) and Fig. 2(b).In the next step by checking transformed x coordinate of s k ' the method chooses metric to compute the significant measure.If the x coordinate of s k ' is less than 0 then the significant measure sig(s k ) is computed using eqn.( 1).(see Fig. 3(a)) if x k ' of s k ' lies between 0 and the x coordinate of s i then the significant measure is computed using eqn.(2) (see Fig. 3(b).If the x k ' value is greater than x j ' of s k+1 then the significant measure of s k is computed using eqn.(3) (See Fig. 3(c)).If (x(0)-x(n-1) != x(1)-x(0)) or ((y(1)-y(0) != y(0)-y(n-1)) then Remove the dominant point s k and recalculate the significant measure of at s k-1 and s k+1 iii) Compute the performance measures with the available dominant points Until (No.of.DPs == k) End

Experimental results
The proposed technique is tested on a variety of challenging curves to demonstrate its efficiency.The results are presented for two experiment sets.The experiment set 1 consists of synthetic curves usually used in the literature [9,11,16,19,24,25,29,30,31,32,33,34,35,36].In the experiment 2, the proposed method is tested extensively with images in MPEG dataset [37].We first present the quality assessment metrics for polygonal approximation of digital curves.Then, we present the results on the two experimental sets.Additionally, we include one experiment to demonstrate geometric invariance of the proposed technique.

Quality assessment
The best method to assess output of polygonal approximation is visual perception.Thus, we include extensive qualitative results.Moreover, we include quantitative performance measures as well for comparison of the performance of the tested methods, including the proposed technique.This paper considers the following metrics to measure the goodness of the results: i) Compression ratio (CR), ii) Integral square error (ISE), iii) Figure of merit (FOM),iv) Weighted sum of square errors (WE),v) Modified version of WE (WE2).Details of these metrics are provided in Table 1.These metrics are taken from [9-11, 15, 19, 31, 34].The readers interested in them are encouraged to read these articles and the references therein.
Table 1: Quality assessment metrics for comparing polygonal approximation methods.

Experiment set 1
The quantitative performance measure for the synthetic curves chromosome, leaf, semicircle and infinity in experiment set 1 are given in Table 2.The visual shots are shown in Fig. 4-7.The methods in [16,17,18,19,32,34,35] presents an optimal solutions for the polygonal approximation.The proposed method output is close to optimal solution for all the curves and further supports reduction of the number of dominant points while retaining the shape information of the curve.The Table 2 summarizes the results from various articles [9,11,15,16,17,18,19,23,24,26,29,30,31,32,33,34,35,36] for the given input synthetic curves.For the chromosome curve display using 15 amount of dominant points the proposed technique produces a low value for ISE than the method in [30,31,32].The snapshot of chromosome curve at 6 number of points using the proposed method as well as by the methods [9,23,24] snapshots can be found in Fig. 4. For the leaf curve, where the output curve at 21 number of dominant points, the proposed method produces the low value for ISE than [11,24,32] (in turn FOM value is high which is appreciable) and high value than [19].The snapshot for leaf output curve produced by the proposed method along with some of the state of the art methods results are displayed in Fig. 5.The output description for the semicircle shaped curve is as follows.While giving an attempt to display the semicircle curve at 17 number of dominant points the proposed method results are better than [32,35] in terms of ISE ,WE and FOM.Then the output polygon using 14 number of dominant points proposed method results in terms of ISE WE an FOM are better than [18,34], and comparable with [17,36] .(Whereas the method [18,35] use genetic algorithms)

CR
Larger is better , where n is the number of points in the initial segmentation while m is the number of dominant points in the final polygonal approximation.

ISE
Smaller is better , where   is the perpendicular distance of a point   on the original digital curve from the nearest line segment on the polygonal approximation.The snapshot of the semicircle curve using varying amount of dominant points by the proposed method along with some other counter-part methods are showed in Fig. 6.The final synthetic curve for this experiment set is a curve which intersects itself i.e infinity shaped curve.In the attempt of producing the output curve using 10 number of points the proposed produce the minimal possible error than [11,26].And also the summarized results reveal that the proposed method output is better than [9,11,19,24,31,26] in terms of ISE, WE and FOM.The graphic shots for the same can be found in Fig. 7.According to human visual perception four points sufficient enough to represents the infinity curve, please see the Fig. 7(g).On the outset, it is perceived that the proposed technique gives the best or second best ISE values for all the cases.This indicates competitiveness of the proposed technique.

Experiment set 2
In this section the performance of the proposed methods has been demonstrated using image in MPEG database [37].
Fernandez [25] presents technique to produce output polygon from a given digital boundary.Authors in [25] demonstrated the efficiency of their method by comparing their results with method [23] which is capable of producing output polygon in non-parametric mode.So the better counter-part method to compare the proposed method is the one proposed in [25].The Table 3 summarizes the results of the proposed method along with the results claimed as the best in [25] for the contours in MPEG database [37].For the Bell-7 contour the snapshot at 23, 22, 20 and 7 number of dominant points, the proposed method produces a less approximation error in terms of ISE WE WE2 than others mentioned in [9,11,23,25].Especially the output approximation at 7 DPs the proposed method and Rosin [38] method produces the curve with the mandatory points compared to others, but the proposed method produces minimal error measure than Rosin [38], the output can be found in Fig.For the octopus-14 contour the proposed efficiently produces the output curve with minimal deviation from the original curve compare to others.By observing Fig. 9(e) the proposed produces an outlying approximation which is visibly excellent than [25].In order to support this claim the output curve for octopus-14 can be found in Fig. 9 along with results of [11,23,25].When the input is the ray-17 contour, at 14 number of DPs the new proposal produces minimal error than the results of [9,38], then for the same curve at 35 DPs the results are good than [25] in terms of ISE,WE,WE2.The graphic shots of the proposed method along with [11,23,25,38] can be found in Fig. 10.When th input for the proposed method is chicken-5 curve, the proposed method approximation error measures are compared with results produced by the techniques in [9,11,23,25,39,40], by using all the quantitative metric the proposed work produces the output curve with minimal error possible, and the visual snapshots are shown in Fig 11 .For device6-9, bell-10 and butterfly-13, the proposed method results are compared with the results in [9,11,23,25,39,40], it is been conceived that produces the minimal error (ISE ,WE) than the error produces by the methods in [9,11,23,25].Except for the bell-10 curve, Prasad [23] RDP_opt produces the minimum error than the proposed method at 110 dominant points.The output curve for device6-9 can be found in Fig. 12. Then finally for the truck-07 curve, the results of the proposed method at 40,12 and 11 dominant points are compared with the results of [9,11,23,25].In all iterations against the mentioned dominant points the proposed method outperforms well than others.Especially output curve at 11 dominant points the proposed method efficiently chooses the good curvature points in such a way the output curve do not deviate much than the original input curve.(plz see the snapshot at Fig. 13 (a),(b) with (g)).

Rotation Invariance
To test the efficiency of the proposed method against rotation invariance, bell-7 contour is rotated using varying amount angle.Then the rotated contour is given as an input to the proposed method as well as to the technique in [9].The results are summarized for the reader's perusal.How to measure a technique is rotation invariant or to what extent?The answer is the metrics such as area of polygon, perimeter and compactness may be suggested to use along with results from human perception.The authors in [41] use the above mentioned metrics to prove whether the technique is able to produce the polygon with same positioned points before as well as after the rotation.This can be measured using compactness metric.Moreover the authors in [41] demonstrated the techniques proposed in a [9,11,12] are scaling as well as translation invariant using compactness metric.The mathematical interpretation of compactness metric (COMP) has been mentioned in eq (2).The Table 4 summarizes the value obtained by using COMP for the bell-7 contour by the proposed method.To compare the robustness of the technique against rotation the snapshots using bell-7 contour are displayed in Fig. 14 and Fig. 15.The output polygon at 20 amounts of dominant points is used here to check the technique is robust enough against rotation invariance.Most of the techniques considered in this paper produces polygon in non-parametric mode.
The best thing to compare the efficiency of rotation invariance is to compare the output at minimal possible amount of points since the input curve may contain more redundant points.So the result of the proposed method is compared with Masood [9].By using [9] any researcher can produce curve with specified number of dominant points.In Table 4 the value for geometric invariance assessment metrics (area of polygon, perimeter and compactness) reveals that results by proposed method using rotated contours measure against compactness metric is more or less nearer to the value produced by the proposed method before rotation and the visual snapshots in Fig. 14 are also supports the same.The results of Masood [9] in terms of quantitative measurements can be found in Table 5. Bell-7 at 30 o value for compactness metric is varies high while comparing the results obtained at before rotation.In the remaining angles the rotated contours compactness metric more or less nearer to the value obtained by the method before rotation.Masood [9] 15.When we observe the position of dominant points on the output curve preserved by the Masood [9] are drastically in different position in after rotated curve approximation.Whereas the proposed methods try to maintain the same positioned dominant points in the rotated contours too see Fig. 14.

CONCLUSION
The proposed significant measure computing metric predicts the position of a projection of an every boundary point between its candidate line-segment thereby invokes suitable significant measure computing metric and accumulates their significant measure to define the significant value of every candidate of dominant points.The technique is demonstrated using wide variety of data sets, where the image contours are with different level details in terms of curvature as well as size.The proposed technique suits for any computer vision application desire to produce the digital boundary with minimal number points without compromising its shape according to human perception as well as using bench-marking performance measuring metrics.

Fig. 1 :
Fig.1: a)A digital curve representing the shape of a snowflake, b) Initial set of dominant points, c)Suitable polygonal approximation are shown here.

Fig. 2 :Fig. 3 :
Fig. 2: Demonstration of the coordinate transform performed for the proposed self-adaptive significant measure computing metric for dominant point detection.(a) An example curve in the original x-y coordinate system is shown.(b) The transformed x'-y' coordinate system is shown in addition to the original x-y system

Algorithm 2 :
Polygonal approximation by computing the significant measure of IDP Input : Digital curve C d :Number of dominant points (m) in the output polygon Output: Output polygon with the specified number of dominant points (k) Begin Step1 : Invoke the function CIDP Step2 : Compute significant measure associated with all initial dominant points (s k 's) Step 3: Repeat i) Identify the dominant point s k with minimal significant measure in C d ii)

Fig. 14 :
Fig.14: The output polygon at 20 DPs by proposed methods in varying amount of angles a)Polygon at 20 DPs b)Polygon at 20 o c)Polygon at 30 o d) Polygon at 45 o e) Polygon at 70 o f) Polygon at 80 o g) Polygon at 180 o

Fig. 15 :
Fig.15: The output polygon at 20 DPs by Masood [9] in varying amount of angles a)polygon at 20 DPs b)Polygon at 20 o c)Polygon at 30 o d) Polygon at 45 o e) Polygon at 70 o f) Polygon at 80 o g) Polygon at 180 o