GECKO 1.0
Human-computer interface based on hand gesture recognition
void HandDescriptor::plotBoundingRectangle ( const cv::Mat &  src,
cv::Mat &  dst,
bool  rotated = true 
)

Plots the rectangle around the hand on display.

{
    //-- Allocate the display matrix if needed:
    if ( dst.total() == 0 )
        dst = src.clone();

    if ( _hand_found )
    {
        //-- Choose between rotated or std box:
        if ( rotated )
        {
            //-- Draw rotated rectangle:
            cv::Point2f rect_points[4]; _hand_rotated_bounding_box.points( rect_points );
            for( int j = 0; j < 4; j++ )
            cv::line( dst, rect_points[j], rect_points[(j+1)%4], cv::Scalar(255, 0, 0) , 2 );
        }
        else
        {
            cv::rectangle( dst, _hand_bounding_box, cv::Scalar( 255, 0, 0), 2 );
        }
    }
}
 All Classes Functions Variables