• Ei tuloksia

Concave-point Based Contour Segmentation

3.3 Contour Evidence Extraction

3.3.2 Concave-point Based Contour Segmentation

The concave-point based methods in [7] applied to overlapping object segmentation perform the task of contour evidence extraction by combining a contour splitting method with ellipse fitting.

Here, the key feature is to extract the concave points by which the contour points are segmented.

The concave-point based algorithm used in this thesis work is from [7] and includes five specific steps, see Algorithm 6.

The first step is to estimate and generate the contours per each connected object. Either edge

Algorithm 5:Edge-to-Marker Association [9]

Input: binary silhouette imageI, the set of object markersM ={M(1), M(2), ..., M(n)}.

Output: Indexed contour setC ={C(1), C(2), ..., C(m)}.

Parameters: the divergence weight factorλ, the minimum number of edge pointsρn, the maximum distance from edge points to potential markersρd

1. Compute the set of edge pointsE ={e1, e2, ..., ek, ...}.

2. For each the edge pointsek ∈E:

(a) Collect the nearest seedpoints into the search regionMSR, the points not far thanρd (b) Estimate the relevance metric with respect to the marker pointsMj(i)in the search

regionMSR, Equation 19.

(c) Assignekto each marker with the highest degree of relevance and constructCa contour evidence set referenced by marker indices.

3. Discard any marker whose number of assigned edge points is less thanρn.

Algorithm 6:Concave-point based contour segmentation [7]

Input: Grayscale imageI

Output: Indexed contour setC ={C(1), C(2), ..., C(m)}.

1. Transform the input image to a binary image silhouetteIBW and estimate the image smoothed contour point setC ={c1, c2, ...}.

2. Determine the contour breaking point setCbreak={cb,1, cb,2, ...}by co-linear point suppression.

3. Determine contour dominant point setCdom ={cd,1, cd,2, ...}by polygonal approximation (Algorithm 7).

4. Segment the obtainedCdom as per concave pointsCcon ={cc,1, cc,2, ...}obtained by Equation 24.

5. Perform contour segment grouping.

detection or image morphology may be used to build up the contour set per each connected object in the image.

The second step is to determine the breaking points Cbreak = {cb,1, cb,2, ...}. Given the image silhouette IBW and the sequence of extracted contour points C = {c1, c2, ...}, the breaking points are determined by co-linear suppression. To be specific, every contour pointci(xi, yi) is examined for co-linearity, while it is compared to the previous and the next successive contour points. ci(xi, yi)is considered a breaking point provided if it is not located on the line connecting ci−1(xi−1, yi−1)andci+1(xi+1, yi+1).

The third step is to filter the extracted breaking point for the dominant pointsCdom ={cd,1, cd,2, ...}.

Dominant points are the points with extreme local curvature. Technically, the dominant point set Cdomis a subset ofCbreakwhose redundant members are eliminated through the process of polyg-onal approximation. The redundant points are detected and discarded by means of break point suppression; a typical approach for polygonal approximation. In this way, the initially defined dominant setCdom withCbreak is pruned by removing redundant points, but preserving a mini-mum error value. That is, the dominant points iteratively are discarded untill the minimini-mum error condition is exceeded.

In polygonal approximation, there are several metrics to measure the error of the approximate model from the discrete true contour model. Here, the sum of the square error (SSD) is adapted

SSD = The steps to find the dominant points are presented in Algorithm 7.

The forth step of Algorithm 6 is involved with extraction of concave points that form the contour segments. The connecting points are resolved through concave points. The dominant point

Algorithm 7:Dominant point estimation [7]

Input: Contour break point setCbreak. Output: Contour dominant point setCdom. Parameters: The distance threshold valueρdist

1. InitializeCdombyCbreak.

2. For eachcd,i(xi, yi)∈Cdom, estimate the distancediofcd,i to the chord connecting cd,i−1(xi−1, yi−1)tocd,i+1(xi+1, yi+1), Equation 23.

3. Eliminate anycd,i fromCdomwithdi less thanρdist.

cd,i ∈Cdomis considered to be the connecting point ifc# »d,i−1cd,i×c# »d,icd,i+1 is positive

Ccon ={cd,i ∈Cdom : c# »d,i−1cd,i ×c# »d,icd,i+1 >0}. (24) The final step in concave-point contour segmentation is to group the contour segments. The contour segmentsS = {s1, s2, ..., sns}are divided to the target and the candidate segments and grouped.

The criteria to divide the contour segments are their length and their condition whether they have been grouped or not. Here, the main idea is to distinguish the short and noisy contour segments from the ones containing the potential of being an individual contour segment. In this way, the segment which still is not assigned to any other segments group is considered as a candidate segmentsc,i ∈ Sc and the segment whose length is greater than the specific limit is the target segmentst,i ∈St.

The contour segment grouping is carried out through the process of ellipse fitting applied to the target, candidate, and joint target-candidate contour segments and eventually examining the goodness of fitted (GoF) ellipse with respect to the actual segments. The main objective is to find the group of contour segments that all together could form a particular ellipse shape object. That is, the candidate segmentsc,i is merged into the target segmentst,i, provided that the goodness of ellipse fitted to the joint target-candidate segments are improved compared to the ellipse fitted to the individual target and the candidate segments alone:

GoF(st,i ∪sc,j)≤GoF(st,i) + GoF(sc,j). (25)

The goodness of fit is described as the Average Distance Deviation (ADD) which measures the discrepancy between the fitting curve and the contour segment under the ellipse model in question. For a given contour segment

sk={ck,1(x1, y1), ck,2(x2, y2), ..., ck,n(xn, yn)} (26) and the corresponding fitted ellipse points

sk,f ={ck,f1(xf1, yf1), ck,f2(xf2, yf2), ..., ck,f n(xf n, yf n)}. (27)

Within the transformed coordinate system

"

Equation 28 can be simplified to

ADDk= 1

where a, b, (xeo, yeo) andθ are the ellipse standard parameters, major axis length, semi-minor axis length, ellipse center point, and the ellipse orientation angle with respect to x axis, respectively. The detailed pseudo code of contour segment grouping is shown in Algorithm 8.

Algorithm 8:Contour segment grouping [7]

Input: Contour segment setS ={s1, s2, ..., sns}

Output: Grouped contour segmentSt={st,1, st,2, ..., st,nt}.

1. initialization: Candidate segment setSc← {s;s∈S,|s| ≥6}.

Target segment setSt←S.

2. Perform segment grouping:

i←1

while|St| ≥1do j ←1

while|Sc| ≥1do ifsc,i *sc,j

computeADDtofst,i by Equation 26 computeADDcofsc,j by Equation 26 computeADDtc ofst,i ∪Sc,j by Equation 26

if(ADDtc<ADDt+ ADDc)∧(st,i nearest tost,i∪sc,j) st,i ←st,i∪sc,j

Sc←Sc\sc,j ifsc,j ⊂St

St←St\sc,j j ←j + 1

i←i+ 1

Eliminatest,iif the enclosed angle is less than90.