I want to calculate the variance of grayscale and RGB images in python. I tried using existing functions from NumPy and statistics but did not get the intended result.The formul