问题
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