The following is the code I used to convert a gray scale compressed image into RGB in MATLAB. But the output image is somewhat of negative image type. can anyone please tell if there is any other way to get a better rgb image or if there are any mistakes in the code? OUTPUT IMAGE
cmap = turbo(256); % Or whatever one you want.
rgbImage = ind2rgb(img2, cmap); % Convert gray scale image into an RGB image