1
votes

I wanna calculate the perceived brightness of an image and classify the image into dark, neutral and bright. And I find one problem here! 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?

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.

1
well the guy who asked this question is most likely as clueless as you are so I don't think it makes much sense to think about details in his question... read a book on image processing fundamentals...Piglet
@Piglet. Well, could you afford me some suggestions?rockstone533
anything from Gonzales & Woods or Burger & Burge, or just follow Amazon ratings... saves you a lot of research timePiglet

1 Answers

1
votes

If you have an RGB color image you can get the brightness by converting it to another color space that separates color from intensity information like HSV or LAB.

Gray images already show local "brightness" so no conversion is necessary.

If an image is perceived as bright depends on many things. Mainly your display device, reference images, contrast, human...

Using a few intensity statistics values should give you an ok classification for one particular display device.