Skip to content

Commit 1c0cb8b

Browse files
committed
Merge pull request #360 from mshabunin:fix-contrib-tests
2 parents 4f860dc + 94e777b commit 1c0cb8b

22 files changed

+138
-148
lines changed

modules/line_descriptor/perf/perf_descriptors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ PERF_TEST_P(file_str, descriptors, testing::Values(IMAGES))
7272
bd->compute( frame, keylines, descriptors );
7373
}
7474

75-
SANITY_CHECK( descriptors );
75+
SANITY_CHECK_NOTHING();
7676

7777
}

modules/line_descriptor/perf/perf_detection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ PERF_TEST_P(file_str, detect, testing::Values(IMAGES))
109109
createMatFromVec( keylines, lines );
110110
}
111111

112-
SANITY_CHECK( lines );
112+
SANITY_CHECK_NOTHING();
113113

114114
}
115115

@@ -133,6 +133,6 @@ PERF_TEST_P(file_str, detect_lsd, testing::Values(IMAGES))
133133
createMatFromVec( keylines, lines );
134134
}
135135

136-
SANITY_CHECK( lines );
136+
SANITY_CHECK_NOTHING();
137137

138138
}

modules/line_descriptor/perf/perf_matching.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ PERF_TEST(matching, single_match)
138138
TEST_CYCLE()
139139
bd->match( query, train, dm );
140140

141-
SANITY_CHECK_MATCHES( dm );
141+
SANITY_CHECK_NOTHING();
142142

143143
}
144144

@@ -160,7 +160,7 @@ PERF_TEST(knn_matching, knn_match_distances_test)
160160
}
161161
}
162162

163-
SANITY_CHECK( distances );
163+
SANITY_CHECK_NOTHING();
164164
}
165165

166166
PERF_TEST(radius_match, radius_match_distances_test)
@@ -181,7 +181,7 @@ PERF_TEST(radius_match, radius_match_distances_test)
181181
}
182182
}
183183

184-
SANITY_CHECK( distances );
184+
SANITY_CHECK_NOTHING();
185185

186186
}
187187

modules/reg/perf/perf_reg.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ PERF_TEST_P(Size_MatType, Registration_Shift,
205205

206206
TEST_CYCLE() shift = perfShift(frame);
207207

208-
SANITY_CHECK(shift);
208+
SANITY_CHECK_NOTHING();
209209
}
210210

211211
PERF_TEST_P(Size_MatType, Registration_Euclidean,
@@ -223,7 +223,7 @@ PERF_TEST_P(Size_MatType, Registration_Euclidean,
223223

224224
TEST_CYCLE() result = perfEuclidean(frame);
225225

226-
SANITY_CHECK(result);
226+
SANITY_CHECK_NOTHING();
227227
}
228228

229229
PERF_TEST_P(Size_MatType, Registration_Similarity,
@@ -241,7 +241,7 @@ PERF_TEST_P(Size_MatType, Registration_Similarity,
241241

242242
TEST_CYCLE() result = perfSimilarity(frame);
243243

244-
SANITY_CHECK(result);
244+
SANITY_CHECK_NOTHING();
245245
}
246246

247247
PERF_TEST_P(Size_MatType, Registration_Affine,
@@ -259,7 +259,7 @@ PERF_TEST_P(Size_MatType, Registration_Affine,
259259

260260
TEST_CYCLE() result = perfAffine(frame);
261261

262-
SANITY_CHECK(result);
262+
SANITY_CHECK_NOTHING();
263263
}
264264

265265
PERF_TEST_P(Size_MatType, Registration_Projective,
@@ -277,5 +277,5 @@ PERF_TEST_P(Size_MatType, Registration_Projective,
277277

278278
TEST_CYCLE() result = perfProjective(frame);
279279

280-
SANITY_CHECK(result);
280+
SANITY_CHECK_NOTHING();
281281
}

modules/xfeatures2d/perf/perf_daisy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ PERF_TEST_P(daisy, extract, testing::Values(DAISY_IMAGES))
2929
// compute all daisies in image
3030
TEST_CYCLE() descriptor->compute(frame, descriptors);
3131

32-
SANITY_CHECK(descriptors, 1e-4);
32+
SANITY_CHECK_NOTHING();
3333
}

modules/xfeatures2d/perf/perf_latch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ PERF_TEST_P(latch, extract, testing::Values(LATCH_IMAGES))
3030
vector<uchar> descriptors;
3131
TEST_CYCLE() descriptor->compute(frame, points, descriptors);
3232

33-
SANITY_CHECK(descriptors, 1e-4);
33+
SANITY_CHECK_NOTHING();
3434
}

modules/xfeatures2d/perf/perf_surf.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ PERF_TEST_P(surf, detect, testing::Values(SURF_IMAGES))
2626

2727
TEST_CYCLE() detector->detect(frame, points, mask);
2828

29-
SANITY_CHECK_KEYPOINTS(points, 1e-3);
29+
SANITY_CHECK_NOTHING();
3030
}
3131

3232
PERF_TEST_P(surf, extract, testing::Values(SURF_IMAGES))
@@ -45,7 +45,7 @@ PERF_TEST_P(surf, extract, testing::Values(SURF_IMAGES))
4545

4646
TEST_CYCLE() detector->compute(frame, points, descriptors);
4747

48-
SANITY_CHECK(descriptors, 1e-4);
48+
SANITY_CHECK_NOTHING();
4949
}
5050

5151
PERF_TEST_P(surf, full, testing::Values(SURF_IMAGES))
@@ -62,6 +62,5 @@ PERF_TEST_P(surf, full, testing::Values(SURF_IMAGES))
6262

6363
TEST_CYCLE() detector->detectAndCompute(frame, mask, points, descriptors, false);
6464

65-
SANITY_CHECK_KEYPOINTS(points, 1e-3);
66-
SANITY_CHECK(descriptors, 1e-4);
65+
SANITY_CHECK_NOTHING();
6766
}

modules/xfeatures2d/perf/perf_surf.ocl.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ PERF_TEST_P(OCL_SURF, DISABLED_with_data_transfer, testing::Values(SURF_IMAGES))
8181
d_descriptors.download(cpu_dp);
8282
}
8383

84-
SANITY_CHECK(cpu_kp, 1);
85-
SANITY_CHECK(cpu_dp, 1);
84+
SANITY_CHECK_NOTHING();
8685
}
8786

8887
PERF_TEST_P(OCL_SURF, DISABLED_without_data_transfer, testing::Values(SURF_IMAGES))
@@ -104,8 +103,7 @@ PERF_TEST_P(OCL_SURF, DISABLED_without_data_transfer, testing::Values(SURF_IMAGE
104103
Mat cpu_dp;
105104
d_keypoints.download(cpu_kp);
106105
d_descriptors.download(cpu_dp);
107-
SANITY_CHECK(cpu_kp, 1);
108-
SANITY_CHECK(cpu_dp, 1);
106+
SANITY_CHECK_NOTHING();
109107
}
110108

111109
#endif // HAVE_OPENCV_OCL

modules/ximgproc/perf/perf_adaptive_manifold.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
* By downloading, copying, installing or using the software you agree to this license.
33
* If you do not agree to this license, do not download, install,
44
* copy or use the software.
5-
*
6-
*
5+
*
6+
*
77
* License Agreement
88
* For Open Source Computer Vision Library
99
* (3 - clause BSD License)
10-
*
10+
*
1111
* Redistribution and use in source and binary forms, with or without modification,
1212
* are permitted provided that the following conditions are met :
13-
*
13+
*
1414
* *Redistributions of source code must retain the above copyright notice,
1515
* this list of conditions and the following disclaimer.
16-
*
16+
*
1717
* * Redistributions in binary form must reproduce the above copyright notice,
1818
* this list of conditions and the following disclaimer in the documentation
1919
* and / or other materials provided with the distribution.
20-
*
20+
*
2121
* * Neither the names of the copyright holders nor the names of the contributors
2222
* may be used to endorse or promote products derived from this software
2323
* without specific prior written permission.
24-
*
24+
*
2525
* This software is provided by the copyright holders and contributors "as is" and
2626
* any express or implied warranties, including, but not limited to, the implied
2727
* warranties of merchantability and fitness for a particular purpose are disclaimed.
@@ -49,7 +49,7 @@ using namespace cv::ximgproc;
4949

5050
typedef tuple<bool, Size, int, int, MatType> AMPerfTestParam;
5151
typedef TestBaseWithParam<AMPerfTestParam> AdaptiveManifoldPerfTest;
52-
52+
5353
PERF_TEST_P( AdaptiveManifoldPerfTest, perf,
5454
Combine(
5555
Values(true, false), //adjust_outliers flag
@@ -70,7 +70,7 @@ PERF_TEST_P( AdaptiveManifoldPerfTest, perf,
7070
Mat joint(sz, CV_MAKE_TYPE(depth, jointCnNum));
7171
Mat src(sz, CV_MAKE_TYPE(depth, srcCnNum));
7272
Mat dst(sz, CV_MAKE_TYPE(depth, srcCnNum));
73-
73+
7474
cv::setNumThreads(cv::getNumberOfCPUs());
7575

7676
declare.in(joint, src, WARMUP_RNG).out(dst).tbb_threads(cv::getNumberOfCPUs());
@@ -87,7 +87,7 @@ PERF_TEST_P( AdaptiveManifoldPerfTest, perf,
8787
sigma_r /= 1.38;
8888
}
8989

90-
SANITY_CHECK(dst);
90+
SANITY_CHECK_NOTHING();
9191
}
9292

93-
}
93+
}

modules/ximgproc/perf/perf_disparity_wls_filter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ PERF_TEST_P( DisparityWLSFilterPerfTest, perf, Combine(GuideTypes::all(), SrcTyp
8989
wls_filter->filter(disp_left,guide,dst,disp_right,ROI);
9090
}
9191

92-
SANITY_CHECK(dst);
92+
SANITY_CHECK_NOTHING();
9393
}
9494

9595
void MakeArtificialExample(RNG rng, Mat& dst_left_view, Mat& dst_left_disparity_map, Mat& dst_right_disparity_map, Rect& dst_ROI)

0 commit comments

Comments
 (0)