Lets say I have a matrix x=[ 1 2 1 2 1 2 1 2 3 4 5 ]
.
To look at its histogram, I can do h=hist(x)
.
Now, h
with retrieve a matrix consisting only the number of occurrences and does not store the original value to which it occurred.
What I want is something like a function which takes a value from x
and returns number of occurrences of it. Having said that, what one thing histeq
does should we admire is, it automatically scales nearest values according!
How should solve this issue? How exactly people do it?
My reason of interest is in images:
Lets say I have an image. I want to find all number of occurrences of a chrominance value of image.