separating r g . b's from a colour image

1 回表示 (過去 30 日間)
Matpar
Matpar 2019 年 8 月 29 日
コメント済み: KALYAN ACHARJYA 2019 年 8 月 29 日
Hi all,
I am trying to separate the red green blue values of an image and it's baffling me based on what i have googled so far!
can someone guide me please and
Thanx in advance
im = imread('forest.jpg');
r=im(:,:,1);
g=im(:,:,2);
b=im(:,:,3);
disp(r);
disp(g);
disp(b);
  1 件のコメント
Stephen23
Stephen23 2019 年 8 月 29 日
The MATLAB documentation has an excellent explanation of different images types:
What exactly is baffling you?

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

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 8 月 29 日
編集済み: KALYAN ACHARJYA 2019 年 8 月 29 日
You are doing right.
im = imread('forest.jpg');
r_plane=im(:,:,1);
g_plane=im(:,:,2);
b_plane=im(:,:,3);
subplot(311),imshow(r_plane);
subplot(312),imshow(g_plane);
subplot(313),imshow(b_plane); % Use imshow to display image
Any issue?
  2 件のコメント
Matpar
Matpar 2019 年 8 月 29 日
I was doubting myself but i solved it thanx for responding so swiftly Kalyan!
ever grateful!
KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 8 月 29 日
It's my pleasure, Matpar!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by