I'm developing a software that detects boxers punching motion. At the moment i used color based segmentation using inRange
function and set it to detect blue Minimum value and Blue Maximum value. The problem is that the range is quite wide and my cam at times picks out noise and segments objects of no interest. To improve the software i though of scanning image of a boxing glove and establishing exact Blue color Value before further processing.
It would make sens to me to store that value in a Vector and call it in inRange fiction
// My current function which takes the Minimum and Maximum values of Blue Color
Mat range_out;
inRange(blur_out, Scalar(100, 100, 100), Scalar(120, 255, 255), range_out);
So i would image the vector to go somewhere here.
- Scan this above image compute the Blue value
- Store this value in an array
- recall the array in a inRange function
Could someone suggest a solution to this problem or direct me to a source of information where I can look for answers ?