diff --git a/modules/cudastereo/src/cuda/util.cu b/modules/cudastereo/src/cuda/util.cu index 432f46191d..6826f90f71 100644 --- a/modules/cudastereo/src/cuda/util.cu +++ b/modules/cudastereo/src/cuda/util.cu @@ -98,6 +98,10 @@ namespace cv { namespace cuda { namespace device template void reprojectImageTo3D_gpu(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream); template void reprojectImageTo3D_gpu(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream); template void reprojectImageTo3D_gpu(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream); + template void reprojectImageTo3D_gpu(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream); + template void reprojectImageTo3D_gpu(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream); + template void reprojectImageTo3D_gpu(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream); + template void reprojectImageTo3D_gpu(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream); /////////////////////////////////// drawColorDisp /////////////////////////////////////////////// diff --git a/modules/cudastereo/src/util.cpp b/modules/cudastereo/src/util.cpp index ba7c23f6b5..a39d28cb2c 100644 --- a/modules/cudastereo/src/util.cpp +++ b/modules/cudastereo/src/util.cpp @@ -66,16 +66,16 @@ void cv::cuda::reprojectImageTo3D(InputArray _disp, OutputArray _xyz, InputArray using namespace cv::cuda::device; typedef void (*func_t)(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream); - static const func_t funcs[2][4] = + static const func_t funcs[2][6] = { - {reprojectImageTo3D_gpu, 0, 0, reprojectImageTo3D_gpu}, - {reprojectImageTo3D_gpu, 0, 0, reprojectImageTo3D_gpu} + {reprojectImageTo3D_gpu, 0, 0, reprojectImageTo3D_gpu, reprojectImageTo3D_gpu, reprojectImageTo3D_gpu}, + {reprojectImageTo3D_gpu, 0, 0, reprojectImageTo3D_gpu, reprojectImageTo3D_gpu, reprojectImageTo3D_gpu} }; GpuMat disp = _disp.getGpuMat(); Mat Q = _Q.getMat(); - CV_Assert( disp.type() == CV_8U || disp.type() == CV_16S ); + CV_Assert( disp.type() == CV_8U || disp.type() == CV_16S || disp.type() == CV_32S || disp.type() == CV_32F ); CV_Assert( Q.type() == CV_32F && Q.rows == 4 && Q.cols == 4 && Q.isContinuous() ); CV_Assert( dst_cn == 3 || dst_cn == 4 );