How to fuse R,G,B Components?
2 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
採用された回答
その他の回答 (1 件)
Image Analyst
2012 年 9 月 14 日
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));
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!