It is likely that the image contains an embedded ICC profile, which affects the way in which the image should be displayed from the raw pixel data. When functions such as "imread" are executed, they only read raw pixel data from the image while ignoring any ICC profile associated with the image.
To check whether the image contains an ICC profile, you can run the following code:
info = imfinfo('input_image.tif');
hasICCProfile = isfield(info,'ICCProfileOffset')
If this is the case, then a workaround to the issue is outlined below. (Note that this workaround requires Image Processing Toolbox.)
1. First, read ICC profile data from the image file using the "iccread" function:
sourceProfile = iccread('input_image.tif');
2. Use the "makecform" function to create a color transformation structure that can convert the previous ICC profile to standard RGB:
destProfile = iccread('sRGB.icm');
ctform = makecform('icc', sourceProfile, destProfile);
3. Apply the previous transformation to the raw image pixel data using the "applycform" function to obtain the corrected pixel data, which can now be used for display.
origImage = imread('input_image.tif');
colorCorrectedImage = applycform(origImage, ctform);
imshow(colorCorrectedImage);