draw circles in result of comparing two images
3 views (last 30 days)
Show older comments
ibrahim soliman
on 5 Apr 2014
Commented: ibrahim soliman
on 8 Apr 2014
i want to compare between two image and the difference between two image select with a circle
code : -
A = imread('C:\Users\iboo\Desktop\1.png');
B = imread('C:\Users\iboo\Desktop\2.png');
imshowpair(B,A);
ThankS
0 Comments
Accepted Answer
Image Analyst
on 5 Apr 2014
Perhaps something like (untested):
diffImage = A ~= B; % Find pixels that are not the same.
[rows, columns] = find(diffImage); % Find their rows and columns.
plot(columns, rows, 'ro'); % Plot circle over those pixels that are not the same.
5 Comments
Image Analyst
on 7 Apr 2014
ibrahim, I guess my gentle hint was not taken. You were supposed to say to yourself, "He's right. I haven't given him anything whatsoever that he can help me with. I have not given him 1.png or 2.png. I have not even given him my code so he can reproduce my 3 red plots. How can he do anything at all for me? There's no way he can do anything to help me. I guess I'd better attach my image files and my m-file so he'll have something to work with."
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!