@@ -1087,7 +1087,7 @@ void HOGDescriptorTester::detect(const Mat& img,
1087
1087
}
1088
1088
1089
1089
const double eps = FLT_EPSILON * 100 ;
1090
- double diff_norm = cvtest::norm (actual_weights, weights, NORM_L2);
1090
+ double diff_norm = cvtest::norm (actual_weights, weights, NORM_L2 + NORM_RELATIVE );
1091
1091
if (diff_norm > eps)
1092
1092
{
1093
1093
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,
1167
1167
std::vector<float > actual_descriptors;
1168
1168
actual_hog->compute (img, actual_descriptors, winStride, padding, locations);
1169
1169
1170
- double diff_norm = cvtest::norm (actual_descriptors, descriptors, NORM_L2);
1170
+ double diff_norm = cvtest::norm (actual_descriptors, descriptors, NORM_L2 + NORM_RELATIVE );
1171
1171
const double eps = FLT_EPSILON * 100 ;
1172
1172
if (diff_norm > eps)
1173
1173
{
@@ -1316,7 +1316,7 @@ void HOGDescriptorTester::computeGradient(const Mat& img, Mat& grad, Mat& qangle
1316
1316
const double eps = FLT_EPSILON * 100 ;
1317
1317
for (i = 0 ; i < 2 ; ++i)
1318
1318
{
1319
- double diff_norm = cvtest::norm (reference_mats [i], actual_mats [i], NORM_L2);
1319
+ double diff_norm = cvtest::norm (actual_mats [i], reference_mats [i], NORM_L2 + NORM_RELATIVE );
1320
1320
if (diff_norm > eps)
1321
1321
{
1322
1322
ts->printf (cvtest::TS::LOG, " %s matrices are not equal\n "
0 commit comments