Add sanity checks support for vertor<KeyPoint>

This commit is contained in:
Andrey Kamaev
2012-10-09 18:37:26 +04:00
parent 5a5c477be6
commit 95b6a103b5
4 changed files with 31 additions and 3 deletions

View File

@@ -2,6 +2,7 @@
#define __OPENCV_TS_PERF_HPP__
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "ts_gtest.h"
#ifdef HAVE_TBB
@@ -165,6 +166,7 @@ class CV_EXPORTS Regression
{
public:
static Regression& add(TestBase* test, const std::string& name, cv::InputArray array, double eps = DBL_EPSILON, ERROR_TYPE err = ERROR_ABSOLUTE);
static Regression& addKeypoints(TestBase* test, const std::string& name, const std::vector<cv::KeyPoint>& array, double eps = DBL_EPSILON, ERROR_TYPE err = ERROR_ABSOLUTE);
static void Init(const std::string& testSuitName, const std::string& ext = ".xml");
Regression& operator() (const std::string& name, cv::InputArray array, double eps = DBL_EPSILON, ERROR_TYPE err = ERROR_ABSOLUTE);
@@ -199,6 +201,7 @@ private:
};
#define SANITY_CHECK(array, ...) ::perf::Regression::add(this, #array, array , ## __VA_ARGS__)
#define SANITY_CHECK_KEYPOINTS(array, ...) ::perf::Regression::addKeypoints(this, #array, array , ## __VA_ARGS__)
/*****************************************************************************************\