I have some images of fish scales that are CMYK gray that I would like to convert to RGB. They read in as a m x n x 4 sheet array with imread. They do not have a color profile, using iccread on them returns an error ('No Icc profile found in TIFF file'). The original looks like this:
When I try to convert with the following:
im=imread('example_img.TIF');C = makecform('cmyk2srgb')im2=applycform(im,C);
It returns a m x n x 3 sheet array, but when I look at it in imshow (or write to a file) the color is wrong (it is way too dark):
Some of the features are visible, but the background is wonky. I've checked, it's not just that it's inverted (i.e. imcomplement doesn't fix it). I have tried many color profiles (reading in with iccread), like so:
inprof = iccread('BlackWhite.icc');outprof = iccread('sRGB.icm');C = makecform('icc',inprof,outprof);im2=applycform(im,C);
but none result in an appropriate looking image. Does anyone have any ideas? I have attached the example image.
Best Answer