GpuMat cv::cuda::getInputMat(InputArray _src, Stream& stream)
{
- GpuMat src;
-
#ifndef HAVE_CUDA
(void) _src;
(void) stream;
throw_no_cuda();
#else
+ GpuMat src;
if (_src.kind() == _InputArray::CUDA_GPU_MAT)
{
src = _src.getGpuMat();
src = pool.getBuffer(_src.size(), _src.type());
src.upload(_src, stream);
}
-#endif
-
return src;
+#endif
}
GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, Stream& stream)
{
- GpuMat dst;
-
#ifndef HAVE_CUDA
(void) _dst;
(void) rows;
(void) stream;
throw_no_cuda();
#else
+ GpuMat dst;
if (_dst.kind() == _InputArray::CUDA_GPU_MAT)
{
_dst.create(rows, cols, type);
BufferPool pool(stream);
dst = pool.getBuffer(rows, cols, type);
}
-#endif
-
return dst;
+#endif
}
void cv::cuda::syncOutput(const GpuMat& dst, OutputArray _dst, Stream& stream)