How get corner of triangle?
3 views (last 30 days)
Show older comments
May i get the corner of triangle if i use regionprops functions? and if it possible, which property from regionprops that i can use? is that any sample code?
i wanna learn more..
Thanks..
0 Comments
Accepted Answer
Image Analyst
on 16 Sep 2012
I don't think regionprops would help. regionprops() measures regions. It might be able to find triangle-shaped regions for you, but as far as taking a single triangle and finding which pixels are at the corner, it can't do that. What about using the corner() function? Have you tried that? Or look at bwboundaries() and try to identify sharp turns.
And, of course, posting an image never hurts. In fact, it's usually mandatory.
2 Comments
Ryan
on 16 Sep 2012
Edited: Ryan
on 16 Sep 2012
To build on IA's answer, if you use bwboundaries to find the perimeter pixel locations, you can take a simple difference for the (x,y) vectors and then find peaks in the tangents to locate the corners of the triangle. You'll have to handle the special case where the bwboundaries starts indexing at a corner if you use that method.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!