如何计算面积 [英] How to calculate area

查看:75
本文介绍了如何计算面积的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

s = regionprops(BW5, I, {'Area','Centroid','PixelValues','BoundingBox'});
figure, imshow(BW5);
title('Standard Deviation of Regions');
hold on
for k = 1 : numObj
    s(k).StandardDeviation = std(double(s(k).PixelValues));
    text(s(k).Centroid(1),s(k).Centroid(2), ...
        sprintf('%2.1f', s(k).StandardDeviation), ...
        'EdgeColor','b','Color','r');
end
for k = 1 : numObj
    S(k)=s(k).Area;

   text(S(1),S(2), ...
       sprintf('%d', S(k)), ...
       'EdgeColor','b','Color','r');


end
hold off





当我运行代码时,它显示



when I run the code, it shows error in

text(S(1),S(2), ...
      sprintf('%d', S(k)), ...
      'EdgeColor','b','Color','r');





I我想最有可能是用错误的方式输入它。

有人能帮我纠正吗?

谢谢。



这段代码基本上是找到e的区域已检测到的ach对象。



I think most probably I type it in a wrong way.
Can anyone help me correct it?
Thanks.

This code is basically find the area of each objects that had been detected.

推荐答案

这篇关于如何计算面积的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆