title: Calculate the perceived brightness of an image
body: <p>I wanna calculate the perceived brightness of an image and classify the image into dark, neutral and bright. And I find one problem  <a href="https://stackoverflow.com/questions/14243472/estimate-brightness-of-an-image-opencv">here</a>!
  And I quote Lakshmi Narayanan's comment below. I'm confused with this method. What does "the average of the hist values from 0th channel" mean here? the 0th channel refer to gray image or value channel in hsv image? Moreover, what's the theory of that method?</p>
  
  <blockquote>
    <p>Well, for such a case, I think the hsv would be better. Or try this method @2vision2. Compute the laplacian of the gray scale of the image. obtain the max value using minMacLoc. call it maxval. Estimate your sharpness/brightness index as - (maxval * average V channel values) / (average of the hist values from 0th channel), as said above. This would give you certain values. low bright images are usually below 30. 30 - 50 can b taken as ok images. and above 50 as bright images. </p>
  </blockquote>