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/07/29 21:41:43
![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](/uploads/image/z/9475910-62-0.jpg?t=MATLAB%E4%B8%AD+regionprops%E8%BF%94%E5%9B%9E%E5%80%BC%E6%80%8E%E4%B9%88%E5%BC%95%E7%94%A8%E9%98%BFs%3Dsize%28junzhi%29%3B+B%3Dbwlabel%28junzhi%29%3B+fh%3Dzeros%28s%281%29%2Cs%282%29%29%3Bbox%3Dregionprops%28B%2C%27BoundingBox%27%29%3B+for+i%3D1%3Alength%28box%29left%3Dround%28box%7Bi%7D%281%29%29%3Btop%3Dround%28box%7Bi%7D%282%29%29%3Bright%3Dround%28box%7Bi%7D%281%29%2Bbox%7Bi%7D%283%29%29%3Bbottom%3Dround%28box%7Bi%7D%282)
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));
这样一改,就对了.