- Local time
- 9:54 AM
- Joined
- Sep 10, 2023
- Messages
- 973
- Reaction score
- 1,438
- Location
- Silicon Valley, CA, USA
I thought a bit more about it.
If speed is zero and you can find a traffic signal in the cameras field of view then angle camera up and turn on the front view until speed increases. Doesn't seem hard to do and you can test once every 500msec or so at zero speed.
Something like this pseudo code
code for this using something like yolo looks trivial assuming you have some form of processing in the wolfbox assembly, even arm should work.
Here is a Yolo example https://github.com/Syazvinski/Traffic-Light-Detection-Color-Classification
You probably have to put some logic in so once it changes view it doesn't change back until speed increases faster than zero, or the display may flip between the views if a branch of a tree obscures the traffic light and it doesnt get detected in every sample. And logic to only change view once etc.
If speed is zero and you can find a traffic signal in the cameras field of view then angle camera up and turn on the front view until speed increases. Doesn't seem hard to do and you can test once every 500msec or so at zero speed.
Something like this pseudo code
Code:
while speed = 0
begin
read and process image
If traffic signal found
save current display view
change view to forward camera
change crop to camera angled upward
render overlay in display with traffic signal state
else
Wait 500msec
End
change view back to saved view
code for this using something like yolo looks trivial assuming you have some form of processing in the wolfbox assembly, even arm should work.
Here is a Yolo example https://github.com/Syazvinski/Traffic-Light-Detection-Color-Classification
You probably have to put some logic in so once it changes view it doesn't change back until speed increases faster than zero, or the display may flip between the views if a branch of a tree obscures the traffic light and it doesnt get detected in every sample. And logic to only change view once etc.
Last edited: