Ocean
testopencv/TestFrameInterpolatorNearestPixel.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_TESTOPENCV_TEST_FRAME_INTERPOLATOR_NEAREST_PIXEL_H
9 #define META_OCEAN_TEST_TESTCV_TESTOPENCV_TEST_FRAME_INTERPOLATOR_NEAREST_PIXEL_H
10 
12 
13 #include <opencv2/core.hpp>
14 
15 namespace Ocean
16 {
17 
18 namespace Test
19 {
20 
21 namespace TestCV
22 {
23 
24 namespace TestOpenCV
25 {
26 
27 /**
28  * This class benchmarks the performance of nearest-neighbor interpolation.
29  * @ingroup testcvopencv
30  */
31 class OCEAN_TEST_CV_OPENCV_EXPORT TestFrameInterpolatorNearestPixel
32 {
33  public:
34 
35  /**
36  * Benchmarks nearest-neighbor interpolation functions.
37  * @param testDuration Number of seconds for each test, with range (0, infinity)
38  */
39  static void test(const double testDuration);
40 
41  private:
42 
43  /**
44  * Benchmarks the homography-based interpolation function.
45  * @param testDuration Number of seconds for each test, with range (0, infinity)
46  */
47  static void testHomography(const double testDuration);
48 
49  /**
50  * Benchmarks the interpolation function based on affine transformations.
51  * @param testDuration Number of seconds for each test, with range (0, infinity)
52  */
53  static void testAffine(const double testDuration);
54 
55  /**
56  * Benchmarks the homography-based interpolation for a specific frame type.
57  * @param width The width of the frame in pixel, with range [1, infinity)
58  * @param height The height of the frame in pixel, with range [1, infinity)
59  * @param channels The number of channels the frame has, with range [1, infinity)
60  * @param testDuration Number of seconds for each test, with range (0, infinity)
61  */
62  static void testHomography(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration);
63 
64  /**
65  * Benchmarks the interpolation function based on affine transformations for a specific frame type.
66  * @param width The width of the frame in pixel, with range [1, infinity)
67  * @param height The height of the frame in pixel, with range [1, infinity)
68  * @param channels The number of channels the frame has, with range [1, infinity)
69  * @param testDuration Number of seconds for each test, with range (0, infinity)
70  */
71  static void testAffine(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration);
72 };
73 
74 } // namespace TestOpenCV
75 
76 } // namespace TestCV
77 
78 } // namespace Test
79 
80 } // namespace Ocean
81 
82 #endif // META_OCEAN_TEST_TESTCV_TESTOPENCV_TEST_FRAME_INTERPOLATOR_NEAREST_PIXEL_H
This class benchmarks the performance of nearest-neighbor interpolation.
Definition: testopencv/TestFrameInterpolatorNearestPixel.h:32
static void testAffine(const double testDuration)
Benchmarks the interpolation function based on affine transformations.
static void test(const double testDuration)
Benchmarks nearest-neighbor interpolation functions.
static void testHomography(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration)
Benchmarks the homography-based interpolation for a specific frame type.
static void testHomography(const double testDuration)
Benchmarks the homography-based interpolation function.
static void testAffine(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration)
Benchmarks the interpolation function based on affine transformations for a specific frame type.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15