# Finding the edges of object in photo

• December 19th, 2011, 08:27 AM
Picker
Finding the edges of object in photo
Hi all!

I'm searching photos for a white ball. Once I find something white, I want to search inside that pixel blob to see if it is round enough to be the ball I'm looking for. I know that its diameter must be between 10 and 100 pixels.

What would be a good way to follow the edge between white and non-white pixels? And checking that the object is solid white?

Consider it in monochrome, a pitch black image with perfectly white shapes in it. What would an efficient algorithm look like which finds all of the edge pixels of the shapes? I can solve this ad hoc with nested for loops, but its not pretty and I'm sure there's an optimal solution out there somewhere. (Once I have a list of the coordinates of the edge pixels, I can mathematically fit a circle to the data and find out if it could be a ball or not, no problem there).

Regards
• April 20th, 2012, 11:32 PM
CjStaal
Re: Finding the edges of object in photo
check for dramatic change in hue and/or saturation