plz explain this code on morphological operation
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
praveen singathi
el 22 de Abr. de 2021
Editada: Pratyush Roy
el 10 de Mayo de 2021
please explain the this piece of code
label=bwlabel(sout);
stats=regionprops(logical(sout),'Solidity','Area','BoundingBox');
density=[stats.Solidity];
area=[stats.Area];
high_dense_area=density>0.6;
max_area=max(area(high_dense_area));
tumor_label=find(area==max_area);
tumor=ismember(label,tumor_label);
if max_area>100
figure;
imshow(tumor)
title('tumor alone','FontSize',20);
else
h = msgbox('No Tumor!!','status');
%disp('no tumor');
return;
end
0 comentarios
Respuesta aceptada
Pratyush Roy
el 10 de Mayo de 2021
Editada: Pratyush Roy
el 10 de Mayo de 2021
Hi,
In the code mentioned above, we use bwlabel to find connected components within the image and attach labels to the connected components.We calculate the density and area of individual connected regions. Then we find the region with the maximum area and in that particular region, we filter out pixels with density grater than 0.6.
These pixels are identified as the tumor pixels if the maximum area is 100, else we conclude that there is no tumor region in the image.
Hope this helps!
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!