How to separate an image to rgb?

How to extract r, g and b values from an image in matrix form?

回答 (1 件)

Jos (10584)
Jos (10584) 2014 年 4 月 18 日

0 投票

Is your image a RGB image with 3 dimensions?
RedValues = MyImage(:,:,1)
...

3 件のコメント

adibbakarrudin
adibbakarrudin 2014 年 4 月 18 日
yes, rgb image with 3 dimesions. but i have a question, i have used "RedValues = MyImage(:,:,1)" before, then, why r value display so many 0?
Walter Roberson
Walter Roberson 2014 年 4 月 18 日
Why not? Not every location will have any measurable red contribution.
Image Analyst
Image Analyst 2014 年 4 月 18 日
Try putting a semicolon at the end of the line to suppress the display of pixel values.

この質問は閉じられています。

質問済み:

2014 年 4 月 18 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by