Reputation: 559
Here is what I did and want. I have two images with small differences. In the case of same resolution and position, to detect difference is simple. Just subtracting two images. Then the subtracted image has only different points valid. How can I draw bounding boxes to those differences? Is there any function to do it in matlab?
Upvotes: 0
Views: 403
Reputation: 1458
Given a set of 2D points X
where the images are different, you can draw the bounding box on top of your image as follows.
imshow(I)
hold on
rectangle('Position', [min(X) (max(X)-min(X))])
hold off
(Depending on the data format, some transposes '
may be needed.)
Upvotes: 2