Generates a histogram of pixel values in a frame and then,
in normal mode, calculates a (weighted) measure of the variance in pixel values.
in diff mode, calculates a (weighted) measure of the variance in differences of pixel count between two neighbouring values (if 800 pixels have value 112 and 1400 pixels have value 113, then the (abs) difference is 600)
in normal mode, calculates a (weighted) measure of the variance in pixel values.
in diff mode, calculates a (weighted) measure of the variance in differences of pixel count between two neighbouring values (if 800 pixels have value 112 and 1400 pixels have value 113, then the (abs) difference is 600)