how to tell whether a shape has a sharp angle

3 views (last 30 days)
How to tell whether a shape contains a sharp angle like less than 30 degree. Is there any simple algorithm to check? Thanks in advance.

Accepted Answer

Image Analyst
Image Analyst on 16 Jun 2012
Get the boundaries with bwboundaries() and then calculate the angle between discrete sets of points (more than just one pair of points with another pair of points).
  5 Comments
sty2004
sty2004 on 19 Jun 2012
For a circle there are infinte slopes for its vertical slopes on both sides, there will be big difference in slope, how I should deal with this?
Image Analyst
Image Analyst on 19 Jun 2012
MATLAB deals with "inf" just fine. I think you can do
if slope1 - slope2 > 0.5
or whatever...

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!