8 #ifndef META_OCEAN_TEST_TESTCV_TEST_FRAME_CONVERTER_H
9 #define META_OCEAN_TEST_TESTCV_TEST_FRAME_CONVERTER_H
58 inline uint8_t alphaValue()
const;
64 inline float gammaValue()
const;
129 FT_3_UINT8_TO_1_UINT8_ALPHA
135 template <
typename TSource,
typename TTarget>
141 template <
typename TSource,
typename TTarget>
147 template <
typename TSource,
typename TTarget>
153 template <
typename TSource,
typename TTarget>
154 using OneSourceOneTargetBlackLevelWhiteBalanceGammaConversionFunction = void(*)(
const TSource* source, TTarget* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag conversionFlag,
const uint16_t blackLevel,
const float* whiteBalance,
const float gamma,
const uint32_t sourcePaddingElements,
const uint32_t targetPaddingElements,
Worker* worker);
159 template <
typename TSource,
typename TTarget>
160 using OneSourceTwoTargetsConversionFunction = void(*)(
const TSource* source, TTarget* target0, TTarget* target1,
const uint32_t width,
const uint32_t height,
const ConversionFlag conversionFlag,
const uint32_t sourcePaddingElements,
const uint32_t target0PaddingElements,
const uint32_t target1PaddingElements,
Worker* worker);
165 template <
typename TSource,
typename TTarget>
166 using OneSourceThreeTargetsConversionFunction = void(*)(
const TSource* source, TTarget* target0, TTarget* target1, TTarget* target2,
const uint32_t width,
const uint32_t height,
const ConversionFlag conversionFlag,
const uint32_t sourcePaddingElements,
const uint32_t target0PaddingElements,
const uint32_t target1PaddingElements,
const uint32_t target2PaddingElements,
Worker* worker);
171 template <
typename TSource,
typename TTarget>
172 using TwoSourcesOneTargetConversionFunction = void(*)(
const TSource* source0,
const TSource* source1, TTarget* target,
const uint32_t width,
const uint32_t height,
const ConversionFlag conversionFlag,
const uint32_t source0PaddingElements,
const uint32_t source1PaddingElements,
const uint32_t targetPaddingElements,
Worker* worker);
177 template <
typename TSource,
typename TTarget>
178 using TwoSourcesThreeTargetConversionFunction = void(*)(
const TSource* source0,
const TSource* source1, TTarget* target0, TTarget* target1, TTarget* target2,
const uint32_t width,
const uint32_t height,
const ConversionFlag conversionFlag,
const uint32_t source0PaddingElements,
const uint32_t source1PaddingElements,
const uint32_t targetPaddingElements0,
const uint32_t targetPaddingElements1,
const uint32_t targetPaddingElements2,
Worker* worker);
183 template <
typename TSource,
typename TTarget>
184 using TwoSourcesOneTargetAlphaConversionFunction = void(*)(
const TSource* source0,
const TSource* source1, TTarget* target,
const uint32_t width,
const uint32_t height,
const ConversionFlag conversionFlag,
const uint32_t source0PaddingElements,
const uint32_t source1PaddingElements,
const uint32_t targetPaddingElements,
const TTarget alpha,
Worker* worker);
189 template <
typename TSource,
typename TTarget>
190 using ThreeSourcesOneTargetConversionFunction = void(*)(
const TSource* source0,
const TSource* source1,
const TSource* source2, TTarget* target,
const uint32_t width,
const uint32_t height,
const ConversionFlag conversionFlag,
const uint32_t source0PaddingElements,
const uint32_t source1PaddingElements,
const uint32_t source2PaddingElements,
const uint32_t targetPaddingElements,
Worker* worker);
195 template <
typename TSource,
typename TTarget>
196 using ThreeSourcesThreeTargetConversionFunction = void(*)(
const TSource* source0,
const TSource* source1,
const TSource* source2, TTarget* target0, TTarget* target1, TTarget* target2,
const uint32_t width,
const uint32_t height,
const ConversionFlag conversionFlag,
const uint32_t source0PaddingElements,
const uint32_t source1PaddingElements,
const uint32_t source2PaddingElements,
const uint32_t targetPaddingElements0,
const uint32_t targetPaddingElements1,
const uint32_t targetPaddingElements2,
Worker* worker);
201 template <
typename TSource,
typename TTarget>
202 using ThreeSourcesOneTargetAlphaConversionFunction = void(*)(
const TSource* source0,
const TSource* source1,
const TSource* source2, TTarget* target,
const uint32_t width,
const uint32_t height,
const ConversionFlag conversionFlag,
const uint32_t source0PaddingElements,
const uint32_t source1PaddingElements,
const uint32_t source2PaddingElements,
const uint32_t targetPaddingElements,
const TTarget alpha,
Worker* worker);
317 bool invoke(
const Frame& source,
Frame& target,
const FrameConverter::ConversionFlag conversionFlag,
const void* options,
Worker* worker)
const;
572 static bool testFrameConversion(
const FrameType::PixelFormat& sourcePixelFormat,
const FrameType::PixelFormat& targetPixelFormat,
const unsigned int width,
const unsigned int height,
const FunctionWrapper& functionWrapper,
const CV::FrameConverter::ConversionFlag conversionFlag,
const FunctionPixelValue functionSourcePixelValue,
const FunctionPixelValue functionTargetPixelValue,
const MatrixD& transformationMatrix,
const double minimalGroundTruthValue,
const double maximalGroundTruthValue,
const double testDuration,
Worker& worker,
const unsigned int thresholdMaximalErrorToInteger = 3u,
const void* options =
nullptr);
598 static bool validateConversion(
const Frame& sourceFrame,
const Frame& targetFrame,
const FunctionPixelValue functionSourcePixelValue,
const FunctionPixelValue functionTargetPixelValue,
const MatrixD& transformationMatrix,
const CV::FrameConverter::ConversionFlag conversionFlag,
double* averageAbsErrorToFloat,
double* averageAbsErrorToInteger,
double* maximalAbsErrorToFloat,
unsigned int* maximalAbsErrorToInteger,
const double minimalGroundTruthValue,
const double maximalGroundTruthValue,
const bool skipPlausibilityCheck =
false);
618 template <
typename T>
629 template <
typename T>
630 static bool testCast(
const unsigned int width,
const unsigned int height,
const unsigned int channels);
642 template <
typename T>
643 static bool testNormalizedCast(
const unsigned int width,
const unsigned int height,
const unsigned int channels,
const T normalization,
const T offset);
651 template <
typename T>
661 template <
typename T,
unsigned int tChannels>
684 template <
typename T>
685 static bool validateSubFrame(
const unsigned int channels,
const T* source,
const unsigned int sourceWidth,
const unsigned int sourceHeight,
const T* target,
const unsigned int targetWidth,
const unsigned int targetHeight,
const unsigned int sourceLeft,
const unsigned int sourceTop,
const unsigned int targetLeft,
const unsigned int targetTop,
const unsigned int width,
const unsigned int height,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements);
711 template <
typename T>
712 static bool validateSubFrameMask(
const unsigned int channels,
const T* source,
const unsigned int sourceWidth,
const unsigned int sourceHeight,
const T* originalTarget,
const T* target,
const unsigned int targetWidth,
const unsigned int targetHeight,
const uint8_t* mask,
const unsigned int sourceLeft,
const unsigned int sourceTop,
const unsigned int targetLeft,
const unsigned int targetTop,
const unsigned int subFrameWidth,
const unsigned int subFrameHeight,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
const unsigned int maskPaddingElements,
const uint8_t maskValue);
716 alphaValue_(uint8_t(
RandomI::random(0u, 255u))),
719 const std::vector<float> gammaValues = {0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f};
This is the base class for all frame converter classes.
Definition: FrameConverter.h:32
ConversionFlag
Definition of individual conversion flags.
Definition: FrameConverter.h:39
This class implements Ocean's image class.
Definition: Frame.h:1760
PixelFormat
Definition of all pixel formats available in the Ocean framework.
Definition: Frame.h:183
This class implements a matrix with arbitrary size.
Definition: Matrix.h:63
This class provides base random functions and several random functions for integer data types.
Definition: RandomI.h:29
static unsigned int random(const unsigned int maxValue)
Returns one random integer value with specified maximum value.
This template class is the base class for all singleton objects.
Definition: Singleton.h:71
This class is a wrapper for function pointers.
Definition: TestFrameConverter.h:86
FunctionWrapper(const TwoSourcesOneTargetConversionFunction< uint8_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_2_UINT8_TO_1_UINT8 function.
FunctionType
Definition of individual types of conversion functions.
Definition: TestFrameConverter.h:93
@ FT_1_UINT8_TO_1_UINT16
1-plane uint8 to 1-plane uint16 conversion function.
Definition: TestFrameConverter.h:99
@ FT_2_UINT8_TO_1_UINT8
2-plane uint8 to 1-plane plus constant alpha uint8 conversion function.
Definition: TestFrameConverter.h:121
@ FT_1_UINT8_TO_3_UINT8
1-plane uint8 to 3-plane uint8 conversion function.
Definition: TestFrameConverter.h:117
@ FT_1_UINT8_GAMMA_TO_1_UINT8
1-plane uint8 plus constant gamma to 1-plane uint8 conversion function.
Definition: TestFrameConverter.h:101
@ FT_1_UINT8_TO_1_UINT8_ALPHA
1-plane uint8 to 1-plane plus constant alpha uint8 conversion function.
Definition: TestFrameConverter.h:103
@ FT_2_UINT8_TO_3_UINT8
2-plane uint8 to 3-plane plus constant alpha uint8 conversion function.
Definition: TestFrameConverter.h:123
@ FT_1_UINT8_TO_1_UINT8
1-plane uint8 to 1-plane uint8 conversion function.
Definition: TestFrameConverter.h:97
@ FT_1_UINT16_TO_1_UINT8
1-plane uint16 to 1-plane uint8 conversion function.
Definition: TestFrameConverter.h:107
@ FT_1_UINT32_TO_1_UINT16
1-plane uint32 to 1-plane uint16 conversion function.
Definition: TestFrameConverter.h:113
@ FT_1_UINT8_TO_2_UINT8
1-plane uint8 to 2-plane uint8 conversion function.
Definition: TestFrameConverter.h:115
@ FT_1_UINT16_TO_1_UINT16
1-plane uint16 to 1-plane uint16 conversion function.
Definition: TestFrameConverter.h:109
@ FT_3_UINT8_TO_1_UINT8
3-plane uint8 to 1-plane uint8 conversion function.
Definition: TestFrameConverter.h:125
@ FT_2_UINT8_TO_1_UINT8_ALPHA
2-plane uint8 to 1-plane uint8 conversion function.
Definition: TestFrameConverter.h:119
@ FT_1_UINT32_TO_1_UINT8
1-plane uint32 to 1-plane uint8 conversion function.
Definition: TestFrameConverter.h:111
@ FT_3_UINT8_TO_3_UINT8
3-plane uint8 to 3-plane uint8 conversion function.
Definition: TestFrameConverter.h:127
@ FT_1_UINT8_TO_1_UINT8_BLACKLEVEL_WHITEBALANCE_GAMMA
1-plane uint8 to 1-plane uint8 plus constant black level, white balance, and gamma conversion functio...
Definition: TestFrameConverter.h:105
FunctionWrapper(const OneSourceOneTargetConversionFunction< uint8_t, uint16_t > function)
Creates a new wrapper object and stores a function pointer to a FT_1_UINT8_TO_1_UINT16 function.
void(*)(const TSource *source0, const TSource *source1, TTarget *target, const uint32_t width, const uint32_t height, const ConversionFlag conversionFlag, const uint32_t source0PaddingElements, const uint32_t source1PaddingElements, const uint32_t targetPaddingElements, Worker *worker) TwoSourcesOneTargetConversionFunction
Definition of a function pointer to a conversion function with two source planes and one target plane...
Definition: TestFrameConverter.h:172
FunctionWrapper(const OneSourceTwoTargetsConversionFunction< uint8_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_1_UINT8_TO_2_UINT8 function.
void(*)(const TSource *source0, const TSource *source1, TTarget *target0, TTarget *target1, TTarget *target2, const uint32_t width, const uint32_t height, const ConversionFlag conversionFlag, const uint32_t source0PaddingElements, const uint32_t source1PaddingElements, const uint32_t targetPaddingElements0, const uint32_t targetPaddingElements1, const uint32_t targetPaddingElements2, Worker *worker) TwoSourcesThreeTargetConversionFunction
Definition of a function pointer to a conversion function with two source planes and three target pla...
Definition: TestFrameConverter.h:178
void(*)(const TSource *source, TTarget *target, const uint32_t width, const uint32_t height, const ConversionFlag conversionFlag, const float gamma, const uint32_t sourcePaddingElements, const uint32_t targetPaddingElements, Worker *worker) OneSourceGammaOneTargetConversionFunction
Definition of a function pointer to a conversion function with one source plane and one target plane ...
Definition: TestFrameConverter.h:142
FunctionWrapper(const TwoSourcesOneTargetAlphaConversionFunction< uint8_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_2_UINT8_TO_1_UINT8_ALPHA function.
void(*)(const TSource *source0, const TSource *source1, const TSource *source2, TTarget *target, const uint32_t width, const uint32_t height, const ConversionFlag conversionFlag, const uint32_t source0PaddingElements, const uint32_t source1PaddingElements, const uint32_t source2PaddingElements, const uint32_t targetPaddingElements, Worker *worker) ThreeSourcesOneTargetConversionFunction
Definition of a function pointer to a conversion function with three source planes and one target pla...
Definition: TestFrameConverter.h:190
void(*)(const TSource *source, TTarget *target0, TTarget *target1, TTarget *target2, const uint32_t width, const uint32_t height, const ConversionFlag conversionFlag, const uint32_t sourcePaddingElements, const uint32_t target0PaddingElements, const uint32_t target1PaddingElements, const uint32_t target2PaddingElements, Worker *worker) OneSourceThreeTargetsConversionFunction
Definition of a function pointer to a conversion function with one source plane and three target plan...
Definition: TestFrameConverter.h:166
FunctionWrapper(const OneSourceOneTargetConversionFunction< uint16_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_1_UINT16_TO_1_UINT8 function.
void(*)(const TSource *source, TTarget *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const uint16_t blackLevel, const float *whiteBalance, const float gamma, const uint32_t sourcePaddingElements, const uint32_t targetPaddingElements, Worker *worker) OneSourceOneTargetBlackLevelWhiteBalanceGammaConversionFunction
Definition of a function pointer to a conversion function with one source plane and one target plane ...
Definition: TestFrameConverter.h:154
bool invoke(const Frame &source, Frame &target, const FrameConverter::ConversionFlag conversionFlag, const void *options, Worker *worker) const
Calls the conversion function for a source and target frame.
void(*)(const TSource *source, TTarget *target, const uint32_t width, const uint32_t height, const ConversionFlag conversionFlag, const uint32_t sourcePaddingElements, const uint32_t targetPaddingElements, const TTarget alpha, Worker *worker) OneSourceOneTargetAlphaConversionFunction
Definition of a function pointer to a conversion function with one source plane and one target plane ...
Definition: TestFrameConverter.h:148
FunctionWrapper(const OneSourceOneTargetConversionFunction< uint32_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_1_UINT32_TO_1_UINT8 function.
FunctionWrapper(const OneSourceOneTargetAlphaConversionFunction< uint8_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_1_UINT8_TO_1_UINT8_ALPHA function.
FunctionWrapper(const TwoSourcesThreeTargetConversionFunction< uint8_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_2_UINT8_TO_3_UINT8 function.
FunctionWrapper(const ThreeSourcesThreeTargetConversionFunction< uint8_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_3_UINT8_TO_3_UINT8 function.
FunctionWrapper(const ThreeSourcesOneTargetConversionFunction< uint8_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_3_UINT8_TO_1_UINT8 function.
void(*)(const TSource *source0, const TSource *source1, TTarget *target, const uint32_t width, const uint32_t height, const ConversionFlag conversionFlag, const uint32_t source0PaddingElements, const uint32_t source1PaddingElements, const uint32_t targetPaddingElements, const TTarget alpha, Worker *worker) TwoSourcesOneTargetAlphaConversionFunction
Definition of a function pointer to a conversion function with two source planes and one target plane...
Definition: TestFrameConverter.h:184
FunctionWrapper(const OneSourceGammaOneTargetConversionFunction< uint8_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_1_UINT8_GAMMA_TO_1_UINT8 function.
void(*)(const TSource *source, TTarget *target, const uint32_t width, const uint32_t height, const ConversionFlag conversionFlag, const uint32_t sourcePaddingElements, const uint32_t targetPaddingElements, Worker *worker) OneSourceOneTargetConversionFunction
Definition of a function pointer to a conversion function with one source plane and one target plane.
Definition: TestFrameConverter.h:136
FunctionWrapper(const OneSourceOneTargetConversionFunction< uint8_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_1_UINT8_TO_1_UINT8 function.
void(*)(const TSource *source0, const TSource *source1, const TSource *source2, TTarget *target, const uint32_t width, const uint32_t height, const ConversionFlag conversionFlag, const uint32_t source0PaddingElements, const uint32_t source1PaddingElements, const uint32_t source2PaddingElements, const uint32_t targetPaddingElements, const TTarget alpha, Worker *worker) ThreeSourcesOneTargetAlphaConversionFunction
Definition of a function pointer to a conversion function with three source planes and one target pla...
Definition: TestFrameConverter.h:202
FunctionWrapper(const OneSourceOneTargetConversionFunction< uint16_t, uint16_t > function)
Creates a new wrapper object and stores a function pointer to a FT_1_UINT16_TO_1_UINT16 function.
FunctionWrapper(const OneSourceThreeTargetsConversionFunction< uint8_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_1_UINT8_TO_3_UINT8 function.
const void * function_
The function pointer of the conversion function.
Definition: TestFrameConverter.h:322
FunctionWrapper(const OneSourceOneTargetConversionFunction< uint32_t, uint16_t > function)
Creates a new wrapper object and stores a function pointer to a FT_1_UINT32_TO_1_UINT16 function.
FunctionWrapper(const ThreeSourcesOneTargetAlphaConversionFunction< uint8_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_3_UINT8_TO_1_UINT8_ALPHA function.
const FunctionType functionType_
The type of the conversion function.
Definition: TestFrameConverter.h:325
FunctionWrapper(const OneSourceOneTargetBlackLevelWhiteBalanceGammaConversionFunction< uint8_t, uint8_t > function)
Creates a new wrapper object and stores a function pointer to a FT_1_UINT8_TO_1_UINT8_BLACKLEVEL_WHIT...
void(*)(const TSource *source, TTarget *target0, TTarget *target1, const uint32_t width, const uint32_t height, const ConversionFlag conversionFlag, const uint32_t sourcePaddingElements, const uint32_t target0PaddingElements, const uint32_t target1PaddingElements, Worker *worker) OneSourceTwoTargetsConversionFunction
Definition of a function pointer to a conversion function with one source plane and two target planes...
Definition: TestFrameConverter.h:160
void(*)(const TSource *source0, const TSource *source1, const TSource *source2, TTarget *target0, TTarget *target1, TTarget *target2, const uint32_t width, const uint32_t height, const ConversionFlag conversionFlag, const uint32_t source0PaddingElements, const uint32_t source1PaddingElements, const uint32_t source2PaddingElements, const uint32_t targetPaddingElements0, const uint32_t targetPaddingElements1, const uint32_t targetPaddingElements2, Worker *worker) ThreeSourcesThreeTargetConversionFunction
Definition of a function pointer to a conversion function with three source planes and three target p...
Definition: TestFrameConverter.h:196
This class is a helper class simply offering random values which are constant during process executio...
Definition: TestFrameConverter.h:49
float gammaValue_
The gamma value.
Definition: TestFrameConverter.h:79
float gammaValue() const
Returns the random (but constant during process execution) gamma value.
Definition: TestFrameConverter.h:729
uint8_t alphaValue_
The alpha value.
Definition: TestFrameConverter.h:76
uint8_t alphaValue() const
Returns the random (but constant during process execution) alpha value.
Definition: TestFrameConverter.h:724
ValueProvider()
Protected constructor.
Definition: TestFrameConverter.h:715
This class implements a frame converter test for the function of the basic frame converter.
Definition: TestFrameConverter.h:42
static bool testConvertOneRow_3Planes1Channel_To_1Plane3Channels_8BitPerChannel_Precision6Bit(const double testDuration)
Test the 1-row-based convert 3-plane to zipped 3-channel function, with 6 bit precision.
static bool testMapOneRow_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane3Channels_8BitPerChannel(const double testDuration)
Test the 1-row-based mapper for pixel formats with 3 channels, 2 planes and a 2x2 downsampling of cha...
static bool testConvertTwoRows_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision10Bit(const double testDuration)
Test the 2-row-based converter for pixel formats with 3 channels, 3 planes and a 2x2 downsampling of ...
static bool testFrameConversion(const FrameType::PixelFormat &sourcePixelFormat, const FrameType::PixelFormat &targetPixelFormat, const unsigned int width, const unsigned int height, const FunctionWrapper &functionWrapper, const CV::FrameConverter::ConversionFlag conversionFlag, const FunctionPixelValue functionSourcePixelValue, const FunctionPixelValue functionTargetPixelValue, const MatrixD &transformationMatrix, const double minimalGroundTruthValue, const double maximalGroundTruthValue, const double testDuration, Worker &worker, const unsigned int thresholdMaximalErrorToInteger=3u, const void *options=nullptr)
Tests the conversion of frames with one pixel format to another pixel format for functions supporting...
static bool testPatchFrame(const double testDuration)
Tests the patch creator.
static bool testCast(const unsigned int width, const unsigned int height, const unsigned int channels)
Tests the cast function for from 'unsigned char' to a specified data type.
static bool testNormalizedCast(const double testDuration)
Tests the normalized cast function.
static bool testMapOneRow_1Plane3ChannelsWith2ChannelsDownsampled2x1BackIsDownsampled_To_1Plane3Channels_8BitPerChannel(const double testDuration)
Test the 1-row-based mapper for pixel formats with 3 channels, 1 planes and a 2x1 downsampling of cha...
static bool testSubFrame(const double testDuration)
Tests the sub frame function.
static bool testMapOneRow_3Plane1Channel_To_1Plane3Channels_8BitPerChannel(const double testDuration)
Test the 1-row-based mapper for pixel formats with 3 planes and 1 channel to 1 plane and 3 channels.
static bool testMapOneRow_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_To_1Plane3Channels_8BitPerChannel(const double testDuration)
Test the 1-row-based mapper for pixel formats with 3 channels, 2 planes and a 2x2 downsampling of cha...
static bool testConvertOneRow_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision10Bit(const double testDuration)
Test the 1-row-based converter for pixel formats with 3 channels, 3 planes and a 2x2 downsampling of ...
static bool testComfortChange(const double testDuration)
Tests the comfort change function for a Frame.
static bool testPatchFrame(const double testDuration)
Tests the patch creator.
static bool validateConversion(const Frame &sourceFrame, const Frame &targetFrame, const FunctionPixelValue functionSourcePixelValue, const FunctionPixelValue functionTargetPixelValue, const MatrixD &transformationMatrix, const CV::FrameConverter::ConversionFlag conversionFlag, double *averageAbsErrorToFloat, double *averageAbsErrorToInteger, double *maximalAbsErrorToFloat, unsigned int *maximalAbsErrorToInteger, const double minimalGroundTruthValue, const double maximalGroundTruthValue, const bool skipPlausibilityCheck=false)
Validates the color space conversion from a source pixel format to a target pixel format.
static bool test(const double testDuration, Worker &worker)
Tests all frame converter functions.
static bool testPatchFrameMirroredBorder(const double testDuration)
Tests the patch creator with mirrored border.
static bool testConversionMatrices(const double testDuration)
Tests the color space conversion matrices.
static bool testConvertOneRow_1Plane3ChannelsWith2ChannelsDownsampled2x1BackIsDownsampled_To_1Plane3Channels_8BitPerChannel_Precision10Bit(const double testDuration)
Test the 1-row-based convert zipped 3-channel with 2x1 downsampling to 3-channel function,...
static bool testConvertTwoRows_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision6Bit(const double testDuration)
Test the 2-row-based converter for pixel formats with 3 channels, 3 planes and a 2x2 downsampling of ...
static bool testConvertOneRow_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision10Bit(const double testDuration)
Test the 1-row-based converter for pixel formats with 3 channels, 2 planes and a 2x2 downsampling of ...
static bool testConvertOneRow_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision6Bit(const double testDuration)
Test the 1-row-based converter for pixel formats with 3 channels, 2 planes and a 2x2 downsampling of ...
static bool testMapTwoRows_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane3Channels_8BitPerChannel(const double testDuration)
Test the 2-row-based mapper for pixel formats with 3 channels, 2 planes and a 2x2 downsampling of cha...
static bool testMapTwoRows_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_To_1Plane3Channels_8BitPerChannel(const double testDuration)
Test the 2-row-based mapper for pixel formats with 3 channels, 2 planes and a 2x2 downsampling of cha...
std::function< MatrixD(const Frame &frame, const unsigned int x, const unsigned int y, const CV::FrameConverter::ConversionFlag conversionFlag)> FunctionPixelValue
Definition of a function pointer to a pixel extraction function.
Definition: TestFrameConverter.h:338
static bool testComfortConvert(const double testDuration)
Tests the comfort convert function for a Frame.
static bool testNormalizedCast(const unsigned int width, const unsigned int height, const unsigned int channels, const T normalization, const T offset)
Tests the cast function for from 'unsigned char' to a specified data type.
static bool testConvertTwoRows_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane4Channels_8BitPerChannel_Precision6Bit(const double testDuration)
Test the 2-row-based converter for pixel formats with 3 channels, 3 planes and a 2x2 downsampling of ...
static bool testSubFrame(const double testDuration)
Tests the sub frame function.
static bool testComfortConvertAndCopy(const double testDuration)
Tests the comfort convert and copy function for a Frame.
static bool testConvertOneRow_1Plane3ChannelsWith2ChannelsDownsampled2x1FrontIsDownsampled_To_1Plane3Channels_8BitPerChannel_Precision10Bit(const double testDuration)
Test the 1-row-based convert zipped 3-channel with 2x1 downsampling to 3-channel function,...
static bool testConvertTwoRows_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision6Bit(const double testDuration)
Test the 2-row-based converter for pixel formats with 3 channels, 2 planes and a 2x2 downsampling of ...
static bool testPatchFrameMirroredBorder(const double testDuration)
Tests the patch creator with mirrored border.
static bool testMapOneRow_1Plane3ChannelsWith2ChannelsDownsampled2x1FrontIsDownsampled_To_1Plane3Channels_8BitPerChannel(const double testDuration)
Test the 1-row-based mapper for pixel formats with 3 channels, 1 planes and a 2x1 downsampling of cha...
static bool testConvertTwoRows_1Plane3Channels_To_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_8BitPerChannel_Precision7Bit(const double testDuration)
Test the 2-row-based converter for pixel formats with 3 channels, 2 planes and a 2x2 downsampling of ...
static bool testConvertTwoRows_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision10Bit(const double testDuration)
Test the 2-row-based converter for pixel formats with 3 channels, 2 planes and a 2x2 downsampling of ...
static MatrixD functionGenericPixel(const Frame &frame, const unsigned int x, const unsigned int y, const CV::FrameConverter::ConversionFlag conversionFlag)
Extracts one pixel from a generic frame (e.g,.
static bool testSubFrameMask(const double testDuration)
Tests the sub frame function.
static bool testCast(const double testDuration)
Tests the cast function.
static bool validateSubFrame(const unsigned int channels, const T *source, const unsigned int sourceWidth, const unsigned int sourceHeight, const T *target, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int sourceLeft, const unsigned int sourceTop, const unsigned int targetLeft, const unsigned int targetTop, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements)
Validates the sub-frame function.
static bool testConvertTwoRows_1Plane3Channels_To_1Plane1ChannelAnd2Planes1ChannelsDownsampled2x2_8BitPerChannel_Precision7Bit(const double testDuration)
Test the 2-row-based converter for pixel formats with 3 channels, 3 planes and a 2x2 downsampling of ...
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
MatrixT< double > MatrixD
Definition of the MatrixT template class using a double precision float data type.
Definition: Matrix.h:32
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15