How to draw rectangles along the tampered region of an image ?
4 views (last 30 days)
Show older comments
Answered: Image Analyst on 8 Feb 2015
I have already determined the blocks of an image which are tampered.I want to draw a box over around this blocks and show the same in original image.Can any one please suggest any method for the same.
imshow(Block0(:,:,i); %tampered block i
[x]=FirstPositionBlock(i,:); %coordinate values of the first pixel of tampered block
If J is the original image how can i get the box drawn on the image corresponding to the tempered blocks of the image.
Image Analyst on 8 Feb 2015
rectangle('Position', [x(1), x(2), 32, 32]);
More Answers (2)
Hi You can use the function
annotation('rectangle',[x y w h])
Hi, I just saw in the documentation that the inputs should be normalized. Try to divide x(1) width image width and x(2) with image height, same for rectangle width and height.
Find more on Watermarking in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!