In 2013, I programmed a custom blob detection and filtering application for identifying robots in the Symbiosis project. The application allowed background substraction, constrast stretching blob detection, filtering blobs by area, and sending the data using the OSC protocol. There are many blob trackers out there today. The main asset of this code was that it integrated the great OfxUI library with OpenCV, therefore allowing to build nice interfaces for OpenCV applications.
Needless to say, this was coded in OpenFrameworks.
Find the code here.