How to use OpenCV249 to detect the location of traffic lights in C language
This article introduces how to use OpenCV249 to detect traffic lights in c language, the content is very detailed, interested friends can refer to it, I hope it can help you.
Traffic light panel positioning order v(x, y)=[vR, vG, vB] is the color value of each pixel in RGB space, and (x, y) is the pixel coordinate. Black areas in an image are segmented in two ways:
where T1=50 and T2=20 are segmentation thresholds. the black region in the image may consist of the sum of binary images binl (x, y) and bin2 (x, y). (This paragraph is from Journal of Central South University (Natural Science Edition))
Then I followed his paper described step by step to achieve, found that the effect is not as good as the paper said, and then I improved a little bit on his basis, feeling that the effect is good. Where exactly has it improved? Because my language ability is relatively poor, so, wait for me to organize a good language, then say in detail. Now let's put two renderings.
This is the case with the red street lamp horizontal.
Here's the red light.
About how to use OpenCV249 to detect traffic light position in c language to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.