1 | initial version |
first, your mask
should have a single CV_8U channel, not 3
then, i think, this is a typo:
if (mask.ucharPtr(i, j)[0] == 255) {
did you mean to check newmask
instead ?
and last, i have no idea what you get from cv.imread("canvasAdjust");
, but if it's a real world image, chances are low, that your "exact" conditions will fire