Definition of a class storing options for frame conversions.
More...
#include <FrameConverter.h>
|
| | Options (const bool allowApproximation=false) |
| | Default constructor.
|
| |
| | Options (const uint8_t alphaChannelTargetValue, const bool allowApproximation=false) |
| | Creates options for source image without alpha channel but a target image with alpha channel.
|
| |
| | Options (const float gamma, const bool allowApproximation=false) |
| | Creates options for a conversion applying gamma correction.
|
| |
| | Options (const uint16_t blackLevel, const float whiteBalanceRed, const float whiteBalanceGreen, const float whiteBalanceBlue, const float gamma, const bool allowApproximation=false) |
| | Creates options for a conversion applying black level subtraction, white balance, and gamma encoding.
|
| |
| OptionsType | optionsType () const |
| | Returns the options type.
|
| |
| uint8_t | alphaChannelTargetValue () const |
| | Returns the uint8_t alpha channel value for the target image if the source image does not contain an alpha channel; ignored if the source image contains an alpha channel.
|
| |
| float | gamma () const |
| | Returns the gamma value for a conversion with gamma correction/encoding.
|
| |
| uint16_t | blackLevel () const |
| | Returns the black level value for a conversion with black level correction.
|
| |
| const float * | whiteBalance () const |
| | Returns the white balance values for a conversion with white balance correction.
|
| |
| bool | allowApproximation () const |
| | Returns whether the conversion can be approximated.
|
| |
|
| OptionsType | optionsType_ = OT_DEFAULT |
| | The options type.
|
| |
| uint8_t | alphaChannelTargetValue_ = 0xFFu |
| | The alpha channel value for the target image if the source image does not contain an alpha channel, with range [0, 255].
|
| |
| float | gamma_ = 1.0f |
| | The gamma value for a conversion with gamma correction/encoding, with range (0, 2) (OT_GAMMA_CORRECTION) or [0, infinity) (OT_BLACKLEVEL_WHITEBALANCE_GAMMA)
|
| |
| uint16_t | blackLevel_ = 0u |
| | The black level value that is subtracted from each element of the raw image before any other operation, with range [0, 1024)
|
| |
| float | whiteBalance_ [3] = { 1.0f, 1.0f, 1.0f } |
| | The white balancing scalars of the red, green, and blue channels (in that order), with range [0, infinity)
|
| |
Definition of a class storing options for frame conversions.
◆ OptionsType
Definition of individual types of options.
| Enumerator |
|---|
| OT_DEFAULT | Default conversion.
|
| OT_ALPHA_CHANNEL_TARGET_VALUE | Conversion with explicit alpha channel target value.
|
| OT_GAMMA_CORRECTION | Conversion with gamma correction.
|
| OT_BLACKLEVEL_WHITEBALANCE_GAMMA | Conversion with black level, white balance, and gamma encoding.
|
| OT_APPROXIMATED | Approximated conversion.
|
◆ Options() [1/4]
| Ocean::CV::FrameConverter::Options::Options |
( |
const bool |
allowApproximation = false | ) |
|
|
inlineexplicit |
Default constructor.
- Parameters
-
| allowApproximation | True, to allow an approximated conversion if available |
◆ Options() [2/4]
| Ocean::CV::FrameConverter::Options::Options |
( |
const uint8_t |
alphaChannelTargetValue, |
|
|
const bool |
allowApproximation = false |
|
) |
| |
|
inlineexplicit |
Creates options for source image without alpha channel but a target image with alpha channel.
- Parameters
-
| alphaChannelTargetValue | The uint8_t alpha channel value for the target image if the source image does not contain an alpha channel; ignored if the source image contains an alpha channel, with range [0, 255] |
| allowApproximation | True, to allow an approximated conversion if available |
◆ Options() [3/4]
| Ocean::CV::FrameConverter::Options::Options |
( |
const float |
gamma, |
|
|
const bool |
allowApproximation = false |
|
) |
| |
|
inlineexplicit |
Creates options for a conversion applying gamma correction.
- Parameters
-
| gamma | The gamma value to be applied, with range (0, 2) |
| allowApproximation | True, to allow an approximated conversion if available |
◆ Options() [4/4]
| Ocean::CV::FrameConverter::Options::Options |
( |
const uint16_t |
blackLevel, |
|
|
const float |
whiteBalanceRed, |
|
|
const float |
whiteBalanceGreen, |
|
|
const float |
whiteBalanceBlue, |
|
|
const float |
gamma, |
|
|
const bool |
allowApproximation = false |
|
) |
| |
|
inlineexplicit |
Creates options for a conversion applying black level subtraction, white balance, and gamma encoding.
- Parameters
-
| blackLevel | The black level value that is subtracted from each element of the raw image before any other operation, with range [0, 1024) |
| whiteBalanceRed | The white balancing scalar of the red channel, with range [0, infinity) |
| whiteBalanceGreen | The white balancing scalar of the green channel, with range [0, infinity) |
| whiteBalanceBlue | The white balancing scalar of the blue channel, with range [0, infinity) |
| gamma | The gamma value to be applied, with range (0, infinity) |
| allowApproximation | True, to allow an allowApproximation conversion if available |
- See also
- FrameConverterRGGB10_Packed::convertRGGB10_PackedToRGB24BlacklevelWhiteBalanceGammaLUT()
◆ allowApproximation()
| bool Ocean::CV::FrameConverter::Options::allowApproximation |
( |
| ) |
const |
|
inline |
Returns whether the conversion can be approximated.
- Returns
- True, if so
◆ alphaChannelTargetValue()
| uint8_t Ocean::CV::FrameConverter::Options::alphaChannelTargetValue |
( |
| ) |
const |
|
inline |
Returns the uint8_t alpha channel value for the target image if the source image does not contain an alpha channel; ignored if the source image contains an alpha channel.
- Returns
- The alpha value for the target channel, with range [0, 255]
◆ blackLevel()
| uint16_t Ocean::CV::FrameConverter::Options::blackLevel |
( |
| ) |
const |
|
inline |
Returns the black level value for a conversion with black level correction.
- Returns
- The black level value, with range [0, 1024)
◆ gamma()
| float Ocean::CV::FrameConverter::Options::gamma |
( |
| ) |
const |
|
inline |
Returns the gamma value for a conversion with gamma correction/encoding.
- Returns
- The gamma value, with range (0, 2) (OT_GAMMA_CORRECTION) or [0, infinity) (OT_BLACKLEVEL_WHITEBALANCE_GAMMA)
◆ optionsType()
Returns the options type.
- Returns
- The options' type
◆ whiteBalance()
| const float * Ocean::CV::FrameConverter::Options::whiteBalance |
( |
| ) |
const |
|
inline |
Returns the white balance values for a conversion with white balance correction.
- Returns
- The white balance values for the red, green, and blue channels, with range [0, infinity)
◆ alphaChannelTargetValue_
| uint8_t Ocean::CV::FrameConverter::Options::alphaChannelTargetValue_ = 0xFFu |
|
protected |
The alpha channel value for the target image if the source image does not contain an alpha channel, with range [0, 255].
◆ blackLevel_
| uint16_t Ocean::CV::FrameConverter::Options::blackLevel_ = 0u |
|
protected |
The black level value that is subtracted from each element of the raw image before any other operation, with range [0, 1024)
◆ gamma_
| float Ocean::CV::FrameConverter::Options::gamma_ = 1.0f |
|
protected |
The gamma value for a conversion with gamma correction/encoding, with range (0, 2) (OT_GAMMA_CORRECTION) or [0, infinity) (OT_BLACKLEVEL_WHITEBALANCE_GAMMA)
◆ optionsType_
◆ whiteBalance_
| float Ocean::CV::FrameConverter::Options::whiteBalance_[3] = { 1.0f, 1.0f, 1.0f } |
|
protected |
The white balancing scalars of the red, green, and blue channels (in that order), with range [0, infinity)
The documentation for this class was generated from the following file: