-
November 19th, 2010, 10:50 AM
#1
how to find pixels common to an object?
There is an image of set of circles( or set of ellipses) projected on a 2-D surface. The width of each circle (or ellipses) is finite. Now I wish to group these pixels, that is, group = all pixels that belong to one circle.
I can traverse each pixel and try to figure if it is adjacent to previous and thus find the groups. However, is there an elegant algorithm to do the same task?
-Ravi
-
November 21st, 2010, 02:22 AM
#2
Re: how to find pixels common to an object?
In general, you can use the Flood Fill algorithm in order to find all pixels with the same color, starting from a given pixel.
But what will you do if you have two different circles which are intersecting and have the same color pixels ? if this case is possible, then simple flood-fill will not do the trick.
If you paint each circle with a different color, and you know the colors in advance, then grouping the pixels is easy: all pixels of the same color belong to the same circle.
Regards,
Zachm
-
November 22nd, 2010, 11:06 AM
#3
Re: how to find pixels common to an object?
I should have mentioned that the circles do not intersect. Thank you for pointing me to the algorithm.
-Ravi
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|