Info

This question is closed. Reopen it to edit or answer.

How to separate an image to rgb?

1 view (last 30 days)
adibbakarrudin
adibbakarrudin on 18 Apr 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
How to extract r, g and b values from an image in matrix form?

Answers (1)

Jos (10584)
Jos (10584) on 18 Apr 2014
Is your image a RGB image with 3 dimensions?
RedValues = MyImage(:,:,1)
...
  3 Comments
Walter Roberson
Walter Roberson on 18 Apr 2014
Why not? Not every location will have any measurable red contribution.
Image Analyst
Image Analyst on 18 Apr 2014
Try putting a semicolon at the end of the line to suppress the display of pixel values.

Community Treasure Hunt

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

Start Hunting!