-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

Error

Error using rectangle Value must be a 4 element vector

Error in detecttext (line 49)

 rectangle('position',Ibox(:,cnt),'edgecolor','r');
LML
  • 1,659
  • 12
  • 29

1 Answers1

1

Try making it a row instead of a column:

Ibox(:,cnt).'
chappjc
  • 30,359
  • 6
  • 75
  • 132