How to separate an image to rgb?

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

Respuestas (1)

Jos (10584)
Jos (10584) el 18 de Abr. de 2014
Is your image a RGB image with 3 dimensions?
RedValues = MyImage(:,:,1)
...

3 comentarios

adibbakarrudin
adibbakarrudin el 18 de Abr. de 2014
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 el 18 de Abr. de 2014
Why not? Not every location will have any measurable red contribution.
Image Analyst
Image Analyst el 18 de Abr. de 2014
Try putting a semicolon at the end of the line to suppress the display of pixel values.

La pregunta está cerrada.

Preguntada:

el 18 de Abr. de 2014

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by