Recovery of RGB from a Converted RGB2Gray converted image

4 views (last 30 days)
Hello, I have browsed the previous attempt for recovering RGB truecolor from grayscale image but have not found a solution that is satisfying so I will post this.
I have an application where I need to process a number of images at different exposures to obtain a sensor response function. To do this, I must make sure that the images are orthorectified. To do this I had to convert them to Grayscale to obtain the affine transformations. I have successfully done this. Now I want to apply the color back into the grayscales from the original images. I thought I would start simple, first with a simple grayscale to RGB recovery. It seems that the best way to do this is to convert the rgb images to indexed images. This is my attempt. Its kinda weird while I have only specified a red channel, I am getting blue and green coming in the resulting recovered RGB image. Any thoughts?
A=imread('DSC08069.JPG');
AmapR=A(:,:,1);
AmapG=A(:,:,2);
AmapB=A(:,:,3);
B=rgb2gray(A);
imshow(B);
Bind=gray2ind(B);
RGB_Aback=ind2rgb(Bind,AmapR);
imshow(RGB_Aback);
  4 Comments
Image Analyst
Image Analyst on 5 Jan 2015
You can colorize it, but not with the original colors. But you shouldn't say "that's too bad" because you don't need to colorize your registered image. Like I said, you still have your original color image. You can register that if you want - you are not stuck with just registering only your gray scale image.
thiirane
thiirane on 5 Jan 2015
I figured out how to rectify the image by simply performing the affine2d adjustments on the individual channels then reassembling them. Sorry for being slow. I appreciate your help.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 4 Jan 2015
You still have the RGB image - it's in the badly-named "A". So there is no need to recover it from the grayscale version of it. You can't even do that - that's why you couldn't find any method via your searching.

More Answers (0)

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!