Converting back to colour image after wavelet transform on luminance plane

Hi, I'm having difficulty converting my images back to colour. I started with two colour images of the same scene taken at different focus settings. I then Converted the images from RGB to NTSC colourspace and assigned Luminance planes of images to Lumback and Lumfront.
% Reading in images
Focusfront=imread('focusfront.jpg');
Focusback=imread('focusback.jpg');
%%%Convert image from RGB to NTSC colourspace
%%%and Assign Luminance planes of images to Lumback and
Lumfront
NFocusfront=rgb2ntsc(Focusfront);
Lumfront=NFocusfront(1:M,1:N,1);
NFocusback=rgb2ntsc(Focusback);
Lumback=NFocusback(1:M,1:N,1);
The images were broken down into blocks of 8 by 8. I then performed haar transforms on these images and selected the block with greater detail from each image to create 1 composite image.
The final image is of the form: double Is there anyway to convert this to colour again?
I've tried ntsc2rgb but it comes up with an error message saying: ??? Error using ==> ntsc2rgb>parse_inputs at 95 YIQMAP must be a M-by-3 array.
Thanks in advance for any advice. Karen

Answers (1)

When you select the blocks with greater detail based upon the luminance channel, you should should select the same blocks from the other two channels (which might turn out to be as simple as changing a ",1)" to a ",:)" in the code.) The array you feed in to ntsc2rgb() needs to be 3 dimensional -- it needs to have the other two channels.

Categories

Asked:

on 23 Mar 2011

Community Treasure Hunt

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

Start Hunting!