Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Shouldn't Mat::copyTo be documented with the type of mask?

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, nor the docs3.0.0

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?

Shouldn't Mat::copyTo be documented with the type of mask?

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, nor the docs3.0.0

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...