You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
293 B
Matlab

function plot_bounding_box(coords,widths,heights,lineType)
%plot bounding boxes
if nargin<4 || isempty(lineType), lineType='y-'; end
for i=1:size(coords,2)
x=coords(2,i);
y=coords(1,i);
plot([x,x,x+widths(i),x+widths(i),x],[y,y+heights(i),y+heights(i),y,y],lineType,'LineWidth',2);
end