ported superres to T-API
This commit is contained in:
@@ -217,7 +217,7 @@ public:
|
||||
virtual void createSameSize(const _InputArray& arr, int mtype) const;
|
||||
virtual void release() const;
|
||||
virtual void clear() const;
|
||||
virtual void setTo(const _InputArray& value) const;
|
||||
virtual void setTo(const _InputArray& value, const _InputArray & mask = _InputArray()) const;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -5,6 +5,8 @@
|
||||
// Copyright (C) 2014, Advanced Micro Devices, Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
|
||||
//#define CV_OPENCL_RUN_VERBOSE
|
||||
|
||||
#ifdef HAVE_OPENCL
|
||||
|
||||
#ifdef CV_OPENCL_RUN_VERBOSE
|
||||
|
@@ -2560,7 +2560,7 @@ cuda::CudaMem& _OutputArray::getCudaMemRef() const
|
||||
return *(cuda::CudaMem*)obj;
|
||||
}
|
||||
|
||||
void _OutputArray::setTo(const _InputArray& arr) const
|
||||
void _OutputArray::setTo(const _InputArray& arr, const _InputArray & mask) const
|
||||
{
|
||||
int k = kind();
|
||||
|
||||
@@ -2569,10 +2569,16 @@ void _OutputArray::setTo(const _InputArray& arr) const
|
||||
else if( k == MAT || k == MATX || k == STD_VECTOR )
|
||||
{
|
||||
Mat m = getMat();
|
||||
m.setTo(arr);
|
||||
m.setTo(arr, mask);
|
||||
}
|
||||
else if( k == UMAT )
|
||||
((UMat*)obj)->setTo(arr);
|
||||
((UMat*)obj)->setTo(arr, mask);
|
||||
else if( k == GPU_MAT )
|
||||
{
|
||||
Mat value = arr.getMat();
|
||||
CV_Assert( checkScalar(value, type(), arr.kind(), _InputArray::GPU_MAT) );
|
||||
((cuda::GpuMat*)obj)->setTo(Scalar(Vec<double, 4>((double *)value.data)), mask);
|
||||
}
|
||||
else
|
||||
CV_Error(Error::StsNotImplemented, "");
|
||||
}
|
||||
|
Reference in New Issue
Block a user