Finding the difference between two images algorithm.
12 次查看(过去 30 天)
显示 更早的评论
Hello,I am trying to write code to find the difference between two similar images. My way was: make them gray (with rgb2gray) subtract and then add threshold) but it gave me nothing.
The way I am working isnt correct ? maybe I am missing something ?
3 个评论
Rik
2018-7-28
There is a lot that can go wrong here. We can guess what went wrong, but the best way is if you upload example images and the code you were using.
回答(2 个)
Image Analyst
2018-7-28
Subtracting will clip negative values at zero - not good! Cast to double before that.
Try the built-in functions immse() or psnr().
If you want to do it yourself, check out imabsdiff().
2 个评论
Image Analyst
2018-7-29
Are you sure you're displaying the difference image with [] - otherwise it will do that.
differenceImage = abs(double(im1gray)-double(im2gray));
imshow(differenceImage, []);
Savita Hanchinal
2021-4-21
please anyone help me ...which algorithm is best for fake currency detection
2 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!