Ocean
Loading...
Searching...
No Matches
TestFrameInterpolatorBicubic.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_FRAME_INTERPOLATOR_BICUBIC_H
9#define META_OCEAN_TEST_TESTCV_TEST_FRAME_INTERPOLATOR_BICUBIC_H
10
12
14#include "ocean/base/Worker.h"
15
16namespace Ocean
17{
18
19namespace Test
20{
21
22namespace TestCV
23{
24
25/**
26 * This class implements a bicubic frame interpolator test.
27 * @ingroup testcv
28 */
29class OCEAN_TEST_CV_EXPORT TestFrameInterpolatorBicubic
30{
31 public:
32
33 /**
34 * Tests all bicubic interpolation filter functions.
35 * @param width The width of the source frame in pixel, with range [1, infinity)
36 * @param height The height of the source frame in pixel, with range [1, infinity)
37 * @param testDuration Number of seconds for each test, with range (0, infinity)
38 * @param worker The worker object to distribute the computation
39 * @return True, if succeeded
40 */
41 static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker& worker);
42
43 private:
44
45 /**
46 * Tests the bicubic resize function for 8 bit grayscale frames.
47 * @param width The width of the source frame in pixel, with range [1, infinity)
48 * @param height The height of the source frame in pixel, with range [1, infinity)
49 * @param sizeFactor Ratio between target frame size and source frame size
50 * @param testDuration Number of seconds for each test, with range (0, infinity)
51 * @param worker The worker object to distribute the CPU load
52 * @return True, if succeeded
53 * @tparam tChannels The number of frame channels
54 */
55 template <unsigned int tChannels>
56 static bool testResize8BitPerChannel(const unsigned int width, const unsigned int height, const float sizeFactor, const double testDuration, Worker& worker);
57};
58
59}
60
61}
62
63}
64
65#endif // META_OCEAN_TEST_TESTCV_TEST_FRAME_INTERPOLATOR_BICUBIC_H
This class implements a bicubic frame interpolator test.
Definition TestFrameInterpolatorBicubic.h:30
static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests all bicubic interpolation filter functions.
static bool testResize8BitPerChannel(const unsigned int width, const unsigned int height, const float sizeFactor, const double testDuration, Worker &worker)
Tests the bicubic resize function for 8 bit grayscale frames.
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