8 #ifndef META_OCEAN_TEST_TESTCV_TESTADVANCED_TEST_FRAME_COLOR_ADJUSTMENT_H
9 #define META_OCEAN_TEST_TESTCV_TESTADVANCED_TEST_FRAME_COLOR_ADJUSTMENT_H
28 namespace TestAdvanced
42 template <
size_t tCapacity>
72 template <
unsigned int tChannels>
85 static bool test(
const unsigned int width,
const unsigned int height,
const double testDuration,
Worker& worker);
96 template <
unsigned int tChannels>
108 template <
unsigned int tChannels>
125 template <
unsigned int tChannels>
137 template <
unsigned int tChannels>
150 template <
unsigned int tChannels>
162 template <
unsigned int tChannels>
166 template <
size_t tCapacity>
171 for (
size_t n = 0; n < tCapacity; ++n)
173 result[n] = (*this)[n] +
object[n];
179 template <
size_t tCapacity>
184 for (
size_t n = 0; n < tCapacity; ++n)
186 result[n] = (*this)[n] -
object[n];
192 template <
size_t tCapacity>
197 for (
size_t n = 0; n < tCapacity; ++n)
199 result[n] = (*this)[n] * factor;
This class implements Ocean's image class.
Definition: Frame.h:1792
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:44
Object operator-(const Object &object) const
Element-wise subtract operator.
Definition: TestFrameColorAdjustment.h:180
Object operator*(const Scalar factor) const
Scalar multiplication operator.
Definition: TestFrameColorAdjustment.h:193
Object operator+(const Object &object) const
Element-wise add operator.
Definition: TestFrameColorAdjustment.h:167
This class implements a frame color adjustment test.
Definition: TestFrameColorAdjustment.h:36
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 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 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 bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests all frame color adjustment functions.
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:128
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:484
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