# How do automatic high-beam headlights work on cars?

Modern cars can operate high-beam headlights automatically:

• They automatically switch from high-beam headlights to low-beam ones (less intense) when you enter a town or there is a car in front of you either going in the same or opposite direction so you don't dazzle other drivers or people in the street.

• Oppositely, when you are in almost complete darkness and there aren't any other drivers at sight, the system automatically sets the high-beam headlights.

I am aware that in the front part of these cars there is a camera or sensor and also imagine that the automatic switching when entering or exiting a town is achieved by just having a threshold ambient illumination.

But I am unable to imagine how the recognition of other cars works. It might be that an image recognition program is used to detect pairs of front car lights (white) and rear lights (red). However, how do you deal with:

• pairs of street lamps (far from the road and not illuminating it) that could be identified as a car coming in the opposite direction,
• pairs of lights coming from the reflectors of the crash barriers,
• many other random pairs of lights that could be interpreted as cars.

Is this technology based on AI software that after intense training is able to deal with these points? Or is it a less complex image analysis program that takes into account that moving lights outside the car (with respect to the road) move differently than static lights (with respect to the road) when seen from the car?

Edit: I've seen this technology working on Audi A4 and A5 cars.

I don't have domain knowledge on how these cars perform this detection, but between my EE and ML degrees, I'm quite confident they are most likely not using any AI software to perform this prediction. It is similar to using AI prediction with IR bathroom sensors for a paper dispenser.

What they are probably doing is just simply looking at light intensity. The reflectors you provide in the image will have a luminosity much lower than a car light, so from a threshold perspective I would assume is easy to detect car lights from a reflector.

Here is a video from a guy talking about it. youtube.com/watch?v=teilITzPjPU He shows an example where the light intensity is so high for some signs that the high beams turn off. I would guess that at 300 meters a directed car light would have a higher average area luminosity, than most street reflectors, but i can't verify if that's true.

if very_bright_light:
turn_off_highbeams()
else:
turn_on_highbeams()


I'm sure there is more complexity to it, as the time frame of exposure, or perhaps car lights release light with specific frequencies that are easily detectable.

Hope this helps in the event that a domain expert doesn't show up.

• Thank you @JohnRothman You're right that the reflectors are less luminous than most cars' lights but, on straight roads, I've seen the technology detecting car lights at least 300 m away and those lights were less intense than pair of lights of nearby reflectors or street lights. Also, I considered the frequency trick taking into account that street lights work with alternating current at 50 Hz (typically) while car lights use direct current from batteries. That way you could differentiate car lights from street lights but the reflections from your car are still continuous signals. Oct 26, 2021 at 13:22
• Here is a video from a guy talking about it. youtube.com/watch?v=teilITzPjPU. He shows an example where the light intensity is so high for some signs that the high beams turn off. If what you say is true, then I would guess that at 300 meters a directed car light would have a higher average area luminosity, than most street reflectors, but i can't verify if that's true. Sorry. Oct 27, 2021 at 16:27
• Thank you again! The video definitely clarified the point. Would you mind making an edit to your answer so I can mark it as the correct one? Regarding the distant cars and nearby reflectors, I imagine that it might cause some sporadic problems but somehow it works. Oct 31, 2021 at 12:58
• Glad I could provide some help. I've edited the original answer. Nov 1, 2021 at 13:07