Descent Image Equalization

asked 2015-02-06 09:07:35 -0500

Currently I am involved in an Image processing project in which I am dealing with the human faces. But I am facing problems with the images in which the light source is on either of left or right side of the face , in that case, the other portion of image is darker, But I want to Distribute the brightness over the image So that the the brightness of darker pixels is increased and the brightness of Over 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 Darker part and decreasing the brightness of Brighter part. I am not sure if I reproduced the problem statement correctly but this is a very common problem and I haven't anything useful abut this on the web.

1. Image with Light source on the right side

image description

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

image description

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

image description

I was thinking of taking 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.

edit retag flag offensive close merge delete