Ocean
Loading...
Searching...
No Matches
TestIntegralImage.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_TEST_TESTCV_TEST_INTEGRAL_IMAGE_H
9#define META_OCEAN_TEST_TESTCV_TEST_INTEGRAL_IMAGE_H
10
12
14
15namespace Ocean
16{
17
18namespace Test
19{
20
21namespace TestCV
22{
23
24/**
25 * This class implements an integral image tester.
26 * @ingroup testcv
27 */
28class OCEAN_TEST_CV_EXPORT TestIntegralImage
29{
30 public:
31
32 /**
33 * Tests all integral image functions.
34 * @param width The width of the source frame in pixel, with range [1, infinity)
35 * @param height The height of the source frame in pixel, with range [1, infinity)
36 * @param testDuration Number of seconds for each test, with range (0, infinity)
37 * @param selector Test selector for filtering sub-tests; default runs all tests
38 * @return True, if succeeded
39 */
40 static bool test(const unsigned int width, const unsigned int height, const double testDuration, const TestSelector& selector = TestSelector());
41
42 /**
43 * Tests the standard integral image function without any border.
44 * @param width The width of the source frame in pixel, with range [1, infinity)
45 * @param height The height of the source frame in pixel, with range [1, infinity)
46 * @param testDuration Number of seconds for each test, with range (0, infinity)
47 * @return True, if succeeded
48 */
49 static bool testIntegralImage(const unsigned int width, const unsigned int height, const double testDuration);
50
51 /**
52 * Tests the standard integral image function without any border.
53 * @param width The width of the source frame in pixel, with range [1, infinity)
54 * @param height The height of the source frame in pixel, with range [1, infinity)
55 * @param testDuration Number of seconds for each test, with range (0, infinity)
56 * @return True, if succeeded
57 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
58 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
59 * @tparam tChannels The number of channels the source frame has, with range [1, infinity)
60 */
61 template <typename T, typename TIntegral, unsigned int tChannels>
62 static bool testIntegralImage(const unsigned int width, const unsigned int height, const double testDuration);
63
64 /**
65 * Tests the lined integral image function.
66 * @param width The width of the source frame in pixel, with range [1, infinity)
67 * @param height The height of the source frame in pixel, with range [1, infinity)
68 * @param testDuration Number of seconds for each test, with range (0, infinity)
69 * @return True, if succeeded
70 */
71 static bool testLinedIntegralImage(const unsigned int width, const unsigned int height, const double testDuration);
72
73 /**
74 * Tests the comfort function for lined integral images.
75 * @param testDuration Number of seconds for each test, with range (0, infinity)
76 * @return True, if succeeded
77 */
78 static bool testLinedIntegralImageComfort(const double testDuration);
79
80 /**
81 * Tests the lined integral image function.
82 * @param width The width of the source frame in pixel, with range [1, infinity)
83 * @param height The height of the source frame in pixel, with range [1, infinity)
84 * @param testDuration Number of seconds for each test, with range (0, infinity)
85 * @return True, if succeeded
86 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
87 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
88 * @tparam tChannels The number of channels the source frame has, with range [1, infinity)
89 */
90 template <typename T, typename TIntegral, unsigned int tChannels>
91 static bool testLinedIntegralImage(const unsigned int width, const unsigned int height, const double testDuration);
92
93 /**
94 * Tests the lined squared integral image function.
95 * @param width The width of the source frame in pixel, with range [1, infinity)
96 * @param height The height of the source frame in pixel, with range [1, infinity)
97 * @param testDuration Number of seconds for each test, with range (0, infinity)
98 * @return True, if succeeded
99 */
100 static bool testLinedIntegralImageSquared(const unsigned int width, const unsigned int height, const double testDuration);
101
102 /**
103 * Tests the lined squared integral image function.
104 * @param width The width of the source frame in pixel, with range [1, infinity)
105 * @param height The height of the source frame in pixel, with range [1, infinity)
106 * @param testDuration Number of seconds for each test, with range (0, infinity)
107 * @return True, if succeeded
108 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
109 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
110 * @tparam tChannels The number of channels the source frame has, with range [1, infinity)
111 */
112 template <typename T, typename TIntegral, unsigned int tChannels>
113 static bool testLinedIntegralImageSquared(const unsigned int width, const unsigned int height, const double testDuration);
114
115 /**
116 * Tests the joined lined integral and squared integral image function.
117 * @param width The width of the source frame in pixel, with range [1, infinity)
118 * @param height The height of the source frame in pixel, with range [1, infinity)
119 * @param testDuration Number of seconds for each test, with range (0, infinity)
120 * @return True, if succeeded
121 */
122 static bool testLinedIntegralImageAndSquaredJoined(const unsigned int width, const unsigned int height, const double testDuration);
123
124 /**
125 * Tests the joined lined integral and squared integral image function.
126 * @param width The width of the source frame in pixel, with range [1, infinity)
127 * @param height The height of the source frame in pixel, with range [1, infinity)
128 * @param testDuration Number of seconds for each test, with range (0, infinity)
129 * @return True, if succeeded
130 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
131 * @tparam TIntegralAndSquared The data type of each integral element, e.g., 'unsigned int'
132 * @tparam tChannels The number of channels the source frame has, with range [1, infinity)
133 */
134 template <typename T, typename TIntegralAndSquared, unsigned int tChannels>
135 static bool testLinedIntegralImageAndSquaredJoined(const unsigned int width, const unsigned int height, const double testDuration);
136
137 /**
138 * Tests the separate lined integral and squared integral image function.
139 * @param width The width of the source frame in pixel, with range [1, infinity)
140 * @param height The height of the source frame in pixel, with range [1, infinity)
141 * @param testDuration Number of seconds for each test, with range (0, infinity)
142 * @return True, if succeeded
143 */
144 static bool testLinedIntegralImageAndSquaredSeparate(const unsigned int width, const unsigned int height, const double testDuration);
145
146 /**
147 * Tests the separate lined integral and squared integral image function.
148 * @param width The width of the source frame in pixel, with range [1, infinity)
149 * @param height The height of the source frame in pixel, with range [1, infinity)
150 * @param testDuration Number of seconds for each test, with range (0, infinity)
151 * @return True, if succeeded
152 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
153 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
154 * @tparam TIntegralSquared The data type of each squared integral element, e.g., 'unsigned int'
155 * @tparam tChannels The number of channels the source frame has, with range [1, infinity)
156 */
157 template <typename T, typename TIntegral, typename TIntegralSquared, unsigned int tChannels>
158 static bool testLinedIntegralImageAndSquaredSeparate(const unsigned int width, const unsigned int height, const double testDuration);
159
160 /**
161 * Tests the bordered integral image function.
162 * @param width The width of the source frame in pixel, with range [1, infinity)
163 * @param height The height of the source frame in pixel, with range [1, infinity)
164 * @param testDuration Number of seconds for each test, with range (0, infinity)
165 * @return True, if succeeded
166 */
167 static bool testBorderedIntegralImage(const unsigned int width, const unsigned int height, const double testDuration);
168
169 /**
170 * Tests the comfort function for bordered integral images.
171 * @param testDuration Number of seconds for each test, with range (0, infinity)
172 * @return True, if succeeded
173 */
174 static bool testBorderedIntegralImageComfort(const double testDuration);
175
176 /**
177 * Tests the bordered integral image function.
178 * @param width The width of the source frame in pixel, with range [1, infinity)
179 * @param height The height of the source frame in pixel, with range [1, infinity)
180 * @param testDuration Number of seconds for each test, with range (0, infinity)
181 * @return True, if succeeded
182 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
183 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
184 * @tparam tChannels The number of channels the source frame has, with range [1, infinity)
185 */
186 template <typename T, typename TIntegral, unsigned int tChannels>
187 static bool testBorderedIntegralImage(const unsigned int width, const unsigned int height, const double testDuration);
188
189 /**
190 * Tests the bordered squared integral image function.
191 * @param width The width of the source frame in pixel, with range [1, infinity)
192 * @param height The height of the source frame in pixel, with range [1, infinity)
193 * @param testDuration Number of seconds for each test, with range (0, infinity)
194 * @return True, if succeeded
195 */
196 static bool testBorderedIntegralImageSquared(const unsigned int width, const unsigned int height, const double testDuration);
197
198 /**
199 * Tests the bordered squared integral image function.
200 * @param width The width of the source frame in pixel, with range [1, infinity)
201 * @param height The height of the source frame in pixel, with range [1, infinity)
202 * @param testDuration Number of seconds for each test, with range (0, infinity)
203 * @return True, if succeeded
204 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
205 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
206 * @tparam tChannels The number of channels the source frame has, with range [1, infinity)
207 */
208 template <typename T, typename TIntegral, unsigned int tChannels>
209 static bool testBorderedIntegralImageSquared(const unsigned int width, const unsigned int height, const double testDuration);
210
211 /**
212 * Tests the bordered mirrored integral image function.
213 * @param width The width of the source frame in pixel, with range [1, infinity)
214 * @param height The height of the source frame in pixel, with range [1, infinity)
215 * @param testDuration Number of seconds for each test, with range (0, infinity)
216 * @return True, if succeeded
217 */
218 static bool testBorderedIntegralImageMirror(const unsigned int width, const unsigned int height, const double testDuration);
219
220 /**
221 * Tests the bordered mirrored integral image function.
222 * @param width The width of the source frame in pixel, with range [1, infinity)
223 * @param height The height of the source frame in pixel, with range [1, infinity)
224 * @param testDuration Number of seconds for each test, with range (0, infinity)
225 * @return True, if succeeded
226 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
227 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
228 * @tparam tChannels The number of channels the source frame has, with range [1, infinity)
229 */
230 template <typename T, typename TIntegral, unsigned int tChannels>
231 static bool testBorderedIntegralImageMirror(const unsigned int width, const unsigned int height, const double testDuration);
232
233 /**
234 * Tests the bordered squared mirrored integral image function.
235 * @param width The width of the source frame in pixel, with range [1, infinity)
236 * @param height The height of the source frame in pixel, with range [1, infinity)
237 * @param testDuration Number of seconds for each test, with range (0, infinity)
238 * @return True, if succeeded
239 */
240 static bool testBorderedIntegralImageSquaredMirror(const unsigned int width, const unsigned int height, const double testDuration);
241
242 /**
243 * Tests the bordered squared mirrored integral image function.
244 * @param width The width of the source frame in pixel, with range [1, infinity)
245 * @param height The height of the source frame in pixel, with range [1, infinity)
246 * @param testDuration Number of seconds for each test, with range (0, infinity)
247 * @return True, if succeeded
248 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
249 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
250 * @tparam tChannels The number of channels the source frame has, with range [1, infinity)
251 */
252 template <typename T, typename TIntegral, unsigned int tChannels>
253 static bool testBorderedIntegralImageSquaredMirror(const unsigned int width, const unsigned int height, const double testDuration);
254
255 /**
256 * Tests the bordered squared mirrored integral image function.
257 * @param testDuration Number of seconds for each test, with range (0, infinity)
258 * @return True, if succeeded
259 */
260 static bool testVarianceCalculation(const double testDuration);
261
262 /**
263 * Tests the variance calculation function.
264 * @param testDuration Number of seconds for each test, with range (0, infinity)
265 * @return True, if succeeded
266 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
267 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
268 * @tparam TIntegralSquared The data type of each integral element, e.g., 'unsigned long long'
269 * @tparam TVariance The data type of the variance, e.g., `float` or `double`
270 */
271 template <typename T, typename TIntegral, typename TIntegralSquared, typename TVariance>
272 static bool testVarianceCalculation(const double testDuration);
273
274 /**
275 * Tests the bordered squared mirrored integral image function.
276 * @param testDuration Number of seconds for each test, with range (0, infinity)
277 * @return True, if succeeded
278 */
279 static bool testVarianceCalculationTwoRegions(const double testDuration);
280
281 /**
282 * Tests the variance calculation function for two joined regions.
283 * @param testDuration Number of seconds for each test, with range (0, infinity)
284 * @return True, if succeeded
285 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
286 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
287 * @tparam TIntegralSquared The data type of each integral element, e.g., 'unsigned long long'
288 * @tparam TVariance The data type of the variance, e.g., `float` or `double`
289 */
290 template <typename T, typename TIntegral, typename TIntegralSquared, typename TVariance>
291 static bool testVarianceCalculationTwoRegions(const double testDuration);
292
293 private:
294
295 /**
296 * Validates the integral image without border.
297 * @param source The source frame from which the integral image has been created, must be valid
298 * @param integral The integral image to be validated, must be valid
299 * @param width The width of source frame (and integral image) in pixel, with range [1, infinity)
300 * @param height The height of source frame (and integral image) in pixel, with range [1, infinity)
301 * @param channels The number of frame channels, with range [1, infinity)
302 * @param sourcePaddingElements The number of padding elements at the end of each source row, with range [0, infinity)
303 * @param integralPaddingElements The number of padding elements at the end of each integral row, with range [0, infinity)
304 * @param validationChecks The number of random validation checks to be done, with range [1, infinity)
305 * @return True, if succeeded
306 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
307 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
308 */
309 template <typename T, typename TIntegral>
310 static bool validateIntegralImage(const T* source, const TIntegral* integral, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements, const unsigned int validationChecks = 20u);
311
312 /**
313 * Validates the integral image with border.
314 * @param source The source frame from which the integral image has been created, must be valid
315 * @param integral The integral image to be validated, must be valid
316 * @param width The width of original image in pixel, with range [1, infinity)
317 * @param height The height of original image in pixel, with range [1, infinity)
318 * @param channels The number of channels the given image (and integral image has), with range [1, infinity)
319 * @param border The border of the integral image, in pixel, with range [1, infinity)
320 * @param sourcePaddingElements Optional number of padding elements at the end of each row of the source image, with range [0, infinity)
321 * @param integralPaddingElements Optional number of padding elements at the end of each row of the integral image, with range [0, infinity)
322 * @return True, if succeeded
323 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
324 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
325 */
326 template <typename T, typename TIntegral>
327 static bool validateBorderedIntegralImage(const T* source, const TIntegral* integral, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements);
328
329 /**
330 * Validates the integral image with border.
331 * @param source The source frame from which the integral image has been created, must be valid
332 * @param integral The integral image to be validated, must be valid
333 * @param width The width of original image in pixel, with range [1, infinity)
334 * @param height The height of original image in pixel, with range [1, infinity)
335 * @param border The border of the integral image, in pixel, with range [1, infinity)
336 * @param sourcePaddingElements Optional number of padding elements at the end of each row of the source image, with range [0, infinity)
337 * @param integralPaddingElements Optional number of padding elements at the end of each row of the integral image, with range [0, infinity)
338 * @return True, if succeeded
339 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
340 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
341 * @tparam tChannels The number of channels the given image (and integral image has), with range [1, infinity)
342 */
343 template <typename T, typename TIntegral, unsigned int tChannels>
344 static bool validateBorderedIntegralImage(const T* source, const TIntegral* integral, const unsigned int width, const unsigned int height, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements);
345
346 /**
347 * Validates the squared integral image with border.
348 * @param source The source frame from which the integral image has been created, must be valid
349 * @param integral The integral image to be validated, must be valid
350 * @param width The width of original image in pixel, with range [1, infinity)
351 * @param height The height of original image in pixel, with range [1, infinity)
352 * @param border The border of the integral image, in pixel, with range [1, infinity)
353 * @param sourcePaddingElements Optional number of padding elements at the end of each row of the source image, with range [0, infinity)
354 * @param integralPaddingElements Optional number of padding elements at the end of each row of the integral image, with range [0, infinity)
355 * @param validationChecks The number of random validation checks to be done, with range [1, infinity)
356 * @return True, if succeeded
357 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
358 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
359 * @tparam tChannels The number of channels the given image (and integral image has), with range [1, infinity)
360 */
361 template <typename T, typename TIntegral, unsigned int tChannels>
362 static bool validateBorderedIntegralImageSquared(const T* source, const TIntegral* integral, const unsigned int width, const unsigned int height, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements, const unsigned int validationChecks = 20u);
363
364 /**
365 * Validates the joined integral and squared integral image with border.
366 * @param source The source frame from which the integral image has been created, must be valid
367 * @param integralAndSquared The integral image to be validated, must be valid
368 * @param width The width of original image in pixel, with range [1, infinity)
369 * @param height The height of original image in pixel, with range [1, infinity)
370 * @param border The border of the integral image, in pixel, with range [1, infinity)
371 * @param sourcePaddingElements Optional number of padding elements at the end of each row of the source image, with range [0, infinity)
372 * @param integralAndSquaredPaddingElements Optional number of padding elements at the end of each row of the integral image, with range [0, infinity)
373 * @param validationChecks The number of random validation checks to be done, with range [1, infinity)
374 * @return True, if succeeded
375 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
376 * @tparam TIntegralAndSquared The data type of each integral element, e.g., 'unsigned int'
377 * @tparam tChannels The number of channels the given image (and integral image has), with range [1, infinity)
378 */
379 template <typename T, typename TIntegralAndSquared, unsigned int tChannels>
380 static bool validateBorderedIntegralImageAndSquaredJoined(const T* source, const TIntegralAndSquared* integralAndSquared, const unsigned int width, const unsigned int height, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralAndSquaredPaddingElements, const unsigned int validationChecks = 20u);
381
382 /**
383 * Validates the separate integral and squared integral image with border.
384 * @param source The source frame from which the integral image has been created, must be valid
385 * @param integral The integral image to be validated, must be valid
386 * @param integralSquared The integral squared image to be validated, must be valid
387 * @param width The width of original image in pixel, with range [1, infinity)
388 * @param height The height of original image in pixel, with range [1, infinity)
389 * @param border The border of the integral image, in pixel, with range [1, infinity)
390 * @param sourcePaddingElements Optional number of padding elements at the end of each row of the source image, with range [0, infinity)
391 * @param integralPaddingElements Optional number of padding elements at the end of each row of the integral image, with range [0, infinity)
392 * @param integralSquaredPaddingElements Optional number of padding elements at the end of each row of the integral squared image, with range [0, infinity)
393 * @param validationChecks The number of random validation checks to be done, with range [1, infinity)
394 * @return True, if succeeded
395 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
396 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
397 * @tparam TIntegralSquared The data type of each integral squared element, e.g., 'unsigned long long'
398 * @tparam tChannels The number of channels the given image (and integral image has), with range [1, infinity)
399 */
400 template <typename T, typename TIntegral, typename TIntegralSquared, unsigned int tChannels>
401 static bool validateBorderedIntegralImageAndSquaredSeparate(const T* source, const TIntegral* integral, const TIntegralSquared* integralSquared, const unsigned int width, const unsigned int height, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements, const unsigned int integralSquaredPaddingElements, const unsigned int validationChecks = 20u);
402
403 /**
404 * Validates the mirrored integral image with border.
405 * @param source The source frame from which the integral image has been created, must be valid
406 * @param integral The integral image to be validated, must be valid
407 * @param width The width of original image in pixel, with range [1, infinity)
408 * @param height The height of original image in pixel, with range [1, infinity)
409 * @param border The border of the integral image, in pixel, with range [1, infinity)
410 * @param sourcePaddingElements Optional number of padding elements at the end of each row of the source image, with range [0, infinity)
411 * @param integralPaddingElements Optional number of padding elements at the end of each row of the integral image, with range [0, infinity)
412 * @param validationChecks The number of random validation checks to be done, with range [1, infinity)
413 * @return True, if succeeded
414 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
415 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
416 * @tparam tChannels The number of channels the given image (and integral image has), with range [1, infinity)
417 */
418 template <typename T, typename TIntegral, unsigned int tChannels>
419 static bool validateBorderedIntegralImageMirror(const T* source, const TIntegral* integral, const unsigned int width, const unsigned int height, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements, const unsigned int validationChecks = 20u);
420
421 /**
422 * Validates the squared mirrored integral image with border.
423 * @param source The source frame from which the integral image has been created, must be valid
424 * @param integral The integral image to be validated, must be valid
425 * @param width The width of original image in pixel, with range [1, infinity)
426 * @param height The height of original image in pixel, with range [1, infinity)
427 * @param border The border of the integral image, in pixel, with range [1, infinity)
428 * @param sourcePaddingElements Optional number of padding elements at the end of each row of the source image, with range [0, infinity)
429 * @param integralPaddingElements Optional number of padding elements at the end of each row of the integral image, with range [0, infinity)
430 * @param validationChecks The number of random validation checks to be done, with range [1, infinity)
431 * @return True, if succeeded
432 * @tparam T The data type of each source elements, e.g,. 'unsigned char'
433 * @tparam TIntegral The data type of each integral element, e.g., 'unsigned int'
434 * @tparam tChannels The number of channels the given image (and integral image has), with range [1, infinity)
435 */
436 template <typename T, typename TIntegral, unsigned int tChannels>
437 static bool validateBorderedIntegralImageSquaredMirror(const T* source, const TIntegral* integral, const unsigned int width, const unsigned int height, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements, const unsigned int validationChecks = 20u);
438};
439
440}
441
442}
443
444}
445
446#endif // META_OCEAN_TEST_TESTCV_TEST_INTEGRAL_IMAGE_H
This class implements an integral image tester.
Definition TestIntegralImage.h:29
static bool testBorderedIntegralImageMirror(const unsigned int width, const unsigned int height, const double testDuration)
Tests the bordered mirrored integral image function.
static bool testBorderedIntegralImageSquaredMirror(const unsigned int width, const unsigned int height, const double testDuration)
Tests the bordered squared mirrored integral image function.
static bool validateBorderedIntegralImageMirror(const T *source, const TIntegral *integral, const unsigned int width, const unsigned int height, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements, const unsigned int validationChecks=20u)
Validates the mirrored integral image with border.
static bool validateBorderedIntegralImageSquaredMirror(const T *source, const TIntegral *integral, const unsigned int width, const unsigned int height, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements, const unsigned int validationChecks=20u)
Validates the squared mirrored integral image with border.
static bool testVarianceCalculation(const double testDuration)
Tests the bordered squared mirrored integral image function.
static bool testBorderedIntegralImageMirror(const unsigned int width, const unsigned int height, const double testDuration)
Tests the bordered mirrored integral image function.
static bool testBorderedIntegralImageSquared(const unsigned int width, const unsigned int height, const double testDuration)
Tests the bordered squared integral image function.
static bool testBorderedIntegralImage(const unsigned int width, const unsigned int height, const double testDuration)
Tests the bordered integral image function.
static bool testLinedIntegralImageAndSquaredSeparate(const unsigned int width, const unsigned int height, const double testDuration)
Tests the separate lined integral and squared integral image function.
static bool testLinedIntegralImageAndSquaredSeparate(const unsigned int width, const unsigned int height, const double testDuration)
Tests the separate lined integral and squared integral image function.
static bool validateBorderedIntegralImage(const T *source, const TIntegral *integral, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements)
Validates the integral image with border.
static bool test(const unsigned int width, const unsigned int height, const double testDuration, const TestSelector &selector=TestSelector())
Tests all integral image functions.
static bool testVarianceCalculationTwoRegions(const double testDuration)
Tests the variance calculation function for two joined regions.
static bool testVarianceCalculation(const double testDuration)
Tests the variance calculation function.
static bool testLinedIntegralImageAndSquaredJoined(const unsigned int width, const unsigned int height, const double testDuration)
Tests the joined lined integral and squared integral image function.
static bool testBorderedIntegralImage(const unsigned int width, const unsigned int height, const double testDuration)
Tests the bordered integral image function.
static bool testLinedIntegralImageAndSquaredJoined(const unsigned int width, const unsigned int height, const double testDuration)
Tests the joined lined integral and squared integral image function.
static bool validateBorderedIntegralImageSquared(const T *source, const TIntegral *integral, const unsigned int width, const unsigned int height, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements, const unsigned int validationChecks=20u)
Validates the squared integral image with border.
static bool testBorderedIntegralImageComfort(const double testDuration)
Tests the comfort function for bordered integral images.
static bool validateBorderedIntegralImageAndSquaredSeparate(const T *source, const TIntegral *integral, const TIntegralSquared *integralSquared, const unsigned int width, const unsigned int height, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements, const unsigned int integralSquaredPaddingElements, const unsigned int validationChecks=20u)
Validates the separate integral and squared integral image with border.
static bool testLinedIntegralImageComfort(const double testDuration)
Tests the comfort function for lined integral images.
static bool testBorderedIntegralImageSquaredMirror(const unsigned int width, const unsigned int height, const double testDuration)
Tests the bordered squared mirrored integral image function.
static bool testLinedIntegralImage(const unsigned int width, const unsigned int height, const double testDuration)
Tests the lined integral image function.
static bool validateBorderedIntegralImageAndSquaredJoined(const T *source, const TIntegralAndSquared *integralAndSquared, const unsigned int width, const unsigned int height, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralAndSquaredPaddingElements, const unsigned int validationChecks=20u)
Validates the joined integral and squared integral image with border.
static bool testLinedIntegralImageSquared(const unsigned int width, const unsigned int height, const double testDuration)
Tests the lined squared integral image function.
static bool testIntegralImage(const unsigned int width, const unsigned int height, const double testDuration)
Tests the standard integral image function without any border.
static bool testLinedIntegralImageSquared(const unsigned int width, const unsigned int height, const double testDuration)
Tests the lined squared integral image function.
static bool testIntegralImage(const unsigned int width, const unsigned int height, const double testDuration)
Tests the standard integral image function without any border.
static bool testLinedIntegralImage(const unsigned int width, const unsigned int height, const double testDuration)
Tests the lined integral image function.
static bool validateIntegralImage(const T *source, const TIntegral *integral, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements, const unsigned int validationChecks=20u)
Validates the integral image without border.
static bool testVarianceCalculationTwoRegions(const double testDuration)
Tests the bordered squared mirrored integral image function.
static bool testBorderedIntegralImageSquared(const unsigned int width, const unsigned int height, const double testDuration)
Tests the bordered squared integral image function.
static bool validateBorderedIntegralImage(const T *source, const TIntegral *integral, const unsigned int width, const unsigned int height, const unsigned int border, const unsigned int sourcePaddingElements, const unsigned int integralPaddingElements)
Validates the integral image with border.
This class implements a test selector that parses test function strings and determines which tests sh...
Definition TestSelector.h:51
The namespace covering the entire Ocean framework.
Definition Accessor.h:15