作业帮 > 综合 > 作业

MATLAB中 regionprops返回值怎么引用阿

来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/09/21 01:46:42
MATLAB中 regionprops返回值怎么引用阿
s=size(junzhi);
B=bwlabel(junzhi);
fh=zeros(s(1),s(2));
box=regionprops(B,'BoundingBox');
for i=1:length(box)
left=round(box{i}(1));
top=round(box{i}(2));
right=round(box{i}(1)+box{i}(3));
bottom=round(box{i}(2)+box{i}(4));
fh(top,left:right)=1; %画矩形框%
fh(bottom,left:right)=1;
fh(top:bottom,left)=1;
fh(top:bottom,right)=1;
end
这个BOX引用不对啊 怎么改啊
MATLAB中 regionprops返回值怎么引用阿
left=round(box(i).BoundingBox(1));
这样一改,就对了.