フィルターのクリア

RGB to gray pic

2 ビュー (過去 30 日間)
Franzi
Franzi 2020 年 5 月 1 日
コメント済み: Image Analyst 2020 年 6 月 18 日
I want to convert a RGB picture to a gray one, does anybody know how to do that?
  3 件のコメント
Rik
Rik 2020 年 5 月 1 日
You could also consider the rgb2gray function.
Image Analyst
Image Analyst 2020 年 6 月 18 日
Original question (for when it gets edited away):
I want to convert a RGB picture to a gray one, does anybody know how to do that?

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

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 5 月 1 日
編集済み: KALYAN ACHARJYA 2020 年 5 月 1 日
May be, is this to add all channels value to get the particular value
#See Whats going on, same code, just be one line see the Rik's Comments (Prefer & Recommended)
data=imread('1.jpeg');
[r,c,ch]=size(data);
for i=1:r
for j=1:c
data1(i,j)=sum(data(i,j,1:3));
end
end
imshow(data1,[]);
  2 件のコメント
Rik
Rik 2020 年 5 月 1 日
Or just:
data1=sum(data,3);
KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 5 月 1 日
yes, I feel so Thanks.

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

その他の回答 (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