mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
core(test): added cv::sortIdx accuracy tests
This commit is contained in:
@@ -6,6 +6,14 @@
|
||||
|
||||
#include "cvconfig.h"
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <numeric>
|
||||
|
||||
#ifdef WINRT
|
||||
#pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||
#endif
|
||||
@@ -46,14 +54,10 @@ namespace cvtest
|
||||
|
||||
using std::vector;
|
||||
using std::string;
|
||||
using cv::RNG;
|
||||
using cv::Mat;
|
||||
using cv::Scalar;
|
||||
using cv::Size;
|
||||
using cv::Point;
|
||||
using cv::Rect;
|
||||
using cv::InputArray;
|
||||
using cv::noArray;
|
||||
using namespace cv;
|
||||
using testing::Values;
|
||||
using testing::Combine;
|
||||
|
||||
|
||||
class SkipTestException: public cv::Exception
|
||||
{
|
||||
@@ -632,10 +636,12 @@ int main(int argc, char **argv) \
|
||||
|
||||
} //namespace cvtest
|
||||
|
||||
#endif // OPENCV_TS_HPP
|
||||
|
||||
#include "opencv2/ts/ts_perf.hpp"
|
||||
|
||||
namespace cvtest {
|
||||
using perf::MatDepth;
|
||||
}
|
||||
|
||||
#ifdef WINRT
|
||||
#ifndef __FSTREAM_EMULATED__
|
||||
#define __FSTREAM_EMULATED__
|
||||
@@ -734,3 +740,5 @@ public:
|
||||
} // namespace std
|
||||
#endif // __FSTREAM_EMULATED__
|
||||
#endif // WINRT
|
||||
|
||||
#endif // OPENCV_TS_HPP
|
||||
|
||||
@@ -109,6 +109,7 @@ namespace cvtest
|
||||
|
||||
CV_EXPORTS testing::AssertionResult assertMatNear(const char* expr1, const char* expr2, const char* eps_expr, cv::InputArray m1, cv::InputArray m2, double eps);
|
||||
|
||||
#undef EXPECT_MAT_NEAR
|
||||
#define EXPECT_MAT_NEAR(m1, m2, eps) EXPECT_PRED_FORMAT3(cvtest::assertMatNear, m1, m2, eps)
|
||||
#define ASSERT_MAT_NEAR(m1, m2, eps) ASSERT_PRED_FORMAT3(cvtest::assertMatNear, m1, m2, eps)
|
||||
|
||||
@@ -153,6 +154,7 @@ namespace cvtest
|
||||
|
||||
CV_EXPORTS double checkSimilarity(cv::InputArray m1, cv::InputArray m2);
|
||||
|
||||
#undef EXPECT_MAT_SIMILAR
|
||||
#define EXPECT_MAT_SIMILAR(mat1, mat2, eps) \
|
||||
{ \
|
||||
ASSERT_EQ(mat1.type(), mat2.type()); \
|
||||
|
||||
@@ -94,6 +94,7 @@ do \
|
||||
EXPECT_LE(TestUtils::checkNorm1(mat), eps) \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#undef EXPECT_MAT_NEAR
|
||||
#define EXPECT_MAT_NEAR(mat1, mat2, eps) \
|
||||
do \
|
||||
{ \
|
||||
@@ -178,6 +179,7 @@ do \
|
||||
<< "Size: " << name ## _roi.size() << std::endl; \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#undef EXPECT_MAT_SIMILAR
|
||||
#define EXPECT_MAT_SIMILAR(mat1, mat2, eps) \
|
||||
do \
|
||||
{ \
|
||||
@@ -325,7 +327,7 @@ struct CV_EXPORTS TSTestWithParam : public TestUtils, public ::testing::TestWith
|
||||
};
|
||||
|
||||
#undef PARAM_TEST_CASE
|
||||
#define PARAM_TEST_CASE(name, ...) struct name : public TSTestWithParam< std::tr1::tuple< __VA_ARGS__ > >
|
||||
#define PARAM_TEST_CASE(name, ...) struct name : public ::cvtest::ocl::TSTestWithParam< std::tr1::tuple< __VA_ARGS__ > >
|
||||
|
||||
#ifndef IMPLEMENT_PARAM_CLASS
|
||||
#define IMPLEMENT_PARAM_CLASS(name, type) \
|
||||
|
||||
Reference in New Issue
Block a user