1 | initial version |
this is a plain threshold operation.
stop worrying, and throw away your loop in favor of wither:
Mat binary = fgmask > 120;
or :
Mat binary;
threshold(fgmask, binary, 120, 255, 0);
in other words, with opencv, the last thing on earth you should do is, write your own per-pixel loops, and then worry about optimizing that.
2 | No.2 Revision |
this is a plain threshold operation.
stop worrying, and throw away your loop in favor of wither:either:
Mat binary = fgmask > 120;
or :
Mat binary;
threshold(fgmask, binary, 120, 255, 0);
in other words, with opencv, the last thing on earth you should do is, write your own per-pixel loops, and then worry about optimizing that.
3 | No.3 Revision |
this is a plain threshold operation.
stop worrying, and throw away your loop in favor of either:
Mat binary = fgmask > or :
Mat binary;
threshold(fgmask, binary, 120, 255, 0);
in other words, with opencv, the last thing on earth you should do is, write your own per-pixel loops, and then worry about optimizing that.
4 | No.4 Revision |
this is a plain threshold operation.
stop worrying, and throw away your loop in favor of either:
Mat binary = fgmask > 120;
or :
Mat binary;
threshold(fgmask, binary, 120, 255, 0);
in other words, with opencv, the last thing on earth you should do is, write your own per-pixel loops, and then worry about optimizing that.that. doing so, you actively defeat opencv's built in parallelization.
5 | No.5 Revision |
this is a plain threshold operation.
stop worrying, and throw away your loop in favor of either:
Mat binary = fgmask > 120;
or :
Mat binary;
threshold(fgmask, binary, 120, 255, 0);
in other words, with opencv, the last thing on earth you should do is, write your own per-pixel loops, and then worry about optimizing that. doing so, you your current way actively defeat defeats opencv's built in builtin parallelization.