>> uint8(255)
ans =
uint8
255
>> int8(uint8(255))
ans =
int8
127
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.
Best Answer