Open
Description
The documentation of cv::cuda::copyMakeBorder
states
Source image. CV_8UC1 , CV_8UC4 , CV_32SC1 , and CV_32FC1 types are supported.
However, the code seems to support more types as seen in opencv_contrib/modules/cudaarithm/src/cuda/copy_make_border.cu
, i.e.,
static const func_t funcs[6][4] =
{
{ copyMakeBorderImpl<uchar , 1> , copyMakeBorderImpl<uchar , 2> , copyMakeBorderImpl<uchar , 3> , copyMakeBorderImpl<uchar , 4> },
{0, 0, 0 , 0},
{ copyMakeBorderImpl<ushort, 1> , 0, copyMakeBorderImpl<ushort, 3> , copyMakeBorderImpl<ushort, 4> },
{ copyMakeBorderImpl<short , 1> , 0, copyMakeBorderImpl<short , 3> , copyMakeBorderImpl<short , 4> },
{0, 0, 0, 0},
{ copyMakeBorderImpl<float , 1> , 0, copyMakeBorderImpl<float , 3> , copyMakeBorderImpl<float ,4> }
};
Further, it seems that these formats are also part of the tests as the following combinations of types and channels are checked:
Values(CV_8U, CV_16U, CV_32F),
CUDA_CHANNELS_1_3_4,
Perhaps someone who knows the library can check if this is really true and correct the documentation accordingly (and perhaps ensure that all the types are parts of the tests).
Thanks!