8#ifndef META_OCEAN_TEST_TESTCV_TESTADVANCED_TEST_FRAME_COLOR_ADJUSTMENT_H
9#define META_OCEAN_TEST_TESTCV_TESTADVANCED_TEST_FRAME_COLOR_ADJUSTMENT_H
44 template <
size_t tCapacity>
74 template <
unsigned int tChannels>
88 static bool test(
const unsigned int width,
const unsigned int height,
const double testDuration,
Worker& worker,
const TestSelector& selector);
99 template <
unsigned int tChannels>
111 template <
unsigned int tChannels>
128 template <
unsigned int tChannels>
140 template <
unsigned int tChannels>
153 template <
unsigned int tChannels>
165 template <
unsigned int tChannels>
169template <
size_t tCapacity>
174 for (
size_t n = 0; n < tCapacity; ++n)
176 result[n] = (*this)[n] +
object[n];
182template <
size_t tCapacity>
187 for (
size_t n = 0; n < tCapacity; ++n)
189 result[n] = (*this)[n] -
object[n];
195template <
size_t tCapacity>
200 for (
size_t n = 0; n < tCapacity; ++n)
202 result[n] = (*this)[n] * factor;
This class implements Ocean's image class.
Definition Frame.h:1879
This class implements a 2D lookup object with values at the bins' center positions defining the indiv...
Definition Lookup2.h:198
This class implements a generator for random numbers.
Definition RandomGenerator.h:42
This class implements a static buffer that has a fixed capacity.
Definition StaticBuffer.h:24
This class extends the static buffer class by mathematical operators.
Definition TestFrameColorAdjustment.h:46
Object operator-(const Object &object) const
Element-wise subtract operator.
Definition TestFrameColorAdjustment.h:183
Object operator*(const Scalar factor) const
Scalar multiplication operator.
Definition TestFrameColorAdjustment.h:196
Object operator+(const Object &object) const
Element-wise add operator.
Definition TestFrameColorAdjustment.h:170
This class implements a frame color adjustment test.
Definition TestFrameColorAdjustment.h:38
static Scalar averageDifference(const Frame &frame0, const Frame &mask0, const Frame &frame1, const Frame &mask1, const uint8_t maskValue=0xFFu)
Returns the average color difference between two frames.
static void randomMask(Frame &frame, Frame &mask, const unsigned int number, RandomGenerator &randomGenerator, const uint8_t value=0x00u)
Sets random mask values and adds pepper at the same positions in a corresponding frame.
static void modifyFrame8BitPerChannel(const uint8_t *source, const unsigned int sourcePaddingElements, const ObjectLookupCenter2< tChannels > &lookupTable, uint8_t *target, const unsigned int targetPaddingElements)
Modifies a given frame by adding component-wise values from a given lookup table.
static bool testAdjustmentNoMask(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests the default adjustment function without mask pixels.
static bool testAdjustmentWithMask(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests the adjustment function with mask pixels.
static ObjectLookupCenter2< tChannels > modificationTable(const unsigned int sizeX, const unsigned int sizeY, const unsigned int binsX, const unsigned int binsY, const Scalar minimalOffset, const Scalar maximalOffset, RandomGenerator &randomGenerator)
Creates a modification table with given size and maximal offset value.
static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker, const TestSelector &selector)
Tests all frame color adjustment functions.
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
float Scalar
Definition of a scalar type.
Definition Math.h:129
The namespace covering the entire Ocean framework.
Definition Accessor.h:15
AutomaticDifferentiationT< T1, TNumeric1 > operator*(const T2 &left, const AutomaticDifferentiationT< T1, TNumeric1 > &right)
Definition AutomaticDifferentiation.h:524
AutomaticDifferentiationT< T1, TNumeric1 > operator+(const T2 &left, const AutomaticDifferentiationT< T1, TNumeric1 > &right)
Definition AutomaticDifferentiation.h:418
AutomaticDifferentiationT< T1, TNumeric1 > operator-(const T2 &left, const AutomaticDifferentiationT< T1, TNumeric1 > &right)
Definition AutomaticDifferentiation.h:484