1 | initial version |
here's an idea:
and some code:
Mat mask_red, mask_blue;
inRange(ocv, Scalar(0,0,250), Scalar(0,0,255), mask_red);
inRange(ocv, Scalar(250,250,0), Scalar(255,255,0), mask_blue);
for (int i=0; i<5; i++) {
dilate(mask_blue, mask_blue, Mat());
dilate(mask_red, mask_red, Mat());
}
Mat final = mask_blue & mask_red;