TBB

Blog - Object Tracker (2025-03-20)

My Experience Building an Object Tracker Using C++

Recently, I was inspired to build an object tracking software. The idea just seemed interesting to me, and so I decided to start learning. I realized first, that I needed something to track. So, I had to build a demonstration program. I figured that a black circle bouncing around a white canvas would be simple enough to track.

Section 1 of the blog's picture

With that in mind, I quickly hammered together a prototype in SFML (Simple Fast Multimedia Library). Now that I had this, I could begin work on the actual tracker itself. I started learning OpenCV (which is an open source computer vision library) and within about an hour, I had this:

Section 2 of the blog's picture

Voila! My tracker was working. As you can see above, it successfully draws a bounding box in green, and a center point in blue. In the future, I plan to make the tracking work in more complex scenarios. I have some ideas cooking up in my head for things such as facial recognition, but that will take quite some time to complete. Anyhow, I am quite enjoying learning C++ and I plan on continuing in the future.