How get corner of triangle?
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Image Analyst
2012 年 9 月 16 日
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 件のコメント
Ryan
2012 年 9 月 16 日
編集済み: Ryan
2012 年 9 月 16 日
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.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!