how can i get the end point coordinates of major, minor axis of a blob

1 vue (au cours des 30 derniers jours)
Suvidha
Suvidha le 15 Avr 2013
i have calculated major/minor axis length of 5 blobs present in my image . now i need to know the end point coordinates of the major/minor axis how can i do that?
Axismeasurements=regionprops(labeledImage,'MinorAxisLength','MajorAxisLength');
for k=1:numberOfBlobs
minorAxis=Axismeasurements(k).MinorAxisLength;
disp(minorAxis);
end
majorAxis=Axismeasurements(2).MajorAxisLength;

Réponses (1)

Sean de Wolski
Sean de Wolski le 15 Avr 2013
Use bwmorph with the 'endpoints' option on the label or binary image.
  2 commentaires
Suvidha
Suvidha le 15 Avr 2013
i am sorry i could not get how it would work. would you please explain.
Sean de Wolski
Sean de Wolski le 16 Avr 2013
I = false(21);
I(10,3:18) = true; %horizontal line
epts = bwmorph(I,'endpoints')

Connectez-vous pour commenter.

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by