# Detection the cars rear tail-light

**URL:** <https://forums.openmv.io/t/detection-the-cars-rear-tail-light/377>\
**Category:** OpenMV Boards\
**Created:** [August 15, 2017, 1:32am UTC](https://forums.openmv.io/t/detection-the-cars-rear-tail-light/377 "2017-08-15T01:32:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skylin008](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@skylin008](https://forums.openmv.io/u/skylin008)\
**Post date:** [August 15, 2017, 1:32am UTC](https://forums.openmv.io/t/detection-the-cars-rear-tail-light/377/1 "2017-08-15T01:32:46Z")

</div>

We have a new project that needs to be detection in a variety of natural environments (including sunny, rainy, day, night, fog) need to detect the car’s red taillights and its symmetry. When using the find\_blob method, it is found that the influence of ambient light is very large, resulting in inaccurate detection. Is there a better algorithm to achieve this function, thanks!

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [August 15, 2017, 4:00am UTC](https://forums.openmv.io/t/detection-the-cars-rear-tail-light/377/2 "2017-08-15T04:00:51Z")

</div>

Find blobs is the best CV algorithm for this combined with get\_histogram. I don’t know how to do the math but you need to actively sample the image color space and look at the histogram and color statistics. Find blobs will just tell you an area in the image where the color is. But, you’ll need to look at the color histogram to find what color to search for. You should look into how to parse LAB color histogram data to pull of red variances in an image. Note you can call get\_histogram on ROIs in the image since you’ll likely need to look at multiple regions of the image to get an idea for what’s in it.
