8 #ifndef OCEAN_TEST_TESTCV_TEST_FRAME_MEAN_H
9 #define OCEAN_TEST_TESTCV_TEST_FRAME_MEAN_H
38 static bool test(
const double testDuration,
Worker& worker);
48 static bool testAddToFrameIndividually(
const unsigned int performanceWidth,
const unsigned int performanceHeight,
const unsigned numberChannels,
const double testDuration,
Worker& worker);
70 template <
typename T,
typename TMean,
typename TIntermediate>
71 static bool testMeanValue(
const unsigned int width,
const unsigned int height,
const unsigned int channels,
const double testDuration,
Worker& worker);
100 template <
typename T,
typename TMean,
typename TIntermediate>
101 static bool validateMeanValue(
const T* frame,
const unsigned int width,
const unsigned int height,
const unsigned int channels,
const TMean* testMeanValues,
const unsigned int framePaddingElements);
111 template <
typename T>
112 static inline T meanValue(
const T& sum,
const size_t size);
115 template <
typename T>
118 return (sum + T(size) / T(2)) / T(size);
124 return sum / float(size);
130 return sum / double(size);
This class implements Ocean's image class.
Definition: Frame.h:1792
This class implements tests for the FrameMean class.
Definition: TestFrameMean.h:29
static bool validateMeanValue(const T *frame, const unsigned int width, const unsigned int height, const unsigned int channels, const TMean *testMeanValues, const unsigned int framePaddingElements)
Validates the calculation of the mean value.
static bool test(const double testDuration, Worker &worker)
Starts all tests of the FrameMean class.
static bool testAddToFrameIndividually(const unsigned int performanceWidth, const unsigned int performanceHeight, const unsigned numberChannels, const double testDuration, Worker &worker)
Tests adding individual pixel values of a given source frame to a target frame if the corresponding m...
static bool testMeanValue(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration, Worker &worker)
Tests the function determining the mean value.
static bool validateAddToFrameIndividually(const Frame &source, const Frame &mask, const Frame &testTarget, const Frame &testDenominators, const uint8_t nonMaskValue)
Validates adding individual pixel values of a given source frame to a target frame if the correspondi...
static bool testMeanValue(const double testDuration, Worker &worker)
Tests the function determining the mean value for individual pixel formats.
static T meanValue(const T &sum, const size_t size)
Determines the mean values based on the sum of all values and the number of values.
Definition: TestFrameMean.h:116
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