How to detect curves in a binary image?

后端 未结 5 1878
囚心锁ツ
囚心锁ツ 2021-02-05 11:39

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 thi

5条回答
  •  有刺的猬
    2021-02-05 11:46

    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.

提交回复
热议问题