Hello, I am trying to fit ellipses to many different objects within a binary images. The ultimate goal is calculate the average eccentricity of the objects, but I can currently only plot a boundary around the objects. Any suggestions would be much appreciated. Image below (metallic sample with visible porosity).
[f,p]=uigetfile('*.tif','select image file');
BW = imbinarize(rgb2gray(imread(file_name)),0.68);
[B,L,N,A] = bwboundaries(BW);
figure; imshow(BW); hold on;