Wednesday, December 27, 2017

software implementation - Removing Glare from Image


Disclaimer: I am in NO way engaged in signal processing. Just very curious...


Ny question is, very simply: is it possible to apply software processing to an image to remove or reduce headlight glare?


It would be a picture such as this:
http://www.driversedguru.com/wp-content/gallery/jamie-gallery/Lots%20of%20Glare.jpg


If this IS possible, is there a software library available for this? I don't care which language, I just want the capabilities. Slash does anyone know if there is current research on this?



Answer



The problem you might have is that when bright lights are present, the camera will be using a fast shutter speed to keep the image from saturating too much. All the detail you are interested in is in the bottom few bits of the data.



So even if you remove the glare and then try and pull the rest of the image up in level, it's very noisy. For example, if you take your image and play with the levels to pull up the darker sections and just allow the glare to clip, this is the result:



If that's OK for onward processing (I don't know what you have in mind) then you could maybe remove the glare by looking at distributions of saturated pixels, and expand into the "glow" around them.


A better solution (if you have the option) can be to use a high-dynamic range camera which has an non-linear response in the pixels, and also often 10 or 12 bits per pixel of usable resolution, which means you can keep 7-8 bits for the darker sections.


No comments:

Post a Comment

digital communications - Understanding the Matched Filter

I have a question about matched filtering. Does the matched filter maximise the SNR at the moment of decision only? As far as I understand, ...