GECKO 1.0
Human-computer interface based on hand gesture recognition
|
Returns the average of the pixel's values. { //-- Calculate average value double average = 0; for (int i = 0; i < ROI.cols; i++ ) for( int j = 0; j < ROI.rows; j++) average += (int) ROI.at<unsigned char>(i, j); average /= (double) (ROI.cols * ROI.rows); return ceil(average); } |