red Pixel values in ditinct points

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?

답변 (1개)

Image Analyst
Image Analyst 2014년 4월 25일

0 개 추천

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

fereshte
fereshte 2014년 4월 25일
My x-axis from 0 to 128 that I want to each point of x get the average of all red pixels valuse Along the x
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
fereshte 2014년 5월 12일
thanks i want to get mean of green pixel values along the point such x=20 in RGB image.can you help me?
Try this:
greenLine20 = rgbImage(20,:,2); % Extract line 20 of the green channel.
meanGreenLine20 = mean(greenLine20); % Get its mean.
fereshte
fereshte 2014년 5월 12일
what is 2 in this code?(rgbImage(20,:,2)). response is zero!!why?
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
fereshte 2014년 5월 13일
no image size is 47*108. thank you i use other function for this problem.
Image Analyst
Image Analyst 2014년 5월 13일
Okay, whatever...as long as you got it working.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

질문:

2014년 4월 25일

댓글:

2014년 5월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by