I= imread('coins.png');

I = bwareaopen(bwmorph(im2bw(I), 'close'), 50);

s = regionprops(I, 'Orientation', 'MajorAxisLength', ...

'MinorAxisLength', 'Eccentricity','Centroid');

imshow(I)

s(1).MajorAxisLength

returns 60.0507 which is the length (in pixels) of the major axis of the ellipse How to convert this length into cm?

More Leena Silvoster's questions See All
Similar questions and discussions