Image Equalization to compensate for light sources
Asked Answered
R

2

0

Currently I am involved in an image processing project where I am dealing with human faces. But I am facing problems with the images in cases where the light source is on either the left or right side of the face. In those cases, the portion of the image away from the light source is darker. I want to distribute the brightness over the image more evenly, so that the the brightness of darker pixels is increased and the brightness of overly bright pixels is decreased at the same time.

I had used 'gamma correction' techniques to do the same but the results are not desirable , Actually I want to create an output in which the brightness is independent of the light source, in other words , increasing the brightness of the darker part and decreasing the brightness of the brighter part. I am not sure if I reproduced the problem statement correctly but this is a very common problem and I haven't found anything useful abut this on the web.

1. Image with Light source on the right side enter image description here

2. Image after increasing the brightness of the darker pixels.[img = cv2.pow(img, 0.5)] enter image description here

3. Image after decreasing the brightness of Bright pixels[img = cv2.pow(img, 2.0)] enter image description here

I was thinking of taking the mean of both the images 2 and 3 but as we see that the over bright pixels still persist in the image 3 , and I want to get rid of that pixels, Any suggestion ?

In the end I need an image with homogeneous brightness, and independent of the light source.

Rauwolfia answered 6/2, 2015 at 16:14 Comment(1)
have you tried using CLAHE?Kenlee
S
0

Take a look at homomorphic filtering applied to image enhancement in which you can selectively filter reflectance and illumination components of an image.

Stanfordstang answered 7/2, 2015 at 11:41 Comment(0)
D
0

I found this paper: http://www.mirlab.org/conference_papers/International_Conference/ICASSP%202010/pdfs/0001374.pdf i think it exactly addresses the concern you have.

you will need to compute "gradient" of an image i.e. laplacian derivatives for which you can read up on this: http://docs.opencv.org/trunk/doc/py_tutorials/py_imgproc/py_gradients/py_gradients.html

i'd be very interested to know about your implementation. if you run into trouble post a comment here and i can try to help.

Dream answered 7/2, 2015 at 15:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.