fixed GBTrees build on NetBSD & Android; fixed GPU brute force matcher test build on MacOSX

This commit is contained in:
Vadim Pisarevsky
2010-12-06 19:42:16 +00:00
parent 652fb1212e
commit ed934ed6fc
2 changed files with 20 additions and 23 deletions

View File

@@ -40,6 +40,7 @@
//M*/
#include "gputest.hpp"
#include <algorithm>
using namespace cv;
using namespace cv::gpu;
@@ -149,19 +150,19 @@ private:
copy(knnMatches[i].begin(), knnMatches[i].end(), back_inserter(matches));
}
struct DMatchEqual : public binary_function<DMatch, DMatch, bool>
{
bool operator()(const DMatch& m1, const DMatch& m2) const
{
return m1.imgIdx == m2.imgIdx && m1.queryIdx == m2.queryIdx && m1.trainIdx == m2.trainIdx;
}
};
static bool compareMatches(const vector<DMatch>& matches1, const vector<DMatch>& matches2)
{
if (matches1.size() != matches2.size())
return false;
struct DMatchEqual : public binary_function<DMatch, DMatch, bool>
{
bool operator()(const DMatch& m1, const DMatch& m2)
{
return m1.imgIdx == m2.imgIdx && m1.queryIdx == m2.queryIdx && m1.trainIdx == m2.trainIdx;
}
};
return equal(matches1.begin(), matches1.end(), matches2.begin(), DMatchEqual());
}