OfxOneDollar is a project mainly written in C and C++, it's free.
Implementation of the $1 gesture recognizer
ofxOneDollar
Implementation of the $1 gesture recognizer for openFrameworks