What techniques will reduce headlight glare in vehicle image processing?

I am faced with the challenge of both reducing glare from headlights and increasing overall contrast for better object recognition in an attempt to enhance the image quality of road vehicles at night. I am brainstorming here so I have not tried anything yet but plan on using OpenCV and Python as well as making hardware/camera choices to suit the application.

Hardware as an important aside, my question here is in regards to image processing techniques for low latency video streaming

** I am not attempting to classify objects using bounding boxes, I am attempting to clean up the images for humans to view. This project is for an ADAS system using a large rectangular screen displaying the rear view form the vehicle for better night driving experience. Thermal Cameras are also currently outside the scope of this project

Histogram Equalization is said to help extract data from images with poor contrast ( Cars on a dark road ) but what about reducing the blinding effects of headlights?

HSV + CLAHE seems to be a common place to start but no universal method seems to be in use to do the innate complexities of the problem.

What am I getting wrong?

once the picture is formed, it’s impossible to improve meaningfully. avoid the problem entirely if you can.

clean optics to reduce light scattering from dust/dirt/debris/scratches. simple to do.

HDR image sensor. definitely. talk to manufacturers, let them demonstrate how their camera and lens deals with spotlights (oversaturation, light bleeding physically, scanline artefacts, …). ideally, shining a spotlight into the camera only ruins a tiny spot right where the light is, but nothing else. set exposure and aperture to fixed, since you care about the rest of the scene being imaged. if the camera attempts to adjust exposure to respect the spotlight, that’ll cast everything into darkness.

if you have to, you could try some tone mapping. that can happen globally (LUT) or locally (gives the “typical” HDR look even though that’s not HDR, that’s dynamic range compression)