add auxiliary functions to work with Input/Output arrays:

they allow to perform asynchronous upload/download into temporary buffer
to get valid GpuMat object
This commit is contained in:
Vladislav Vinogradov
2014-12-24 13:33:17 +03:00
parent 61991a3330
commit 00e7816c1b
2 changed files with 57 additions and 0 deletions

View File

@@ -106,6 +106,16 @@ namespace cv { namespace cuda
GpuMat::Allocator* allocator_;
};
CV_EXPORTS GpuMat getInputMat(InputArray _src, Stream& stream);
CV_EXPORTS GpuMat getOutputMat(OutputArray _dst, int rows, int cols, int type, Stream& stream);
static inline GpuMat getOutputMat(OutputArray _dst, Size size, int type, Stream& stream)
{
return getOutputMat(_dst, size.height, size.width, type, stream);
}
CV_EXPORTS void syncOutput(const GpuMat& dst, OutputArray _dst, Stream& stream);
static inline void checkNppError(int code, const char* file, const int line, const char* func)
{
if (code < 0)