Snippet for OpenCV to detect hand gestures....
drawContours( thr, contours,largest_contour_ index, color, CV_FILLED, 8, hierarchy ); // Draw the largest contour using previously stored index.
drawContours( thr, hullP, 0, color, 1, 8, vector(), 0, Point() );
ellipse(src, minellipse[0], color, 2, 8 );
findContours( thr, contours, hierarchy,CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE );
drawContours( thr, hullP, 0, color, 1, 8, vector
ellipse(src, minellipse[0], color, 2, 8 );
findContours( thr, contours, hierarchy,CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE );