Effacer les filtres
Effacer les filtres

how to get the major axis co-ordinates of an segmented image

2 vues (au cours des 30 derniers jours)
narayana reddy
narayana reddy le 12 Fév 2016
we have drawn the major axis for the segmented image. Now we need co-ordinates of the all major axis pixels. please help us advance thanks

Réponses (1)

Image Analyst
Image Analyst le 12 Fév 2016
Ask regionprops() for the centroid as well as the orientation. After that it's simple algebra that I'm sure you can handle because you learned the point-slope formula for a line back in the 10th grade. As you move outward, in both directions, from the centroid, just round the row and column and see if they are non-zero in your labeled image. If it's the label Index it's in the blob, if it's 0, you've left the blob. Be aware that the major axis and centroid may actually be outside the blob for really tortuous blob shapes, like a blob that is a "C" shape for example. For that reason you need to use the labeled image instead of the binary image so you know that you're checking for the correct blob number.

Community Treasure Hunt

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

Start Hunting!

Translated by