mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
Trying to fix flann python wrapper issue
This commit is contained in:
parent
424c2bddb3
commit
26d9a7cd40
@ -1022,12 +1022,27 @@ FlannBasedMatcher::FlannBasedMatcher( const Ptr<flann::IndexParams>& _indexParam
|
||||
void FlannBasedMatcher::add( InputArrayOfArrays _descriptors )
|
||||
{
|
||||
DescriptorMatcher::add( _descriptors );
|
||||
std::vector<UMat> descriptors;
|
||||
_descriptors.getUMatVector(descriptors);
|
||||
|
||||
for( size_t i = 0; i < descriptors.size(); i++ )
|
||||
if(_descriptors.isUMatVector() || _descriptors.isUMat())
|
||||
{
|
||||
addedDescCount += descriptors[i].rows;
|
||||
std::vector<UMat> descriptors;
|
||||
_descriptors.getUMatVector(descriptors);
|
||||
for( size_t i = 0; i < descriptors.size(); i++ )
|
||||
{
|
||||
addedDescCount += descriptors[i].rows;
|
||||
}
|
||||
}
|
||||
else if(_descriptors.isMatVector() || _descriptors.isMat())
|
||||
{
|
||||
std::vector<Mat> descriptors;
|
||||
_descriptors.getMatVector(descriptors);
|
||||
for( size_t i = 0; i < descriptors.size(); i++ )
|
||||
{
|
||||
addedDescCount += descriptors[i].rows;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CV_Assert( _descriptors.isUMat() || _descriptors.isUMatVector() || _descriptors.isMat() || _descriptors.isMatVector());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user