The distribution of gray and/or color values within an image can be determined by a homogeneity factor. Generally speaking, an image is homogeneous if each dot (pixel) in the image has the same color. If there are strong contrasts within an image, it is inhomogeneous. Statistically, in the simplest case, the standard deviation of each pixel from the mean gray value can be calculated. If the variance of this standard deviation is high, the homogeneity is low.