red Pixel values in ditinct points
Afficher commentaires plus anciens
I have a separate part of the picture. Had placed the image into a new coordinates. How can I get the red Pixel values in the points of x-y coordinate?
Réponses (1)
Image Analyst
le 25 Avr 2014
0 votes
See my color segmentation demos in my File Exchange. They do that (find red pixels), though I'm not exactly sure what you mean by "points of x-y coordinate".
8 commentaires
fereshte
le 25 Avr 2014
Image Analyst
le 25 Avr 2014
OK, you can do that, just segment it to get a binary image, redMask, and then use find and mean:
[rows, columns] = find(redMask);
meanX = mean(columns);
fereshte
le 12 Mai 2014
Image Analyst
le 12 Mai 2014
Try this:
greenLine20 = rgbImage(20,:,2); % Extract line 20 of the green channel.
meanGreenLine20 = mean(greenLine20); % Get its mean.
fereshte
le 12 Mai 2014
Image Analyst
le 12 Mai 2014
The 2 means color channel 2, which is green. Here, run this code:
rgbImage = imread('peppers.png');
greenLine20 = rgbImage(20,:,2); % Extract line 20 of the green channel.
meanGreenLine20 = mean(greenLine20); % Get its mean.
Do you get a 512 element long array for greenLine20? And a value of 36.3770 for the mean? If you don't get that for your image, then attach it.
fereshte
le 13 Mai 2014
Image Analyst
le 13 Mai 2014
Okay, whatever...as long as you got it working.
Catégories
En savoir plus sur Image Processing Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!