MATLAB: How to plot RGB intensity value from the specific pixel
pixelrgb plot
How to plot RGB intensity value from the specific pixel?. Let say I have 50 picked pixel coordinate, I would like to plot these values in to RGB graph.
Best Answer
Let R be a vector of the row coordinates of the selected pixels, and C be a vector of the corresponding column coordinates. Let your image be I. Then
ind = find((sub(:,1)==-i&sub(:,2)>=-i&sub(:,2)<=i)|(sub(:,1)==i&sub(:,2)>=-i&sub(:,2)<=i)|(sub(:,2)==-i&sub(:,1)>=-i&sub(:,1)<=i)|(sub(:,2)==i&sub(:,1)>=-i&sub(:,1)<=i));
Best Answer