12.07.2015 Views

An interactive flower image recognition system

An interactive flower image recognition system

An interactive flower image recognition system

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

60 Multimed Tools Appl (2011) 53:53–732.1.3 Flower boundary tracingLet e 1 ,e 2 ,e 3 , and e 4 denote the detected <strong>flower</strong> edge points. The two lines which connectP 1 and P 2 as well as P 3 and P 4 will divide the <strong>flower</strong> bounding window into four subregions(see R 1 , R 2 , R 3 , and R 4 in Fig. 8). The <strong>flower</strong> boundary of each sub-region will beindependently traced. Each pair of the four sets of edge points (e 1 ,e 4 ), (e 4 ,e 2 ), (e 2 ,e 3 ) and(e 3 ,e 1 ) will serve as the starting and ending tracing points of each sub-region, respectively.The proposed <strong>flower</strong> boundary tracing algorithm starts from the starting point and stopswhen the ending point is reached. These four partial <strong>flower</strong> boundaries will then becombined to form the whole <strong>flower</strong> boundary (see the yellow curve in Fig. 8).The proposed <strong>flower</strong> boundary tracing algorithm modifies the 2-D dynamic programminggraph search algorithm developed by Mortensen et al. [9]. It treats each pixel withinthe <strong>flower</strong> bounding window a vertex in a graph. <strong>An</strong> edge in the graph will connect a pixelto one of its 8-connected neighboring pixels. The cost associated with an edge is defined asthe local cost evaluated on the neighboring pixel. The concept of average path cost, whichis defined as the partial average cost computed from the previous pixel to the next pixel, isemployed to decide which direction to move. The partial average cost is updated by addingthe average of the previous pixel cost and the next pixel cost. The detailed algorithm of themodified <strong>flower</strong> boundary tracing algorithm is described as follows.Algorithm: <strong>flower</strong> boundary tracing algorithmInput:s Starting pixele Ending pixelc(q, r) Cost function for the edge between pixels q and rOutput:p Pointers from each pixel to its parent pixel with the minimum cost pathData Structures:L List of active pixels (i.e. pixels that are not determined with the minimum average cost yetand will be chosen as candidates to expand at next step) sorted by average cost (initiallyempty)N(q) 8-neighboring pixels of qB(q) Boolean function indicating if q has been expanded/processedG(q) Cost function from the starting pixel s to qAlgorithm:G(s) = 0; L = L + {s};//Initialize the active list and the cost functionwhile (L φ and not B(e)) do begin //While there exits pixels to expandq min(L); //Find the pixel from L with minimum costB(q) = TRUE;//Set q as expanded (i.e. processed)for each r ∈ N(q) with not B(r) do begintemp = (G(q)+c(q, r))/2; //Compute average cost to rif r ∈ L and temp < G(r) thenL = L – {r};//Remove higher cost pixel r from Lif r ∉ L then begin//If r is not in LG(r) = temp;//update average cost for rp(r) = q;//set the parent pixel of rL = L + {r};//and place r in Lendendend

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!