フィルターのクリア

how to get back the rgb image from r g b component ?

2 ビュー (過去 30 日間)
namita chandrakar
namita chandrakar 2014 年 11 月 18 日
回答済み: Kevin Claytor 2014 年 11 月 18 日
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);

採用された回答

Kevin Claytor
Kevin Claytor 2014 年 11 月 18 日
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 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by