I have a series on .png images, which were created by Matlab running 'image' on series on mxn matrices. In doing so, it applied the default colormap (jet). I now need to get the data back from the images (the data itself was lost). As I understand it, the image function takes my mxn matrix, and a colormap, and uses it to generate an mxnx3 tensor (of RGB values). Is it possible (aside from just searching through the colormap like a lookup table), to get Matlab to go from the image, and, based on the colormap used to generate it, reconstruct the data.
This can certainly be done, since the mapping from the original data to the RGB values is linear, based on the colormap, but I can only think of using the colormap as a lookup table. Is there a sort of reverse-image function?
Thanks.