Ocean
|
This class implements frame channel conversion, transformation and extraction functions. More...
Data Structures | |
class | Comfort |
The following comfort class provides comfortable functions simplifying prototyping applications but also increasing binary size of the resulting applications. More... | |
Public Types | |
template<typename TSource , typename TTarget , unsigned int tSourceChannels, unsigned int tTargetChannels> | |
using | RowOperatorFunction = void(*)(const TSource *sourceRow, TTarget *targetRow, const unsigned int width, const unsigned int height, unsigned int rowIndex, const unsigned int sourceStrideElements, const unsigned int targetStrideElements) |
Definition of a function pointer to a function able to operate on an entire image row. More... | |
Public Types inherited from Ocean::CV::FrameConverter | |
enum | ConversionFlag : uint32_t { CONVERT_NORMAL , CONVERT_FLIPPED , CONVERT_MIRRORED , CONVERT_FLIPPED_AND_MIRRORED } |
Definition of individual conversion flags. More... | |
enum | CopyPreference : bool { CP_AVOID_COPY_IF_POSSIBLE = false , CP_ALWAYS_COPY = true } |
Definition of a boolean enum for copy preferences (to improve code readability). More... | |
using | ConversionFlags = std::vector< ConversionFlag > |
Definition of a vector holding conversion flags. More... | |
Public Member Functions | |
template<bool tUseFactorChannel0, bool tUseFactorChannel1, bool tUseFactorChannel2> | |
void | convert3ChannelsTo1Channel8Pixels8BitPerChannel7BitPrecisionNEON (const uint8_t *const source, uint8_t *const target, const uint8x8_t &factorChannel0_128_u_8x8, const uint8x8_t &factorChannel1_128_u_8x8, const uint8x8_t &factorChannel2_128_u_8x8) |
template<bool tUseFactorChannel0, bool tUseFactorChannel1, bool tUseFactorChannel2, bool tUseFactorChannel3> | |
void | convert4ChannelsTo1Channel8Pixels8BitPerChannel7BitPrecisionNEON (const uint8_t *const source, uint8_t *const target, const uint8x8_t &factorChannel0_128_u_8x8, const uint8x8_t &factorChannel1_128_u_8x8, const uint8x8_t &factorChannel2_128_u_8x8, const uint8x8_t &factorChannel3_128_u_8x8) |
Public Member Functions inherited from Ocean::CV::FrameConverter | |
template<typename TSource , typename TTarget > | |
OCEAN_RE_ENABLE_DOCUMENTATION_DIAGNOSTIC void | cast (const TSource *__restrict source, TTarget *__restrict target, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements) |
template<typename TSource , typename TTarget > | |
OCEAN_FORCE_INLINE void | cast16Elements (const TSource *const source, TTarget *const target) |
Static Public Member Functions | |
template<typename TSource , typename TTarget , unsigned int tChannels = CHANNELS_NOT_KNOWN_AT_COMPILE_TIME> | |
static void | separateTo1Channel (const TSource *const sourceFrame, TTarget *const *const targetFrames, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int sourceFramePaddingElements, const unsigned int *targetFramesPaddingElements) |
Separates a given frame with zipped pixel format e.g., FORMAT_RGB24, FORMAT_YUV24, FORMAT_BGRA32 into individual frames with one channel only. More... | |
template<typename TSource , typename TTarget > | |
static void | separateTo1Channel (const TSource *const sourceFrame, const std::initializer_list< TTarget * > &targetFrames, const unsigned int width, const unsigned int height, const unsigned int sourceFramePaddingElements, const std::initializer_list< const unsigned int > &targetFramesPaddingElements) |
Separates a given frame with zipped pixel format e.g., FORMAT_RGB24, FORMAT_YUV24, FORMAT_BGRA32 into individual frames with one channel only. More... | |
template<typename TSource , typename TTarget , unsigned int tChannels = CHANNELS_NOT_KNOWN_AT_COMPILE_TIME> | |
static void | zipChannels (const TSource *const *const sourceFrames, TTarget *const targetFrame, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int *sourceFramesPaddingElements, const unsigned int targetFramePaddingElements) |
Zips/interleaves 1-channel images into one image with n-channels. More... | |
template<typename TSource , typename TTarget > | |
static void | zipChannels (const std::initializer_list< const TSource * > &sourceFrames, TTarget *const targetFrame, const unsigned int width, const unsigned int height, const std::initializer_list< unsigned int > &sourceFramesPaddingElements, const unsigned int targetFramePaddingElements) |
Zips/interleaves 1-channel images into one image with n-channels. More... | |
template<typename T , unsigned int tSourceChannels> | |
static void | addFirstChannel (const T *source, const T *sourceNewChannel, T *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const unsigned int sourcePaddingElements, const unsigned int sourceNewChannelPaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Adds a new channel to a given frame with zipped pixel format, the new channel will be added to the front of all existing channels. More... | |
template<typename T , unsigned int tSourceChannels> | |
static void | addFirstChannelValue (const T *source, const T newChannelValue, T *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Adds a new channel to a given frame with zipped pixel format, the value of the new channel will be the same for each pixel. More... | |
template<typename T , unsigned int tSourceChannels> | |
static void | addLastChannel (const T *source, const T *sourceNewChannel, T *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const unsigned int sourcePaddingElements, const unsigned int sourceNewChannelPaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Adds a new channel to a given frame with zipped pixel format, the new channel will be added to the back of all existing channels. More... | |
template<typename T , unsigned int tSourceChannels> | |
static void | addLastChannelValue (const T *source, const T newChannelValue, T *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Adds a new channel to a given frame with zipped pixel format, the value of the new channel will be the same for each pixel. More... | |
template<typename T , unsigned int tSourceChannels> | |
static void | removeFirstChannel (const T *source, T *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Removes the first channel from a given frame with zipped (generic) pixel format. More... | |
template<typename T , unsigned int tSourceChannels> | |
static void | removeLastChannel (const T *source, T *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Removes the last channel from a given frame with zipped (generic) pixel format. More... | |
template<typename T , unsigned int tSourceChannels, unsigned int tTargetChannels, unsigned int tSourceChannelIndex, unsigned int tTargetChannelIndex> | |
static void | copyChannel (const T *source, T *target, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Copies one channel from a given frame with zipped pixel format to another frame with zipped pixel format. More... | |
template<typename T , unsigned int tChannel, unsigned int tChannels> | |
static void | setChannel (T *frame, const unsigned int width, const unsigned int height, const T value, const unsigned int framePaddingElements, Worker *worker=nullptr) |
Sets one channel of a frame with a specific unique value. More... | |
template<typename T , unsigned int tChannels> | |
static void | reverseChannelOrder (const T *source, T *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Reverses the order of the channels of a frame with zipped pixel format. More... | |
template<typename T , unsigned int tSourceChannels, unsigned int tTargetChannels, unsigned int tShufflePattern> | |
static void | shuffleChannels (const T *source, T *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Shuffles the channels of a frame by an arbitrary pattern. More... | |
template<typename T , unsigned int tSourceChannels, unsigned int tTargetChannels, unsigned int tShufflePattern> | |
static void | shuffleChannelsAndSetLastChannelValue (const T *source, const T newChannelValue, T *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Shuffles the channels of source frame and sets the last channel with constant value in the target frame. More... | |
template<unsigned int tChannels> | |
static void | narrow16BitPerChannelTo8BitPerChannel (const uint16_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Narrows 16 bit channels of a frame to 8 bit channels. More... | |
template<typename T , unsigned int tChannels, void(*)(const T *, T *) tPixelFunction> | |
static void | applyPixelModifier (const T *source, T *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, Worker *worker=nullptr) |
Applies a specific modifier function on each pixel. More... | |
template<typename TSource , typename TTarget , unsigned int tSourceChannels, unsigned int tTargetChannels, void(*)(const TSource *, TTarget *) tPixelFunction> | |
static void | applyAdvancedPixelModifier (const TSource *source, TTarget *target, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const ConversionFlag conversionFlag, Worker *worker=nullptr) |
Applies a specific modifier function on each pixel. More... | |
template<typename TSource0 , typename TSource1 , typename TTarget , typename TIntermediate , unsigned int tSourceChannels, unsigned int tTargetChannels, void(*)(const TSource0 *, const TSource1 *, TTarget *) tOperator> | |
static void | applyBivariateOperator (const TSource0 *source0, const TSource1 *source1, TTarget *target, const unsigned int width, const unsigned int height, const unsigned int source0PaddingElements, const unsigned int source1PaddingElements, const unsigned int targetPaddingElements, const ConversionFlag conversionFlag, Worker *worker=nullptr) |
Generic bivariate pixel operations Applies bivariate per-pixel operators: C(y, x) = op(A(y, x), B(y, x)) . More... | |
template<typename TSource , typename TTarget , unsigned int tSourceChannels, unsigned int tTargetChannels> | |
static void | applyRowOperator (const TSource *source, TTarget *target, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const RowOperatorFunction< TSource, TTarget, tSourceChannels, tTargetChannels > &rowOperatorFunction, Worker *worker=nullptr) |
Applies a row operator to all rows of a source image. More... | |
template<typename T , unsigned int tChannels> | |
static void | transformGeneric (const T *source, T *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker) |
Transforms a frame with generic pixel format (with zipped pixel information) like RGB24 or YUV24, to a frame with same pixel format and channel number. More... | |
template<unsigned int tChannels, unsigned int tAlphaChannelIndex> | |
static void | premultipliedAlphaToStraightAlpha8BitPerChannel (uint8_t *const frame, const unsigned int width, const unsigned int height, const unsigned int framePaddingElements, Worker *worker=nullptr) |
Converts an image with premultiplied alpha to a straight image (without premultiplied alpha). More... | |
template<unsigned int tChannels, unsigned int tAlphaChannelIndex> | |
static void | premultipliedAlphaToStraightAlpha8BitPerChannel (const uint8_t *const source, uint8_t *const target, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Converts an image with premultiplied alpha to a straight image (without premultiplied alpha). More... | |
template<unsigned int tChannels, unsigned int tAlphaChannelIndex> | |
static void | straightAlphaToPremultipliedAlpha8BitPerChannel (uint8_t *const frame, const unsigned int width, const unsigned int height, const unsigned int framePaddingElements, Worker *worker=nullptr) |
Converts an image with straight alpha (without premultiplied alpha) to an image with premultiplied alpha. More... | |
template<unsigned int tChannels, unsigned int tAlphaChannelIndex> | |
static void | straightAlphaToPremultipliedAlpha8BitPerChannel (const uint8_t *const source, uint8_t *const target, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Converts an image with straight alpha (without premultiplied alpha) to an image with premultiplied alpha. More... | |
template<typename T , unsigned int tChannels> | |
static void | reverseRowPixelOrder (const T *source, T *target, const size_t size) |
Reverses/mirrors the order of pixels in a given row (or a memory block in general). More... | |
template<typename T , unsigned int tChannels> | |
static void | reverseRowPixelOrderInPlace (T *data, const size_t size) |
Reverses/mirrors the order of pixels in a given row (or a memory block in general) in place. More... | |
template<typename T , unsigned int tChannels> | |
static void | reverseRowChannelOrder (const T *source, T *target, const size_t size, const void *unusedOptions=nullptr) |
Reverses/mirrors the order of channels in a given row (or a memory block in general). More... | |
template<typename T , unsigned int tSourceChannels, unsigned int tTargetChannels, unsigned int tShufflePattern> | |
static void | shuffleRowChannels (const T *source, T *target, const size_t size, const void *unusedOptions=nullptr) |
Shuffles the channels of row pixels by application of a specified shuffle pattern. More... | |
template<typename T , unsigned int tSourceChannels, unsigned int tTargetChannels, unsigned int tShufflePattern> | |
static void | shuffleRowChannelsAndSetLastChannelValue (const T *source, T *target, const size_t size, const void *options=nullptr) |
Shuffles the channels of row pixels by application of a specified shuffle pattern and sets the last channel with constant value in the target row. More... | |
template<bool tUseFactorChannel0, bool tUseFactorChannel1, bool tUseFactorChannel2> | |
static void | convertRow3ChannelsTo1Channel8BitPerChannel7BitPrecision (const uint8_t *source, uint8_t *target, const size_t size, const void *channelMultiplicationFactors_128) |
Converts a row of pixels with 3 channels to pixels with one channel by a linear combination of the four channels. More... | |
static void | convertRow3ChannelsTo3Channels8BitPerChannel6BitPrecision (const uint8_t *source, uint8_t *target, const size_t size, const void *parameters) |
Converts a row of pixels with 3 channels to pixels with 3 channels by a linear combination of the three channels plus an translational part applied to the source data before applying the linear transformation. More... | |
static void | convertRow3ChannelsTo3Channels8BitPerChannel7BitPrecision (const uint8_t *source, uint8_t *target, const size_t size, const void *parameters) |
Converts a row of pixels with 3 channels to pixels with 3 channels by a linear combination of the three channels plus a bias (translation) part. More... | |
static void | convertRow3ChannelsTo3Channels8BitPerChannel10BitPrecision (const uint8_t *source, uint8_t *target, const size_t size, const void *parameters) |
Converts a row of pixels with 3 channels to pixels with 3 channels by a linear combination of the three channels plus a bias (translation) part. More... | |
static void | convertRow3ChannelsTo4Channels8BitPerChannel6BitPrecision (const uint8_t *source, uint8_t *target, const size_t size, const void *parameters) |
Converts a row of pixels with 3 channels to pixels with 4 channels by a linear combination of the three channels plus an translational part applied to the source data before applying the linear transformation (for the first three channels). More... | |
template<bool tUseFactorChannel0, bool tUseFactorChannel1, bool tUseFactorChannel2, bool tUseFactorChannel3> | |
static void | convertRow4ChannelsTo1Channel8BitPerChannel7BitPrecision (const uint8_t *source, uint8_t *target, const size_t size, const void *channelMultiplicationFactors_128) |
Converts a row of pixels with 4 channels to pixels with one channel by a linear combination of the four channels. More... | |
static void | convertRow4ChannelsTo2Channels8BitPerChannel7BitPrecision (const uint8_t *source, uint8_t *target, const size_t size, const void *multiplicationFactors_128) |
Converts a row of pixels with 4 channels to pixels with two channel by a linear combination of the four channels. More... | |
static void | convertRow4ChannelsTo3Channels8BitPerChannel7BitPrecision (const uint8_t *source, uint8_t *target, const size_t size, const void *parameters) |
Converts a row of pixels with 3 channels to pixels with 3 channels by a linear combination of the three channels plus a bias (translation) part. More... | |
template<unsigned int tChannels> | |
static void | narrowRow16BitPerChannelTo8BitPerChannel (const uint16_t *source, uint8_t *target, const size_t size, const void *unusedParameters=nullptr) |
Narrows a row of pixels with 16 bit channels to pixels with 8 bit channels. More... | |
template<typename T , unsigned int tSourceChannels, bool tAddToFront> | |
static void | addChannelRow (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Adds a channel to a given row with generic (zipped) pixel format and copies the information of the new channel from a one-channel image. More... | |
template<typename T , unsigned int tSourceChannels, bool tAddToFront> | |
static void | addChannelValueRow (const T *source, T *target, const size_t size, const void *channelValueParameter) |
Adds a channel to a given row with generic (zipped) pixel format and sets all values to a specified value. More... | |
template<typename T , unsigned int tSourceChannels, unsigned int tTargetChannels, unsigned int tSourceChannelIndex, unsigned int tTargetChannelIndex> | |
static void | copyChannelRow (const T *source, T *target, const size_t size, const void *unusedParameters=nullptr) |
Copies one channel from a source row to a target row with generic (zipped) pixel format. More... | |
template<> | |
void | separateTo1Channel (const uint8_t *const sourceFrame, uint8_t *const *const targetFrames, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int sourceFramePaddingElements, const unsigned int *targetFramesPaddingElements) |
template<> | |
void | separateTo1Channel (const uint8_t *const sourceFrame, uint8_t *const *const targetFrames, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int sourceFramePaddingElements, const unsigned int *targetFramesPaddingElements) |
template<> | |
void | separateTo1Channel (const uint8_t *const sourceFrame, uint8_t *const *const targetFrames, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int sourceFramePaddingElements, const unsigned int *targetFramesPaddingElements) |
template<> | |
void | zipChannels (const uint8_t *const *sourceFrames, uint8_t *const targetFrame, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int *sourceFramesPaddingElements, const unsigned int targetFramePaddingElements) |
template<> | |
void | zipChannels (const uint8_t *const *sourceFrames, uint8_t *const targetFrame, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int *sourceFramesPaddingElements, const unsigned int targetFramePaddingElements) |
template<> | |
void | zipChannels (const uint8_t *const *sourceFrames, uint8_t *const targetFrame, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int *sourceFramesPaddingElements, const unsigned int targetFramePaddingElements) |
template<> | |
void | zipChannels (const float *const *sourceFrames, uint8_t *const targetFrame, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int *sourceFramesPaddingElements, const unsigned int targetFramePaddingElements) |
template<> | |
void | zipChannels (const float *const *sourceFrames, uint8_t *const targetFrame, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int *sourceFramesPaddingElements, const unsigned int targetFramePaddingElements) |
template<> | |
void | zipChannels (const float *const *sourceFrames, uint8_t *const targetFrame, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int *sourceFramesPaddingElements, const unsigned int targetFramePaddingElements) |
Static Public Member Functions inherited from Ocean::CV::FrameConverter | |
template<typename TSource , typename TTarget > | |
static void | cast (const TSource *__restrict source, TTarget *__restrict target, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements) |
Casts the pixel values from one frame type to another frame type. More... | |
template<typename TSource , typename TTarget > | |
static void | normalizedCast (const TSource *__restrict source, TTarget *__restrict target, const unsigned int width, const unsigned int height, const unsigned int channels, const TTarget multiplicationFactor, const TTarget offset, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements) |
Casts the pixel values from one frame type to another frame type but also normalizes the casted source values before assigning them (by scaling and offsetting). More... | |
template<typename T > | |
static bool | subFrame (const T *source, T *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int channels, 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) |
Copies a sub-frame of a given frame into a second frame while both frames might have an individual number of padding elements at the end of each row. More... | |
template<typename T > | |
static bool | subFrameMask (const Frame &sourceFrame, Frame &targetFrame, const Frame &maskFrame, const uint32_t sourceLeft, const uint32_t sourceTop, const uint32_t targetLeft, const uint32_t targetTop, const uint32_t subFrameWidth, const uint32_t subFrameHeight, const uint8_t maskValue=0u) |
Copies pixels from one sub-frame to another if the pixels are part of a mask; input may use padding. More... | |
template<typename T > | |
static bool | subFrameMask (const T *source, T *target, const uint8_t *mask, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int channels, 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=0u) |
Copies pixels from one sub-frame to another if the pixels are part of a mask; input may use padding. More... | |
template<typename T > | |
static void | patchFrame (const T *source, T *buffer, const unsigned int width, const unsigned int channels, const unsigned int x, const unsigned int y, const unsigned int patchSize, const unsigned int sourcePaddingElements, const unsigned int bufferPaddingElements) |
Copies a small patch area of a given frame into a buffer holding only the entire patch. More... | |
template<typename T , unsigned int tChannels> | |
static void | patchFrameMirroredBorder (const T *source, T *buffer, const unsigned int width, const unsigned int height, const unsigned int x, const unsigned int y, const unsigned int patchSize, const unsigned int sourcePaddingElements, const unsigned int bufferPaddingElements) |
Copies a small patch area of a frame into a buffer holding only the entire patch. More... | |
static MatrixD | transformationMatrix_FullRangeRGB24_To_FullRangeYUV24_BT601 () |
Returns the 3x4 color space transformation matrix from full range RGB24 to full range YUV24 using BT.601, analog RGB to (analog) YPbPr. More... | |
static MatrixD | transformationMatrix_FullRangeRGB24_To_FullRangeYVU24_BT601 () |
Returns the 3x4 color space transformation matrix from full range RGB24 to full range YVU24 using BT.601, analog RGB to (analog) YPbPr. More... | |
static MatrixD | transformationMatrix_FullRangeRGB24_To_LimitedRangeYUV24_BT601 () |
Returns the 3x4 color space transformation matrix from full range RGB24 to limited range YUV24 using BT.601, analog RGB to (digital) YCbCr. More... | |
static MatrixD | transformationMatrix_FullRangeRGB24_To_LimitedRangeYVU24_BT601 () |
Returns the 3x4 color space transformation matrix from full range RGB24 to limited range YVU24 using BT.601, analog RGB to (digital) YCbCr. More... | |
static MatrixD | transformationMatrix_FullRangeYUV24_To_FullRangeBGR24_BT601 () |
Returns the color space transformation matrix from full range YUV24 to full range BGR24 using BT.601, (analog) YPbPr to analog BGR. More... | |
static MatrixD | transformationMatrix_FullRangeYUV24_To_FullRangeRGB24_BT601 () |
Returns the color space transformation matrix from full range YUV24 to full range RGB24 using BT.601, (analog) YPbPr to analog RGB. More... | |
static MatrixD | transformationMatrix_FullRangeYUV24_To_FullRangeBGR24_Android () |
Returns the color space transformation matrix from full range YUV24 to full range BGR24 similar to BT.601, (analog) YPbPr to analog BGR. More... | |
static MatrixD | transformationMatrix_FullRangeYUV24_To_FullRangeRGB24_Android () |
Returns the color space transformation matrix from full range YUV24 to full range RGB24 similar to BT.601, (analog) YPbPr to analog RGB. More... | |
static MatrixD | transformationMatrix_FullRangeYVU24_To_FullRangeBGR24_Android () |
Returns the color space transformation matrix from full range YVU24 to full range BGR24 similar to BT.601, (analog) YPbPr to analog BGR. More... | |
static MatrixD | transformationMatrix_FullRangeYVU24_To_FullRangeRGB24_Android () |
Returns the color space transformation matrix from full range YVU24 to full range RGB24 similar to BT.601, (analog) YPbPr to analog RGB. More... | |
static MatrixD | transformationMatrix_LimitedRangeYUV24_To_FullRangeRGB24_BT601 () |
Returns the color space transformation matrix from limited range YUV24 to full range RGB24 using BT.601, (digital) YCbCr to analog RGB. More... | |
static MatrixD | transformationMatrix_FullRangeBGR24_To_LimitedRangeYUV24_BT601 () |
Returns the color space transformation matrix from full range BGR24 to limited range YUV24 using BT.601, analog RGB to (digital) YCbCr. More... | |
static MatrixD | transformationMatrix_FullRangeBGR24_To_FullRangeYUV24_BT601 () |
Returns the 3x4 color space transformation matrix from full range BGR24 to full range YUV24 using BT.601, analog BGR to (analog) YPbPr. More... | |
static MatrixD | transformationMatrix_FullRangeBGR24_To_FullRangeYVU24_BT601 () |
Returns the 3x4 color space transformation matrix from full range BGR24 to full range YVU24 using BT.601, analog BGR to (analog) YPbPr. More... | |
static MatrixD | transformationMatrix_LimitedRangeYUV24_To_FullRangeBGR24_BT601 () |
Returns the color space transformation matrix from limited range YUV24 to full range BGR24 using BT.601, (digital) YCbCr to analog BGR. More... | |
static MatrixD | transformationMatrix_LimitedRangeYVU24_To_FullRangeBGR24_BT601 () |
Returns the color space transformation matrix from limited range YVU24 to full range BGR24 using BT.601, (digital) YCrCb to analog BGR. More... | |
static MatrixD | transformationMatrix_LimitedRangeYVU24_To_FullRangeRGB24_BT601 () |
Returns the color space transformation matrix from limited range YVU24 to full range RGB24 using BT.601, (digital) YCrCb to analog RGB. More... | |
static MatrixD | transformationMatrix_FullRangeYVU24_To_FullRangeRGB24_BT601 () |
Returns the color space transformation matrix from full range YVU24 to full range RGB24 using BT.601, (digital) YCrCb to analog RGB. More... | |
static MatrixD | transformationMatrix_FullRangeYVU24_To_FullRangeBGR24_BT601 () |
Returns the color space transformation matrix from full range YVU24 to full range BGR24 using BT.601, (digital) YCrCb to analog BGR. More... | |
static const ConversionFlags & | conversionFlags () |
Returns a vector holding all possible conversion flags. More... | |
static std::string | translateConversionFlag (const ConversionFlag conversionFlag) |
Translates a given conversion flag to a string. More... | |
Static Public Attributes | |
static constexpr unsigned int | CHANNELS_NOT_KNOWN_AT_COMPILE_TIME = 0u |
Definition of a constant to specify that the number of channels are not known at compile time but at runtime only. More... | |
Static Protected Member Functions | |
template<typename TSource , typename TTarget > | |
static void | separateTo1ChannelRuntime (const TSource *const sourceFrame, TTarget *const *const targetFrames, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int sourceFramePaddingElements, const unsigned int *targetFramesPaddingElements) |
Separates a given frame with zipped pixel format e.g., FORMAT_RGB24, FORMAT_YUV24, FORMAT_BGRA32 into individual frames with one channel only. More... | |
template<typename TSource , typename TTarget > | |
static void | zipChannelsRuntime (const TSource *const *const sourceFrames, TTarget *const targetFrame, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int *sourceFramesPaddingElements, const unsigned int targetFramePaddingElements) |
Zips/interleaves 1-channel images into one image with n-channels. More... | |
template<typename T , unsigned int tChannel, unsigned int tChannels> | |
static void | setChannelSubset (T *frame, const unsigned int width, const T value, const unsigned int framePaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Sets one channel of a frame with one unique value. More... | |
template<typename T , unsigned int tChannels, void(*)(const T *, T *) tPixelFunction> | |
static void | applyPixelModifierSubset (const T *source, T *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const unsigned int firstRow, const unsigned int numberRows) |
Applies a specific modifier function on each pixel. More... | |
template<typename TSource , typename TTarget , unsigned int tSourceChannels, unsigned int tTargetChannels, void(*)(const TSource *, TTarget *) tPixelFunction> | |
static void | applyAdvancedPixelModifierSubset (const TSource *source, TTarget *target, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const ConversionFlag conversionFlag, const unsigned int firstRow, const unsigned int numberRows) |
Applies a specific modifier function on each pixel. More... | |
template<typename TSource0 , typename TSource1 , typename TTarget , typename TIntermediate , unsigned int tSourceChannels, unsigned int tTargetChannels, void(*)(const TSource0 *, const TSource1 *, TTarget *) tOperator> | |
static void | applyBivariateOperatorSubset (const TSource0 *source0, const TSource1 *source1, TTarget *target, const unsigned int width, const unsigned int height, const unsigned int source0PaddingElements, const unsigned int source1PaddingElements, const unsigned int targetPaddingElements, const ConversionFlag conversionFlag, const unsigned int firstRow, const unsigned int numberRows) |
Generic bivariate pixel operations. More... | |
template<typename TSource , typename TTarget , unsigned int tSourceChannels, unsigned int tTargetChannels> | |
static void | applyRowOperatorSubset (const TSource *source, TTarget *target, const unsigned int width, const unsigned int height, const unsigned int sourceStrideElements, const unsigned int targetStrideElements, const RowOperatorFunction< TSource, TTarget, tSourceChannels, tTargetChannels > rowOperatorFunction, const unsigned int firstRow, const unsigned int numberRows) |
Applies a row operator to a subset of all rows of a source image. More... | |
static void | transformGenericSubset (const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const RowReversePixelOrderFunction< void > rowReversePixelOrderFunction, const unsigned int bytesPerRow, const unsigned int sourceStrideBytes, const unsigned int targetStrideBytes, const unsigned int firstRow, const unsigned int numberRows) |
Transforms a subset of a frame with generic pixel format (with zipped pixel information) like RGB24 or YUV24, to a frame with same pixel format and channel number. More... | |
template<unsigned int tChannels, unsigned int tAlphaChannelIndex> | |
static void | premultipliedAlphaToStraightAlpha8BitPerChannelSubset (uint8_t *const frame, const unsigned int width, const unsigned int framePaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Converts an image with premultiplied alpha to a straight image (without premultiplied alpha). More... | |
template<unsigned int tChannels, unsigned int tAlphaChannelIndex> | |
static void | premultipliedAlphaToStraightAlpha8BitPerChannelSubset (const uint8_t *const source, uint8_t *const target, const unsigned int width, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Converts an image with premultiplied alpha to a straight image (without premultiplied alpha). More... | |
template<unsigned int tChannels, unsigned int tAlphaChannelIndex> | |
static void | straightAlphaToPremultipliedAlpha8BitPerChannelSubset (uint8_t *const frame, const unsigned int width, const unsigned int framePaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Converts an image with straight alpha (without premultiplied alpha) to an image with premultiplied alpha. More... | |
template<unsigned int tChannels, unsigned int tAlphaChannelIndex> | |
static void | straightAlphaToPremultipliedAlpha8BitPerChannelSubset (const uint8_t *const source, uint8_t *const target, const unsigned int width, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Converts an image with straight alpha (without premultiplied alpha) to an image with premultiplied alpha. More... | |
static OCEAN_FORCE_INLINE void | convert3ChannelsTo1Channel16Pixels8BitPerChannel7BitPrecisionSSE (const uint8_t *const source, uint8_t *const target, const __m128i &multiplicationFactors0_128_u_16x8, const __m128i &multiplicationFactors1_128_u_16x8, const __m128i &multiplicationFactors2_128_u_16x8) |
Converts 16 pixels with 3 channels per pixel to 16 pixels with one channel per pixel by a linear combination of the three channels. More... | |
static OCEAN_FORCE_INLINE void | convert3ChannelsTo3Channels16Pixels8BitPerChannel7BitPrecisionSSE (const uint8_t *const source, uint8_t *const target, const __m128i &factorChannel00_128_s_16x8, const __m128i &factorChannel10_128_s_16x8, const __m128i &factorChannel20_128_s_16x8, const __m128i &factorChannel01_128_s_16x8, const __m128i &factorChannel11_128_s_16x8, const __m128i &factorChannel21_128_s_16x8, const __m128i &factorChannel02_128_s_16x8, const __m128i &factorChannel12_128_s_16x8, const __m128i &factorChannel22_128_s_16x8, const __m128i &biasChannel0_s_16x8, const __m128i &biasChannel1_s_16x8, const __m128i &biasChannel2_s_16x8) |
Converts 16 pixels with 3 channels per pixel to 16 pixels with three channel per pixel by a linear combination of the three channels plus a bias (translation) parameter. More... | |
static OCEAN_FORCE_INLINE void | convert3ChannelsTo3Channels16Pixels8BitPerChannel10BitPrecisionSSE (const uint8_t *const source, uint8_t *const target, const __m128i &factorChannel00_1024_s_16x8, const __m128i &factorChannel10_1024_s_16x8, const __m128i &factorChannel20_1024_s_16x8, const __m128i &factorChannel01_1024_s_16x8, const __m128i &factorChannel11_1024_s_16x8, const __m128i &factorChannel21_1024_s_16x8, const __m128i &factorChannel02_1024_s_16x8, const __m128i &factorChannel12_1024_s_16x8, const __m128i &factorChannel22_1024_s_16x8, const __m128i &biasChannel0_1024_s_32x4, const __m128i &biasChannel1_1024_s_32x4, const __m128i &biasChannel2_1024_s_32x4) |
Converts 16 pixels with 3 channels per pixel to 16 pixels with three channel per pixel by a linear combination of the three channels plus a bias (translation) parameter. More... | |
static OCEAN_FORCE_INLINE void | convert4ChannelsTo1Channel16Pixels8BitPerChannel7BitPrecisionSSE (const uint8_t *const source, uint8_t *const target, const __m128i &multiplicationFactors0123_128_s_32x) |
Converts 16 pixels with 4 channels per pixel to 16 pixels with one channel per pixel by a linear combination of the four channels. More... | |
static OCEAN_FORCE_INLINE void | convert4ChannelsTo2Channels16Pixels8BitPerChannel7BitPrecisionSSE (const uint8_t *const source, uint8_t *const target, const __m128i &multiplicationFactorsChannel0_0123_128_s_16x8, const __m128i &multiplicationFactorsChannel1_0123_128_s_16x8) |
Converts 16 pixels with 4 channels per pixel to 16 pixels with two channel per pixel by a linear combination of the four channels. More... | |
template<bool tUseFactorChannel0, bool tUseFactorChannel1, bool tUseFactorChannel2> | |
static OCEAN_FORCE_INLINE void | convert3ChannelsTo1Channel8Pixels8BitPerChannel7BitPrecisionNEON (const uint8_t *const source, uint8_t *const target, const uint8x8_t &factorChannel0_128_u_8x8, const uint8x8_t &factorChannel1_128_u_8x8, const uint8x8_t &factorChannel2_128_u_8x8) |
Converts 8 pixels with 3 channels per pixel to 8 pixels with one channel per pixel by a linear combination of the three channels. More... | |
static OCEAN_FORCE_INLINE void | convert3ChannelsTo3Channels8Pixels8BitPerChannel6BitPrecisionNEON (const uint8_t *const source, uint8_t *const target, const int16x8_t &factorChannel00_64_s_16x8, const int16x8_t &factorChannel10_64_s_16x8, const int16x8_t &factorChannel20_64_s_16x8, const int16x8_t &factorChannel01_64_s_16x8, const int16x8_t &factorChannel11_64_s_16x8, const int16x8_t &factorChannel21_64_s_16x8, const int16x8_t &factorChannel02_64_s_16x8, const int16x8_t &factorChannel12_64_s_16x8, const int16x8_t &factorChannel22_64_s_16x8, const uint8x8_t &biasChannel0_u_8x8, const uint8x8_t &biasChannel1_u_8x8, const uint8x8_t &biasChannel2_u_8x8) |
Converts 8 pixels with 3 channels per pixel to 8 pixels with three channel per pixel by a linear combination of the three channels plus an in advance bias (translation) parameter. More... | |
static OCEAN_FORCE_INLINE void | convert3ChannelsTo3Channels16Pixels8BitPerChannel6BitPrecisionNEON (const uint8_t *const source, uint8_t *const target, const int16x8_t &factorChannel00_64_s_16x8, const int16x8_t &factorChannel10_64_s_16x8, const int16x8_t &factorChannel20_64_s_16x8, const int16x8_t &factorChannel01_64_s_16x8, const int16x8_t &factorChannel11_64_s_16x8, const int16x8_t &factorChannel21_64_s_16x8, const int16x8_t &factorChannel02_64_s_16x8, const int16x8_t &factorChannel12_64_s_16x8, const int16x8_t &factorChannel22_64_s_16x8, const uint8x8_t &biasChannel0_u_8x8, const uint8x8_t &biasChannel1_u_8x8, const uint8x8_t &biasChannel2_u_8x8) |
Converts 16 pixels with 3 channels per pixel to 16 pixels with three channel per pixel by a linear combination of the three channels plus an in advance bias (translation) parameter. More... | |
static OCEAN_FORCE_INLINE void | convert3ChannelsTo3Channels8Pixels8BitPerChannel7BitPrecisionNEON (const uint8_t *const source, uint8_t *const target, const int16x8_t &factorChannel00_128_s_16x8, const int16x8_t &factorChannel10_128_s_16x8, const int16x8_t &factorChannel20_128_s_16x8, const int16x8_t &factorChannel01_128_s_16x8, const int16x8_t &factorChannel11_128_s_16x8, const int16x8_t &factorChannel21_128_s_16x8, const int16x8_t &factorChannel02_128_s_16x8, const int16x8_t &factorChannel12_128_s_16x8, const int16x8_t &factorChannel22_128_s_16x8, const int16x8_t &biasChannel0_128_s_16x8, const int16x8_t &biasChannel1_128_s_16x8, const int16x8_t &biasChannel2_128_s_16x8) |
Converts 8 pixels with 3 channels per pixel to 8 pixels with three channel per pixel by a linear combination of the three channels plus a bias (translation) parameter. More... | |
static OCEAN_FORCE_INLINE void | convert3ChannelsTo3Channels8Pixels8BitPerChannel10BitPrecisionNEON (const uint8_t *const source, uint8_t *const target, const int16x4_t &factorChannel00_1024_s_16x4, const int16x4_t &factorChannel10_1024_s_16x4, const int16x4_t &factorChannel20_1024_s_16x4, const int16x4_t &factorChannel01_1024_s_16x4, const int16x4_t &factorChannel11_1024_s_16x4, const int16x4_t &factorChannel21_1024_s_16x4, const int16x4_t &factorChannel02_1024_s_16x4, const int16x4_t &factorChannel12_1024_s_16x4, const int16x4_t &factorChannel22_1024_s_16x4, const int32x4_t &biasChannel0_1024_s_32x4, const int32x4_t &biasChannel1_1024_s_32x4, const int32x4_t &biasChannel2_1024_s_32x4) |
Converts 8 pixels with 3 channels per pixel to 8 pixels with three channel per pixel by a linear combination of the three channels plus a bias (translation) parameter. More... | |
static OCEAN_FORCE_INLINE void | convert3ChannelsTo3Channels16Pixels8BitPerChannel10BitPrecisionNEON (const uint8_t *const source, uint8_t *const target, const int16x4_t &factorChannel00_1024_s_16x4, const int16x4_t &factorChannel10_1024_s_16x4, const int16x4_t &factorChannel20_1024_s_16x4, const int16x4_t &factorChannel01_1024_s_16x4, const int16x4_t &factorChannel11_1024_s_16x4, const int16x4_t &factorChannel21_1024_s_16x4, const int16x4_t &factorChannel02_1024_s_16x4, const int16x4_t &factorChannel12_1024_s_16x4, const int16x4_t &factorChannel22_1024_s_16x4, const int32x4_t &biasChannel0_1024_s_32x4, const int32x4_t &biasChannel1_1024_s_32x4, const int32x4_t &biasChannel2_1024_s_32x4) |
Converts 8 pixels with 3 channels per pixel to 16 pixels with three channel per pixel by a linear combination of the three channels plus a bias (translation) parameter. More... | |
static OCEAN_FORCE_INLINE void | convert3ChannelsTo3Channels16Pixels8BitPerChannel7BitPrecisionNEON (const uint8_t *const source, uint8_t *const target, const int16x8_t &factorChannel00_128_s_16x8, const int16x8_t &factorChannel10_128_s_16x8, const int16x8_t &factorChannel20_128_s_16x8, const int16x8_t &factorChannel01_128_s_16x8, const int16x8_t &factorChannel11_128_s_16x8, const int16x8_t &factorChannel21_128_s_16x8, const int16x8_t &factorChannel02_128_s_16x8, const int16x8_t &factorChannel12_128_s_16x8, const int16x8_t &factorChannel22_128_s_16x8, const int16x8_t &biasChannel0_128_s_16x8, const int16x8_t &biasChannel1_128_s_16x8, const int16x8_t &biasChannel2_128_s_16x8) |
Converts 16 pixels with 3 channels per pixel to 16 pixels with 3 channels per pixel by a linear combination of the three channels plus a bias (translation) parameter. More... | |
static OCEAN_FORCE_INLINE void | convert3ChannelsTo4Channels16Pixels8BitPerChannel6BitPrecisionNEON (const uint8_t *const source, uint8_t *const target, const int16x8_t &factorChannel00_64_s_16x8, const int16x8_t &factorChannel10_64_s_16x8, const int16x8_t &factorChannel20_64_s_16x8, const int16x8_t &factorChannel01_64_s_16x8, const int16x8_t &factorChannel11_64_s_16x8, const int16x8_t &factorChannel21_64_s_16x8, const int16x8_t &factorChannel02_64_s_16x8, const int16x8_t &factorChannel12_64_s_16x8, const int16x8_t &factorChannel22_64_s_16x8, const uint8x8_t &biasChannel0_u_8x8, const uint8x8_t &biasChannel1_u_8x8, const uint8x8_t &biasChannel2_u_8x8, const uint8x16_t &channelValue3_u_8x16) |
Converts 16 pixels with 3 channels per pixel to 16 pixels with 4 channels per pixel by a linear combination of the three channels plus a bias (translation) parameter. More... | |
template<bool tUseFactorChannel0, bool tUseFactorChannel1, bool tUseFactorChannel2, bool tUseFactorChannel3> | |
static OCEAN_FORCE_INLINE void | convert4ChannelsTo1Channel8Pixels8BitPerChannel7BitPrecisionNEON (const uint8_t *const source, uint8_t *const target, const uint8x8_t &factorChannel0_128_u_8x8, const uint8x8_t &factorChannel1_128_u_8x8, const uint8x8_t &factorChannel2_128_u_8x8, const uint8x8_t &factorChannel3_128_u_8x8) |
Converts 8 pixels with 4 channels per pixel to 8 pixels with one channel per pixel by a linear combination of the four channels. More... | |
static OCEAN_FORCE_INLINE void | convert4ChannelsTo2Channels8Pixels8BitPerChannel7BitPrecisionNEON (const uint8_t *const source, uint8_t *const target, const uint8x8_t &factorChannel00_128_u_8x8, const uint8x8_t &factorChannel10_128_u_8x8, const uint8x8_t &factorChannel01_128_u_8x8, const uint8x8_t &factorChannel11_128_u_8x8, const uint8x8_t &factorChannel02_128_u_8x8, const uint8x8_t &factorChannel12_128_u_8x8, const uint8x8_t &factorChannel03_128_u_8x8, const uint8x8_t &factorChannel13_128_u_8x8) |
Converts 8 pixels with 4 channels per pixel to 8 pixels with two channels per pixel by a linear combination of the four channels. More... | |
Static Protected Member Functions inherited from Ocean::CV::FrameConverter | |
template<typename TSource , typename TTarget > | |
static void | cast16Elements (const TSource *const source, TTarget *const target) |
Casts 16 successive elements from one data type to another data type. More... | |
template<typename TSource , typename TTarget > | |
static void | convertGenericPixelFormat (const TSource *source, TTarget *target, const unsigned int width, const unsigned int height, const unsigned int sourceStrideElements, const unsigned int targetStrideElements, const ConversionFlag flag, const RowConversionFunction< TSource, TTarget > rowConversionFunction, const RowReversePixelOrderInPlaceFunction< TTarget > targetReversePixelOrderInPlaceFunction, const bool areContinuous, const void *options, Worker *worker) |
Converts a frame with generic pixel format (e.g., RGBA32, BGR24, YUV24, ...) to a frame with generic pixel format (e.g., RGB24, Y8). More... | |
static void | convertArbitraryPixelFormat (const void **sources, void **targets, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int multipleRowsPerIteration, const MultipleRowsConversionFunction multipleRowsConversionFunction, const void *options, Worker *worker) |
Converts a frame with arbitrary pixel format (e.g., Y_UV12, Y_VU12, YUYV16, ...) to a frame with arbitrary pixel format. More... | |
static void | convertGenericPixelFormatSubset (const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const unsigned int sourceStrideBytes, const unsigned int targetStrideBytes, const ConversionFlag flag, const RowConversionFunction< uint8_t, uint8_t > rowConversionFunction, const RowReversePixelOrderInPlaceFunction< uint8_t > targetReversePixelOrderInPlaceFunction, const bool areContinuous, const void *options, const unsigned int firstRow, const unsigned int numberRows) |
Converts a subset of a frame with generic pixel format (e.g., RGBA32, BGR24, YUV24, ...) to a frame with generic pixel format (e.g., Y8). More... | |
static void | convertArbitraryPixelFormatSubset (const void **sources, void **targets, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int multipleRowsPerIteration, const MultipleRowsConversionFunction multipleRowsConversionFunction, const void *options, const unsigned int firstMultipleRow, const unsigned int numberMultipleRows) |
Converts a subset of a frame with arbitrary pixel format (e.g., Y_UV12, Y_VU12, YUYV16, ...) to a frame with arbitrary pixel format. More... | |
static void | convertOneRow_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision6Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
This function is not used anymore due to the corresponding 2-row function. More... | |
static void | convertOneRow_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision10Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
This function is not used anymore due to the corresponding 2-row function. More... | |
static void | convertTwoRows_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision6Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts two rows of an image with e.g., a Y_UV12 pixel format to two rows of an image with e.g., an RGB24 pixel format with 6 bit precision. More... | |
static void | convertTwoRows_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision10Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts two rows of an image with e.g., a Y_UV12 pixel format to two rows of an image with e.g., an RGB24 pixel format with 10 bit precision. More... | |
static void | convertTwoRows_1Plane3Channels_To_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_8BitPerChannel_Precision7Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts two rows of an image with e.g., a RGB pixel format to two rows of an image with e.g., an Y_UV12 pixel format with 7 bit precision. More... | |
static void | convertTwoRows_1Plane3Channels_To_1Plane1ChannelAnd2Planes1ChannelsDownsampled2x2_8BitPerChannel_Precision7Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts two rows of an image with e.g., a RGB pixel format to two rows of an image with e.g., an Y_U_V12 pixel format with 7 bit precision. More... | |
template<unsigned int tSourceChannelIndex0, unsigned int tSourceChannelIndex1, unsigned int tSourceChannelIndex2> | |
static void | mapOneRow_3Plane1Channel_To_1Plane3Channels_8BitPerChannel (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts (maps) one row of an image with e.g., a Y_U_V24 pixel format to one row of an image with e.g., an YUV24 or YVU24 pixel format. More... | |
template<unsigned int tSourceChannelIndex0, unsigned int tSourceChannelIndex1, unsigned int tSourceChannelIndex2> | |
static void | mapOneRow_1Plane3Channels_To_3Plane1Channel_8BitPerChannel (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts (maps) one row of an image with e.g., a RGB24 pixel format to one row of an image with e.g., a R_G_B24 pixel format. More... | |
template<unsigned int tSourceChannelIndex0, unsigned int tSourceChannelIndex1, unsigned int tSourceChannelIndex2> | |
static void | mapOneRow_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_To_1Plane3Channels_8BitPerChannel (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts (matches) one row of an image with e.g., a Y_UV12 pixel format to one row of an image with e.g., an YUV24 or YVU24 pixel format. More... | |
template<unsigned int tSourceChannelIndex0, unsigned int tSourceChannelIndex1, unsigned int tSourceChannelIndex2> | |
static void | mapTwoRows_1Plane1ChannelAnd1Plane2ChannelsDownsampled2x2_To_1Plane3Channels_8BitPerChannel (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts (matches) two rows of an image with e.g., a Y_UV12 pixel format to two rows of an image with e.g., an YUV24 or YVU24 pixel format. More... | |
static void | convertOneRow_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision10Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts one row of an image with e.g., a Y_U_V12 pixel format to one row of an image with e.g., an RGB24 pixel format with 10 bit precision. More... | |
static void | convertTwoRows_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision10Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts two rows of an image with e.g., a Y_U_V12 pixel format to two rows of an image with e.g., an RGB24 pixel format with 10 bit precision. More... | |
template<unsigned int tSourceChannelIndex0, unsigned int tSourceChannelIndex1, unsigned int tSourceChannelIndex2> | |
static void | mapOneRow_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane3Channels_8BitPerChannel (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts one row of an image with e.g., a Y_U_V12 pixel format to one row of an image with e.g., an YUV24 or YVU24 pixel format. More... | |
template<unsigned int tSourceChannelIndex0, unsigned int tSourceChannelIndex1, unsigned int tSourceChannelIndex2> | |
static void | mapTwoRows_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane3Channels_8BitPerChannel (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts two rows of an image with e.g., a Y_U_V12 pixel format to two rows of an image with e.g., an YUV24 or YVU24 pixel format. More... | |
template<unsigned int tSourceChannelIndex0, unsigned int tSourceChannelIndex1, unsigned int tSourceChannelIndex2> | |
static void | mapTwoRows_1Plane3Channels_To_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_8BitPerChannel (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts two rows of an image with e.g., a YUV24 pixel format to two rows of an image with e.g., an Y_U_V12 or Y_V_U12 pixel format. More... | |
static void | convertOneRow_3Planes1Channel_To_1Plane3Channels_8BitPerChannel_Precision6Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts one row of an image with e.g., a Y_U_V24 pixel format to one rows of an image with e.g., an RGB24 pixel format. More... | |
static void | convertOneRow_3Planes1Channel_To_1Plane4Channels_8BitPerChannel_Precision6Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts one row of an image with e.g., a Y_U_V24 pixel format to one rows of an image with e.g., an RGBA32 pixel format. More... | |
static void | convertOneRow_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane4Channels_8BitPerChannel_Precision6Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts one row of an image with e.g., a Y_U_V12 pixel format to one row of an image with e.g., an RGBA32 pixel format. More... | |
static void | convertTwoRows_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane3Channels_8BitPerChannel_Precision6Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts two rows of an image with e.g., a Y_U_V12 pixel format to two rows of an image with e.g., an RGB24 pixel format. More... | |
static void | convertTwoRows_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane4Channels_8BitPerChannel_Precision6Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts two rows of an image with e.g., a Y_U_V12 pixel format to two rows of an image with e.g., an RGBA32 pixel format. More... | |
static void | convertOneRow_1Plane3ChannelsWith2ChannelsDownsampled2x1BackIsDownsampled_To_1Plane3Channels_8BitPerChannel_Precision10Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts one row of an image with e.g., a YUYV16 pixel format to one row of an image with e.g., an RGB24 or BGR2424 pixel format. More... | |
static void | convertOneRow_1Plane3ChannelsWith2ChannelsDownsampled2x1FrontIsDownsampled_To_1Plane3Channels_8BitPerChannel_Precision10Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts one row of an image with e.g., a UYVY16 pixel format to one row of an image with e.g., an RGB24 or BGR2424 pixel format. More... | |
template<unsigned int tSourceChannelIndex0, unsigned int tSourceChannelIndex1, unsigned int tSourceChannelIndex2> | |
static void | mapOneRow_1Plane3ChannelsWith2ChannelsDownsampled2x1BackIsDownsampled_To_1Plane3Channels_8BitPerChannel (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts one row of an image with e.g., a YUYV16 pixel format to one row of an image with e.g., an YUV24 or YVU24 pixel format. More... | |
template<unsigned int tSourceChannelIndex0, unsigned int tSourceChannelIndex1, unsigned int tSourceChannelIndex2> | |
static void | mapOneRow_1Plane3ChannelsWith2ChannelsDownsampled2x1FrontIsDownsampled_To_1Plane3Channels_8BitPerChannel (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts one row of an image with e.g., a UYVY16 pixel format to one row of an image with e.g., an YUV24 or YVU24 pixel format. More... | |
template<unsigned int tIndexRed, unsigned int tIndexGreen, unsigned int tIndexBlue> | |
static void | convertTwoRows_1PlaneMosaicPacked10Bit_To_1PlaneUnpacked3Channels8Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts two rows of an image with 3-channel Bayer mosaic pixel format with packed 10-bit pixel values to an image with 3-channel un-packed 8-bit pixel format. More... | |
template<unsigned int tIndexRed, unsigned int tIndexGreen, unsigned int tIndexBlue> | |
static void | convertTwoRows_1PlaneMosaicPacked10Bit_To_1PlaneUnpacked3Channels16Bit (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts two rows of an image with 3-channel Bayer mosaic pixel format with packed 10-bit pixel values to an image with 3-channel un-packed 16-bit pixel format. More... | |
template<unsigned int tIndexRed, unsigned int tIndexGreen, unsigned int tIndexBlue> | |
static void | convertTwoRows_1PlaneMosaicPacked10Bit_To_1PlaneUnpacked3Channels8BitAdvanced (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Converts two rows of an image with 3-channel Bayer mosaic pixel format with packed 10-bit pixel values to an image with 3-channel un-packed 8-bit pixel format and applies black level subtraction, white balance, and gamma encoding The layout of the parameters, options , is defined in the struct RGGB10ToRGB24AdvancedOptions . More... | |
static void | mapOneRow_1Plane2Channels_To_2Planes1Channel_8BitPerChannel (const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Maps one row of a 1-plane, 2-channel image to two planes with 1 channels. More... | |
static OCEAN_FORCE_INLINE void | unpack5ElementsBayerMosaicPacked10Bit (const uint8_t *const packed, uint16_t *unpacked) |
Unpacks 5 elements from a row in a packed Bayer mosaic to 4 pixels values The required memory layout of the input: A B C D X ... Bytes marked as X store two bits for each of the previous four elements: X = AABB CCDD . More... | |
template<bool tAllowLastOverlappingElement> | |
static OCEAN_FORCE_INLINE void | unpack15ElementsBayerMosaicPacked10BitNEON (const uint8_t *const packed, uint16x8_t &unpackedAB_u_16x8, uint16x4_t &unpackedC_u_16x4) |
Unpacks 15 elements from a row in a packed Bayer mosaic to 12 pixels values The required memory layout of the input: A B C D X A B C D X A B C D X A ... Bytes marked as X store two bits for each of the previous four elements: X = AABB CCDD . More... | |
template<> | |
OCEAN_FORCE_INLINE void | cast16Elements (const uint8_t *const source, float *const target) |
template<> | |
OCEAN_FORCE_INLINE void | cast16Elements (const uint8_t *const source, uint16_t *const target) |
template<> | |
OCEAN_FORCE_INLINE void | cast16Elements (const uint8_t *const source, int16_t *const target) |
template<> | |
OCEAN_FORCE_INLINE void | cast16Elements (const uint8_t *const source, uint32_t *const target) |
template<> | |
OCEAN_FORCE_INLINE void | cast16Elements (const uint8_t *const source, int32_t *const target) |
template<> | |
OCEAN_FORCE_INLINE void | cast16Elements (const float *const source, uint8_t *const target) |
Additional Inherited Members | |
Protected Types inherited from Ocean::CV::FrameConverter | |
template<typename TSource , typename TTarget > | |
using | RowConversionFunction = void(*)(const TSource *sourceRow, TTarget *targetRow, const size_t width, const void *options) |
Definition of a function pointer to a function able to convert one image row from one generic pixel format to another generic pixel format. More... | |
using | MultipleRowsConversionFunction = void(*)(const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options) |
Definition of a function pointer to a function able to convert multiple image row from an arbitrary pixel format to another arbitrary pixel format. More... | |
template<typename T > | |
using | RowReversePixelOrderFunction = void(*)(const T *inputRow, T *targetRow, const size_t width) |
Definition of a function pointer to a function able to reverse the order of pixels in an image row with a generic pixel format. More... | |
template<typename T > | |
using | RowReversePixelOrderInPlaceFunction = void(*)(T *row, const size_t width) |
Definition of a function pointer to a function able to reverse the order of pixels in an image row with a generic pixel format in-place. More... | |
This class implements frame channel conversion, transformation and extraction functions.
using Ocean::CV::FrameChannels::RowOperatorFunction = void(*)(const TSource* sourceRow, TTarget* targetRow, const unsigned int width, const unsigned int height, unsigned int rowIndex, const unsigned int sourceStrideElements, const unsigned int targetStrideElements) |
Definition of a function pointer to a function able to operate on an entire image row.
|
static |
Adds a channel to a given row with generic (zipped) pixel format and copies the information of the new channel from a one-channel image.
The channel can be added at new first channel or as new last channel.
sources | The pointer to the multi-channel source frame and to the single-channel source frame, must be valid |
targets | The one pointer to the target image, must be valid |
multipleRowIndex | The index of the multiple-row to be handled, with range [0, height - 1] |
width | The width of the frame in pixel, with range [1, infinity), must be even |
height | The height of the frame in pixel, with range [1, infinity), must be even |
conversionFlag | The conversion to be applied |
options | The 1 options parameters: padding parameters of 1-channel source frame, must be valid |
T | Data type of each channel pixel value, e.g, 'uint8_t' or 'float' |
tSourceChannels | Number of channels of the source frame (without the new channel), with range [1, infinity) |
tAddToFront | True, to add the channel to the front (as new first channel); False, to add the channel to the back (as new last channel). |
|
static |
Adds a channel to a given row with generic (zipped) pixel format and sets all values to a specified value.
The channel can be added at new first channel or as new last channel.
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels, receiving the additional channels, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
channelValueParameter | The pointer to the value of the channel to be set (with data type 'T'), must be valid |
T | Data type of each channel pixel value, e.g, 'uint8_t' or 'float' |
tSourceChannels | Number of channels of the source frame (without the new channel), with range [1, infinity) |
tAddToFront | True, to add the channel to the front (as new first channel); False, to add the channel to the back (as new last channel). |
|
inlinestatic |
Adds a new channel to a given frame with zipped pixel format, the new channel will be added to the front of all existing channels.
source | The source frame to which the new channel will be added, must be valid |
sourceNewChannel | The 1-channel frame providing the new channel information, must be valid |
target | The target frame receiving the joined channels, must be valid |
width | The width of the frames in pixel, with range [1, infinity) |
height | The height of the frames in pixel, with range [1, infinity) |
conversionFlag | The conversion to be applied |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
sourceNewChannelPaddingElements | The number of padding elements at the end of each new-channel-source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
T | Data type of each channel pixel value |
tSourceChannels | Number of channels of the source frame (without the new channel), with range [1, infinity) |
|
inlinestatic |
Adds a new channel to a given frame with zipped pixel format, the value of the new channel will be the same for each pixel.
source | The source frame that provided the existing channels |
newChannelValue | Value that will be assigned to the new channel for each pixel |
target | The target frame to that the existing channels and the new channel will be added (as new first channel) |
width | The width of the frames in pixel, with range [1, infinity) |
height | The height of the frames in pixel, with range [1, infinity) |
conversionFlag | The conversion to be applied |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
T | Data type of each channel pixel value |
tSourceChannels | Number of channels of the source frame (without the new channel) |
|
inlinestatic |
Adds a new channel to a given frame with zipped pixel format, the new channel will be added to the back of all existing channels.
source | The source frame to which the new channel will be added, must be valid |
sourceNewChannel | The 1-channel frame providing the new channel information, must be valid |
target | The target frame receiving the joined channels, must be valid |
width | The width of the frames in pixel, with range [1, infinity) |
height | The height of the frames in pixel, with range [1, infinity) |
conversionFlag | The conversion to be applied |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
sourceNewChannelPaddingElements | The number of padding elements at the end of each new-channel-source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
T | Data type of each channel pixel value |
tSourceChannels | Number of channels of the source frame (without the new channel), with range [1, infinity) |
|
inlinestatic |
Adds a new channel to a given frame with zipped pixel format, the value of the new channel will be the same for each pixel.
source | The source frame that provided the existing channels |
newChannelValue | Value that will be assigned to the new channel for each pixel |
target | The target frame to that the existing channels and the new channel will be added (as new last channel) |
width | The width of the frames in pixel, with range [1, infinity) |
height | The height of the frames in pixel, with range [1, infinity) |
conversionFlag | The conversion to be applied |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
T | Data type of each channel pixel value |
tSourceChannels | Number of channels of the source frame (without the new channel) |
|
static |
Applies a specific modifier function on each pixel.
source | The source frame providing the pixel information, must be valid |
target | The target frame receiving the pixel information, must be valid |
width | The width of the source frame in pixel, with range [1, infinity) |
height | The height of the source frame in pixel, with range [1, infinity) |
sourcePaddingElements | The number of padding elements at the end of each row of the source frame, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each row of the target frame, in elements, with range [0, infinity) |
conversionFlag | The conversion to be applied |
worker | Optional worker object to distribute the computation |
TSource | Data type of each source channel pixel value |
TTarget | Data type of each target channel pixel value |
tSourceChannels | Number of source data channels, with range [1, infinity) |
tTargetChannels | Number of target data channels, with range [1, infinity) |
tPixelFunction | Pixel modification function |
|
staticprotected |
Applies a specific modifier function on each pixel.
source | The source frame providing the pixel information, must be valid |
target | The target frame receiving the pixel information, must be valid |
width | The width of the source frame in pixel, with range [1, infinity) |
height | The height of the source frame in pixel, with range [1, infinity) |
sourcePaddingElements | The number of padding elements at the end of each row of the source frame, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each row of the target frame, in elements, with range [0, infinity) |
conversionFlag | The conversion to be applied |
firstRow | First row to be handled |
numberRows | Number of rows to be handled |
TSource | Data type of each source channel pixel value |
TTarget | Data type of each target channel pixel value |
tSourceChannels | Number of source data channels, with range [1, infinity) |
tTargetChannels | Number of target data channels, with range [1, infinity) |
tPixelFunction | Pixel modification function |
|
static |
Generic bivariate pixel operations Applies bivariate per-pixel operators: C(y, x) = op(A(y, x), B(y, x))
.
Input and output must have the same frame type and have a single plane.
source0 | First source frame |
source1 | Second source frame |
target | The target frame |
width | The width of the source frame in pixel, with range [1, infinity) |
height | The height of the source frame in pixel, with range [1, infinity) |
source0PaddingElements | The number of padding elements at the end of each row of the first source, in elements, with range [0, infinity) |
source1PaddingElements | The number of padding elements at the end of each row of the second source, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
conversionFlag | The conversion to be applied |
worker | Optional worker object to distribute the computation |
TSource0 | Type of the first data source |
TSource1 | Type of the second data source |
TTarget | Type of the target |
TIntermediate | Data type that is used for the computation of intermediate results, e.g. if TSource0 and TSource1 are different |
tSourceChannels | Number of channels of the two sources, range: [1, infinity) |
tTargetChannels | Number of channels of the target, range: [1, infinity) |
tOperator | The operation (function) that is applied on both sources to yield the value for the target (called per pixel) |
|
staticprotected |
Generic bivariate pixel operations.
source0 | First source frame |
source1 | Second source frame |
target | The target frame |
width | The width of the source frame in pixel, with range [1, infinity) |
height | The height of the source frame in pixel, with range [1, infinity) |
source0PaddingElements | The number of padding elements at the end of each row of the first source, in elements, with range [0, infinity) |
source1PaddingElements | The number of padding elements at the end of each row of the second source, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
conversionFlag | The conversion to be applied |
firstRow | First row to be handled |
numberRows | Number of rows to be handled |
TSource0 | Type of the first data source |
TSource1 | Type of the second data source |
TTarget | Type of the target |
TIntermediate | Type for the computation of intermediate result, e.g. if TSource0 and TSource1 are different |
tSourceChannels | Number of channels of the two sources, range: [1, infinity) |
tTargetChannels | Number of channels of the target, range: [1, infinity) |
tOperator | The operation (function) that is applied on both sources to yield the value for the target (called per pixel) |
|
static |
Applies a specific modifier function on each pixel.
source | The source frame providing the pixel information, must be valid |
target | The target frame receiving the pixel information, must be valid |
width | The width of the source frame in pixel, with range (0, infinity) |
height | The height of the source frame in pixel, with range (0, infinity) |
conversionFlag | The conversion to be applied |
worker | Optional worker object to distribute the computation |
T | Data type of each channel pixel value |
tChannels | Number of data channels, with range [1, infinity) |
tPixelFunction | Pixel modification function |
|
staticprotected |
Applies a specific modifier function on each pixel.
source | The source frame providing the pixel information, must be valid |
target | The target frame receiving the pixel information, must be valid |
width | The width of the source frame in pixel |
height | The height of the source frame in pixel |
conversionFlag | The conversion to be applied |
firstRow | First row to be handled |
numberRows | Number of rows to be handled |
T | Data type of each channel pixel value |
tChannels | Number of data channels, with range [1, infinity) |
tPixelFunction | Pixel modification function |
|
static |
Applies a row operator to all rows of a source image.
The row operator is given as function pointer and is intended to transform a source row to a target row.
The function allows to implement e.g., frame filters with few lines of code, source and target frame must have the same size.
source | The source frame to which the row operator is applied, must be valid |
target | The target frame receiving the result of the row operator, must be valid |
width | The width of the source frame and target frame in pixel, with range [1, infinity) |
height | The height of the source frame and target frame in pixel, with range [1, infinity) |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
rowOperatorFunction | The pointer to the row operator function, must be valid |
worker | Optional worker object to distribute the computation |
TSource | The data type of the source elements |
TTarget | The data type of the target elements |
tSourceChannels | The number of channels the source frame has, with range [1, infinity) |
tTargetChannels | The number of channels the target frame has, with range [1, infinity) |
|
staticprotected |
Applies a row operator to a subset of all rows of a source image.
The row operator is given as function pointer and is intended to transform a source row to a target row.
The function allows to implement e.g., frame filters with few lines of code, source and target frame must have the same size.
source | The source frame to which the row operator is applied, must be valid |
target | The target frame receiving the result of the row operator, must be valid |
width | The width of the source frame and target frame in pixel, with range [1, infinity) |
height | The height of the source frame and target frame in pixel, with range [1, infinity) |
sourceStrideElements | The number of stride elements at the end of each source row, in elements, with range [width * tSourceChannels, infinity) |
targetStrideElements | The number of padding elements at the end of each target row, in elements, with range [width * tTargetChannels, infinity) |
rowOperatorFunction | The pointer to the row operator function, must be valid |
firstRow | The first row to be handled, with range [0, height - 1] |
numberRows | The number of rows to be handled, with range [1, height - firstRow] |
TSource | The data type of the source elements |
TTarget | The data type of the target elements |
tSourceChannels | The number of channels the source frame has, with range [1, infinity) |
tTargetChannels | The number of channels the target frame has, with range [1, infinity) |
|
staticprotected |
Converts 16 pixels with 3 channels per pixel to 16 pixels with one channel per pixel by a linear combination of the three channels.
This function can be used to e.g., convert RGB24 to Y8, or RGB24 to Y8. The linear combination is defined by one integer multiplication factor for each channel with 128 as denominator.
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
source | The pointer to the 16 source pixels (with 3 channels = 64 bytes) to convert, must be valid |
target | The pointer to the 16 target pixels (with 1 channel = 16 bytes) receiving the converted pixel data, must be valid |
multiplicationFactors0_128_u_16x8 | The multiplication factor for the first channel (8 identical 16 bit values), with ranges [0, 128], while the sum of all three factors must be 128 |
multiplicationFactors1_128_u_16x8 | The multiplication factor for the second channel (8 identical 16 bit values), with ranges [0, 128], while the sum of all three factors must be 128 |
multiplicationFactors2_128_u_16x8 | The multiplication factor for the third channel (8 identical 16 bit values), with ranges [0, 128], while the sum of all three factors must be 128 |
|
staticprotected |
Converts 8 pixels with 3 channels per pixel to 8 pixels with one channel per pixel by a linear combination of the three channels.
Thus, this function can be used to e.g., convert RGB24 to Y8, or BGR24 to Y8. The linear combination is defined by one integer multiplication factor for each channel with 128 as denominator.
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
source | The pointer to the 8 source pixels (with 3 channels = 24 bytes) to convert, must be valid |
target | The pointer to the 8 target pixels (with 1 channel = 8 bytes) receiving the converted pixel data, must be valid |
factorChannel0_128_u_8x8 | The multiplication factor (8 identical factors) for the first channel, with range [0, 128] |
factorChannel1_128_u_8x8 | The multiplication factor (8 identical factors) for the second channel, with range [0, 128 - factorChannel0 - factorChannel2] |
factorChannel2_128_u_8x8 | The multiplication factor (8 identical factors) for the third channel, with range [0, 128 - factorChannel0 - factorChannel1] |
tUseFactorChannel0 | True, if the value(s) of factorChannel0 is not zero; False, if the value(s) of factorChannel0 is zero |
tUseFactorChannel1 | True, if the value(s) of factorChannel1 is not zero; False, if the value(s) of factorChannel1 is zero |
tUseFactorChannel2 | True, if the value(s) of factorChannel2 is not zero; False, if the value(s) of factorChannel2 is zero |
void Ocean::CV::FrameChannels::convert3ChannelsTo1Channel8Pixels8BitPerChannel7BitPrecisionNEON | ( | const uint8_t *const | source, |
uint8_t *const | target, | ||
const uint8x8_t & | factorChannel0_128_u_8x8, | ||
const uint8x8_t & | factorChannel1_128_u_8x8, | ||
const uint8x8_t & | factorChannel2_128_u_8x8 | ||
) |
|
staticprotected |
Converts 8 pixels with 3 channels per pixel to 16 pixels with three channel per pixel by a linear combination of the three channels plus a bias (translation) parameter.
Thus, this function can be used to e.g., convert YUV24 to RGB24, or YVU24 to BGR24. The linear combination is defined by three integer multiplication factor for each source channel with 1024 as denominator. plus one bias (translation) parameter for each source channel (also with 1024 as denominator).
Beware: As this function applies integer multiplication factors (with 10 bits precision) the conversion result has an accuracy of +/- 1 color intensities.
The transformation is based on the following pattern:
t0 = f00 * s0 + f01 * s1 + f02 * s2 + b0 t1 = f10 * s0 + f11 * s1 + f12 * s2 + b1 t2 = f20 * s0 + f21 * s1 + f22 * s2 + b2
With t target, s source, f factor, and b bias.
source | The pointer to the 16 source pixels (with 3 channels = 24 bytes) to convert, must be valid |
target | The pointer to the 16 target pixels (with 3 channels = 24 bytes) receiving the converted pixel data, must be valid |
factorChannel00_1024_s_16x4 | The multiplication factor (4 identical factors) for the first source channel and for the first target channel, with range [-32767, 32767] |
factorChannel10_1024_s_16x4 | The multiplication factor (4 identical factors) for the first source channel and for the second target channel, with range [-32767, 32767] |
factorChannel20_1024_s_16x4 | The multiplication factor (4 identical factors) for the first source channel and for the third target channel, with range [-32767, 32767] |
factorChannel01_1024_s_16x4 | The multiplication factor (4 identical factors) for the second source channel and for the first target channel, with range [-32767, 32767] |
factorChannel11_1024_s_16x4 | The multiplication factor (4 identical factors) for the second source channel and for the second target channel, with range [-32767, 32767] |
factorChannel21_1024_s_16x4 | The multiplication factor (4 identical factors) for the second source channel and for the third target channel, with range [-32767, 32767] |
factorChannel02_1024_s_16x4 | The multiplication factor (4 identical factors) for the third source channel and for the first target channel, with range [-32767, 32767] |
factorChannel12_1024_s_16x4 | The multiplication factor (4 identical factors) for the third source channel and for the second target channel, with range [-32767, 32767 |
factorChannel22_1024_s_16x4 | The multiplication factor (4 identical factors) for the third source channel and for the third target channel, with range [-32767, 32767] |
biasChannel0_1024_s_32x4 | The bias (translation) value for the first target channel, with range [-32767, 32767] |
biasChannel1_1024_s_32x4 | The bias (translation) value for the second target channel, with range [-32767, 32767] |
biasChannel2_1024_s_32x4 | The bias (translation) value for the third target channel, with range [-32767, 32767] |
|
staticprotected |
Converts 16 pixels with 3 channels per pixel to 16 pixels with three channel per pixel by a linear combination of the three channels plus a bias (translation) parameter.
Thus, this function can be used to e.g., convert RGB24 to YUV24, or YUV24 to RGB24. The linear combination is defined by three integer multiplication factor for each source channel with 1024 as denominator. plus one bias (translation) parameter for each source channel (with 1 as denominator).
Beware: As this function applies integer multiplication factors (with 10 bits precision) the conversion result has an accuracy of +/- 1 color intensities.
The transformation is based on the following pattern:
t0 = f00 * s0 + f01 * s1 + f02 * s2 + b0 t1 = f10 * s0 + f11 * s1 + f12 * s2 + b1 t2 = f20 * s0 + f21 * s1 + f22 * s2 + b2
With t target, s source, f factor, and b bias.
source | The pointer to the 16 source pixels (with 3 channels = 48 bytes) to convert, must be valid |
target | The pointer to the 16 target pixels (with 3 channels = 48 bytes) receiving the converted pixel data, must be valid |
factorChannel00_1024_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the first target channel, with range [-1024 * 16, 1024 * 16] |
factorChannel10_1024_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the second target channel, with range [-1024 * 16, 1024 * 16] |
factorChannel20_1024_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the third target channel, with range [-1024 * 16, 1024 * 16] |
factorChannel01_1024_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the first target channel, with range [-1024 * 16, 1024 * 16] |
factorChannel11_1024_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the second target channel, with range [-1024 * 16, 1024 * 16] |
factorChannel21_1024_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the third target channel, with range [-1024 * 16, 1024 * 16] |
factorChannel02_1024_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the first target channel, with range [-1024 * 16, 1024 * 16] |
factorChannel12_1024_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the second target channel, with range [-1024 * 16, 1024 * 16] |
factorChannel22_1024_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the third target channel, with range [-1024 * 16, 1024 * 16] |
biasChannel0_1024_s_32x4 | The bias (translation) value for the first target channel, with range [-1024 * 16, 1024 * 16] |
biasChannel1_1024_s_32x4 | The bias (translation) value for the second target channel, with range [-1024 * 16, 1024 * 16] |
biasChannel2_1024_s_32x4 | The bias (translation) value for the third target channel, with range [-1024 * 16, 1024 * 16] |
precise color space conversion:
|
staticprotected |
Converts 16 pixels with 3 channels per pixel to 16 pixels with three channel per pixel by a linear combination of the three channels plus an in advance bias (translation) parameter.
Thus, this function can be used to e.g., convert RGB24 to YUV24, or RGB24 to YUV24. The linear combination is defined by three integer multiplication factor for each source channel with 64 as denominator. plus one bias (translation) parameter for each source channel (with 1 as denominator).
Beware: As this function applies integer multiplication factors (with 6 bits precision) the conversion result has an accuracy of +/- 4 color intensities.
The transformation is based on the following pattern:
t0 = clamp(0, f00 * (s0 - b0) + f01 * (s1 - b1) + f02 * (s2 - b2), 255) t1 = clamp(0, f10 * (s0 - b0) + f11 * (s1 - b1) + f12 * (s2 - b2), 255) t2 = clamp(0, f20 * (s0 - b0) + f21 * (s1 - b1) + f22 * (s2 - b2), 255)
With t target, s source, f factor, and b bias/translation.
source | The pointer to the 16 source pixels (with 3 channels = 48 bytes) to convert, must be valid |
target | The pointer to the 16 target pixels (with 3 channels = 48 bytes) receiving the converted pixel data, must be valid |
factorChannel00_64_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the first target channel, with range [-127, 127] |
factorChannel10_64_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the second target channel, with range [-127, 127] |
factorChannel20_64_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the third target channel, with range [-127, 127] |
factorChannel01_64_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the first target channel, with range [-127, 127] |
factorChannel11_64_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the second target channel, with range [-127, 127] |
factorChannel21_64_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the third target channel, with range [-127, 127] |
factorChannel02_64_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the first target channel, with range [-127, 127] |
factorChannel12_64_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the second target channel, with range [-127, 127] |
factorChannel22_64_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the third target channel, with range [-127, 127] |
biasChannel0_u_8x8 | The bias (translation) value for the first target channel, with range [0, 128] |
biasChannel1_u_8x8 | The bias (translation) value for the second target channel, with range [0, 128] |
biasChannel2_u_8x8 | The bias (translation) value for the third target channel, with range [0, 128] |
|
staticprotected |
Converts 16 pixels with 3 channels per pixel to 16 pixels with 3 channels per pixel by a linear combination of the three channels plus a bias (translation) parameter.
Thus, this function can be used to e.g., convert RGB24 to YUV24, or YUV24 to RGB24. The linear combination is defined by three integer multiplication factor for each source channel with 128 as denominator. plus one bias (translation) parameter for each source channel (with 128 as denominator).
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
The transformation is based on the following pattern:
t0 = f00 * s0 + f01 * s1 + f02 * s2 + b0 t1 = f10 * s0 + f11 * s1 + f12 * s2 + b1 t2 = f20 * s0 + f21 * s1 + f22 * s2 + b2
With t target, s source, f factor, and b bias.
source | The pointer to the 16 source pixels (with 3 channels = 48 bytes) to convert, must be valid |
target | The pointer to the 16 target pixels (with 3 channels = 48 bytes) receiving the converted pixel data, must be valid |
factorChannel00_128_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the first target channel, with range [-127, 127] |
factorChannel10_128_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the second target channel, with range [-127, 127] |
factorChannel20_128_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the third target channel, with range [-127, 127] |
factorChannel01_128_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the first target channel, with range [-127, 127] |
factorChannel11_128_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the second target channel, with range [-127, 127] |
factorChannel21_128_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the third target channel, with range [-127, 127] |
factorChannel02_128_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the first target channel, with range [-127, 127] |
factorChannel12_128_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the second target channel, with range [-127, 127 |
factorChannel22_128_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the third target channel, with range [-127, 127] |
biasChannel0_128_s_16x8 | The bias (translation) value for the first target channel, with range [-128 * 128, 128 * 128] |
biasChannel1_128_s_16x8 | The bias (translation) value for the second target channel, with range [-128 * 128, 128 * 128] |
biasChannel2_128_s_16x8 | The bias (translation) value for the third target channel, with range [-128 * 128, 128 * 128] |
|
staticprotected |
Converts 16 pixels with 3 channels per pixel to 16 pixels with three channel per pixel by a linear combination of the three channels plus a bias (translation) parameter.
Thus, this function can be used to e.g., convert RGB24 to YUV24, or YUV24 to RGB24. The linear combination is defined by three integer multiplication factor for each source channel with 128 as denominator. plus one bias (translation) parameter for each source channel (with 1 as denominator).
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
The transformation is based on the following pattern:
t0 = f00 * s0 + f01 * s1 + f02 * s2 + b0 t1 = f10 * s0 + f11 * s1 + f12 * s2 + b1 t2 = f20 * s0 + f21 * s1 + f22 * s2 + b2
With t target, s source, f factor, and b bias.
source | The pointer to the 16 source pixels (with 3 channels = 48 bytes) to convert, must be valid |
target | The pointer to the 16 target pixels (with 3 channels = 48 bytes) receiving the converted pixel data, must be valid |
factorChannel00_128_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the first target channel, with range [-127, 127] |
factorChannel10_128_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the second target channel, with range [-127, 127] |
factorChannel20_128_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the third target channel, with range [-127, 127] |
factorChannel01_128_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the first target channel, with range [-127, 127] |
factorChannel11_128_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the second target channel, with range [-127, 127] |
factorChannel21_128_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the third target channel, with range [-127, 127] |
factorChannel02_128_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the first target channel, with range [-127, 127] |
factorChannel12_128_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the second target channel, with range [-127, 127 |
factorChannel22_128_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the third target channel, with range [-127, 127] |
biasChannel0_s_16x8 | The bias (translation) value for the first target channel, with range [-127, 127] |
biasChannel1_s_16x8 | The bias (translation) value for the second target channel, with range [-127, 127] |
biasChannel2_s_16x8 | The bias (translation) value for the third target channel, with range [-127, 127] |
|
staticprotected |
Converts 8 pixels with 3 channels per pixel to 8 pixels with three channel per pixel by a linear combination of the three channels plus a bias (translation) parameter.
Thus, this function can be used to e.g., convert YUV24 to RGB24, or YVU24 to BGR24. The linear combination is defined by three integer multiplication factor for each source channel with 1024 as denominator. plus one bias (translation) parameter for each source channel (also with 1024 as denominator).
Beware: As this function applies integer multiplication factors (with 10 bits precision) the conversion result has an accuracy of +/- 1 color intensities.
The transformation is based on the following pattern:
t0 = f00 * s0 + f01 * s1 + f02 * s2 + b0 t1 = f10 * s0 + f11 * s1 + f12 * s2 + b1 t2 = f20 * s0 + f21 * s1 + f22 * s2 + b2
With t target, s source, f factor, and b bias.
source | The pointer to the 8 source pixels (with 3 channels = 24 bytes) to convert, must be valid |
target | The pointer to the 8 target pixels (with 3 channels = 24 bytes) receiving the converted pixel data, must be valid |
factorChannel00_1024_s_16x4 | The multiplication factor (4 identical factors) for the first source channel and for the first target channel, with range [-32767, 32767] |
factorChannel10_1024_s_16x4 | The multiplication factor (4 identical factors) for the first source channel and for the second target channel, with range [-32767, 32767] |
factorChannel20_1024_s_16x4 | The multiplication factor (4 identical factors) for the first source channel and for the third target channel, with range [-32767, 32767] |
factorChannel01_1024_s_16x4 | The multiplication factor (4 identical factors) for the second source channel and for the first target channel, with range [-32767, 32767] |
factorChannel11_1024_s_16x4 | The multiplication factor (4 identical factors) for the second source channel and for the second target channel, with range [-32767, 32767] |
factorChannel21_1024_s_16x4 | The multiplication factor (4 identical factors) for the second source channel and for the third target channel, with range [-32767, 32767] |
factorChannel02_1024_s_16x4 | The multiplication factor (4 identical factors) for the third source channel and for the first target channel, with range [-32767, 32767] |
factorChannel12_1024_s_16x4 | The multiplication factor (4 identical factors) for the third source channel and for the second target channel, with range [-32767, 32767 |
factorChannel22_1024_s_16x4 | The multiplication factor (4 identical factors) for the third source channel and for the third target channel, with range [-32767, 32767] |
biasChannel0_1024_s_32x4 | The bias (translation) value for the first target channel, with range [-32767, 32767] |
biasChannel1_1024_s_32x4 | The bias (translation) value for the second target channel, with range [-32767, 32767] |
biasChannel2_1024_s_32x4 | The bias (translation) value for the third target channel, with range [-32767, 32767] |
|
staticprotected |
Converts 8 pixels with 3 channels per pixel to 8 pixels with three channel per pixel by a linear combination of the three channels plus an in advance bias (translation) parameter.
Thus, this function can be used to e.g., convert RGB24 to YUV24, or RGB24 to YUV24. The linear combination is defined by three integer multiplication factor for each source channel with 64 as denominator. plus one bias (translation) parameter for each source channel (with 1 as denominator).
Beware: As this function applies integer multiplication factors (with 6 bits precision) the conversion result has an accuracy of +/- 4 color intensities.
The transformation is based on the following pattern:
t0 = clamp(0, f00 * (s0 - b0) + f01 * (s1 - b1) + f02 * (s2 - b2), 255) t1 = clamp(0, f10 * (s0 - b0) + f11 * (s1 - b1) + f12 * (s2 - b2), 255) t2 = clamp(0, f20 * (s0 - b0) + f21 * (s1 - b1) + f22 * (s2 - b2), 255)
With t target, s source, f factor, and b bias/translation.
source | The pointer to the 8 source pixels (with 3 channels = 24 bytes) to convert, must be valid |
target | The pointer to the 8 target pixels (with 3 channels = 24 bytes) receiving the converted pixel data, must be valid |
factorChannel00_64_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the first target channel, with range [-127, 127] |
factorChannel10_64_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the second target channel, with range [-127, 127] |
factorChannel20_64_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the third target channel, with range [-127, 127] |
factorChannel01_64_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the first target channel, with range [-127, 127] |
factorChannel11_64_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the second target channel, with range [-127, 127] |
factorChannel21_64_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the third target channel, with range [-127, 127] |
factorChannel02_64_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the first target channel, with range [-127, 127] |
factorChannel12_64_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the second target channel, with range [-127, 127] |
factorChannel22_64_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the third target channel, with range [-127, 127] |
biasChannel0_u_8x8 | The bias (translation) value for the first target channel, with range [0, 128] |
biasChannel1_u_8x8 | The bias (translation) value for the second target channel, with range [0, 128] |
biasChannel2_u_8x8 | The bias (translation) value for the third target channel, with range [0, 128] |
|
staticprotected |
Converts 8 pixels with 3 channels per pixel to 8 pixels with three channel per pixel by a linear combination of the three channels plus a bias (translation) parameter.
Thus, this function can be used to e.g., convert RGB24 to YUV24, or YUV24 to RGB24. The linear combination is defined by three integer multiplication factor for each source channel with 128 as denominator. plus one bias (translation) parameter for each source channel (also with 128 as denominator).
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
The transformation is based on the following pattern:
t0 = f00 * s0 + f01 * s1 + f02 * s2 + b0 t1 = f10 * s0 + f11 * s1 + f12 * s2 + b1 t2 = f20 * s0 + f21 * s1 + f22 * s2 + b2
With t target, s source, f factor, and b bias.
source | The pointer to the 8 source pixels (with 3 channels = 24 bytes) to convert, must be valid |
target | The pointer to the 8 target pixels (with 3 channels = 24 bytes) receiving the converted pixel data, must be valid |
factorChannel00_128_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the first target channel, with range [-127, 127] |
factorChannel10_128_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the second target channel, with range [-127, 127] |
factorChannel20_128_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the third target channel, with range [-127, 127] |
factorChannel01_128_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the first target channel, with range [-127, 127] |
factorChannel11_128_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the second target channel, with range [-127, 127] |
factorChannel21_128_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the third target channel, with range [-127, 127] |
factorChannel02_128_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the first target channel, with range [-127, 127] |
factorChannel12_128_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the second target channel, with range [-127, 127] |
factorChannel22_128_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the third target channel, with range [-127, 127] |
biasChannel0_128_s_16x8 | The bias (translation) value for the first target channel, with range [-128 * 128, 128 * 128] |
biasChannel1_128_s_16x8 | The bias (translation) value for the second target channel, with range [-128 * 128, 128 * 128] |
biasChannel2_128_s_16x8 | The bias (translation) value for the third target channel, with range [-128 * 128, 128 * 128] |
|
staticprotected |
Converts 16 pixels with 3 channels per pixel to 16 pixels with 4 channels per pixel by a linear combination of the three channels plus a bias (translation) parameter.
The fourth channel is set to a constant value, e.g., for an alpha channel.
Thus, this function can be used to e.g., convert YUV24 to RGBA32, or YVU24 to BGRA32.
The linear combination is defined by three integer multiplication factor for each source channel with 128 as denominator. plus one bias (translation) parameter for each source channel (with 128 as denominator).
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
The transformation is based on the following pattern:
t0 = f00 * s0 + f01 * s1 + f02 * s2 + b0 t1 = f10 * s0 + f11 * s1 + f12 * s2 + b1 t2 = f20 * s0 + f21 * s1 + f22 * s2 + b2 t3 = valueChannel3
With t target, s source, f factor, and b bias.
source | The pointer to the 16 source pixels (with 3 channels = 48 bytes) to convert, must be valid |
target | The pointer to the 16 target pixels (with 3 channels = 48 bytes) receiving the converted pixel data, must be valid |
factorChannel00_64_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the first target channel, with range [-127, 127] |
factorChannel10_64_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the second target channel, with range [-127, 127] |
factorChannel20_64_s_16x8 | The multiplication factor (8 identical factors) for the first source channel and for the third target channel, with range [-127, 127] |
factorChannel01_64_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the first target channel, with range [-127, 127] |
factorChannel11_64_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the second target channel, with range [-127, 127] |
factorChannel21_64_s_16x8 | The multiplication factor (8 identical factors) for the second source channel and for the third target channel, with range [-127, 127] |
factorChannel02_64_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the first target channel, with range [-127, 127] |
factorChannel12_64_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the second target channel, with range [-127, 127 |
factorChannel22_64_s_16x8 | The multiplication factor (8 identical factors) for the third source channel and for the third target channel, with range [-127, 127] |
biasChannel0_u_8x8 | The bias (translation) value for the first target channel, with range [0, 128] |
biasChannel1_u_8x8 | The bias (translation) value for the second target channel, with range [0, 128] |
biasChannel2_u_8x8 | The bias (translation) value for the third target channel, with range [0, 138] |
channelValue3_u_8x16 | The constant value for the fourth target channel, with range [0, 255] |
|
staticprotected |
Converts 16 pixels with 4 channels per pixel to 16 pixels with one channel per pixel by a linear combination of the four channels.
This function can be used to e.g., convert RGBA32 to Y8, or ARGB32 to Y8, or RGB32 to Y8. The linear combination is defined by one integer multiplication factor for each channel with 128 as denominator.
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
source | The pointer to the 16 source pixels (with 4 channels = 64 bytes) to convert, must be valid |
target | The pointer to the 16 target pixels (with 1 channel = 16 bytes) receiving the converted pixel data, must be valid |
multiplicationFactors0123_128_s_32x | The four individual multiplication factors, one for each channel, with ranges [0, 127], while the sum of all four factors must be 128 |
|
staticprotected |
Converts 8 pixels with 4 channels per pixel to 8 pixels with one channel per pixel by a linear combination of the four channels.
Thus, this function can be used to e.g., convert RGBA32 to Y8, or ARGB32 to Y8, or RGB32 to Y8. The linear combination is defined by one integer multiplication factor for each channel with 128 as denominator.
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
source | The pointer to the 8 source pixels (with 4 channels = 32 bytes) to convert, must be valid |
target | The pointer to the 8 target pixels (with 1 channel = 8 bytes) receiving the converted pixel data, must be valid |
factorChannel0_128_u_8x8 | The multiplication factor (8 identical factors) for the first channel, with range [0, 127] |
factorChannel1_128_u_8x8 | The multiplication factor (8 identical factors) for the second channel, with range [0, 127 - factorChannel0 - factorChannel2 - factorChannel3] |
factorChannel2_128_u_8x8 | The multiplication factor (8 identical factors) for the third channel, with range [0, 127 - factorChannel0 - factorChannel1 - factorChannel3] |
factorChannel3_128_u_8x8 | The multiplication factor (8 identical factors) for the fourth channel, with range [0, 127 - factorChannel0 - factorChannel1 - factorChannel2] |
tUseFactorChannel0 | True, if the value(s) of factorChannel0 is not zero; False, if the value(s) of factorChannel0 is zero |
tUseFactorChannel1 | True, if the value(s) of factorChannel1 is not zero; False, if the value(s) of factorChannel1 is zero |
tUseFactorChannel2 | True, if the value(s) of factorChannel2 is not zero; False, if the value(s) of factorChannel2 is zero |
tUseFactorChannel3 | True, if the value(s) of factorChannel3 is not zero; False, if the value(s) of factorChannel3 is zero |
void Ocean::CV::FrameChannels::convert4ChannelsTo1Channel8Pixels8BitPerChannel7BitPrecisionNEON | ( | const uint8_t *const | source, |
uint8_t *const | target, | ||
const uint8x8_t & | factorChannel0_128_u_8x8, | ||
const uint8x8_t & | factorChannel1_128_u_8x8, | ||
const uint8x8_t & | factorChannel2_128_u_8x8, | ||
const uint8x8_t & | factorChannel3_128_u_8x8 | ||
) |
|
staticprotected |
Converts 16 pixels with 4 channels per pixel to 16 pixels with two channel per pixel by a linear combination of the four channels.
This function can be used to e.g., convert RGBA32 to YA16, or ARGB32 to AY16. The linear combination is defined by one integer multiplication factor for each channel with 128 as denominator.
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
source | The pointer to the 16 source pixels (with 4 channels = 64 bytes) to convert, must be valid |
target | The pointer to the 16 target pixels (with 2 channel = 32 bytes) receiving the converted pixel data, must be valid |
multiplicationFactorsChannel0_0123_128_s_16x8 | The four individual multiplication factors for the first target channel (two sets), one for each source channel, with ranges [0, 128], while the sum of all four factors must be 128 |
multiplicationFactorsChannel1_0123_128_s_16x8 | The four individual multiplication factors for the second target channel (two sets), one for each source channel, with ranges [0, 128], while the sum of all four factors must be 128 |
|
staticprotected |
Converts 8 pixels with 4 channels per pixel to 8 pixels with two channels per pixel by a linear combination of the four channels.
Thus, this function can be used to e.g., convert RGBA32 to YA16, or ARGB32 to AY16. The linear combination is defined by one integer multiplication factor for each channel with 128 as denominator.
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
source | The pointer to the 8 source pixels (with 4 channels = 32 bytes) to convert, must be valid |
target | The pointer to the 8 target pixels (with 1 channel = 8 bytes) receiving the converted pixel data, must be valid |
factorChannel00_128_u_8x8 | The multiplication factor (8 identical factors) for the first target and first source channel, with range [0, 127] |
factorChannel10_128_u_8x8 | The multiplication factor (8 identical factors) for the second target and first source channel, with range [0, 127] |
factorChannel01_128_u_8x8 | The multiplication factor (8 identical factors) for the first target and second source channel, with range [0, 127 - factorChannel00 - factorChannel02 - factorChannel03] |
factorChannel11_128_u_8x8 | The multiplication factor (8 identical factors) for the second target and second source channel, with range [0, 127 - factorChannel10 - factorChannel12 - factorChannel13] |
factorChannel02_128_u_8x8 | The multiplication factor (8 identical factors) for the first target and third source channel, with range [0, 127 - factorChannel00 - factorChannel01 - factorChannel03] |
factorChannel12_128_u_8x8 | The multiplication factor (8 identical factors) for the second target and third source channel, with range [0, 127 - factorChannel10 - factorChannel11 - factorChannel13] |
factorChannel03_128_u_8x8 | The multiplication factor (8 identical factors) for the first target and fourth source channel, with range [0, 127 - factorChannel00 - factorChannel01 - factorChannel02] |
factorChannel13_128_u_8x8 | The multiplication factor (8 identical factors) for the second target and fourth source channel, with range [0, 127 - factorChannel10 - factorChannel11 - factorChannel12] |
|
static |
Converts a row of pixels with 3 channels to pixels with one channel by a linear combination of the four channels.
This function can be used to e.g., convert RGB24 to Y8, or BGR24 to Y8. The linear combination is defined by one integer multiplication factor for each channel with 128 as denominator.
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels receiving the converted pixel data, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
channelMultiplicationFactors_128 | The three uint32_t multiplication factors, one for each channel, with range [0, 128], while the sum of all four factors must be 128, must be valid |
tUseFactorChannel0 | True, if the value(s) of factorChannel0 is not zero; False, if the value(s) of factorChannel0 is zero |
tUseFactorChannel1 | True, if the value(s) of factorChannel1 is not zero; False, if the value(s) of factorChannel1 is zero |
tUseFactorChannel2 | True, if the value(s) of factorChannel2 is not zero; False, if the value(s) of factorChannel2 is zero |
|
static |
Converts a row of pixels with 3 channels to pixels with 3 channels by a linear combination of the three channels plus a bias (translation) part.
This function can be used to e.g., convert YUV24 to RGB24, or YVU24 to BGR24. The linear combination is defined by three integer multiplication factor for each source channel with 1024 as denominator. plus one bias (translation) parameter for each source channel (with 1 as denominator).
Beware: As this function applies integer multiplication factors (with 10 bits precision) the conversion result has an accuracy of +/- 1 color intensities.
The transformation is based on the following pattern:
t0 = clamp(0, f00 * s0 + f01 * s1 + f02 * s2 + b0, 255) t1 = clamp(0, f10 * s0 + f11 * s1 + f12 * s2 + b1, 255) t2 = clamp(0, f20 * s0 + f21 * s1 + f22 * s2 + b2, 255)
With t target, s source, f factor, and b bias.
Factors must be specified in relation to a denominator of 1024, bias values must be specified with a denominator of 1.
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels receiving the converted pixel data, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
parameters | The 12 int32_t parameters of the column-aligned 3x4 transformation matrix: f00_1024, f10_1024, f20_1024, f01_1024, f02_1024, ..., f22_1024, b0, b1, b2, with ranges [-1024 * 16, 1024 * 16] |
|
static |
Converts a row of pixels with 3 channels to pixels with 3 channels by a linear combination of the three channels plus an translational part applied to the source data before applying the linear transformation.
This function can be used to e.g., convert RGB24 to YUV24, or YUV24 to RGB24. The linear combination is defined by three integer multiplication factor for each source channel with 64 as denominator, plus one translation parameter for each source channel (with 1 as denominator).
Beware: As this function applies integer multiplication factors (with 6 bits precision) the conversion result has an accuracy of +/- 4 color intensities.
The transformation is based on the following pattern:
t0 = clamp(0, f00 * (s0 - b0) + f01 * (s1 - b1) + f02 * (s2 - b2), 255) t1 = clamp(0, f10 * (s0 - b0) + f11 * (s1 - b1) + f12 * (s2 - b2), 255) t2 = clamp(0, f20 * (s0 - b0) + f21 * (s1 - b1) + f22 * (s2 - b2), 255)
With t target, s source, f factor, and b bias/translation.
Factors must be specified in relation to a denominator of 64, bias values must be specified with a denominator of 1.
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels receiving the converted pixel data, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
parameters | The 12 int32_t parameters of the column-aligned 3x3 transformation matrix, plus 3 translation parameters: f00_64, f10_64, f20_64, f01_64, f02_64, ..., f22_64, with ranges [-128, 128], b0, b1, b2, with ranges [0, 128] |
|
static |
Converts a row of pixels with 3 channels to pixels with 3 channels by a linear combination of the three channels plus a bias (translation) part.
This function can be used to e.g., convert RGB24 to YUV24, or BGR24 to YVU24. The linear combination is defined by three integer multiplication factor for each source channel with 128 as denominator, plus one bias (translation) parameter for each source channel (with 1 as denominator).
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
The transformation is based on the following pattern:
t0 = clamp(0, f00 * s0 + f01 * s1 + f02 * s2 + b0, 255) t1 = clamp(0, f10 * s0 + f11 * s1 + f12 * s2 + b1, 255) t2 = clamp(0, f20 * s0 + f21 * s1 + f22 * s2 + b2, 255)
With t target, s source, f factor, and b bias.
Factors must be specified in relation to a denominator of 128, bias values must be specified with a denominator of 1.
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels receiving the converted pixel data, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
parameters | The 12 int32_t parameters of the column-aligned 3x4 transformation matrix: f00_128, f10_128, f20_128, f01_128, f02_128, ..., f22_128, b0, b1, b2, with ranges [-127, 127] |
|
static |
Converts a row of pixels with 3 channels to pixels with 4 channels by a linear combination of the three channels plus an translational part applied to the source data before applying the linear transformation (for the first three channels).
The fourth channel is set to a constant value, e.g., for an alpha channel.
This function can be used to e.g., convert YUV24 to RGBA32, or YVU24 to BGRA32.
The linear combination is defined by three integer multiplication factor for each source channel with 64 as denominator, plus one translation parameter for each source channel (with 1 as denominator).
Beware: As this function applies integer multiplication factors (with 6 bits precision) the conversion result has an accuracy of +/- 4 color intensities.
The transformation is based on the following pattern:
t0 = clamp(0, f00 * (s0 - b0) + f01 * (s1 - b1) + f02 * (s2 - b2), 255) t1 = clamp(0, f10 * (s0 - b0) + f11 * (s1 - b1) + f12 * (s2 - b2), 255) t2 = clamp(0, f20 * (s0 - b0) + f21 * (s1 - b1) + f22 * (s2 - b2), 255) t3 = valueChannel3
With t target, s source, f factor, and b bias/translation.
Factors must be specified in relation to a denominator of 64, bias values must be specified with a denominator of 1.
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels receiving the converted pixel data, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
parameters | The 13 int32_t parameters of the column-aligned 3x3 transformation matrix, plus 3 translation parameters: f00_64, f10_64, f20_64, f01_64, f02_64, ..., f22_64, with ranges [-128, 128], b0, b1, b2, with ranges [0, 128], valueChannel3, with range [0, 255] |
|
static |
Converts a row of pixels with 4 channels to pixels with one channel by a linear combination of the four channels.
This function can be used to e.g., convert RGBA32 to Y8, or ARGB32 to Y8, or RGB32 to Y8. The linear combination is defined by one integer multiplication factor for each channel with 128 as denominator.
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
t0 = f0 * s0 + f1 * s1 + f2 * s2 + f3 * s3
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels receiving the converted pixel data, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
channelMultiplicationFactors_128 | The four uint32_t multiplication factors, one for each channel, with range [0, 127], while the sum of all four factors must be 128, must be valid |
tUseFactorChannel0 | True, if the value(s) of factorChannel0 is not zero; False, if the value(s) of factorChannel0 is zero |
tUseFactorChannel1 | True, if the value(s) of factorChannel1 is not zero; False, if the value(s) of factorChannel1 is zero |
tUseFactorChannel2 | True, if the value(s) of factorChannel2 is not zero; False, if the value(s) of factorChannel2 is zero |
tUseFactorChannel3 | True, if the value(s) of factorChannel3 is not zero; False, if the value(s) of factorChannel3 is zero |
|
static |
Converts a row of pixels with 4 channels to pixels with two channel by a linear combination of the four channels.
This function can be used to e.g., convert RGBA32 to YA16, or ARGB32 to AY16. The linear combination is defined by one integer multiplication factor for each channel with 128 as denominator.
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities. The transformation is based on the following pattern:
t0 = f00 * s0 + f01 * s1 + f02 * s2 + f03 * s3 t1 = f10 * s0 + f11 * s1 + f12 * s2 + f13 * s3
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels receiving the converted pixel data, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
multiplicationFactors_128 | The 8 int32_t parameters of the column-aligned 2x4 transformation matrix: f00_128, f10_128, f01_128, ..., f13_128, with range [0, 127], while the sum of all four row factors must be 128, must be valid |
|
static |
Converts a row of pixels with 3 channels to pixels with 3 channels by a linear combination of the three channels plus a bias (translation) part.
This function can be used to e.g., convert RGBA32 to YUV24, or BGRA24 to YVU24. The linear combination is defined by three integer multiplication factor for each source channel with 128 as denominator, plus one bias (translation) parameter for each source channel (with 1 as denominator).
Beware: As this function applies integer multiplication factors (with 7 bits precision) the conversion result has an accuracy of +/- 2 color intensities.
The transformation is based on the following pattern:
t0 = clamp(0, f00 * s0 + f01 * s1 + f02 * s2 + f03 * s3 + b0, 255) t1 = clamp(0, f10 * s0 + f11 * s1 + f12 * s2 + f13 * s3 + b1, 255) t2 = clamp(0, f20 * s0 + f21 * s1 + f22 * s2 + f23 * s3 + b2, 255)
With t target, s source, f factor, and b bias.
Factors must be specified in relation to a denominator of 128, bias values must be specified with a denominator of 1.
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels receiving the converted pixel data, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
parameters | The 12 int32_t parameters of the column-aligned 3x4 transformation matrix: f00_128, f10_128, f20_128, f01_128, f02_128, ..., f23_128, b0, b1, b2, with ranges [-127, 127] |
|
inlinestatic |
Copies one channel from a given frame with zipped pixel format to another frame with zipped pixel format.
source | The source frame from that the channel will be copied, must be valid |
target | The target frame to which the channel will be copied, must be valid |
width | The width of both frames in pixel, with range [1, infinity) |
height | The height of both frames in pixel, with range [1, infinity) |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
T | Data type of each channel pixel value |
tSourceChannels | Number of channels in the source frame, with range [1, infinity) |
tTargetChannels | Number of channels in the target frame, with range [1, infinity) |
tSourceChannelIndex | The index of the source channel that will be copied, with range [0, tSourceChannels - 1] |
tTargetChannelIndex | The index of the target channel that will be copied, with range [0, tTargetChannels - 1] |
|
static |
Copies one channel from a source row to a target row with generic (zipped) pixel format.
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels, receiving the additional channels, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
T | Data type of each channel pixel value, e.g, 'uint8_t' or 'float' |
unusedParameters | Unused parameters, must be nullptr |
tSourceChannels | Number of channels of the source frame, with range [1, infinity) |
tTargetChannels | Number of channels of the target frame, with range [1, infinity) |
tSourceChannelIndex | The index of the source channel to be copied, with range [0, tSourceChannels - 1] |
tTargetChannelIndex | The index of the target channel to be copied, with range [0, tTargetChannels - 1] |
|
inlinestatic |
Narrows 16 bit channels of a frame to 8 bit channels.
source | The source frame for which the channels will be narrowed, must be valid |
target | The target frame that receives the narrowed channels, must be valid |
width | The width of the source frame in pixel, with range [1, infinity) |
height | The height of the source frame in pixel, with range [1, infinity) |
conversionFlag | The conversion to be applied |
sourcePaddingElements | Optional padding at the end of each source row in elements, with range [0, infinity) |
targetPaddingElements | Optional padding at the end of each target row in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
tChannels | Number of source data channels, with range [1, infinity) |
|
static |
Narrows a row of pixels with 16 bit channels to pixels with 8 bit channels.
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels receiving the converted pixel data, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
unusedParameters | Unused parameter, must be nullptr |
tChannels | The number of channels the source (and target) frame have, with range [1, infinity) |
|
inlinestatic |
Converts an image with premultiplied alpha to a straight image (without premultiplied alpha).
source | The source image to convert, must be valid |
target | The resulting converted target image, must be valid |
width | The width of the image in pixel, with range [1, infinity) |
height | The height of the image in pixel, with range [1, infinity) |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
tChannels | The number of frame channels, with range [2, infinity) |
tAlphaChannelIndex | The index of the alpha channel, with range [0, tChannels - 1] |
|
inlinestatic |
Converts an image with premultiplied alpha to a straight image (without premultiplied alpha).
frame | The image to convert, must be valid |
width | The width of the image in pixel, with range [1, infinity) |
height | The height of the image in pixel, with range [1, infinity) |
framePaddingElements | The number of padding elements at the end of each frame row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
tChannels | The number of frame channels, with range [2, infinity) |
tAlphaChannelIndex | The index of the alpha channel, with range [0, tChannels - 1] |
|
staticprotected |
Converts an image with premultiplied alpha to a straight image (without premultiplied alpha).
source | The source image to convert, must be valid |
target | The resulting converted target image, must be valid |
width | The width of the image in pixel, with range [1, infinity) |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
firstRow | The first row to be handled, with range [0, height - 1] |
numberRows | The number of rows to be handled, with range [1, height - firstRow] |
tChannels | The number of frame channels, with range [2, infinity) |
tAlphaChannelIndex | The index of the alpha channel, with range [0, tChannels - 1] |
|
staticprotected |
Converts an image with premultiplied alpha to a straight image (without premultiplied alpha).
frame | The image to convert, must be valid |
width | The width of the image in pixel, with range [1, infinity) |
framePaddingElements | The number of padding elements at the end of each frame row, in elements, with range [0, infinity) |
firstRow | The first row to be handled, with range [0, height - 1] |
numberRows | The number of rows to be handled, with range [1, height - firstRow] |
tChannels | The number of frame channels, with range [2, infinity) |
tAlphaChannelIndex | The index of the alpha channel, with range [0, tChannels - 1] |
|
inlinestatic |
Removes the first channel from a given frame with zipped (generic) pixel format.
This function is mainly a wrapper around FrameChannels::shuffleChannels().
source | The source frame from that the first channel will be removed, must be valid |
target | The target frame without the first channel, must be valid |
width | The width of the frames in pixel, with range [1, infinity) |
height | The height of the frames in pixel, with range [1, infinity) |
conversionFlag | The conversion to be applied |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
T | Data type of each channel pixel value |
tSourceChannels | Number of channels of the source frame (including the channel that will be removed), with range [2, infinity) |
|
inlinestatic |
Removes the last channel from a given frame with zipped (generic) pixel format.
This function is mainly a wrapper around FrameChannels::shuffleChannels().
source | The source frame from that the first channel will be removed, must be valid |
target | The target frame without the first channel, must be valid |
width | The width of the frames in pixel, with range [1, infinity) |
height | The height of the frames in pixel, with range [1, infinity) |
conversionFlag | The conversion to be applied |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
T | Data type of each channel pixel value |
tSourceChannels | Number of channels of the frame (including the channel that will be removed), with range [2, infinity) |
|
inlinestatic |
Reverses the order of the channels of a frame with zipped pixel format.
The first channel will be exchanged with the last channel, the second channel will be exchanged with the second last channel and so on.
source | The source frame from that the channels will be swapped, must be valid |
target | The target frame that receives the swapped channels, must be valid |
width | The width of the source frame in pixel, with range (0, infinity) |
height | The height of the source frame in pixel, with range (0, infinity) |
conversionFlag | The conversion to be applied |
sourcePaddingElements | Optional padding at the end of each source row in elements, with range [0, infinity) |
targetPaddingElements | Optional padding at the end of each target row in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
T | Data type of each channel pixel value |
tChannels | Number of data channels, with range [1, infinity) |
|
static |
Reverses/mirrors the order of channels in a given row (or a memory block in general).
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels receiving the reversed/mirrored channels, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
unusedOptions | An unused options parameters, must be nullptr |
T | The data type of the pixel elements, e.g, 'uint8_t', 'int' |
tChannels | The number of channels (the number of elements) each pixel has, with range [1, infinity) |
|
static |
Reverses/mirrors the order of pixels in a given row (or a memory block in general).
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels receiving the reversed/mirrored pixel data, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
T | The data type of the pixel elements, e.g, 'uint8_t', 'int' |
tChannels | The number of channels (the number of elements) each pixel has, with range [1, infinity) |
|
static |
Reverses/mirrors the order of pixels in a given row (or a memory block in general) in place.
data | The pointer to the pixels, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
T | The data type of the pixel elements, e.g, 'uint8_t', 'int' |
tChannels | The number of channels (the number of elements) each pixel has, with range [1, infinity) |
|
static |
Separates a given frame with zipped pixel format e.g., FORMAT_RGB24, FORMAT_YUV24, FORMAT_BGRA32 into individual frames with one channel only.
Usage:
sourceFrame | The frame to be separated, must be valid |
targetFrames | The pointers to the resulting separated frames each holding one channel of the source frame, with already allocated memory |
width | The width of the source frame in pixel, with range [1, infinity) |
height | The height of the source frame in pixel, with range [1, infinity) |
sourceFramePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetFramesPaddingElements | The array of padding elements at the end of each target row, one for each target frame, in elements, with range [0, infinity) |
TSource | The data type of each source pixel channel, e.g., 'uint8_t', 'float', ... |
TTarget | The data type of each target pixel channel, e.g., 'uint8_t', 'float', ... |
|
static |
Separates a given frame with zipped pixel format e.g., FORMAT_RGB24, FORMAT_YUV24, FORMAT_BGRA32 into individual frames with one channel only.
Usage:
sourceFrame | The frame to be separated, must be valid |
targetFrames | The pointers to the resulting separated frames each holding one channel of the source frame, with already allocated memory |
width | The width of the source frame in pixel, with range [1, infinity) |
height | The height of the source frame in pixel, with range [1, infinity) |
channels | The number of channels the source frame has, with range [1, infinity) |
sourceFramePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetFramesPaddingElements | The array of padding elements at the end of each target row, one for each target frame, in elements, with range [0, infinity), nullptr if all are zero |
TSource | The data type of each source pixel channel, e.g., 'uint8_t', 'float', ... |
TTarget | The data type of each target pixel channel, e.g., 'uint8_t', 'float', ... |
tChannels | The number of source frames (and target channels) if known at compile time; otherwise CHANNELS_NOT_KNOWN_AT_COMPILE_TIME == 0, if know at compile time must be identical with 'channels' |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
staticprotected |
Separates a given frame with zipped pixel format e.g., FORMAT_RGB24, FORMAT_YUV24, FORMAT_BGRA32 into individual frames with one channel only.
sourceFrame | The frame to be separated, must be valid |
targetFrames | The pointers to the resulting separated frames each holding one channel of the source frame, with already allocated memory |
width | The width of the source frame in pixel, with range [1, infinity) |
height | The height of the source frame in pixel, with range [1, infinity) |
channels | The number of channels the source frame has, with range [1, infinity) |
sourceFramePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetFramesPaddingElements | The array of padding elements at the end of each target row, one for each target frame, in elements, with range [0, infinity) |
TSource | The data type of each source pixel channel, e.g., 'uint8_t', 'float', ... |
TTarget | The data type of each target pixel channel, e.g., 'uint8_t', 'float', ... |
|
inlinestatic |
Sets one channel of a frame with a specific unique value.
frame | The frame in that one channel of each pixel will be set |
width | The width of the frame in pixel, with range [1, infinity) |
height | The height of the frame in pixel, with range [1, infinity) |
value | The value to be set |
framePaddingElements | The number of padding elements at the end of each frame row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
T | Data type of each channel pixel value |
tChannel | Index of the channel that will be inverted, with range [0, tChannels) |
tChannels | Number of data channels of the frames, with range [1, infinity) |
|
staticprotected |
Sets one channel of a frame with one unique value.
frame | The frame in that one channel of each pixel will be set, must be valid |
width | The width of the frame in pixel, with range [1, infinity) |
value | The value to be set |
framePaddingElements | The number of padding elements at the end of each frame row, in elements, with range [0, infinity) |
firstRow | First row to be handled |
numberRows | Number of rows to be handled |
T | Data type of each channel pixel value |
tChannel | Index of the channel that will be inverted, with range [0, tChannels) |
tChannels | Number of data channels of the frames, with range [1, infinity) |
|
inlinestatic |
Shuffles the channels of a frame by an arbitrary pattern.
The shuffle pattern is defined in groups of four bits defining the source channels.
For the shuffling from e.g., an RGBA32 row to a BGRA32 row the pattern 0x3012u must be defined:
source pixel R G B A 0 1 2 3 target pixel B G R A 2 1 0 3 pattern (with reversed order): 0x3012
source | The source frame for which the channels will be shuffled, must be valid |
target | The target frame that receives the shuffled channels, must be valid |
width | The width of the source frame in pixel, with range [1, infinity) |
height | The height of the source frame in pixel, with range [1, infinity) |
conversionFlag | The conversion to be applied |
sourcePaddingElements | Optional padding at the end of each source row in elements, with range [0, infinity) |
targetPaddingElements | Optional padding at the end of each target row in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
T | Data type of each channel pixel value |
tSourceChannels | Number of source data channels, with range [1, 8u] |
tTargetChannels | Number of target data channels, with range [1, 8u] |
tShufflePattern | Groups of four bits define the source channel, e.g., 0x76543210 defines the identity transformation, 0x01234567 defines the reverse transformation |
|
inlinestatic |
Shuffles the channels of source frame and sets the last channel with constant value in the target frame.
The shuffle pattern is defined in groups of four bits defining the source channels.
For the shuffling from e.g., an RGB24 row to a BGRA32 row the pattern 0x012u must be defined:
source pixel R G B 0 1 2 target pixel B G R A 2 1 0 pattern (with reversed order): 0x012
source | The source frame for which the channels will be shuffled, must be valid |
newChannelValue | The constant channel value which will be added as last channel to the target frame, with range [0, infinity) |
target | The target frame that receives the shuffled channels, must be valid |
width | The width of the source frame in pixel, with range [1, infinity) |
height | The height of the source frame in pixel, with range [1, infinity) |
conversionFlag | The conversion to be applied |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
T | Data type of each channel pixel value |
tSourceChannels | Number of source data channels, with range [1, 8u] |
tTargetChannels | Number of target data channels, including the additional extra target channel, with range [2, 8u] |
tShufflePattern | Groups of four bits define the source channel, e.g., 0x76543210 defines the identity transformation, 0x01234567 defines the reverse transformation |
|
inlinestatic |
Shuffles the channels of row pixels by application of a specified shuffle pattern.
The shuffle pattern is defined in groups of four bits defining the source channels.
For the shuffling from e.g., an RGBA32 row to a BGRA32 row the pattern 0x3012u must be defined:
source pixel R G B A 0 1 2 3 target pixel B G R A 2 1 0 3 pattern (with reversed order): 0x3012
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels, receiving the shuffled channels, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
unusedOptions | An unused options parameters, must be nullptr |
T | Data type of each channel pixel value, e.g, 'uint8_t' or 'float' |
tSourceChannels | Number of source data channels, with range [1, 8u] |
tTargetChannels | Number of target data channels, with range [1, 8u] |
tShufflePattern | Groups of four bits define the source channel, e.g., 0x76543210 defines the identity transformation, 0x01234567 defines the reverse transformation |
|
inlinestatic |
Shuffles the channels of row pixels by application of a specified shuffle pattern and sets the last channel with constant value in the target row.
The shuffle pattern is defined in groups of four bits defining the source channels.
For the shuffling from e.g., an RGB24 row to a BGRA32 row the pattern 0x012u must be defined:
source pixel R G B 0 1 2 target pixel B G R A 2 1 0 pattern (with reversed order): 0x012
source | The pointer to the source pixels, must be valid |
target | The pointer to the target pixels, receiving the shuffled channels, must be valid |
size | The number of source (and target pixels) to convert, with range [1, infinity) |
options | Pointer to the constant channel value which will be added to the end of the target channels, must be valid |
T | Data type of each channel pixel value, e.g, 'uint8_t' or 'float' |
tSourceChannels | Number of source data channels, with range [1, 8u] |
tTargetChannels | Number of target data channels, including the additional extra target channel, with range [2, 8u] |
tShufflePattern | Groups of four bits define the source channel, e.g., 0x76543210 defines the identity transformation, 0x01234567 defines the reverse transformation |
|
inlinestatic |
Converts an image with straight alpha (without premultiplied alpha) to an image with premultiplied alpha.
source | The source image to convert, must be valid |
target | The resulting converted target image, must be valid |
width | The width of the image in pixel, with range [1, infinity) |
height | The height of the image in pixel, with range [1, infinity) |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
tChannels | The number of frame channels, with range [2, infinity) |
tAlphaChannelIndex | The index of the alpha channel, with range [0, tChannels - 1] |
|
inlinestatic |
Converts an image with straight alpha (without premultiplied alpha) to an image with premultiplied alpha.
frame | The image to convert, must be valid |
width | The width of the image in pixel, with range [1, infinity) |
height | The height of the image in pixel, with range [1, infinity) |
framePaddingElements | The number of padding elements at the end of each frame row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
tChannels | The number of frame channels, with range [2, infinity) |
tAlphaChannelIndex | The index of the alpha channel, with range [0, tChannels - 1] |
|
staticprotected |
Converts an image with straight alpha (without premultiplied alpha) to an image with premultiplied alpha.
source | The source image to convert, must be valid |
target | The resulting converted target image, must be valid |
width | The width of the image in pixel, with range [1, infinity) |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
firstRow | The first row to be handled, with range [0, height - 1] |
numberRows | The number of rows to be handled, with range [1, height - firstRow] |
tChannels | The number of frame channels, with range [2, infinity) |
tAlphaChannelIndex | The index of the alpha channel, with range [0, tChannels - 1] |
|
staticprotected |
Converts an image with straight alpha (without premultiplied alpha) to an image with premultiplied alpha.
frame | The image to convert, must be valid |
width | The width of the image in pixel, with range [1, infinity) |
framePaddingElements | The number of padding elements at the end of each frame row, in elements, with range [0, infinity) |
firstRow | The first row to be handled, with range [0, height - 1] |
numberRows | The number of rows to be handled, with range [1, height - firstRow] |
tChannels | The number of frame channels, with range [2, infinity) |
tAlphaChannelIndex | The index of the alpha channel, with range [0, tChannels - 1] |
|
inlinestatic |
Transforms a frame with generic pixel format (with zipped pixel information) like RGB24 or YUV24, to a frame with same pixel format and channel number.
This function mainly mirrors or flips an image.
source | The source frame buffer, must be valid |
target | The target frame buffer, must be valid |
width | The width of the frame in pixel, with range [1, infinity) |
height | The height of the frame in pixel, with range [1, infinity) |
conversionFlag | The conversion to be applied |
sourcePaddingElements | Optional padding at the end of each source row in elements, with range [0, infinity) |
targetPaddingElements | Optional padding at the end of each target row in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
T | Data type of each channel pixel value, e.g., 'uint8_t', 'float', ... |
tChannels | Number of channels of the frame, with range [1, infinity) |
|
staticprotected |
Transforms a subset of a frame with generic pixel format (with zipped pixel information) like RGB24 or YUV24, to a frame with same pixel format and channel number.
source | The source frame buffer, must be valid |
target | The target frame buffer, must be valid |
width | The width of the frame in pixel, with range [1, infinity) |
height | The height of the frame in pixel, with range [1, infinity) |
conversionFlag | The conversion to be applied |
rowReversePixelOrderFunction | The function able to reverse the pixel order, must be valid |
bytesPerRow | The actual number of bytes each row covers, not including optional padding bytes at the end of each row, with range [width, infinity) |
sourceStrideBytes | The number of bytes between to start points of successive rows in the source frame, with range [0, infinity) |
targetStrideBytes | The number of bytes between to start points of successive rows in the target frame, with range [0, infinity) |
firstRow | The first row to be handled, with range [0, height - 1] |
numberRows | The number of rows to be handled, with range [1, height - firstRow] |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
Zips/interleaves 1-channel images into one image with n-channels.
Usage:
sourceFrames | The pointers to the individual 1-channel frames, one for each image, must be valid |
targetFrame | The pointer to the resulting zipped frame holding n-channels, must be valid |
width | The width of the source frames in pixel, with range [1, infinity) |
height | The height of the source frames in pixel, with range [1, infinity) |
sourceFramesPaddingElements | The array of padding elements at the end of each source row, one for each source frame, in elements, with range [0, infinity) |
targetFramePaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
TSource | The data type of each source pixel channel, e.g., 'uint8_t', 'float', ... |
TTarget | The data type of each target pixel channel, e.g., 'uint8_t', 'float', ... |
|
static |
Zips/interleaves 1-channel images into one image with n-channels.
Usage:
sourceFrames | The pointers to the individual 1-channel frames, one for each image, must be valid |
targetFrame | The pointer to the resulting zipped frame holding n-channels, must be valid |
width | The width of the source frames in pixel, with range [1, infinity) |
height | The height of the source frames in pixel, with range [1, infinity) |
channels | The number of provided source frames (and the number of channels the target frame will have), with range [1, infinity) |
sourceFramesPaddingElements | The array of padding elements at the end of each source row, one for each source frame, in elements, with range [0, infinity), nullptr if all are zero |
targetFramePaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
TSource | The data type of each source pixel channel, e.g., 'uint8_t', 'float', ... |
TTarget | The data type of each target pixel channel, e.g., 'uint8_t', 'float', ... |
tChannels | The number of source frames (and target channels) if known at compile time; otherwise CHANNELS_NOT_KNOWN_AT_COMPILE_TIME == 0, if know at compile time must be identical with 'channels' |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
staticprotected |
Zips/interleaves 1-channel images into one image with n-channels.
sourceFrames | The pointers to the individual 1-channel frames, one for each image, must be valid |
targetFrame | The pointer to the resulting zipped frame holding n-channels, must be valid |
width | The width of the source frames in pixel, with range [1, infinity) |
height | The height of the source frames in pixel, with range [1, infinity) |
channels | The number of provided source frames (and the number of channels the target frame will have), with range [1, infinity) |
sourceFramesPaddingElements | The array of padding elements at the end of each source row, one for each source frame, in elements, with range [0, infinity) |
targetFramePaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
TSource | The data type of each source pixel channel, e.g., 'uint8_t', 'float', ... |
TTarget | The data type of each target pixel channel, e.g., 'uint8_t', 'float', ... |
|
staticconstexpr |
Definition of a constant to specify that the number of channels are not known at compile time but at runtime only.