How get corner of triangle?

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..

 Réponse acceptée

Image Analyst
Image Analyst le 16 Sep 2012

0 votes

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 commentaires

Ryan
Ryan le 16 Sep 2012
Modifié(e) : Ryan le 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.
Cahaya
Cahaya le 24 Sep 2012
to IA's : i've tried corner function. in http://www.csse.uwa.edu.au/~pk/research/matlabfns/ under subtittle spatial feature detection, there a harris.m ( http://www.csse.uwa.edu.au/~pk/research/matlabfns/Spatial/harris.m ) using derivative5.m and gaussfilt.m. Can u help me, in file harris.m i want to plot a corner point to the image. what i must added in code?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by