Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

hist and imhist. image processing

$
0
0
HI,

what am I doing wrong?

I have an RGB image A.
I do rgb2gray(A)

now I apply "x-m": I take every pixel and substrate from it the mean of it's 8 surrounding pixels.

so that gives me a new matrix B.

(the motivation is that now histogram of B is supposed to be closer to Gauss distribution)

if i try now imhist(B) I get something that makes no sense.
if i try hist(B, 256) it is perfect.

1.why is that? how can this be?
2. the problem with hist, is that i am not sure how to calculate now the mean and sigma of the histogram because it looks like the values of hist has nothing to do with the values of the pixels of B...
3. why the more bins i take, the lower the maximum value at the Y-axis?

thank you so much,
Tomer

Viewing all articles
Browse latest Browse all 19628

Trending Articles