GECKO 1.0
Human-computer interface based on hand gesture recognition
int HandDetector::stdDeviation ( cv::Mat &  ROI) [private]

Returns the standard deviation of the pixel's values.

{
    //-- Calculates the std deviation of the pixel values
    double stddev = 0;

    for (int i = 0; i < ROI.cols; i++ )
        for( int j = 0; j < ROI.rows; j++)
            stddev +=  pow( (int) ROI.at<unsigned char>(i, j), 2);

    stddev = sqrt( stddev ) / (ROI.cols * ROI.rows);
    return ceil(stddev);
}
 All Classes Functions Variables