How to transform to grayscale image?

I want to transform to grayscale image but I should not by the matlab commands I must use only matrix operations.How can I do? e.g=(262x262 x3 uint8 image).
note:ı can use basic commands sometimes if they requires.

 採用された回答

KSSV
KSSV 2018 年 11 月 29 日
編集済み: KSSV 2018 年 11 月 29 日

1 投票

I = imread(image) ;
R = I(:,:,1) ;
G = I(:,:,2) ;
B = I(:,:,3) ;
I = 1/3*(R+G+B) ;
I = uint8(I) ;
imshow(I)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

質問済み:

2018 年 11 月 29 日

編集済み:

2018 年 11 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by