Tracking Lights With OpenCV

This was a small experiment done back in 2011 to get familiar with OpenCV and C++ programming. It later proved to be a very beneficial experience for writing video transmission code in the Cyclops project.

This is a screen recording of the running demo:

OpenCV is a programming library that provides a very easy way to access video input from a webcam or built-in computer camera. It allows developers to break down each frame into individual pixels, and manipulate or analyze them. It also comes with a set of very powerful built-in utilities that allow for video effects, edge detection, and a variety of other computer vision tools. The library can be used for object detection, augmented reality, or just as a simple and quick way to get input from your computer's camera.

This experiment is a short and simple demonstration of tracking bright areas on the screen. If a portion of a video frame is particularly bright, it will be highlighted and displayed in white. All other areas will be blackened out. The program finds clusters of bright pixels, and groups them together. It then finds the average location between all clusters, and circles it.

Back to Top