MATLAB: Does the image after subtracting the original image from average image displays a black screen

averaging

Why does the image after subtracting the original image from average image displays a black screen?

Best Answer

There may be two issues-
  1. Suppose the image as following-
image=[3 4 5;5 6 7;1 2 0];
If you calulate the average of the image,you will get the almost same image (near values).Therefore original image - average image = Near about zero matrix or lower values, hence difference may show as black image (image having lower pixels values).
2. If the difference is smaller range, Matlab auto set to display, therefore use full scale range
imshow(difference_image,[]);
Better to check the pixels on difference image, you may easily find out the reason.
Still, not clear let me know.