Greetings, how to extract each object and calculate their area based on example picture shown below.
2 次查看(过去 30 天)
显示 更早的评论
2 个评论
Image Analyst
2018-3-14
How is this different than your other post https://www.mathworks.com/matlabcentral/answers/387906-greetings-how-to-calculate-area-and-parameter-of-cell#comment_544813
采纳的回答
KALYAN ACHARJYA
2018-3-14
k=imread('cell.bmp');
BW1=im2bw(k);
BW2=imcomplement(BW1);
% Apply condition calculate the pixels in certain boundary area (objects)
% Once you find white pixels, sum all upto certain boundary (Hint from given image)
% following is the code for all objects
nWhite_pixels=sum(BW2(:));
[rows columns depth]=size(BW2);
percentage_tot_area=((nWhite_pixels)/(rows*columns))*100;
fprintf('#The Percentage covered by all object is %f',percentage_tot_area);
disp('%');
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!