Ocean
test/testcv/testdetector/Utilities.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_UTILITIES_H
9 #define META_OCEAN_TEST_TESTCV_TESTDETECTOR_UTILITIES_H
10 
12 
14 
15 namespace Ocean
16 {
17 
18 namespace Test
19 {
20 
21 namespace TestCV
22 {
23 
24 namespace TestDetector
25 {
26 
27 /**
28  * This class implements utility functions for the detector test library.
29  * @ingroup testcvdetector
30  */
31 class OCEAN_TEST_CV_DETECTOR_EXPORT Utilities
32 {
33  public:
34 
35  /**
36  * Creates a randomized grayscale (8 bit, one channel) frame with some feature points.
37  * @param width The width of the resulting frame in pixel, with range [1, infinity)
38  * @param height The height of the resulting frame in pixel, with range [1, infinity)
39  * @param featurePointPercentage The percentage of feature points to create, in relation to the image resolution, with range [0, 100]
40  * @param randomGenerator Optional explicit random generator to be used, nullptr to use any
41  * @return The resulting frame
42  */
43  static Frame createRandomFrameWithFeatures(const unsigned int width, const unsigned int height, const unsigned int featurePointPercentage = 2u, RandomGenerator* randomGenerator = nullptr);
44 };
45 
46 }
47 
48 }
49 
50 }
51 
52 }
53 
54 #endif // META_OCEAN_TEST_TESTCV_TESTDETECTOR_TEST_HARRIS_DETECTOR_H
This class implements Ocean's image class.
Definition: Frame.h:1760
This class implements a generator for random numbers.
Definition: RandomGenerator.h:42
This class implements utility functions for the detector test library.
Definition: test/testcv/testdetector/Utilities.h:32
static Frame createRandomFrameWithFeatures(const unsigned int width, const unsigned int height, const unsigned int featurePointPercentage=2u, RandomGenerator *randomGenerator=nullptr)
Creates a randomized grayscale (8 bit, one channel) frame with some feature points.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15