DSPRelated.com
Forums

Finding Corresponding Bins

Started by filgimon2002 November 14, 2003
Hello,

I am just new to MATLAB and also to programming. I used the 'hist'
function in MATLAB to find the histogram of the image. My code is as
follows: A=imread(X);
B=imread(X);
HSV2=rgb2hsv(double(A));
H=HSV2(:,:,1);
S=HSV2(:,:,2);
[F,NBin]=hist(H);
[G,P]=hist(S);

Now I want to calculate the corresponding bin of each pixels in the
H and the S variable. How do I do that? I hope my question is clear.

Thank you,
Filgi