how to get back the rgb image from r g b component ?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
namita chandrakar
am 18 Nov. 2014
Beantwortet: Kevin Claytor
am 18 Nov. 2014
i have 3D image. i want to combine r g and b component ? how do i display the 3D image back ?
% display one channel only clear all;
im=imread('images/DSC1228L_512.jpg'); im_red = im; im_green = im; im_blue = im;
% Red channel only im_red(:,:,2) = 0; im_red(:,:,3) = 0; figure, imshow(im_red);
% Green channel only im_green(:,:,1) = 0; im_green(:,:,3) = 0; figure, imshow(im_green);
% Blue channel only im_blue(:,:,1) = 0; im_blue(:,:,2) = 0; figure, imshow(im_blue);
0 Kommentare
Akzeptierte Antwort
Kevin Claytor
am 18 Nov. 2014
Exactly the opposite of how you pulled out the data;
im = imread(...);
red = im(:,:,1);
grn = im(:,:,2);
blu = im(:,:,3);
original_mk2 = zeros(size(im));
original_mk2(:,:,1) = red;
original_mk2(:,:,2) = grn;
original_mk2(:,:,3) = blu;
fiugre; imshow(original_mk2);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing and Computer Vision finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!