Recovery of RGB from a Converted RGB2Gray converted image

조회 수: 4 (최근 30일)
thiirane
thiirane 2015년 1월 4일
댓글: thiirane 2015년 1월 5일
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
Image Analyst
Image Analyst 2015년 1월 5일
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 2015년 1월 5일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2015년 1월 4일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Blue에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by