# How to detect the light of red laser (small dots) using C++?

**URL:** <https://forum.opencv.org/t/how-to-detect-the-light-of-red-laser-small-dots-using-c/16806>\
**Category:** C++\
**Tags:** imgproc\
**Created:** [March 14, 2024, 8:04am UTC](https://forum.opencv.org/t/how-to-detect-the-light-of-red-laser-small-dots-using-c/16806 "2024-03-14T08:04:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vahe\_Barseghyan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/vahe_barseghyan/32/9929_2.png) [@Vahe\_Barseghyan](https://forum.opencv.org/u/Vahe_Barseghyan)\
**Post date:** [March 14, 2024, 8:04am UTC](https://forum.opencv.org/t/how-to-detect-the-light-of-red-laser-small-dots-using-c/16806/1 "2024-03-14T08:04:01Z")

</div>

I am working on a project to detect the contours of a red laser. When the light appears, the center of that light is orange-yellow, but the borders are red. How can I detect the contour?

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [March 14, 2024, 12:47pm UTC](https://forum.opencv.org/t/how-to-detect-the-light-of-red-laser-small-dots-using-c/16806/2 "2024-03-14T12:47:14Z")

</div>

dial the exposure down so it’s not saturating the sensor and bleeding into other color channels

or make your mask include not just “red” but also saturated red with some green (=yellow)
