I have just found that the `mask` in the `Mat::copyTo()` function should be of type `CV_8U`, with one or more channels (the same as `this`):
// opencv/modules/src/copy.cpp: lines 270 and 271
int cn = channels(), mcn = mask.channels();
CV_Assert( mask.depth() == CV_8U && (mcn == 1 || mcn == cn) );
and that this information is not mentioned in the [docs2.4.11](http://docs.opencv.org/modules/core/doc/basic_structures.html#mat-copyto), nor the [docs3.0.0](http://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#a4331fa88593a9a9c14c0998574695ebb)
Shouldn't it be added in some place? Or is there somewhere a remark like the `mask` should be of type/depth `CV_8U`, that I have missed?
Maybe there are some other mask parameters that need to be documented with this remark, too...
↧