8 #ifndef META_OCEAN_TEST_TESTCV_TEST_FRAME_CONVERTER_RGGB_10_PACKED_H
9 #define META_OCEAN_TEST_TESTCV_TEST_FRAME_CONVERTER_RGGB_10_PACKED_H
72 static double elementValue(
const Frame& frame,
const unsigned int x,
const int y,
const uint16_t blackLevel = 0u,
const double whiteBalance = 1.0);
100 uint16_t blackLevel_ = 0u;
103 double whiteBalance_[3] = {0.0, 0.0, 0.0};
119 static bool test(
const unsigned int width,
const unsigned int height,
const double testDuration,
Worker& worker);
168 blackLevel_(blackLevel),
169 whiteBalance_{whiteBalance[0], whiteBalance[1], whiteBalance[2]},
173 ocean_assert(
gamma_ >= 0.0);
178 return pixelFunctionRGGB10_PackedWithBlackLevelWhiteBalanceGamma(frame, x, y, conversionFlag, blackLevel_, whiteBalance_, gamma_);
184 constexpr uint16_t blackLevel = 0u;
185 constexpr
double whiteBalance[3] = {1.0, 1.0, 1.0};
186 constexpr
double gamma = 1.0;
188 return pixelFunctionRGGB10_PackedWithBlackLevelWhiteBalanceGamma(frame, x, y, conversionFlag, blackLevel, whiteBalance, gamma);
ConversionFlag
Definition of individual conversion flags.
Definition: FrameConverter.h:39
This class implements Ocean's image class.
Definition: Frame.h:1792
This class implements a matrix with arbitrary size.
Definition: Matrix.h:63
This class implements a generator for random numbers.
Definition: RandomGenerator.h:42
Definition of a functor class to access single pixels of an frame with pixel format RGGB10_PACKED.
Definition: TestFrameConverterRGGB10_Packed.h:39
static double elementValue(const Frame &frame, const unsigned int x, const int y, const uint16_t blackLevel=0u, const double whiteBalance=1.0)
Returns bit element value of a pixel of RGGB10_PACKED frame as a double clamped to [0,...
static MatrixD pixelFunctionRGGB10_PackedWithBlackLevelWhiteBalanceGamma(const Frame &frame, const unsigned int x, const unsigned int y, const CV::FrameConverter::ConversionFlag conversionFlag, const uint16_t blackLevel, const double *whiteBalance, const double gamma)
Extracts one pixel from a RGGB10_PACKED source frame and subtracts the black level and applies white ...
double whiteBalance_[3]
The white balancing scalars of the red, green, and blue channel (in that order), range: [0,...
Definition: TestFrameConverterRGGB10_Packed.h:103
PixelFunctorRGGB10_Packed(const uint16_t blackLevel, const double *whiteBalance, const double gamma)
Constructor to specify black level, white balance, and gamma.
Definition: TestFrameConverterRGGB10_Packed.h:167
MatrixD operator()(const Frame &frame, const unsigned int x, const unsigned int y, const CV::FrameConverter::ConversionFlag conversionFlag) const
Extracts one pixel from a RGGB10_PACKED source frame and subtracts the black level and applies white ...
Definition: TestFrameConverterRGGB10_Packed.h:176
double gamma_
The gamma value that each pixel will be encoded with, range: [0, infinity)
Definition: TestFrameConverterRGGB10_Packed.h:106
static MatrixD pixelFunctionRGGB10_Packed(const Frame &frame, const unsigned int x, const unsigned int y, const CV::FrameConverter::ConversionFlag conversionFlag)
Extracts one pixel from a RGGB10_PACKED source frame.
Definition: TestFrameConverterRGGB10_Packed.h:182
This class implements a RGGB10_PACKED frame converter test.
Definition: TestFrameConverterRGGB10_Packed.h:32
static bool testRGGB10_PackedToRGB48(const unsigned int width, const unsigned int height, const CV::FrameConverter::ConversionFlag flag, const double testDuration, Worker &worker)
Tests the RGGB10_PACKED to RGB48 conversion.
static bool testConvertRGGB10_PackedToRGB24BlacklevelWhiteBalanceGammaLUT(RandomGenerator &randomGenerator, const unsigned int width, const unsigned int height, const CV::FrameConverter::ConversionFlag flag, const double testDuration, Worker &worker)
Tests the RGGB10_PACKED to RGB24 conversion with black-level subtraction, white balancing,...
static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests all RGGB10_PACKED bit frame conversion functions.
static bool testRGGB10_PackedToRGB24(const unsigned int width, const unsigned int height, const CV::FrameConverter::ConversionFlag flag, const double testDuration, Worker &worker)
Tests the RGGB10_PACKED to RGB24 conversion.
static bool testRGGB10_PackedToBGR24(const unsigned int width, const unsigned int height, const CV::FrameConverter::ConversionFlag flag, const double testDuration, Worker &worker)
Tests the RGGB10_PACKED to BGR24 conversion.
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