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