Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Histograms contain useful information about your image, smoothing it will degrade the information, making the histogram mostly useless.

If you still want to use it, here you are: just replace each value by the mean of its neighbors. e.g. smooth_hist[i]=(hist[i-2]+hist[i-1]+hist[i]+hist[i+1]+hist[i+2])/5. You can use a gaussian weighting, too.