title: What's the theory behind computing variance of an image?
body: <p>I am trying to compute the blurriness of an image by using LaplacianFilter. </p>
  
  <p>According to this article: <a href="https://www.pyimagesearch.com/2015/09/07/blur-detection-with-opencv/" rel="noreferrer">https://www.pyimagesearch.com/2015/09/07/blur-detection-with-opencv/</a> I have to compute the variance of the output image. The problem is I don't understand conceptually how do I compute variance of an image.</p>
  
  <p>Every pixel has 4 values for every color channel, therefore I can compute the variance of every channel, but then I get 4 values, or even 16 by computing variance-covariance matrix, but according to the OpenCV example, they have only 1 number.</p>
  
  <p>After computing that number, they just play with the threshold in order to make a binary decision, whether the image is blurry or not.</p>
  
  <p>PS. by no means I am an expert on this topic, therefore my statements can make no sense. If so, please be nice to edit the question.</p>