1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #7869 from alalek:icc

Build with ICC
This commit is contained in:
Alexander Alekhin
2016-12-15 19:21:18 +02:00
committed by GitHub
4 changed files with 34 additions and 8 deletions
+1 -5
View File
@@ -1,9 +1,5 @@
#include "test_precomp.hpp"
#include <cmath>
#ifndef NAN
#include <limits> // numeric_limits<T>::quiet_NaN()
#define NAN std::numeric_limits<float>::quiet_NaN()
#endif
using namespace cv;
using namespace std;
@@ -1895,7 +1891,7 @@ TEST(MinMaxLoc, regression_4955_nans)
cv::Mat one_mat(2, 2, CV_32F, cv::Scalar(1));
cv::minMaxLoc(one_mat, NULL, NULL, NULL, NULL);
cv::Mat nan_mat(2, 2, CV_32F, cv::Scalar(NAN));
cv::Mat nan_mat(2, 2, CV_32F, cv::Scalar(std::numeric_limits<float>::quiet_NaN()));
cv::minMaxLoc(nan_mat, NULL, NULL, NULL, NULL);
}
@@ -1087,7 +1087,7 @@ void HOGDescriptorTester::detect(const Mat& img,
}
const double eps = FLT_EPSILON * 100;
double diff_norm = cvtest::norm(actual_weights, weights, NORM_L2);
double diff_norm = cvtest::norm(actual_weights, weights, NORM_L2 + NORM_RELATIVE);
if (diff_norm > eps)
{
ts->printf(cvtest::TS::SUMMARY, "Weights for found locations aren't equal.\n"
@@ -1167,7 +1167,7 @@ void HOGDescriptorTester::compute(InputArray _img, vector<float>& descriptors,
std::vector<float> actual_descriptors;
actual_hog->compute(img, actual_descriptors, winStride, padding, locations);
double diff_norm = cvtest::norm(actual_descriptors, descriptors, NORM_L2);
double diff_norm = cvtest::norm(actual_descriptors, descriptors, NORM_L2 + NORM_RELATIVE);
const double eps = FLT_EPSILON * 100;
if (diff_norm > eps)
{
@@ -1316,7 +1316,7 @@ void HOGDescriptorTester::computeGradient(const Mat& img, Mat& grad, Mat& qangle
const double eps = FLT_EPSILON * 100;
for (i = 0; i < 2; ++i)
{
double diff_norm = cvtest::norm(reference_mats[i], actual_mats[i], NORM_L2);
double diff_norm = cvtest::norm(actual_mats[i], reference_mats[i], NORM_L2 + NORM_RELATIVE);
if (diff_norm > eps)
{
ts->printf(cvtest::TS::LOG, "%s matrices are not equal\n"