How can i extract color from RGB image section ?

3 visualizaciones (últimos 30 días)
Nathash Kamur
Nathash Kamur el 4 de Dic. de 2015
Respondida: Image Analyst el 10 de Dic. de 2015
I have image of color fabric, then i crop small part of that image, i need to get the rgb color of that part (not individual pixel colors, one color as a whole image part)
  1 comentario
Amith Kamath
Amith Kamath el 10 de Dic. de 2015
Nathash: I'm afraid your question may not be clear enough for anyone to help with. Could you please elaborate on what you mean by 'one color as a whole image part'? I believe you have a three channel image with R, G and B values accessible. I don't quite understand what whole image part means.

Iniciar sesión para comentar.

Respuestas (1)

Image Analyst
Image Analyst el 10 de Dic. de 2015
It's very unclear what you want. Try to rephrase your question. Perhaps you want this
rgbImage = imcrop(); % Get a subsection of the current image in the current axes.
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by