How to fuse R,G,B Components?
Afficher commentaires plus anciens
I have read an RGB Image, and extracted all its components R,G,B seperately by,
R = inputImage (:,:,1);
G = inputImage (:,:,2);
B = inputImage (:,:,3);
Again I performed some operations to get the values changed. they are Re,Ge,Be.
Now again I want to display the Image integrating all these Re,Ge,Be. How?
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 14 Sep 2012
Concatenate separate image channels into one RGB image using cat():
newRGBImage = cat(3, Re, Ge, Be);
But now, how you display it depends on what class your processed image channels were: integer or floating point. If, after processing, your new image is uint8, you can simply display it.
imshow(newRGBImage);
If, after processing, your new image channels are floating point, instead of uint8, and are in the range 0-255, you'll need to cast to uint8 before you display the new image.
imshow(uint8(newRGBImage));
If you have floating point values outside this range, you can do:
imshow(im2double(newRGBImage));
Catégories
En savoir plus sur Image Processing Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!