# Few statistical measures for an image

• Dec 11th 2010, 05:06 PM
Bivalgo
Few statistical measures for an image
I'm not sure which section it belongs to, so I thought I should post in "others". The thing is I have a 3x3 matrix which represents a nine pixel square from grayscale image, so let's say the matrix can have values from 0 to 255. Now I need to make few statistical measures for the square based on this matrix, but whenever I tried to google any of them it always showed solutions that use some dedicated programs (like Matlab) or C++ libraries etc., while I only want pure mathematical formulas so I could calculate everything by myself based on the said matrix. The measures I need to calculate are:
- measure of smoothness
- measure of uniformity
- average gray level
- average contrast
- thrid moment
- entropy
Is there anyone who knows how to get these from the matrix? Any help will be apreciated.
• Dec 11th 2010, 06:58 PM
ark600
I would imagine that average grey level is quite simple (take the average).
I suppose the third moment is derived once you know the mean ( is it the cube root of the sum of absolute values of the cubes of the differences of each element from the mean? )
-- sorry, I would write it as a formula rather than words if I was fluent in the code.
I don't know the formula for other variables.
• Dec 18th 2010, 06:49 PM
Bivalgo
Thank you very much, does anyone else know other formulas?
• Dec 21st 2010, 09:49 AM
zzzoak
May be you could give us the source code in C or C++ of these functions and we could write it in pure math.