GECKO 1.0
Human-computer interface based on hand gesture recognition
void HandDetector::threshold ( const cv::Mat &  src,
cv::Mat &  dst 
) [private]

Thresholds the input image using the HSV range.

Parameters:
srcInput image
dstBinary output image

{
    //-- Convert to HSV
    cv::Mat hsv;
    cv::cvtColor( src, hsv, CV_BGR2HSV);

    //-- Threshold
    cv::inRange(hsv, lower_limit, upper_limit, dst);

    //-- If color limit is arround 0, hue channel needs to be inverted
    if (hue_invert)
    {
                std::vector< cv::Mat > hsv;
                cv::split( dst, hsv);
                cv::bitwise_not( hsv[0], hsv[0] );
    }
}
 All Classes Functions Variables