Merge pull request #2142 from KonstantinMatskevich:ocl_tapi_bfmatcher
This commit is contained in:
@@ -113,6 +113,7 @@ public:
|
||||
virtual Mat getMat(int idx=-1) const;
|
||||
virtual UMat getUMat(int idx=-1) const;
|
||||
virtual void getMatVector(std::vector<Mat>& mv) const;
|
||||
virtual void getUMatVector(std::vector<UMat>& umv) const;
|
||||
virtual cuda::GpuMat getGpuMat() const;
|
||||
virtual ogl::Buffer getOGlBuffer() const;
|
||||
void* getObj() const;
|
||||
@@ -134,7 +135,7 @@ public:
|
||||
virtual size_t step(int i=-1) const;
|
||||
bool isMat() const;
|
||||
bool isUMat() const;
|
||||
bool isMatVectot() const;
|
||||
bool isMatVector() const;
|
||||
bool isUMatVector() const;
|
||||
bool isMatx();
|
||||
|
||||
|
@@ -110,7 +110,7 @@ inline _InputArray::~_InputArray() {}
|
||||
|
||||
inline bool _InputArray::isMat() const { return kind() == _InputArray::MAT; }
|
||||
inline bool _InputArray::isUMat() const { return kind() == _InputArray::UMAT; }
|
||||
inline bool _InputArray::isMatVectot() const { return kind() == _InputArray::STD_VECTOR_MAT; }
|
||||
inline bool _InputArray::isMatVector() const { return kind() == _InputArray::STD_VECTOR_MAT; }
|
||||
inline bool _InputArray::isUMatVector() const { return kind() == _InputArray::STD_VECTOR_UMAT; }
|
||||
inline bool _InputArray::isMatx() { return kind() == _InputArray::MATX; }
|
||||
|
||||
|
@@ -1324,6 +1324,42 @@ void _InputArray::getMatVector(std::vector<Mat>& mv) const
|
||||
CV_Error(Error::StsNotImplemented, "Unknown/unsupported array type");
|
||||
}
|
||||
|
||||
void _InputArray::getUMatVector(std::vector<UMat>& umv) const
|
||||
{
|
||||
int k = kind();
|
||||
int accessFlags = flags & ACCESS_MASK;
|
||||
|
||||
if( k == NONE )
|
||||
{
|
||||
umv.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
if( k == STD_VECTOR_MAT )
|
||||
{
|
||||
const std::vector<Mat>& v = *(const std::vector<Mat>*)obj;
|
||||
size_t i, n = v.size();
|
||||
umv.resize(n);
|
||||
|
||||
for( i = 0; i < n; i++ )
|
||||
umv[i] = v[i].getUMat(accessFlags);
|
||||
return;
|
||||
}
|
||||
|
||||
if( k == STD_VECTOR_UMAT )
|
||||
{
|
||||
const std::vector<UMat>& v = *(const std::vector<UMat>*)obj;
|
||||
size_t i, n = v.size();
|
||||
umv.resize(n);
|
||||
|
||||
for( i = 0; i < n; i++ )
|
||||
umv[i] = v[i];
|
||||
return;
|
||||
}
|
||||
|
||||
CV_Error(Error::StsNotImplemented, "Unknown/unsupported array type");
|
||||
}
|
||||
|
||||
cuda::GpuMat _InputArray::getGpuMat() const
|
||||
{
|
||||
int k = kind();
|
||||
|
Reference in New Issue
Block a user