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
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/14 21:26:36
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
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返回值怎么引用阿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
left=round(box(i).BoundingBox(1));
这样一改,就对了.