Anybody help me with measure asymmetry an irregular object
6 次查看(过去 30 天)
显示 更早的评论
What's the best method to sort the asymmetry?
basically, I need the result of the ratio between the perpendicular segment and the largest diagonal, where the score is quantified in (0 to 2 points): if the proportion is greater than 40.01%: 0 point, symmetric lesion. If the proportion is between 20.01% to 40%: 1 point, little asymmetric lesion. If the proportion is less than 20%: 2 points, very unbalanced lesion.
I need to define 'percent' and apply in the results
%%Reads the original image and performs the conversion to binary.
A = imread('IRREGULAROBJECT.jpg'); % this image already is grayscale.
imshow(A);
BW = im2bw(A);
imshow(BW);
%%Extract the Asymmetry Value of the object.
% AREA VALUE
s = regionprops(BW,'area');
area = cat(1, s.Area)
imshow(area)
title('Value AREA image', 'FontSize', fontSize);
%%CONDITIONS
%If the proportion is greater than 40.01%: 0 point, symmetrical lesion.
if (percent > 40.01)
asymmetry = 0;
end
% If the proportion is between 20.01% to 40%: 1 point, little asymmetric lesion.
if (percent > 20.01 & percent < 40.00)
asymmetry = 1;
end
% If the proportion is less than 20%: 2 points, very unbalanced lesion.
if (percent < 20.00)
asymmetry = 2;
end
4 个评论
Image Analyst
2020-5-13
I have no idea. Is it the solidity like you get from reginoprops(), which is the area divided by the area of the convex hull? Since it now appears that you did not write that code, why don't you ask whomever wrote the code?
回答(1 个)
Image Analyst
2017-11-19
编辑:Image Analyst
2017-11-19
You might want to try the Dice-Sorensen coefficient. See attached demo.
Alternatively you can find the bounding rectangle by using the radon transform. No demo for that (yet). Simply find the widest width and the narrowest width. Or you could use John's function: https://www.mathworks.com/matlabcentral/fileexchange/34767-a-suite-of-minimal-bounding-objects
8 个评论
JovanS
2022-6-8
Hello Image Analyst ,
As you said before in order to find the percentage of asymmetry we have to flip the blob about its major axis of symmetry and count pixels that are common to both the flipped and unflipped blob, and count pixels that are different. could you share matlab code with us ?
Image Analyst
2022-6-8
I don't have code for that but you'd call regionprops to get orientation, then call imrotate to put the major axis vertical, then call dice.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!