Canny edge of a circle

17 views
Skip to first unread message

Pete

unread,
Mar 22, 2010, 11:41:52 PM3/22/10
to simple-iphone-image-processing
Hi,

I've been using the simple iphone image processing to try and obtain
the outline of a person from a picture. I tried using the canny edge
detection function on a black circle on a white background just to
have a controlled input to the algorithm, and I noticed that the
detected edge isn't continuous. It seems to break at the vertical and
horizontal points (I was planning on running the detected image
through the max region function, so obviously, if the edge detection
isn't continuous, then the region isn' closed).

Is that inherent in the canny algorithm?

Peter

Marcelo Roque

unread,
Mar 23, 2010, 12:23:51 AM3/23/10
to simple-iphone-i...@googlegroups.com
Yes, Peter. It is common to have that result from Canny Edge Extractor. It is the best edge extractor but that's one of its flaws.

Marcelo Roque

2010/3/23 Pete <pcor...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "simple-iphone-image-processing" group.
To post to this group, send an email to simple-iphone-i...@googlegroups.com.
To unsubscribe from this group, send email to simple-iphone-image-p...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-iphone-image-processing?hl=en-GB.




--
Marcelo Roque
Diretor Administrativo
Finxi – Tecnologia
mar...@finxi.com.br
+ 55 21 96476109

Peter Wiley-Cordone

unread,
Mar 23, 2010, 11:57:33 AM3/23/10
to simple-iphone-i...@googlegroups.com
Thanks,

I'll have to see what I can come up with. I'll post some code back to
the project if I figure something out.

Peter

Marcelo Roque

unread,
Mar 23, 2010, 12:23:54 PM3/23/10
to simple-iphone-i...@googlegroups.com
I suggest you to try, if I may do so, changing the thresholds values, and applying the algorithm to a more complex image than a circle. Avoid resizing the image as well so you won't lose important data.

Regards,


2010/3/23 Peter Wiley-Cordone <pcor...@gmail.com>

Peter Wiley-Cordone

unread,
Mar 23, 2010, 12:34:26 PM3/23/10
to simple-iphone-i...@googlegroups.com
Marcelo,

I'm trying to extract regions, so I think that's where the issue is.
I call the max region method on the cannyed image. I tried a circle
because I thought that I would control the input.

I'll try to extract the outline of a person (that's what I'm
ultimately doing). I was also thinking, if it still produces breaks
in the image, I could pass it through an algorithm that traces the
path, and if it finds breaks, it looks for the next edge within a
given tolerance and extrapolates the breaks to make the edge
continuous.

Why does canny produce breaks like that? Is it because it's computing
the first derivative? I'm also interested in identifying the points
of inflection in the cannyed image. I've got to look at the algorithm
to see if I can extract that info while it does the canny (that might
be the most efficient).

Any advice?

Pete

Marcelo Roque

unread,
Mar 23, 2010, 1:44:46 PM3/23/10
to simple-iphone-i...@googlegroups.com
Peter,

Generally the enhancer and the nonmaximum suppresion step of the Canny Edge, based on a deviation value and the hystheresis computing will be responsible for generating more accurate edges. If you're willing to have perfect edges.

As to the breaks, take in consideration that the algorithm exams the direction and orientation of all edges candidates. Unless you have an perfect capturing device (which only exists in theory, haha), with a exceptional noise smoother and a good calibration for the deviation and threshold values, you can expect to have some/lots of breaks in your image.

For inflection points, perhaps that algorithm to trace paths and fill them might suffice. Even though, that will be a heuristic that soon or later might fail on you.

Either way, keep us informed on your progress.

Regards.

2010/3/23 Peter Wiley-Cordone <pcor...@gmail.com>

Peter Wiley-Cordone

unread,
Mar 23, 2010, 2:27:10 PM3/23/10
to simple-iphone-i...@googlegroups.com
Will do. Thanks!

Peter

On Tue, Mar 23, 2010 at 1:44 PM, Marcelo Roque

Reply all
Reply to author
Forward
0 new messages