Ocean
Loading...
Searching...
No Matches
TestFrameInverter.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 OCEAN_TEST_TESTCV_TEST_FRAME_INVERTER_H
9#define OCEAN_TEST_TESTCV_TEST_FRAME_INVERTER_H
10
12
14
15#include "ocean/base/Worker.h"
16
17namespace Ocean
18{
19
20namespace Test
21{
22
23namespace TestCV
24{
25
26/**
27 * This class implements tests for the FrameInverter class.
28 * @ingroup testcv
29 */
30class OCEAN_TEST_CV_EXPORT TestFrameInverter
31{
32 public:
33
34 /**
35 * Starts all tests of the FrameInverter class.
36 * @param width The width of the test frame in pixel, with range [1, infinity)
37 * @param height The height of the test frame in pixel, with range [1, infinity)
38 * @param testDuration Number of seconds for each test, with range (0, infinity)
39 * @param worker The worker object to distribute the computational load
40 * @param selector Test selector for filtering sub-tests; default runs all tests
41 * @return True, if succeeded
42 */
43 static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker& worker, const TestSelector& selector = TestSelector());
44
45 /**
46 * Tests the invert function for images with 8 bit per channel.
47 * @param width The width of the test frame in pixel, with range [1, infinity)
48 * @param height The height of the test frame in pixel, with range [1, infinity)
49 * @param channels The number of frame channels, with range [1, infinity)
50 * @param testDuration Number of seconds for each test, with range (0, infinity)
51 * @param worker The worker object to distribute the computational load
52 * @return True, if succeeded
53 */
54 static bool testInvert8BitPerChannel(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration, Worker& worker);
55};
56
57}
58
59}
60
61}
62
63#endif // OCEAN_TEST_TESTCV_TEST_FRAME_INVERTER_H
This class implements tests for the FrameInverter class.
Definition TestFrameInverter.h:31
static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker, const TestSelector &selector=TestSelector())
Starts all tests of the FrameInverter class.
static bool testInvert8BitPerChannel(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration, Worker &worker)
Tests the invert function for images with 8 bit per channel.
This class implements a test selector that parses test function strings and determines which tests sh...
Definition TestSelector.h:51
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