How to get traffic light color information #5508
-
I am studying object detection in CARLA simulation. My coding skills are not good enough, so I wrote a question. I had to figure out the color of the traffic light to make the training data, so I succeeded in implementing the Binding Box of the traffic light by following the URL below, but I couldn't figure out the color of the traffic light. There are two ways I've tried.
If possible, I would like to receive the traffic light by Actor Class and know the color information Could you tell me any useful information? Thank you for reading it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @ltj3334 , I've done some training data collection job before. You could have a look at this link. I use a RGB camera and a segmentation camera to extract every light box part in the RGB image, and then determine the color of the light box using some classical method. It is not an elegant way to do this job, but it may helps you quickly collect some training data and quickly to start you further project. For further developing, you could refer this link to get all traffic light actors, and use |
Beta Was this translation helpful? Give feedback.
-
Hi @ltj3334, Thanks |
Beta Was this translation helpful? Give feedback.
Hi @ltj3334 , I've done some training data collection job before. You could have a look at this link.
I use a RGB camera and a segmentation camera to extract every light box part in the RGB image, and then determine the color of the light box using some classical method. It is not an elegant way to do this job, but it may helps you quickly collect some training data and quickly to start you further project.
For further developing, you could refer this link to get all traffic light actors, and use
get_state
to get their state to determine the traffic light color. But I think maybe you want to label the light box, not the traffic light pole. So that you could use theget_light_boxes
functio…