I am trying to compute the variance of a plain and cipher grayscale LENA image... I found in a paper that variance value is equal to 630780 for a plain Lena image while if I calculate I find it to be around 2298.45
Can someone explain how to code the same or any existing functions or libraries that can be used in Matlab or python for the same? I can see the formula but why am I getting the wrong values.