Find a curve in a binary image

感情迁移 提交于 2020-01-06 05:57:29

问题


Given an Image How can I find that there is some curve or a straight line in image. HoughLine transform can be used to find a straight line but I want to find if there is some curve in an image or not.

Following is a rough technique in matlab to detect curve in binary image mentioned at https://www.mathworks.com/matlabcentral/answers/127190-how-can-i-detect-whether-a-line-is-a-straight-line-or-curve-from-an-binary-image but I want to code it in python.

1- call regionprops to get area and pixeled_list

2- use pythagorean theorm to get distance between two farthest points.

3- Comapre that to area which is then length along the curve.

4- divide on some ratio that divides straight fro curvy.

来源:https://stackoverflow.com/questions/52233166/find-a-curve-in-a-binary-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!