How can i extract color from RGB image section ?

3 vues (au cours des 30 derniers jours)
Nathash Kamur
Nathash Kamur le 4 Déc 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 commentaire
Amith Kamath
Amith Kamath le 10 Déc 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.

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 10 Déc 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);

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by