How to find endpoints of lines in OpenCV?

前端 未结 4 787
滥情空心
滥情空心 2021-01-19 00:42

I have an image made up of lines; how can I find the endpoints with OpenCV?

The lines are about 20 pixels wide. They turn, branch, and can be at angles (although mos

4条回答
  •  感动是毒
    2021-01-19 01:18

    You can create a morphological skeleton (thinning algorithm which you talked about) as described here, my implementation of this is here. Then you can traverse the skeleton(s) and just look for the end of it in every way.

提交回复
热议问题