Goldgesture is a GUI app built with the Android SDK and OpenCV's Java bindings for Android. It has just a single view, as shown in the screenshot on the next page. The app has the following flow of execution:
The app constantly displays a live video feed from the front-facing (self-portrait) camera.
It performs human face detection using OpenCV's
CascadeClassifier
class.When a human face is detected:
It draws a blue rectangle around the face.
It detects features of the face (points that should be easy to track in subsequent frames despite movement) using OpenCV's
goodFeaturesToTrack
function. It then draws green circles around these features.
As the face moves, the app tracks the features in every frame using OpenCV's
calcOpticalFlowPyrLK
function. This function can continuously track the features even thoughCascadeClassifier
is unlikely to continuously detect a face.When the features' center point moves up and down by a certain amount and a certain number of times...