フィルターのクリア

I want code to convert color image to rgb color spaces exactly

2 ビュー (過去 30 日間)
venmal devi
venmal devi 2015 年 9 月 2 日
コメント済み: Walter Roberson 2015 年 9 月 2 日
I want code to convert color image to rgb color spaces exactly
  2 件のコメント
Image Analyst
Image Analyst 2015 年 9 月 2 日
What does that mean? Why is your color image not already RGB? What color space is it in, and how did you create it in that color space? http://www.mathworks.com/matlabcentral/answers/728-how-do-i-write-a-good-question-for-matlab-answers
Walter Roberson
Walter Roberson 2015 年 9 月 2 日
編集済み: Walter Roberson 2015 年 9 月 2 日
In a duplicate Question, the user posted
X=imread('images.jpg'); R = X(:,:,1); image(R), colormap([[0:1/255:1]', zeros(256,1), zeros(256,1)]), colorbar;
%Green Component G = X(:,:,2); figure; image(G), colormap([zeros(256,1),[0:1/255:1]', zeros(256,1)]), colorbar;
%Blue component B = X(:,:,3); figure; image(B), colormap([zeros(256,1), zeros(256,1), [0:1/255:1]']), colorbar;

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2015 年 9 月 2 日
X = im2double(imread('images.jpg'));
R = X(:,:,1);
G = X(:,:,2);
B = X(:,:,3);
z = zeros(size(R));
Rimg = cat(3, R, z, z);
Gimg = cat(3, z, G, z);
Bimg = cat(3, z, z, B);
L256 = linspace(0,1,256).';
z256 = zeros(256,1);
mapR = [L256, z256, z256];
mapG = [z256, L256, z256];
mapB = [z256, z256, L256];
figure; image(Rimg); colormap(mapR); colorbar();
figure; image(Gimg); colormap(mapG); colorbar();
figure; image(Bimg); colormap(mapB); colorbar();
  2 件のコメント
venmal devi
venmal devi 2015 年 9 月 2 日
its displaying R ,G and B color ..but behind every image it showing black gray image why ?
Walter Roberson
Walter Roberson 2015 年 9 月 2 日
I do not know what you mean by a "black gray image" ? Please capture a portion of the screen and post the image.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeColormaps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by