5. Page 5 of 7Alex Zaleski 3/20/2014
3/20/2014file:///C:/Users/azaleski/Downloads/html/AlexZaleski_motionDetection.html
6. Box It (PART 4)
figure;
imshow(image2);
hold on;
for(j=1:len)
x=stats(j,1).BoundingBox(1);
y=stats(j,1).BoundingBox(2);
xw=stats(j,1).BoundingBox(3);
yw=stats(j,1).BoundingBox(4);
if(xw>15 && yw> 20)
line([x,x+xw,x+xw,x,x],[y,y,y+yw,y+yw,y],'color','r','Linewidth',3);
end
end
hold off;
Page 6 of 7Alex Zaleski 3/20/2014
3/20/2014file:///C:/Users/azaleski/Downloads/html/AlexZaleski_motionDetection.html
7. Published with MATLAB® R2013b
Page 7 of 7Alex Zaleski 3/20/2014
3/20/2014file:///C:/Users/azaleski/Downloads/html/AlexZaleski_motionDetection.html