1 | initial version |
it's doubtful, that your "object detection" will work, but applying the "condition" is not so hard:
Mat data = ... // single channel input;
Mat lo = data > 450;
Mat hi = data < 775;
Mat shadow = lo & hi; // bitwise_and
resulting in a "mask", where "shadow pixels" are 255 and the rest is 0