Merge pull request #1034 from pengx17:2.4_oclmat_inoutarray
This commit is contained in:
@@ -74,6 +74,7 @@ namespace cv
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// convert_C3C4
|
||||
static void convert_C3C4(const cl_mem &src, oclMat &dst)
|
||||
@@ -227,6 +228,34 @@ void cv::ocl::oclMat::upload(const Mat &m)
|
||||
//download_channels = m.channels();
|
||||
}
|
||||
|
||||
cv::ocl::oclMat::operator cv::_InputArray()
|
||||
{
|
||||
_InputArray newInputArray;
|
||||
newInputArray.flags = cv::_InputArray::OCL_MAT;
|
||||
newInputArray.obj = reinterpret_cast<void *>(this);
|
||||
return newInputArray;
|
||||
}
|
||||
|
||||
cv::ocl::oclMat::operator cv::_OutputArray()
|
||||
{
|
||||
_OutputArray newOutputArray;
|
||||
newOutputArray.flags = cv::_InputArray::OCL_MAT;
|
||||
newOutputArray.obj = reinterpret_cast<void *>(this);
|
||||
return newOutputArray;
|
||||
}
|
||||
|
||||
cv::ocl::oclMat& cv::ocl::getOclMatRef(InputArray src)
|
||||
{
|
||||
CV_Assert(src.flags & cv::_InputArray::OCL_MAT);
|
||||
return *reinterpret_cast<oclMat*>(src.obj);
|
||||
}
|
||||
|
||||
cv::ocl::oclMat& cv::ocl::getOclMatRef(OutputArray src)
|
||||
{
|
||||
CV_Assert(src.flags & cv::_InputArray::OCL_MAT);
|
||||
return *reinterpret_cast<oclMat*>(src.obj);
|
||||
}
|
||||
|
||||
void cv::ocl::oclMat::download(cv::Mat &m) const
|
||||
{
|
||||
CV_DbgAssert(!this->empty());
|
||||
|
||||
Reference in New Issue
Block a user