Merge pull request #2217 from ilya-lavrenov:tapi_superres

This commit is contained in:
Andrey Pavlenko
2014-02-03 14:38:59 +04:00
committed by OpenCV Buildbot
18 changed files with 886 additions and 1499 deletions

View File

@@ -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;
};

View File

@@ -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

View File

@@ -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, "");
}