Ocean
Loading...
Searching...
No Matches
testcv/testdetector/testbullseyes/TestUtilities.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#pragma once
9
11
13
15
16namespace Ocean
17{
18
19namespace Test
20{
21
22namespace TestCV
23{
24
25namespace TestDetector
26{
27
28namespace TestBullseyes
29{
30
31/**
32 * This class implements tests for the Utilities class.
33 * @ingroup testcvdetectorbullseyes
34 */
35class OCEAN_TEST_CV_DETECTOR_BULLSEYES_EXPORT TestUtilities
36{
37 protected:
38
39 /// Alias for the Utilities class.
41
42 /// Alias for the Bullseye class.
44
45 public:
46
47 /**
48 * Tests the Utilities functions.
49 * @param testDuration Number of seconds for each test, with range (0, infinity)
50 * @return True, if succeeded
51 */
52 static bool test(const double testDuration);
53
54 /**
55 * Test for Utilities::createBullseyeImage()
56 * @param testDuration The duration in seconds for which this test will be run, must be > 0.0
57 * @param randomGenerator A random generator that will be used to generate test data
58 * @return True, if succeeded
59 */
60 static bool testCreateBullseyeImage(const double testDuration, RandomGenerator& randomGenerator);
61
62 /**
63 * Test for Utilities::drawBullseyeWithOffset()
64 * @param testDuration The duration in seconds for which this test will be run, must be > 0.0
65 * @param randomGenerator A random generator that will be used to generate test data
66 * @return True, if succeeded
67 */
68 static bool testDrawBullseyeWithOffset(const double testDuration, RandomGenerator& randomGenerator);
69
70 /**
71 * Test for Utilities::drawBullseye()
72 * @param testDuration The duration in seconds for which this test will be run, must be > 0.0
73 * @param randomGenerator A random generator that will be used to generate test data
74 * @return True, if succeeded
75 */
76 static bool testDrawBullseye(const double testDuration, RandomGenerator& randomGenerator);
77
78 /**
79 * Test for Utilities::drawBullseyes()
80 * @param testDuration The duration in seconds for which this test will be run, must be > 0.0
81 * @param randomGenerator A random generator that will be used to generate test data
82 * @return True, if succeeded
83 */
84 static bool testDrawBullseyes(const double testDuration, RandomGenerator& randomGenerator);
85
86 protected:
87
88 /**
89 * Creates a random valid bullseye with random position, radius, and gray threshold
90 * @param randomGenerator A random generator that will be used to generate test data
91 * @return A valid bullseye with random parameters
92 */
94};
95
96} // namespace TestBullseyes
97
98} // namespace TestDetector
99
100} // namespace TestCV
101
102} // namespace Test
103
104} // namespace Ocean
Definition of a bullseye composed of a location and a radius.
Definition Bullseye.h:32
This class implements utility functions for the Bullseyes library.
Definition cv/detector/bullseyes/Utilities.h:36
This class implements a generator for random numbers.
Definition RandomGenerator.h:42
This class implements tests for the Utilities class.
Definition testcv/testdetector/testbullseyes/TestUtilities.h:36
static bool testDrawBullseye(const double testDuration, RandomGenerator &randomGenerator)
Test for Utilities::drawBullseye()
static bool testCreateBullseyeImage(const double testDuration, RandomGenerator &randomGenerator)
Test for Utilities::createBullseyeImage()
static Bullseye createRandomValidBullseye(RandomGenerator &randomGenerator)
Creates a random valid bullseye with random position, radius, and gray threshold.
static bool testDrawBullseyeWithOffset(const double testDuration, RandomGenerator &randomGenerator)
Test for Utilities::drawBullseyeWithOffset()
static bool test(const double testDuration)
Tests the Utilities functions.
static bool testDrawBullseyes(const double testDuration, RandomGenerator &randomGenerator)
Test for Utilities::drawBullseyes()
The namespace covering the entire Ocean framework.
Definition Accessor.h:15