override clear method to VectorDescriptorMatch
This commit is contained in:
parent
97c598c0bc
commit
045402e481
@ -1397,7 +1397,7 @@ public:
|
|||||||
* matches Indices of the closest matches from the training set
|
* matches Indices of the closest matches from the training set
|
||||||
*/
|
*/
|
||||||
void match( const Mat& query, const Mat& mask,
|
void match( const Mat& query, const Mat& mask,
|
||||||
vector<int>& matches, vector<double>* distances = 0 ) const;
|
vector<int>& matches ) const;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the best keypoint matches for small view changes.
|
* Find the best keypoint matches for small view changes.
|
||||||
@ -1416,6 +1416,7 @@ public:
|
|||||||
/*void matchWindowed( const vector<KeyPoint>& keypoints_1, const Mat& descriptors_1,
|
/*void matchWindowed( const vector<KeyPoint>& keypoints_1, const Mat& descriptors_1,
|
||||||
const vector<KeyPoint>& keypoints_2, const Mat& descriptors_2,
|
const vector<KeyPoint>& keypoints_2, const Mat& descriptors_2,
|
||||||
float maxDeltaX, float maxDeltaY, vector<Match>& matches) const;*/
|
float maxDeltaX, float maxDeltaY, vector<Match>& matches) const;*/
|
||||||
|
virtual void clear();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Mat train;
|
Mat train;
|
||||||
@ -1458,15 +1459,15 @@ inline void DescriptorMatcher::match( const Mat& query, vector<int>& matches ) c
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline void DescriptorMatcher::match( const Mat& query, const Mat& mask,
|
inline void DescriptorMatcher::match( const Mat& query, const Mat& mask,
|
||||||
vector<int>& matches, vector<double>* distances ) const
|
vector<int>& matches ) const
|
||||||
{
|
{
|
||||||
if( distances )
|
vector<double> innDistances;
|
||||||
matchImpl( query, train, mask, matches, *distances );
|
matchImpl( query, train, mask, matches, innDistances );
|
||||||
else
|
}
|
||||||
{
|
|
||||||
vector<double> innDistances;
|
inline void DescriptorMatcher::clear()
|
||||||
matchImpl( query, train, mask, matches, innDistances );
|
{
|
||||||
}
|
train.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1828,10 +1829,16 @@ public:
|
|||||||
matcher.match( descriptors, keypointIndices );
|
matcher.match( descriptors, keypointIndices );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
virtual void clear()
|
||||||
|
{
|
||||||
|
GenericDescriptorMatch::clear();
|
||||||
|
matcher.clear();
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Extractor extractor;
|
Extractor extractor;
|
||||||
Matcher matcher;
|
Matcher matcher;
|
||||||
vector<int> classIds;
|
//vector<int> classIds;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user