imshow(uint8(imagematrix)) and imshow(int8(imagematrix)) gives different results although pixel values are between 0-255
조회 수: 3(최근 30일)
I want to understand effects of mean filter in zro mean gaussian noised image with different window size. image is read by imread and assigned to matrix.Although pixel values in the image matrix are between 0 and 255, imshow(uint8(imageMatrix)) and imshow(int8(imageMatrix)) gives different results-in int8 case the image is brighter for example.Why can be this happen, what is the reason and I am not sure which one is true while examining the effects of mean filter on zero-mean gaussian variance noised image? Thanks in advance friends.
Walter Roberson 2020년 4월 8일
When you int8() data that is in the range 0 to 255, all values that are 128 or more are turned into 127, the maximum value for the range.
When you imshow() an int8 image, it notices that it is int8, and scales the colors to run from -128 to +127, with 0 being the middle color and 127 being the brightest color. But since you started with uint8 you do not have any values that are negative, and you will probably have a number of locations that int8() changed from being 128 or more into 127 which is maximum brightness for int8.