Answers.Body: <p>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.</p>
  <p>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.</p>
  <p>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.</p>
  <pre><code>if very_bright_light:
      turn_off_highbeams()
  else:
      turn_on_highbeams()
  </code></pre>
  <p>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.</p>
  <p>Hope this helps in the event that a domain expert doesn't show up.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-26T13:22:04.973Z
Answers.Text: 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.
Answers.UserDisplayName: Víctor Zamora
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-27T16:27:58.720Z
Answers.Text: Here is a video from a guy talking about it. https://www.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.
Answers.UserDisplayName: John Rothman
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-31T12:58:08.843Z
Answers.Text: 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.
Answers.UserDisplayName: Víctor Zamora
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-01T13:07:03.690Z
Answers.Text: Glad I could provide some help. I've edited the original answer.
Answers.UserDisplayName: John Rothman
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-19T17:45:01.673Z
Answers.LastActivityDate: 2021-11-01T13:03:27.843Z
Answers.LastEditDate: 2021-11-01T13:03:27.843Z
Answers.UserDisplayName: John Rothman
Body: <p>Modern cars can operate high-beam headlights automatically:</p>
  <ul>
  <li><p>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.</p>
  </li>
  <li><p>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.</p>
  </li>
  </ul>
  <p>I am aware that in the front part of these cars there is a <strong>camera or sensor</strong> and also imagine that the automatic switching when entering or exiting a town is achieved by just having a <strong>threshold ambient illumination</strong>.</p>
  <p>But I am unable to imagine <strong>how the recognition of other cars works</strong>. 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:</p>
  <ul>
  <li>pairs of street lamps (far from the road and not illuminating it) that could be identified as a car coming in the opposite direction,</li>
  <li>pairs of lights coming from the reflectors of the crash barriers,
  <a href="https://i.sstatic.net/AsBst.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/AsBst.jpg" alt="enter image description here" /></a></li>
  <li>many other random pairs of lights that could be interpreted as cars.</li>
  </ul>
  <p>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?</p>
  <p><strong>Edit</strong>: I've seen this technology working on Audi A4 and A5 cars.</p>
  
Tags: <image-recognition><autonomous-vehicles>
Title: How do automatic high-beam headlights work on cars?
UserDisplayName: Víctor Zamora
ThreadText: # How do automatic high-beam headlights work on cars?
  
  (Asked by: username_0 on 2021-10-19)
  
  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,
    [![enter image description here](https://i.sstatic.net/AsBst.jpg)](https://i.sstatic.net/AsBst.jpg)
  * 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.
  
  **Tags:** image-recognition, autonomous-vehicles
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-10-19. Score: 1 | Accepted answer
  
  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.
  
  > **Comments:**
  > **username_0**: 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.  
  > **username_1**: Here is a video from a guy talking about it. https://www.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.  
  > **username_0**: 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.  
  > **username_1**: Glad I could provide some help. I've edited the original answer.  
  
  ---
  
  