Alex Rivera | Logout

How to detect curves in a binary image?

Asked 2011-08-13T16:52:46.243
17

I have a binary image, i want to detect/trace curves in that image. I don't know any thing (coordinates, angle etc). Can any one guide me how should i start? suppose i have this image enter image description here

I want to separate out curves and other lines. I am only interested in curved lines and their parameters. I want to store information of curves (in array) to use afterward.

Edit
Report

2 Answers

17

It really depends on what you mean by "curve".

If you want to simply identify each discrete collection of pixels as a "curve", you could use a connected-components algorithm. Each component would correspond to a collection of pixels. You could then apply some test to determine linearity or some other feature of the component.

If you're looking for straight lines, circular curves, or any other parametric curve you could use the Hough transform to detect the elements from the image.

The best approach is really going to depend on which curves you're looking for, and what information you need about the curves.

reference links:

answered 2011-08-13T18:18:50.080
1

1) Read a book on Image Analysis

2) Scan for a black pixel, when found look for neighbouring pixels that are also black, store their location then make them white. This gets the points in one object and removes it from the image. Just keep repeating this till there are no remaining black pixels.

If you want to separate the curves from the straight lines try line fitting and then getting the coefficient of correlation. Similar algorithms are available for curves and the correlation tells you the closeness of the point to the idealised shape.

answered 2011-08-13T17:10:29.793

Your Answer