MATLAB: How to find major and minor axis of each human cells

coordinatesferet distanceimage analysisImage Processing Toolbox

Hi All,
I want to find the major and minor axis of each human cell in order to find their eccentricity. So I tried to find the maximum and minimum values of X axis and Y axis of each cell. But I do not know how can I find corresponding coordinates of these maxX and maxY. (file data is a wield arraged struct, I'll attach the image of that chart below)
%eccentricity might able to work
for n = 1:length(data)
A = data(n).coordinates(:,:,1);
B = data(n).coordinates(:,:,2);
X2(n) = max(A); %needs to find corresponding coordinates----bug
X1(n) = min(A);
Y2(n) = max(B);
Y1(n) = min(B);
mal(n) = sqrt((X2-X1).^2+(Y2-Y1).^2);
nal(n) = sqrt((x2-x1).^2+(y2-y1).^2);
ecce(n) = nal/mal;
end
Also, I found in this way, the length of major and minor axis mearsured are not really accurate. So does anyone has a faster way to find major and minor axis of human cells?
Thanks a lot for help!

Best Answer

Related Question