Support GpuMat in copyTo() functions

This commit is contained in:
Hamdi Sahloul
2018-09-17 23:31:54 +09:00
parent 3512cb2226
commit ecc9bd0925
3 changed files with 24 additions and 0 deletions

View File

@@ -874,6 +874,14 @@ void UMat::copyTo(OutputArray _dst) const
{
CV_INSTRUMENT_REGION();
#ifdef HAVE_CUDA
if (_dst.isGpuMat())
{
_dst.getGpuMat().upload(*this);
return;
}
#endif
int dtype = _dst.type();
if( _dst.fixedType() && dtype != type() )
{