How can I detect whether a line is a straight line or curve from an binary image?
3 views (last 30 days)
Show older comments
differentiate between straight line and a curve
0 Comments
Answers (1)
Image Analyst
on 25 Apr 2014
Call regionprops to get the area and the PixelIdxList. Use Pythagorean theorem to get the distance between the two farthest points. Compare that to the area, which is the length along the curve. Decide upon some ratio that divides "straight" from "curvy".
2 Comments
Image Analyst
on 24 May 2014
You're welcome. If you have no more questions, then can you mark this as Accepted to close it out?
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!