|
|
|
@ -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()) |
|
|
|
|
{ |
|
|
|
|
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 |
|
|
|
|
{ |
|
|
|
|
addedDescCount += descriptors[i].rows; |
|
|
|
|
CV_Assert( _descriptors.isUMat() || _descriptors.isUMatVector() || _descriptors.isMat() || _descriptors.isMatVector()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|