Why does the image after subtracting the original image from average image displays a black screen
Show older comments
Why does the image after subtracting the original image from average image displays a black screen?
Accepted Answer
More Answers (1)
Image Analyst
on 14 Jul 2019
Some or all of your values may be small (too dark to see) or would be negative (and so they will be clipped to zero if you have a uint8 image). Cast to double before subtracting, so negative numbers will be allowed (not clipped), then use [] in imshow() so that negative numbers will show up:
diffImage = double(image1) - double(image2);
imshow(diffImage, []);
Categories
Find more on Images 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!