Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you swapped rows & cols here:

Mat::zeros(width,height,CV_8UC1);

it must be:

Mat::zeros(height,width,CV_8UC1);

you swapped rows & cols here:

Mat::zeros(width,height,CV_8UC1);

it must be:

Mat::zeros(height,width,CV_8UC1);

(common pitfall here !)

you swapped rows & cols here:

mask = Mat::zeros(width,height,CV_8UC1);

it must be:

mask = Mat::zeros(height,width,CV_8UC1);

(common pitfall here !)