how can i get the end point coordinates of major, minor axis of a blob
1 次查看(过去 30 天)
显示 更早的评论
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;
0 个评论
回答(1 个)
Sean de Wolski
2013-4-15
Use bwmorph with the 'endpoints' option on the label or binary image.
2 个评论
Sean de Wolski
2013-4-16
I = false(21);
I(10,3:18) = true; %horizontal line
epts = bwmorph(I,'endpoints')
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!