features2d

This commit is contained in:
Konstantin Matskevich
2014-02-04 16:34:18 +04:00
parent c684da3549
commit f44334285b
16 changed files with 148 additions and 116 deletions

View File

@@ -2232,10 +2232,11 @@ namespace cv{
return false;
}
void OneWayDescriptorMatcher::knnMatchImpl( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
void OneWayDescriptorMatcher::knnMatchImpl( InputArray _queryImage, std::vector<KeyPoint>& queryKeypoints,
std::vector<std::vector<DMatch> >& matches, int knn,
const std::vector<Mat>& /*masks*/, bool /*compactResult*/ )
{
Mat queryImage = _queryImage.getMat();
train();
CV_Assert( knn == 1 ); // knn > 1 unsupported because of bug in OneWayDescriptorBase for this case
@@ -2251,10 +2252,12 @@ namespace cv{
}
}
void OneWayDescriptorMatcher::radiusMatchImpl( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
void OneWayDescriptorMatcher::radiusMatchImpl( InputArray _queryImage, std::vector<KeyPoint>& queryKeypoints,
std::vector<std::vector<DMatch> >& matches, float maxDistance,
const std::vector<Mat>& /*masks*/, bool /*compactResult*/ )
{
Mat queryImage = _queryImage.getMat();
train();
matches.resize( queryKeypoints.size() );

View File

@@ -1297,10 +1297,12 @@ void FernDescriptorMatcher::calcBestProbAndMatchIdx( const Mat& image, const Poi
}
}
void FernDescriptorMatcher::knnMatchImpl( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
void FernDescriptorMatcher::knnMatchImpl( InputArray _queryImage, std::vector<KeyPoint>& queryKeypoints,
std::vector<std::vector<DMatch> >& matches, int knn,
const std::vector<Mat>& /*masks*/, bool /*compactResult*/ )
{
Mat queryImage = _queryImage.getMat();
train();
matches.resize( queryKeypoints.size() );
@@ -1333,10 +1335,11 @@ void FernDescriptorMatcher::knnMatchImpl( const Mat& queryImage, std::vector<Key
}
}
void FernDescriptorMatcher::radiusMatchImpl( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
void FernDescriptorMatcher::radiusMatchImpl( InputArray _queryImage, std::vector<KeyPoint>& queryKeypoints,
std::vector<std::vector<DMatch> >& matches, float maxDistance,
const std::vector<Mat>& /*masks*/, bool /*compactResult*/ )
{
Mat queryImage = _queryImage.getMat();
train();
matches.resize( queryKeypoints.size() );
std::vector<float> signature( (size_t)classifier->getClassCount() );