Ask Your Question

Revision history [back]

click to hide/show revision 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