1 | initial version |
you swapped rows & cols here:
Mat::zeros(width,height,CV_8UC1);
it must be:
Mat::zeros(height,width,CV_8UC1);
2 | No.2 Revision |
you swapped rows & cols here:
Mat::zeros(width,height,CV_8UC1);
it must be:
Mat::zeros(height,width,CV_8UC1);
(common pitfall here !)
3 | No.3 Revision |
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 !)