Ocean
TestFrameChangeDetector.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_TESTDETECTOR_TEST_FRAME_CHANGE_DETECTOR_H
9 #define META_OCEAN_TEST_TESTCV_TESTDETECTOR_TEST_FRAME_CHANGE_DETECTOR_H
10 
12 
13 namespace Ocean
14 {
15 
16 namespace Test
17 {
18 
19 namespace TestCV
20 {
21 
22 namespace TestDetector
23 {
24 
25 /**
26  * This class implements tests for frame change detection.
27  * @ingroup testcvdetector
28  */
29 class OCEAN_TEST_CV_DETECTOR_EXPORT TestFrameChangeDetector
30 {
31  public:
32 
33  /**
34  * Tests all frame change detector functions.
35  * @param testDuration Number of seconds for each test, with range (0, infinity)
36  * @param worker The worker object
37  * @return True, if succeeded
38  */
39  static bool test(const double testDuration, Worker& worker);
40 
41  /**
42  * Tests the frame change detector consecutive frames with randomized inputs.
43  * @param testDuration Number of seconds for the test, with range (0, infinity)
44  * @param nonStaticInput If true, the input will be randomized on each frame, almost certainly guaranteeing a change; otherwise, it will be static on each frame
45  * @param simulateDeviceMotion Whether to add random accelerometer and gyroscope readings and ensure that the detector handles them correctly
46  * @param forcedKeyframes Whether to require keyframes at fixed intervals
47  * @param worker The worker object; to test single- and multi-core performance individual trials may or may not use this
48  * @return True, if succeeded
49  */
50  static bool testInput(const double testDuration, bool nonStaticInput, bool simulateDeviceMotion, bool forcedKeyframes, Worker& worker);
51 };
52 
53 }
54 
55 }
56 
57 }
58 
59 }
60 
61 #endif // META_OCEAN_TEST_TESTCV_TESTDETECTOR_TEST_FRAME_CHANGE_DETECTOR_H
This class implements tests for frame change detection.
Definition: TestFrameChangeDetector.h:30
static bool testInput(const double testDuration, bool nonStaticInput, bool simulateDeviceMotion, bool forcedKeyframes, Worker &worker)
Tests the frame change detector consecutive frames with randomized inputs.
static bool test(const double testDuration, Worker &worker)
Tests all frame change detector functions.
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15