2014-03-26 44 views
-1
Iprops = regionprops(cl,'BoundingBox'); 
Ibox = [Iprops.BoundingBox]; 

[m,n]=size(Ibox); 

Ibox = reshape(Ibox,[4 (n/4)]); 

figure,imshow(image); 

hold on; 
for cnt = 1:n/4 
rectangle('position',Ibox(:,cnt),'edgecolor','r'); 
end 

錯誤在MATLAB邊框對於連接區域

使用矩形 錯誤值必須是一個4元素矢量

錯誤detecttext(線49)

rectangle('position',Ibox(:,cnt),'edgecolor','r'); 

回答

1

嘗試使其成爲一排而不是一列:

Ibox(:,cnt).'