From: Uzma on
Hi,
I draw the histogram of my image using

figure, imhist(image);
Now, I want to calculate the mean, standard deviation and degree of skewness using histogram. Kindly guide me how to calculate these ?

Thanks
From: ImageAnalyst on
On May 14, 9:03 am, "Uzma " <u...(a)hw.ac.uk> wrote:
> Hi,
> I draw the histogram of my image using
>
> figure, imhist(image);
> Now, I want to calculate the mean, standard deviation and degree of skewness using histogram. Kindly guide me how to calculate these ?
>
> Thanks
----------------------------------------------------------------------------
It's just the regular, usual form as for any moment:

meanGL = sum(counts .* GLs) / sum(counts);
Similarly for the second and third moments.
Formulas straight out of the textbooks, just with a little MATLAB
vectorization thrown in for fun (and speed).