Ocean
|
This class implements bilinear frame interpolator 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... | |
class | SpecialCases |
This class implements highly optimized interpolation functions with fixed properties. More... | |
Public Types | |
typedef LookupCorner2< Vector2 > | LookupTable |
Definition of a lookup table for 2D vectors. More... | |
Static Public Member Functions | |
template<typename T , unsigned int tChannels> | |
static void | resize (const T *source, T *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Resizes a given frame with (almost) arbitrary data type (e.g., float, double, int) by using a bilinear interpolation. More... | |
template<typename T , unsigned int tChannels> | |
static void | scale (const T *source, T *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int targetHeight, const double sourceX_s_targetX, const double sourceY_s_targetY, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Rescales a given frame with arbitrary data type (e.g., float, double, int) by using a bilinear interpolation with user-defined scaling factors. More... | |
template<unsigned int tChannels> | |
static void | rotate8BitPerChannel (const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const Scalar horizontalAnchorPosition, const Scalar verticalAnchorPosition, const Scalar angle, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr, const uint8_t *borderColor=nullptr) |
Rotates a given frame by a bilinear interpolation. More... | |
template<unsigned int tChannels> | |
static void | affine8BitPerChannel (const uint8_t *source, const unsigned int sourceWidth, const unsigned int sourceHeight, const SquareMatrix3 &source_A_target, const uint8_t *borderColor, uint8_t *target, const PixelPositionI &targetOrigin, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Apply an affine transforms to a N-channel, 8-bit frame The target frame must have the same pixel format and pixel origin as the source frame, however the dimension (and position) of the target frame can be arbitrary. More... | |
template<typename T , unsigned int tChannels> | |
static void | homography (const T *input, const unsigned int inputWidth, const unsigned int inputHeight, const SquareMatrix3 &input_H_output, const T *borderColor, T *output, const PixelPositionI &outputOrigin, const unsigned int outputWidth, const unsigned int outputHeight, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, Worker *worker=nullptr) |
Transforms a input frame with (almost) arbitrary pixel format into an output frame by application of a homography. More... | |
template<unsigned int tChannels> | |
static void | homographies8BitPerChannel (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const SquareMatrix3 homographies[4], const uint8_t *borderColor, uint8_t *output, const Vector2 &outputQuadrantCenter, const PixelPositionI &outputOrigin, const unsigned int outputWidth, const unsigned int outputHeight, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, Worker *worker=nullptr) |
Transforms a given 8 bit per channel input frame into an output frame by application of four homographies. More... | |
template<unsigned int tChannels> | |
static void | homographyMask8BitPerChannel (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const SquareMatrix3 &input_H_output, uint8_t *output, uint8_t *outputMask, const PixelPositionI &outputOrigin, const unsigned int outputWidth, const unsigned int outputHeight, const uint8_t maskValue, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int outputMaskPaddingElements, Worker *worker=nullptr) |
Transforms a given 8 bit per channel input frame into an output frame by application of a homography. More... | |
template<unsigned int tChannels> | |
static void | homographiesMask8BitPerChannel (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const SquareMatrix3 homographies[4], uint8_t *output, uint8_t *outputMask, const Vector2 &outputQuadrantCenter, const PixelPositionI &outputOrigin, const unsigned int outputWidth, const unsigned int outputHeight, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int outputMaskPaddingElements, Worker *worker=nullptr, const uint8_t maskValue=0xFF) |
Transforms a given 8 bit per channel input frame into an output frame by application of four homographies. More... | |
template<unsigned int tChannels> | |
static void | homographyWithCamera8BitPerChannel (const PinholeCamera &inputCamera, const PinholeCamera &outputCamera, const uint8_t *input, const SquareMatrix3 &homography, const bool useDistortionParameters, const uint8_t *borderColor, uint8_t *output, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, Worker *worker=nullptr) |
Transforms a given 8 bit per channel input frame into an output frame by application of a homography. More... | |
template<unsigned int tChannels> | |
static void | homographyWithCameraMask8BitPerChannel (const PinholeCamera &inputCamera, const PinholeCamera &outputCamera, const uint8_t *input, const unsigned int inputPaddingElements, const SquareMatrix3 &homography, uint8_t *output, uint8_t *outputMask, const unsigned int outputPaddingElements, const unsigned int outputMaskPaddingElements, Worker *worker=nullptr, const uint8_t maskValue=0xFF) |
Transforms a given 8 bit per channel input frame into an output frame by application of a homography. More... | |
template<typename T , unsigned int tChannels> | |
static void | lookup (const T *input, const unsigned int inputWidth, const unsigned int inputHeight, const LookupTable &input_LT_output, const bool offset, const T *borderColor, T *output, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, Worker *worker=nullptr) |
Transforms a given input frame into an output frame by application of an interpolation lookup table. More... | |
template<unsigned int tChannels> | |
static void | lookupMask8BitPerChannel (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const LookupTable &input_LT_output, const bool offset, uint8_t *output, uint8_t *outputMask, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int outputMaskPaddingElements, Worker *worker=nullptr, const uint8_t maskValue=0xFF) |
Transforms a given input frame into an output frame by application of an interpolation lookup table. More... | |
template<typename T , unsigned int tChannels> | |
static void | resampleCameraImage (const T *sourceFrame, const AnyCamera &sourceCamera, const SquareMatrix3 &source_R_target, const AnyCamera &targetCamera, T *targetFrame, const unsigned int sourceFramePaddingElements, const unsigned int targetFramePaddingElements, LookupCorner2< Vector2 > *source_OLT_target=nullptr, Worker *worker=nullptr, const unsigned int binSizeInPixel=8u, const T *borderColor=nullptr) |
Re-samples a camera image which has been captured with a camera profile as if the image would have been captured with a second camera profile. More... | |
template<unsigned int tChannels, PixelCenter tPixelCenter = PC_TOP_LEFT, typename TScalar = Scalar> | |
static void | interpolatePixel8BitPerChannel (const uint8_t *frame, const unsigned int width, const unsigned int height, const unsigned int framePaddingElements, const VectorT2< TScalar > &position, uint8_t *result) |
Determines the interpolated pixel values for a given pixel position in an 8 bit per channel frame. More... | |
template<typename TSource , typename TTarget , unsigned int tChannels, PixelCenter tPixelCenter = PC_TOP_LEFT, typename TScalar = Scalar, typename TIntermediate = TScalar> | |
static void | interpolatePixel (const TSource *frame, const unsigned int width, const unsigned int height, const unsigned int framePaddingElements, const VectorT2< TScalar > &position, TTarget *result, const TIntermediate &resultBias=TIntermediate(0)) |
Determines the interpolated pixel values for a given pixel position in a frame with arbitrary data type. More... | |
template<unsigned int tChannels, bool tAlphaAtFront, bool tTransparentIs0xFF> | |
static void | interpolate1PixelFullAlphaBorder8BitPerChannel (const uint8_t *frame, const unsigned int width, const unsigned int height, const Vector2 &position, uint8_t *result, const unsigned int framePaddingElements) |
Determines the interpolated pixel values for a given pixel position in an 8 bit per channel frame with alpha channel. More... | |
static Scalar | patchIntensitySum1Channel (const uint32_t *linedIntegralFrame, const unsigned int frameWidth, const unsigned int frameHeight, const unsigned int lineIntegralFramePaddingElements, const Vector2 ¢er, const CV::PixelCenter pixelCenter, const unsigned int patchWidth, const unsigned int patchHeight) |
Interpolate the sum of intensity values of an image patch in a frame, while the frame is provided as lined integral frame. More... | |
static bool | coversHomographyInputFrame (const unsigned int inputWidth, const unsigned int inputHeight, const unsigned int outputWidth, const unsigned int outputHeight, const SquareMatrix3 &input_H_output, const int outputOriginX=0, const int outputOriginY=0) |
Checks whether the application of a given homography for a specified input frame and output frame covers the entire image information (which is necessary for the bilinear interpolation) or whether the homography relies on missing image information. More... | |
Static Private Member Functions | |
template<unsigned int tChannels> | |
static void | homography8BitPerChannel (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const SquareMatrix3 &input_H_output, const uint8_t *borderColor, uint8_t *output, const PixelPositionI &outputOrigin, const unsigned int outputWidth, const unsigned int outputHeight, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, Worker *worker=nullptr) |
Transforms a given 8 bit per channel input frame into an output frame by application of a homography. More... | |
template<unsigned int tChannels> | |
static void | scale8BitPerChannel (const uint8_t *source, uint8_t *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int targetHeight, const double sourceX_s_targetX, const double sourceY_s_targetY, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Rescales a given frame with 8 bit per data channel by using a bilinear interpolation with user-defined scaling factors. More... | |
template<unsigned int tChannels> | |
static void | scale8BitPerChannelSubset (const uint8_t *source, uint8_t *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int targetHeight, const double sourceX_s_targetX, const double sourceY_s_targetY, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstTargetRow, const unsigned int numberTargetRows) |
Resizes a subset of a given frame with 8 bit per channel by a bilinear interpolation. More... | |
static void | interpolateRowHorizontal8BitPerChannel7BitPrecision (const uint8_t *extendedSourceRow, uint8_t *targetRow, const unsigned int targetWidth, const unsigned int channels, const unsigned int *interpolationLocations, const uint8_t *interpolationFactors) |
Applies a (horizontal) linear interpolation for one row with 8 bit per channel. More... | |
template<typename T > | |
static void | interpolateRowVertical (const T *sourceRowTop, const T *sourceRowBottom, T *targetRow, const unsigned int elements, const float factorBottom) |
Applies a (vertical) linear interpolation between two rows with arbitrary data types. More... | |
template<typename T , unsigned int tChannels> | |
static void | interpolateRowHorizontal (const T *extendedSourceRow, T *targetRow, const unsigned int targetWidth, const unsigned int channels, const unsigned int *interpolationLocations, const float *interpolationFactorsRight) |
Applies a (horizontal) linear interpolation for one row with arbitrary data type. More... | |
static void | interpolateRowVertical8BitPerChannel7BitPrecisionNEON (const uint8_t *sourceRowTop, const uint8_t *sourceRowBottom, uint8_t *targetRow, const unsigned int elements, const unsigned int factorBottom) |
Applies a (vertical) linear interpolation between two rows with 8 bit per channel. More... | |
template<typename T > | |
static void | interpolateRowVerticalNEON (const T *sourceRowTop, const T *sourceRowBottom, T *targetRow, const unsigned int elements, const float factorBottom) |
Applies a (vertical) linear interpolation between two rows with arbitrary data types. More... | |
template<unsigned int tChannels> | |
static void | interpolateRowHorizontal8BitPerChannel7BitPrecisionNEON (const uint8_t *extendedSourceRow, uint8_t *targetRow, const unsigned int targetWidth, const unsigned int channels, const unsigned int *interpolationLocations, const uint8_t *interpolationFactors) |
Applies a (horizontal) linear interpolation for one row with 8 bit per channel. More... | |
template<typename T , unsigned int tChannels> | |
static void | interpolateRowHorizontalNEON (const T *extendedSourceRow, T *targetRow, const unsigned int targetWidth, const unsigned int channels, const unsigned int *interpolationLocations, const float *interpolationFactorsRight) |
Applies a (horizontal) linear interpolation for one row with arbitrary data type. More... | |
static void | scale8BitPerChannelSubset7BitPrecisionNEON (const uint8_t *source, uint8_t *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int channels, const double sourceX_s_targetX, const double sourceY_s_targetY, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstTargetRow, const unsigned int numberTargetRows) |
Rescales a subset of a given frame with 8 bit per channel by a bilinear interpolation. More... | |
template<typename T , typename TScale , unsigned int tChannels> | |
static void | scaleSubset (const T *source, T *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int targetHeight, const double sourceX_s_targetX, const double sourceY_s_targetY, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstTargetRow, const unsigned int numberTargetRows) |
Resizes a subset of a given frame with arbitrary data type by a bilinear interpolation. More... | |
template<unsigned int tChannels> | |
static void | rotate8BitPerChannelSubset (const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const Scalar horizontalAnchorPosition, const Scalar verticalAnchorPosition, const Scalar angle, const uint8_t *borderColor, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstTargetRow, const unsigned int numberTargetRows) |
Rotates a subset of a given frame by a bilinear interpolation. More... | |
template<unsigned int tChannels> | |
static void | affine8BitPerChannelSubset (const uint8_t *source, const unsigned int sourceWidth, const unsigned int sourceHeight, const SquareMatrix3 *source_A_target, const uint8_t *borderColor, uint8_t *target, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int firstTargetRow, const unsigned int numberTargetRows, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements) |
Subset function to apply an affine transform to an N-channel, 8-bit unsigned image. More... | |
template<unsigned int tChannels> | |
static void | homography8BitPerChannelSubset (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const SquareMatrix3 *input_H_output, const uint8_t *borderColor, uint8_t *output, const unsigned int outputWidth, const unsigned int outputHeight, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int firstOutputRow, const unsigned int numberOutputRows) |
Transforms an 8 bit per channel frame using the given homography. More... | |
template<typename T , unsigned int tChannels> | |
static void | homographySubset (const T *input, const unsigned int inputWidth, const unsigned int inputHeight, const SquareMatrix3 *input_H_output, const T *borderColor, T *output, const unsigned int outputWidth, const unsigned int outputHeight, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int firstOutputRow, const unsigned int numberOutputRows) |
Transforms a frame with (almost) arbitrary pixel format using the given homography. More... | |
template<unsigned int tChannels> | |
static void | affine8BitPerChannelSSESubset (const uint8_t *source, const unsigned int sourceWidth, const unsigned int sourceHeight, const SquareMatrix3 *source_A_target, const uint8_t *borderColor, uint8_t *target, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int firstTargetRow, const unsigned int numberTargetRows, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements) |
Subset function to apply an affine transform to an N-channel, 8-bit unsigned image (using SSE). More... | |
template<unsigned int tChannels> | |
static void | homography8BitPerChannelSSESubset (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const SquareMatrix3 *input_H_output, const uint8_t *borderColor, uint8_t *output, const unsigned int outputWidth, const unsigned int outputHeight, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int firstOutputRow, const unsigned int numberOutputRows) |
Transforms an 8 bit per channel frame using the given homography. More... | |
template<unsigned int tChannels> | |
static OCEAN_FORCE_INLINE void | interpolate4Pixels8BitPerChannelSSE (const uint8_t *source, const unsigned int offsetsTopLeft[4], const unsigned int offsetsTopRight[4], const unsigned int offsetsBottomLeft[4], const unsigned int offsetsBottomRight[4], const unsigned int validPixels[4], const typename DataType< uint8_t, tChannels >::Type &borderColor, const __m128i &m128_factorsRight, const __m128i &m128_factorsBottom, typename DataType< uint8_t, tChannels >::Type *targetPositionPixels) |
Interpolates 4 independent pixels concurrently based on already known locations (top-left, top-right, bottom-left, and bottom-right) and interpolation factors for the source pixels. More... | |
template<unsigned int tChannels> | |
static OCEAN_FORCE_INLINE __m128i | interpolate4Pixels8BitPerChannelSSE (const __m128i &m128_sourcesTopLeft, const __m128i &m128_sourcesTopRight, const __m128i &m128_sourcesBottomLeft, const __m128i &m128_sourcesBottomRight, const __m128i &m128_factorsTopLeft, const __m128i &m128_factorsTopRight, const __m128i &m128_factorsBottomLeft, const __m128i &m128_factorsBottomRight) |
Interpolates 4 independent pixels concurrently based on already known locations (top-left, top-right, bottom-left, and bottom-right) and interpolation factors for the source pixels. More... | |
template<unsigned int tChannels> | |
static void | affine8BitPerChannelNEONSubset (const uint8_t *source, const unsigned int sourceWidth, const unsigned int sourceHeight, const SquareMatrix3 *source_A_target, const uint8_t *borderColor, uint8_t *target, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int firstTargetRow, const unsigned int numberTargetRows, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements) |
Subset function to apply an affine transform to an N-channel, 8-bit unsigned image (using NEON). More... | |
template<unsigned int tChannels> | |
static void | homography8BitPerChannelNEONSubset (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const SquareMatrix3 *input_H_output, const uint8_t *borderColor, uint8_t *output, const unsigned int outputWidth, const unsigned int outputHeight, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int firstOutputRow, const unsigned int numberOutputRows) |
Transforms an 8 bit per channel frame using the given homography. More... | |
template<unsigned int tChannels> | |
static OCEAN_FORCE_INLINE void | interpolate4Pixels8BitPerChannelNEON (const uint8_t *source, const unsigned int offsetsTopLeftElements[4], const unsigned int offsetsTopRightElements[4], const unsigned int offsetsBottomLeftElements[4], const unsigned int offsetsBottomRightElements[4], const unsigned int validPixels[4], const typename DataType< uint8_t, tChannels >::Type &borderColor, const uint32x4_t &m128_factorsRight, const uint32x4_t &m128_factorsBottom, typename DataType< uint8_t, tChannels >::Type *targetPositionPixels) |
Interpolates 4 independent pixels concurrently based on already known locations (top-left, top-right, bottom-left, and bottom-right) and interpolation factors for the source pixels. More... | |
static OCEAN_FORCE_INLINE void | interpolate8Pixels1Channel8BitNEON (const uint8x8_t &topLeft_u_8x8, const uint8x8_t &topRight_u_8x8, const uint8x8_t &bottomLeft_u_8x8, const uint8x8_t &bottomRight_u_8x8, const uint8x16_t &factorsRight_factorsBottom_128_u_8x16, uint8_t *targetPositionPixels) |
Interpolates 8 independent pixels concurrently of a 1 channel frame, the source pixel locations must be known already (top-left, top-right, bottom-left, and bottom-right), further the interpolation factors must be known already. More... | |
template<unsigned int tChannels> | |
static void | homographies8BitPerChannelSubset (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const SquareMatrix3 *homographies, const uint8_t *borderColor, uint8_t *output, const Scalar outputQuadrantCenterX, const Scalar outputQuadrantCenterY, const int outputOriginX, const int outputOriginY, const unsigned int outputWidth, const unsigned int outputHeight, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int firstOutputRow, const unsigned int numberOutputRows) |
Transforms an 8 bit per channel frame using the given homographies. More... | |
template<unsigned int tChannels> | |
static void | homographyMask8BitPerChannelSubset (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const SquareMatrix3 *input_H_output, uint8_t *output, uint8_t *outputMask, const uint8_t maskValue, const unsigned int outputWidth, const unsigned int outputHeight, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int outputMaskPaddingElements, const unsigned int firstOutputRow, const unsigned int numberOutputRows) |
Transforms an 8 bit per channel frame using the given homography. More... | |
template<unsigned int tChannels> | |
static void | homographiesMask8BitPerChannelSubset (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const SquareMatrix3 *homographies, uint8_t *output, uint8_t *outputMask, const uint8_t maskValue, const Scalar outputQuadrantCenterX, const Scalar outputQuadrantCenterY, const int outputOriginX, const int outputOriginY, const unsigned int outputWidth, const unsigned int outputHeight, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int outputMaskPaddingElements, const unsigned int firstOutputRow, const unsigned int numberOutputRows) |
Transforms an 8 bit per channel frame using the given homography. More... | |
template<unsigned int tChannels> | |
static void | homographyWithCamera8BitPerChannelSubset (const PinholeCamera *inputCamera, const PinholeCamera *outputCamera, const PinholeCamera::DistortionLookup *outputCameraDistortionLookup, const uint8_t *input, const SquareMatrix3 *normalizedHomography, const bool useDistortionParameters, const uint8_t *borderColor, uint8_t *output, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Transforms an 8 bit per channel frame using the given homography. More... | |
template<unsigned int tChannels> | |
static void | homographyWithCameraMask8BitPerChannelSubset (const PinholeCamera *inputCamera, const PinholeCamera *outputCamera, const PinholeCamera::DistortionLookup *outputCameraDistortionLookup, const uint8_t *input, const unsigned int inputPaddingElements, const SquareMatrix3 *normalizedHomography, uint8_t *output, uint8_t *outputMask, const unsigned int outputPaddingElements, const unsigned int outputMaskPaddingElements, const uint8_t maskValue, const unsigned int firstRow, const unsigned int numberRows) |
Transforms an 8 bit per channel frame using the given homography. More... | |
template<unsigned int tChannels> | |
static void | lookup8BitPerChannelSubset (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const LookupTable *input_LT_output, const bool offset, const uint8_t *borderColor, uint8_t *output, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Transforms a subset of a given input frame with uint8_t as element type into an output frame by application of an interpolation lookup table. More... | |
template<typename T , unsigned int tChannels> | |
static void | lookupSubset (const T *input, const unsigned int inputWidth, const unsigned int inputHeight, const LookupTable *input_LT_output, const bool offset, const T *borderColor, T *output, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Transforms a subset of a given input frame with arbitrary element type into an output frame by application of an interpolation lookup table. More... | |
template<unsigned int tChannels> | |
static void | lookup8BitPerChannelSubsetNEON (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const LookupTable *input_LT_output, const bool offset, const uint8_t *borderColor, uint8_t *output, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Transforms a subset of a given input frame into an output frame by application of an interpolation lookup table and uses NEON instructions. More... | |
template<unsigned int tChannels> | |
static void | lookupMask8BitPerChannelSubset (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const LookupTable *input_LT_output, const bool offset, uint8_t *output, uint8_t *outputMask, const uint8_t maskValue, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int outputMaskPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Transforms a given input frame into an output frame by application of an interpolation lookup table. More... | |
template<> | |
OCEAN_FORCE_INLINE __m128i | interpolate4Pixels8BitPerChannelSSE (const __m128i &sourcesTopLeft, const __m128i &sourcesTopRight, const __m128i &sourcesBottomLeft, const __m128i &sourcesBottomRight, const __m128i &factorsTopLeft, const __m128i &factorsTopRight, const __m128i &factorsBottomLeft, const __m128i &factorsBottomRight) |
template<> | |
OCEAN_FORCE_INLINE __m128i | interpolate4Pixels8BitPerChannelSSE (const __m128i &sourcesTopLeft, const __m128i &sourcesTopRight, const __m128i &sourcesBottomLeft, const __m128i &sourcesBottomRight, const __m128i &factorsTopLeft, const __m128i &factorsTopRight, const __m128i &factorsBottomLeft, const __m128i &factorsBottomRight) |
template<> | |
OCEAN_FORCE_INLINE void | interpolate4Pixels8BitPerChannelSSE (const uint8_t *source, const unsigned int offsetsTopLeft[4], const unsigned int offsetsTopRight[4], const unsigned int offsetsBottomLeft[4], const unsigned int offsetsBottomRight[4], const unsigned int validPixels[4], const DataType< uint8_t, 1u >::Type &borderColor, const __m128i &m128_factorsRight, const __m128i &m128_factorsBottom, typename DataType< uint8_t, 1u >::Type *targetPositionPixels) |
template<> | |
OCEAN_FORCE_INLINE void | interpolate4Pixels8BitPerChannelSSE (const uint8_t *source, const unsigned int offsetsTopLeft[4], const unsigned int offsetsTopRight[4], const unsigned int offsetsBottomLeft[4], const unsigned int offsetsBottomRight[4], const unsigned int validPixels[4], const DataType< uint8_t, 3u >::Type &borderColor, const __m128i &m128_factorsRight, const __m128i &m128_factorsBottom, typename DataType< uint8_t, 3u >::Type *targetPositionPixels) |
template<> | |
OCEAN_FORCE_INLINE void | interpolate4Pixels8BitPerChannelSSE (const uint8_t *source, const unsigned int offsetsTopLeft[4], const unsigned int offsetsTopRight[4], const unsigned int offsetsBottomLeft[4], const unsigned int offsetsBottomRight[4], const unsigned int validPixels[4], const DataType< uint8_t, 4u >::Type &borderColor, const __m128i &m128_factorsRight, const __m128i &m128_factorsBottom, typename DataType< uint8_t, 4u >::Type *targetPositionPixels) |
template<> | |
OCEAN_FORCE_INLINE void | interpolate4Pixels8BitPerChannelNEON (const uint8_t *source, const unsigned int offsetsTopLeftElements[4], const unsigned int offsetsTopRightElements[4], const unsigned int offsetsBottomLeftElements[4], const unsigned int offsetsBottomRightElements[4], const unsigned int validPixels[4], const DataType< uint8_t, 1u >::Type &borderColor, const uint32x4_t &m128_factorsRight, const uint32x4_t &m128_factorsBottom, typename DataType< uint8_t, 1u >::Type *targetPositionPixels) |
template<> | |
OCEAN_FORCE_INLINE void | interpolate4Pixels8BitPerChannelNEON (const uint8_t *source, const unsigned int offsetsTopLeftElements[4], const unsigned int offsetsTopRightElements[4], const unsigned int offsetsBottomLeftElements[4], const unsigned int offsetsBottomRightElements[4], const unsigned int validPixels[4], const DataType< uint8_t, 2u >::Type &borderColor, const uint32x4_t &m128_factorsRight, const uint32x4_t &m128_factorsBottom, typename DataType< uint8_t, 2u >::Type *targetPositionPixels) |
template<> | |
OCEAN_FORCE_INLINE void | interpolate4Pixels8BitPerChannelNEON (const uint8_t *source, const unsigned int offsetsTopLeftElements[4], const unsigned int offsetsTopRightElements[4], const unsigned int offsetsBottomLeftElements[4], const unsigned int offsetsBottomRightElements[4], const unsigned int validPixels[4], const DataType< uint8_t, 3u >::Type &borderColor, const uint32x4_t &m128_factorsRight, const uint32x4_t &m128_factorsBottom, typename DataType< uint8_t, 3u >::Type *targetPositionPixels) |
template<> | |
OCEAN_FORCE_INLINE void | interpolate4Pixels8BitPerChannelNEON (const uint8_t *source, const unsigned int offsetsTopLeftElements[4], const unsigned int offsetsTopRightElements[4], const unsigned int offsetsBottomLeftElements[4], const unsigned int offsetsBottomRightElements[4], const unsigned int validPixels[4], const DataType< uint8_t, 4u >::Type &borderColor, const uint32x4_t &m128_factorsRight, const uint32x4_t &m128_factorsBottom, typename DataType< uint8_t, 4u >::Type *targetPositionPixels) |
template<> | |
void | lookup8BitPerChannelSubsetNEON (const uint8_t *input, const unsigned int inputWidth, const unsigned int inputHeight, const LookupTable *input_LT_output, const bool offset, const uint8_t *borderColor, uint8_t *output, const unsigned int inputPaddingElements, const unsigned int outputPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
template<> | |
void | interpolateRowVerticalNEON (const float *sourceRowTop, const float *sourceRowBottom, float *targetRow, const unsigned int elements, const float factorBottom) |
template<> | |
void | interpolateRowHorizontalNEON (const float *extendedSourceRow, float *targetRow, const unsigned int targetWidth, const unsigned int channels, const unsigned int *interpolationLocations, const float *interpolationFactorsRight) |
template<> | |
void | scaleSubset (const float *source, float *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int targetHeight, const double sourceX_s_targetX, const double sourceY_s_targetY, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstTargetRow, const unsigned int numberTargetRows) |
This class implements bilinear frame interpolator functions.
Definition of a lookup table for 2D vectors.
|
inlinestatic |
Apply an affine transforms to a N-channel, 8-bit frame The target frame must have the same pixel format and pixel origin as the source frame, however the dimension (and position) of the target frame can be arbitrary.
This function allows the creation of an target frame fully covering the source frame (if the position and dimension of the target frame covers the transformation of the affine transformation).
The 'targetOrigin' parameter simply applies an additional translation onto the provided affine transformation i.e., affine * create_translation_matrix3x3(targetOrigin.x(), targetOrigin.y()). Please note that here the affine transformation is specified as a 3-by-3 matrix (in contrast to the more commonly used 2-by-3 matrix) and should take of the form:
a c e b d f 0 0 1
However, this function disregards the last row completely and only uses the top two rows, i.e., the elements a through f.
source | Input frame that will be transformed, must be valid |
sourceWidth | Width of both images in pixel, with range [1, infinity) |
sourceHeight | Height of both images pixel, with range [1, infinity) |
source_A_target | Affine transformation, such that: sourcePoint = source_A_target * targetPoint |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
target | The target frame using the given affine transform, must be valid |
targetOrigin | The origin of the target frame defining the global position of the target frame's pixel coordinate (0, 0), with range (-infinity, infinity)x(-infinity, infinity) |
targetWidth | The width of the target image in pixel, with range [1, infinity) |
targetHeight | The height of the target image in pixel, with range [1, infinity) |
sourcePaddingElements | The number of padding elements at the end of each source frame row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target frame row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
tChannels | Number of channels of the frame |
|
inlinestaticprivate |
Subset function to apply an affine transform to an N-channel, 8-bit unsigned image (using NEON).
This function applies NEON instructions.
This one has the property: sourcePoint = source_A_target * targetPoint Beware: The target width 'targetWidth' must be >= 4, use affine8BitPerChannelSubset for small target frames Please note that here the affine transformation is specified as a 3-by-3 matrix (in contrast to the more commonly used 2-by-3 matrix) and should take of the form:
a c e b d f 0 0 1
However, this function disregards the last row completely and only uses the top two rows, i.e., the elements a through f.
source | The source frame that will be transformed |
sourceWidth | Width of both source images in pixel, with range [1, infinity) |
sourceHeight | Height of both source images pixel, with range [1, infinity) |
source_A_target | Affine transform used to transform the given source frame. |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
target | The target frame using the given affine transform |
targetWidth | The width of the target image in pixel, with range [4, infinity) |
targetHeight | The height of the target image in pixel, with range [1, infinity) |
firstTargetRow | The first target row to be handled |
numberTargetRows | Number of target rows to be handled |
sourcePaddingElements | The number of padding elements at the end of each source frame, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target frame, in elements, with range [0, infinity) |
tChannels | Number of frame channels, with range [1, infinity) |
|
inlinestaticprivate |
Subset function to apply an affine transform to an N-channel, 8-bit unsigned image (using SSE).
This function applies SSE instructions.
Beware: The target width 'targetWidth' must be >= 4, use affine8BitPerChannelSubset for small target frames This function has the property: sourcePoint = source_A_target * targetPoint Please note that here the affine transformation is specified as a 3-by-3 matrix (in contrast to the more commonly used 2-by-3 matrix) and should take of the form:
a c e b d f 0 0 1
However, this function disregards the last row completely and only uses the top two rows, i.e., the elements a through f.
source | Input frame that will be transformed |
sourceWidth | Width of both source images in pixel, with range [1, infinity) |
sourceHeight | Height of both source images pixel, with range [1, infinity) |
source_A_target | Affine transformation which is applied to source frame. |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
target | The target frame where the result of the transformation will be stored |
targetWidth | The width of the target image in pixel, with range [4, infinity) |
targetHeight | The height of the target image in pixel, with range [1, infinity) |
firstTargetRow | The first target row to be handled |
numberTargetRows | Number of target rows to be handled |
sourcePaddingElements | The number of padding elements at the end of each source frame, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target frame, in elements, with range [0, infinity) |
tChannels | Number of frame channels |
|
inlinestaticprivate |
Subset function to apply an affine transform to an N-channel, 8-bit unsigned image.
The affine transform must be provided in the following form: sourcePoint = source_A_target * targetPoint
This function does not apply SIMD instructions and can be used for any frame dimensions. Please note that here the affine transformation is specified as a 3-by-3 matrix (in contrast to the more commonly used 2-by-3 matrix) and should take of the form:
a c e b d f 0 0 1
However, this function disregards the last row completely and only uses the top two rows, i.e., the elements a through f.
source | Input frame that will be transformed |
sourceWidth | Width of both source images in pixel, with range [1, infinity) |
sourceHeight | Height of both source images pixel, with range [1, infinity) |
source_A_target | Affine transformation which is applied to the source frame. |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
target | Output frame using the given affine transform |
targetWidth | The width of the target image in pixel, with range [1, infinity) |
targetHeight | The height of the target image in pixel, with range [1, infinity) |
firstTargetRow | The first target row to be handled |
numberTargetRows | Number of target rows to be handled |
sourcePaddingElements | The number of padding elements at the end of each source frame, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target frame, in elements, with range [0, infinity) |
tChannels | Number of frame channels, with range [1, infinity) |
|
static |
Checks whether the application of a given homography for a specified input frame and output frame covers the entire image information (which is necessary for the bilinear interpolation) or whether the homography relies on missing image information.
inputWidth | The width of the input frame in pixel, with range [1, infinity) |
inputHeight | The height of the input frame in pixel, with range [1, infinity) |
outputWidth | The width of the output frame in pixel, with range [1, infinity) |
outputHeight | The height of the output frame in pixel, with range [1, infinity) |
input_H_output | Homography used to transform the given input frame by following equation: inputPoint = input_H_output * outputPoint, must be valid |
outputOriginX | The horizontal origin of the output frame defining the global position of the output frame's pixel coordinate (0, 0), with range (-infinity, infinity) |
outputOriginY | The vertical origin of the output frame defining the global position of the output frame's pixel coordinate (0, 0), with range (-infinity, infinity) |
|
inlinestatic |
Transforms a given 8 bit per channel input frame into an output frame by application of four homographies.
For each quadrant of the output frame an individual homography is applied while the final result is interpolated between the four homographies.
The quadrant order of the homographies is as follows: top left, top right, bottom left, bottom right.
The output frame must have the same pixel format and pixel origin as the input frame, however the dimension (and position) of the output frame can be arbitrary.
This function allows the creation of an output frame fully covering the input frame (if the position and dimension of the output frame covers the transformation of the homography.
input | The input frame that will be transformed |
inputWidth | Width of both images in pixel, with range [1, infinity) |
inputHeight | Height of both images pixel, with range [1, infinity) |
homographies | Four homographies used to transform the given input frame, transforming points defined in the output frame into points defined in the input frame |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
output | The output frame using the given homography |
outputQuadrantCenter | The center position of the four quadrants in the output frame (the local center not respecting the optional outputOrigin parameter), with range [0, outputWidth)x[0, outputHeight) |
outputOrigin | The origin of the output frame defining the global position of the output frame's pixel coordinate (0, 0), with range (-infinity, infinity)x(-infinity, infinity) |
outputWidth | The width of the output image in pixel, with range [1, infinity) |
outputHeight | The height of the output image in pixel, with range [1, infinity) |
inputPaddingElements | The number of padding elements at the end of each input frame row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output frame row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
tChannels | Number of channels of the frame |
|
inlinestaticprivate |
Transforms an 8 bit per channel frame using the given homographies.
input | The input frame that will be transformed |
inputWidth | Width of both input images in pixel, with range [1, infinity) |
inputHeight | Height of both input images pixel, with range [1, infinity) |
homographies | Homographies used to transform the given input frame |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
output | The output frame using the given homography |
outputQuadrantCenterX | The horizontal position of the four quadrants in the output frame (the local center not respecting the optional outputOrigin parameter), with range [0, outputWidth) |
outputQuadrantCenterY | The vertical position of the four quadrants in the output frame (the local center not respecting the optional outputOrigin parameter), with range [0, outputHeight) |
outputOriginX | The horizontal coordinate of the output frame's origin |
outputOriginY | The vertical coordinate of the output frame's origin |
outputWidth | The width of the output image in pixel, with range [1, infinity) |
outputHeight | The height of the output image in pixel, with range [1, infinity) |
inputPaddingElements | The number of padding elements at the end of each input frame, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output frame, in elements, with range [0, infinity) |
firstOutputRow | The first output row to be handled |
numberOutputRows | Number of output rows to be handled |
tChannels | Number of frame channels |
|
inlinestatic |
Transforms a given 8 bit per channel input frame into an output frame by application of four homographies.
For each quadrant of the output frame an individual homography is applied while the final result is interpolated between the four homographies.
The quadrant order of the homographies is as follows: top left, top right, bottom left, bottom right.
The output frame must have the same pixel format and pixel origin as the input frame, however the dimension (and position) of the output frame can be arbitrary.
This function allows the creation of an output frame fully covering the input frame (if the position and dimension of the output frame covers the transformation of the homography.
input | The input frame that will be transformed |
inputWidth | Width of both images in pixel, with range [1, infinity) |
inputHeight | Height of both images pixel, with range [1, infinity) |
homographies | Four homographies used to transform the given input frame, transforming points defined in the output frame into points defined in the input frame |
output | The output frame using the given homography |
outputMask | Mask frame with 8 bit per pixel defining whether an output frame pixel has a valid corresponding pixel in the input frame |
outputQuadrantCenter | The center position of the four quadrants in the output frame (the local center not respecting the optional outputOrigin parameter), with range [0, outputWidth)x[0, outputHeight) |
outputOrigin | The origin of the output frame defining the global position of the output frame's pixel coordinate (0, 0), with range (-infinity, infinity)x(-infinity, infinity) |
outputWidth | The width of the output image in pixel, with range [1, infinity) |
outputHeight | The height of the output image in pixel, with range [1, infinity) |
inputPaddingElements | The number of padding elements at the end of each input row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output row, in elements, with range [0, infinity) |
outputMaskPaddingElements | The number of padding elements at the end of each row of the output mask, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
maskValue | 8 bit mask values for reference pixels lying inside the given camera frame, reference pixels lying outside the camera frame will be assigned with (0xFF - maskValue) |
tChannels | Number of channels of the frame |
|
inlinestaticprivate |
Transforms an 8 bit per channel frame using the given homography.
input | The input frame that will be transformed |
inputWidth | Width of both input images in pixel, with range [1, infinity) |
inputHeight | Height of both input images pixel, with range [1, infinity) |
homographies | Homographies used to transform the given input frame |
output | The output frame resulting by application of the given homography |
outputMask | Mask frame with 8 bit per pixel defining whether an output frame pixel has a valid corresponding pixel in the input frame |
maskValue | 8 bit mask values for reference pixels lying inside the given camera frame, reference pixels lying outside the camera frame will be assigned with (0xFF - maskValue) |
outputQuadrantCenterX | The horizontal position of the four quadrants in the output frame (the local center not respecting the optional outputOrigin parameter), with range [0, outputWidth) |
outputQuadrantCenterY | The vertical position of the four quadrants in the output frame (the local center not respecting the optional outputOrigin parameter), with range [0, outputHeight) |
outputOriginX | The horizontal coordinate of the output frame's origin |
outputOriginY | The vertical coordinate of the output frame's origin |
outputWidth | The width of the output image in pixel, with range [1, infinity) |
outputHeight | The height of the output image in pixel, with range [1, infinity) |
inputPaddingElements | The number of padding elements at the end of each input row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output row, in elements, with range [0, infinity) |
outputMaskPaddingElements | The number of padding elements at the end of each row of the output mask, in elements, with range [0, infinity) |
firstOutputRow | The first output row to be handled |
numberOutputRows | Number of output rows to be handled |
tChannels | Number of frame channels |
|
inlinestatic |
Transforms a input frame with (almost) arbitrary pixel format into an output frame by application of a homography.
The output frame must have the same pixel format and pixel origin as the input frame, however the dimension (and position) of the output frame can be arbitrary.
This function allows the creation of an output frame fully covering the input frame (if the position and dimension of the output frame covers the transformation of the homography.
The 'outputOrigin' parameter simply applies an additional translation onto the provided homography i.e., homography * create_translation_matrix3x3(outputOrigin.x(), outputOrigin.y()).
input | The input frame that will be transformed, must be valid |
inputWidth | Width of both images in pixel, with range [1, infinity) |
inputHeight | Height of both images pixel, with range [1, infinity) |
input_H_output | Homography used to transform the given input frame by following equation: inputPoint = input_H_output * outputPoint, must be valid |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
output | The output frame using the given homography, must be valid |
outputOrigin | The origin of the output frame defining the global position of the output frame's pixel coordinate (0, 0), with range (-infinity, infinity)x(-infinity, infinity) |
outputWidth | The width of the output image in pixel, with range [1, infinity) |
outputHeight | The height of the output image in pixel, with range [1, infinity) |
inputPaddingElements | The number of padding elements at the end of each input frame row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output frame row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
T | Data type of each pixel channel, e.g., float, double, int |
tChannels | Number of channels of the frame, with range [1, infinity) |
|
inlinestaticprivate |
Transforms a given 8 bit per channel input frame into an output frame by application of a homography.
The output frame must have the same pixel format and pixel origin as the input frame, however the dimension (and position) of the output frame can be arbitrary.
This function allows the creation of an output frame fully covering the input frame (if the position and dimension of the output frame covers the transformation of the homography).
The 'outputOrigin' parameter simply applies an additional translation onto the provided homography i.e., homography * create_translation_matrix3x3(outputOrigin.x(), outputOrigin.y()).
input | The input frame that will be transformed, must be valid |
inputWidth | Width of both images in pixel, with range [1, infinity) |
inputHeight | Height of both images pixel, with range [1, infinity) |
input_H_output | Homography used to transform the given input frame by following equation: inputPoint = input_H_output * outputPoint, must be valid |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
output | The output frame using the given homography, must be valid |
outputOrigin | The origin of the output frame defining the global position of the output frame's pixel coordinate (0, 0), with range (-infinity, infinity)x(-infinity, infinity) |
outputWidth | The width of the output image in pixel, with range [1, infinity) |
outputHeight | The height of the output image in pixel, with range [1, infinity) |
inputPaddingElements | The number of padding elements at the end of each input frame row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output frame row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
tChannels | Number of channels of the frame |
|
inlinestaticprivate |
Transforms an 8 bit per channel frame using the given homography.
This function applies NEON instructions.
Beware: The output width 'outputWidth' must be >= 4, use homography8BitPerChannelSubset for small output frames.
input | The input frame that will be transformed |
inputWidth | Width of both input images in pixel, with range [1, infinity) |
inputHeight | Height of both input images pixel, with range [1, infinity) |
input_H_output | Homography used to transform the given input frame by following equation: inputPoint = input_H_output * outputPoint, must be valid |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
output | The output frame using the given homography |
outputWidth | The width of the output image in pixel, with range [4, infinity) |
outputHeight | The height of the output image in pixel, with range [1, infinity) |
inputPaddingElements | The number of padding elements at the end of each input frame row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output frame row, in elements, with range [0, infinity) |
firstOutputRow | The first output row to be handled, with range [0, outputHeight - 1] |
numberOutputRows | Number of output rows to be handled, with range [1, outputHeight - firstOutputRow] |
tChannels | Number of frame channels, with range [1, infinity) |
|
inlinestaticprivate |
Transforms an 8 bit per channel frame using the given homography.
This function applies SSE instructions.
Beware: The output width 'outputWidth' must be >= 4, use homography8BitPerChannelSubset for small output frames
input | The input frame that will be transformed, must be valid |
inputWidth | Width of both input images in pixel, with range [1, infinity) |
inputHeight | Height of both input images pixel, with range [1, infinity) |
input_H_output | Homography used to transform the given input frame by following equation: inputPoint = input_H_output * outputPoint, must be valid |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
output | The output frame using the given homography, must be valid |
outputWidth | The width of the output image in pixel, with range [4, infinity) |
outputHeight | The height of the output image in pixel, with range [1, infinity) |
inputPaddingElements | The number of padding elements at the end of each input frame row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output frame row, in elements, with range [0, infinity) |
firstOutputRow | The first output row to be handled, with range [0, outputHeight - 1] |
numberOutputRows | Number of output rows to be handled, with range [1, outputHeight - firstOutputRow] |
tChannels | Number of frame channels, with range [1, infinity) |
|
inlinestaticprivate |
Transforms an 8 bit per channel frame using the given homography.
The homography must provide the following transformation: inputPoint = homography * outputPoint This function does not apply SIMD instructions and can be used for any frame dimensions.
input | The input frame that will be transformed |
inputWidth | Width of both input images in pixel, with range [1, infinity) |
inputHeight | Height of both input images pixel, with range [1, infinity) |
input_H_output | Homography used to transform the given input frame by following equation: inputPoint = input_H_output * outputPoint, must be valid |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
output | The output frame using the given homography |
outputWidth | The width of the output image in pixel, with range [1, infinity) |
outputHeight | The height of the output image in pixel, with range [1, infinity) |
inputPaddingElements | The number of padding elements at the end of each input frame row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output frame row, in elements, with range [0, infinity) |
firstOutputRow | The first output row to be handled, with range [0, height - 1] |
numberOutputRows | Number of output rows to be handled, with range [1, height - firstOutputRow] |
tChannels | Number of frame channels, with range [1, infinity) |
|
inlinestatic |
Transforms a given 8 bit per channel input frame into an output frame by application of a homography.
The output frame must have the same pixel format and pixel origin as the input frame, however the dimension (and position) of the output frame can be arbitrary.
This function allows the creation of an output frame fully covering the input frame (if the position and dimension of the output frame covers the transformation of the homography.
The 'outputOrigin' parameter simply applies an additional translation onto the provided homography i.e., homography * create_translation_matrix3x3(outputOrigin.x(), outputOrigin.y()).
input | The input frame that will be transformed, must be valid |
inputWidth | Width of both images in pixel, with range [1, infinity) |
inputHeight | Height of both images pixel, with range [1, infinity) |
input_H_output | Homography used to transform the given input frame by following equation: inputPoint = input_H_output * outputPoint, must be valid |
output | The output frame using the given homography, must be valid |
outputMask | Mask frame with 8 bit per pixel defining whether an output frame pixel has a valid corresponding pixel in the input frame, must be valid |
outputOrigin | The origin of the output frame defining the global position of the output frame's pixel coordinate (0, 0), with range (-infinity, infinity)x(-infinity, infinity) |
outputWidth | The width of the output image in pixel, with range [1, infinity) |
outputHeight | The height of the output image in pixel, with range [1, infinity) |
maskValue | 8 bit mask values for reference pixels lying inside the given camera frame, reference pixels lying outside the camera frame will be assigned with (0xFF - maskValue) |
inputPaddingElements | The number of padding elements at the end of each input row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output row, in elements, with range [0, infinity) |
outputMaskPaddingElements | The number of padding elements at the end of output mask input row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
tChannels | Number of channels of the frame, with range [1, infinity) |
|
inlinestaticprivate |
Transforms an 8 bit per channel frame using the given homography.
input | The input frame that will be transformed, must be valid |
inputWidth | Width of both input images in pixel, with range [1, infinity) |
inputHeight | Height of both input images pixel, with range [1, infinity) |
input_H_output | Homography used to transform the given input frame by following equation: inputPoint = input_H_output * outputPoint, must be valid |
output | The output frame resulting by application of the given homography, must be valid |
outputMask | Mask frame with 8 bit per pixel defining whether an output frame pixel has a valid corresponding pixel in the input frame |
maskValue | 8 bit mask values for reference pixels lying inside the given camera frame, reference pixels lying outside the camera frame will be assigned with (0xFF - maskValue) |
outputWidth | The width of the output image in pixel, with range [1, infinity) |
outputHeight | The height of the output image in pixel, with range [1, infinity) |
inputPaddingElements | The number of padding elements at the end of each input row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output row, in elements, with range [0, infinity) |
outputMaskPaddingElements | The number of padding elements at the end of output mask input row, in elements, with range [0, infinity) |
firstOutputRow | The first output row to be handled |
numberOutputRows | Number of output rows to be handled |
tChannels | Number of frame channels, with range [1, infinity) |
|
inlinestaticprivate |
Transforms a frame with (almost) arbitrary pixel format using the given homography.
This function does not apply SIMD instructions and can be used for any frame dimensions.
input | The input frame that will be transformed |
inputWidth | Width of both input images in pixel, with range [1, infinity) |
inputHeight | Height of both input images pixel, with range [1, infinity) |
input_H_output | Homography used to transform the given input frame by following equation: inputPoint = input_H_output * outputPoint, must be valid |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
output | The output frame using the given homography |
outputWidth | The width of the output image in pixel, with range [1, infinity) |
outputHeight | The height of the output image in pixel, with range [1, infinity) |
inputPaddingElements | The number of padding elements at the end of each input frame row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output frame row, in elements, with range [0, infinity) |
firstOutputRow | The first output row to be handled, with range [0, height - 1] |
numberOutputRows | Number of output rows to be handled, with range [1, height - firstOutputRow] |
T | Data type of each pixel channel, e.g., float, double, int |
tChannels | Number of frame channels, with range [1, infinity) |
|
inlinestatic |
Transforms a given 8 bit per channel input frame into an output frame by application of a homography.
This function also uses a camera profile to improve the interpolation accuracy.
The given homography is transformed into a homography for normalized image coordinates.
Thus, also distortion parameters of the camera profile can be applied.
inputCamera | The pinhole camera profile to be applied for the input frame |
outputCamera | The pinhole camera profile to be applied for the output frame |
input | The input frame that will be transformed |
homography | The homography used to transform the given input frame by following equation: inputPoint = homography * outputPoint |
useDistortionParameters | True, to apply the distortion parameters of the camera profile |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
output | The output frame using the given homography |
inputPaddingElements | The number of padding elements at the end of each input row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
tChannels | Number of channels of the frame |
|
staticprivate |
Transforms an 8 bit per channel frame using the given homography.
inputCamera | The pinhole camera profile to be applied for the input frame |
outputCamera | The pinhole camera profile to be applied for the output frame |
outputCameraDistortionLookup | The distortion lookup table of the of the output camera |
input | The input frame that will be transformed |
normalizedHomography | The homography used to transform the given input frame specified in normalized camera coordinates |
useDistortionParameters | True, to apply the distortion parameters of the camera profile |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
output | The output frame resulting by application of the given homography |
inputPaddingElements | The number of padding elements at the end of each input row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output row, in elements, with range [0, infinity) |
firstRow | The first row to be handled |
numberRows | Number of rows to be handled |
tChannels | Number of frame channels |
|
inlinestatic |
Transforms a given 8 bit per channel input frame into an output frame by application of a homography.
Input frame pixels lying outside the frame will be masked in the resulting output mask frame.
This function also uses a camera profile to improve the interpolation accuracy.
The given homography is transformed into a homography for normalized image coordinates.
Thus, also distortion parameters of the camera profile can be applied.
inputCamera | The pinhole camera profile to be applied for the input frame, must be valid |
outputCamera | The pinhole camera profile to be applied for the output frame, must be valid |
input | The input frame that will be transformed, must be valid |
inputPaddingElements | The number of padding elements at the end of each input row, in elements, with range [0, infinity) |
homography | The homography used to transform the given input frame by following equation: inputPoint = homography * outputPoint |
output | The output frame using the given homography |
outputMask | Mask frame with 8 bit per pixel defining whether an output frame pixel has a valid corresponding pixel in the input frame |
outputPaddingElements | The number of padding elements at the end of each output row, in elements, with range [0, infinity) |
outputMaskPaddingElements | The number of padding elements at the end of each output mask row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
maskValue | 8 bit mask values for reference pixels lying inside the given camera frame, reference pixels lying outside the camera frame will be assigned with (0xFF - maskValue) |
tChannels | Number of channels of the frame |
|
staticprivate |
Transforms an 8 bit per channel frame using the given homography.
inputCamera | The pinhole camera profile to be applied for the input frame |
outputCamera | The pinhole camera profile to be applied for the output frame |
outputCameraDistortionLookup | The distortion lookup table of the of the output camera |
input | The input frame that will be transformed, must be valid |
inputPaddingElements | The number of padding elements at the end of each input row, in elements, with range [0, infinity) |
normalizedHomography | The homography used to transform the given input frame specified in normalized camera coordinates |
output | The output frame resulting by application of the given homography |
outputMask | Mask frame with 8 bit per pixel defining whether an output frame pixel has a valid corresponding pixel in the input frame |
outputPaddingElements | The number of padding elements at the end of each output row, in elements, with range [0, infinity) |
outputMaskPaddingElements | The number of padding elements at the end of each output mask row, in elements, with range [0, infinity) |
maskValue | 8 bit mask values for reference pixels lying inside the given camera frame, reference pixels lying outside the camera frame will be assigned with (0xFF - maskValue) |
firstRow | The first row to be handled |
numberRows | Number of rows to be handled |
tChannels | Number of frame channels |
|
inlinestatic |
Determines the interpolated pixel values for a given pixel position in an 8 bit per channel frame with alpha channel.
The center of each pixel is located with an offset of (0.5 x 0.5) in relation to the real pixel position.
The given frame is virtually extended by a fully transparent border so that this functions supports arbitrary interpolation positions.
If the given position lies inside the frame area of (-0.5, -0.5) -> (width + 0.5, height + 0.5) the resulting interpolation result will contain color information of the frame, otherwise a fully transparent interpolation result is provided.
frame | The frame to determine the pixel values from, 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) |
position | The position to determine the interpolated pixel values for, with range (-infinity, infinity)x(-infinity, infinity) |
result | Resulting pixel values, must be valid |
framePaddingElements | The number of padding elements at the end of each frame row, in elements, with range [0, infinity) |
tChannels | Number of channels of the given frame, with range [1, infinity) |
tAlphaAtFront | True, if the alpha channel is in the front of the data channels |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
Interpolates 4 independent pixels concurrently based on already known locations (top-left, top-right, bottom-left, and bottom-right) and interpolation factors for the source pixels.
This function also supports to interpolate the pixel values for a subset of the four pixels only, valid pixels will be interpolated, invalid pixels receive a defined border color.
source | The source image in which the four independent pixels are located, must be valid |
offsetsTopLeftElements | The four offsets within the source image for the four top-left pixels used for the interpolation, in elements, with ranges [0, strideElements * height), or the corresponding validPixel information is 0x00000000 |
offsetsTopRightElements | The four offsets within the source image for the four top-right pixels used for the interpolation, in elements, with ranges [0, strideElements * height), or the corresponding validPixel information is 0x00000000 |
offsetsBottomLeftElements | The four offsets within the source image for the four bottom-right pixels used for the interpolation, in elements, with ranges [0, strideElements * height), or the corresponding validPixel information is 0x00000000 |
offsetsBottomRightElements | The four offsets within the source image for the four bottom-right pixels used for the interpolation, in elements, with ranges [0, strideElements * height), or the corresponding validPixel information is 0x00000000 |
validPixels | For boolean states specifying whether which of the given four pixels will be interpolated and which one will receive the defined border color, 0x00000000 for invalid pixels everything else for valid pixels (e.g., 0xFFFFFFFF) |
borderColor | The border color that will be assigned to each resulting pixel that is invalid (for which the corresponding validPixel information is 0x00000000 |
m128_factorsRight | The horizontal interpolation factors for right pixels, with range [0, 128], 128 to use the color information of the right pixels only, 0 to use the color information of the left pixels only |
m128_factorsBottom | The vertical interpolation factors for bottom pixels, with range [0, 128], 128 to use the color information of the bottom pixels only, 0 to use the color information of the top pixels only |
targetPositionPixels | The buffer that will receive the interpolated color values, must be valid |
tChannels | The number of frame channels, with range [1, infinity) |
|
staticprivate |
Interpolates 4 independent pixels concurrently based on already known locations (top-left, top-right, bottom-left, and bottom-right) and interpolation factors for the source pixels.
This function also supports to interpolate the pixel values for a subset of the four pixels only, valid pixels will be interpolated, invalid pixels receive a defined border color.
m128_sourcesTopLeft | The pixel values of the four top left pixels, starting at the first byte may contain unused bytes at the end, e.g., RGBARGBARGBARGBA or YUVYUVYUVYUV-— |
m128_sourcesTopRight | The pixel values of the four top right pixels, starting at the first byte may contain unused bytes at the end |
m128_sourcesBottomLeft | The pixel values of the four bottom left pixels, starting at the first byte may contain unused bytes at the end |
m128_sourcesBottomRight | The pixel values of the four bottom right pixels, starting at the first byte may contain unused bytes at the end |
m128_factorsTopLeft | The four interpolation factors of the four top left pixels, with ranges [0, 128 * 128], so that (m128_factorsTopLeft + m128_factorsTopRight + m128_factorsBottomLeft + m128_factorsBottomRight) == (128 * 128) |
m128_factorsTopRight | The four interpolation factors of the four top right pixels, with ranges [0, 128 * 128], so that (m128_factorsTopLeft + m128_factorsTopRight + m128_factorsBottomLeft + m128_factorsBottomRight) == (128 * 128) |
m128_factorsBottomLeft | The four interpolation factors of the four bottom left pixels, with ranges [0, 128 * 128], so that (m128_factorsTopLeft + m128_factorsTopRight + m128_factorsBottomLeft + m128_factorsBottomRight) == (128 * 128) |
m128_factorsBottomRight | The four interpolation factors of the four bottom right pixels, with ranges [0, 128 * 128], so that (m128_factorsTopLeft + m128_factorsTopRight + m128_factorsBottomLeft + m128_factorsBottomRight) == (128 * 128) |
tChannels | The number of frame channels, with range [3, 4] |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
Interpolates 4 independent pixels concurrently based on already known locations (top-left, top-right, bottom-left, and bottom-right) and interpolation factors for the source pixels.
This function also supports to interpolate the pixel values for a subset of the four pixels only, valid pixels will be interpolated, invalid pixels receive a defined border color.
source | The source image in which the four independent pixels are located, must be valid |
offsetsTopLeft | The four offsets within the source image for the four top-left pixels used for the interpolation, with range [0, (width * tChannels + sourcePaddingElements) * (height - 1) + width * tChannels), or the corresponding validPixel information is 0x00000000 |
offsetsTopRight | The four offsets within the source image for the four top-right pixels used for the interpolation, with range [0, (width * tChannels + sourcePaddingElements) * (height - 1) + width * tChannels), or the corresponding validPixel information is 0x00000000 |
offsetsBottomLeft | The four offsets within the source image for the four bottom-right pixels used for the interpolation, with range [0, (width * tChannels + sourcePaddingElements) * (height - 1) + width * tChannels), or the corresponding validPixel information is 0x00000000 |
offsetsBottomRight | The four offsets within the source image for the four bottom-right pixels used for the interpolation, with range [0, (width * tChannels + sourcePaddingElements) * (height - 1) + width * tChannels), or the corresponding validPixel information is 0x00000000 |
validPixels | For boolean states specifying whether which of the given four pixels will be interpolated and which one will receive the defined border color, 0x00000000 for invalid pixels everything else for valid pixels (e.g., 0xFFFFFFFF) |
borderColor | The border color that will be assigned to each resulting pixel that is invalid (for which the corresponding validPixel information is 0x00000000 |
m128_factorsRight | The horizontal interpolation factors for right pixels, with range [0, 128], 128 to use the color information of the right pixels only, 0 to use the color information of the left pixels only |
m128_factorsBottom | The vertical interpolation factors for bottom pixels, with range [0, 128], 128 to use the color information of the bottom pixels only, 0 to use the color information of the top pixels only |
targetPositionPixels | The buffer that will receive the interpolated color values, must be valid |
tChannels | The number of frame channels, with range [1, infinity) |
|
staticprivate |
Interpolates 8 independent pixels concurrently of a 1 channel frame, the source pixel locations must be known already (top-left, top-right, bottom-left, and bottom-right), further the interpolation factors must be known already.
topLeft_u_8x8 | The 8 top left pixel values to be used for interpolation |
topRight_u_8x8 | The 8 top right pixel values to be used for interpolation |
bottomLeft_u_8x8 | The 8 bottom left pixel values to be used for interpolation |
bottomRight_u_8x8 | The 8 bottom right pixel values to be used for interpolation |
factorsRight_factorsBottom_128_u_8x16 | The eight horizontal interpolation factors for right pixels, and the eight vertical interpolation factors for the bottom pixels, with range [0, 128], 128 to use the color information of the right pixels only, 0 to use the color information of the left pixels only |
targetPositionPixels | The buffer that will receive the interpolated color values, must be valid |
|
inlinestatic |
Determines the interpolated pixel values for a given pixel position in a frame with arbitrary data type.
This function uses floating point precision during interpolation.
frame | The frame to determine the pixel values from, 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) |
framePaddingElements | The number of padding elements at the end of each frame row, in elements, with range [0, infinity) |
position | The position for which the interpolated pixel will be determined, with ranges [0, width - 1]x[0, height - 1] for PC_TOP_LEFT, [0, width]x[0, height] for PC_CENTER |
result | Resulting interpolated pixel value(s), must be valid |
resultBias | Optional bias value which will be added to the interpolation result e.g. to handle rounding, with range (-infinity, infinity), default is zero |
TSource | The data type of the provided pixel values in the (source) frame |
TTarget | The data type of the resulting interpolated value(s) |
tChannels | Number of channels of the given frame, with range [1, infinity) |
tPixelCenter | The pixel center to be used during interpolation, either 'PC_TOP_LEFT' or 'PC_CENTER' |
TScalar | The data type of each coordinate of the provided interpolation location, should be either Scalar, float, or double |
TIntermediate | The data type of the intermediate interpolation result before assigning the result |
|
inlinestatic |
Determines the interpolated pixel values for a given pixel position in an 8 bit per channel frame.
This function uses an integer interpolation with a precision of 1/128.
frame | The frame to determine the pixel values from, 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) |
framePaddingElements | The number of padding elements at the end of each frame row, in elements, with range [0, infinity) |
position | The position for which the interpolated pixel will be determined, with ranges [0, width - 1]x[0, height - 1] for PC_TOP_LEFT, [0, width]x[0, height] for PC_CENTER |
result | Resulting pixel values, must be valid, must be valid |
tChannels | Number of channels of the given frame, with range [1, infinity) |
tPixelCenter | The pixel center to be used during interpolation, either 'PC_TOP_LEFT' or 'PC_CENTER' |
TScalar | The scalar data type of the sub-pixel position |
|
staticprivate |
Applies a (horizontal) linear interpolation for one row with arbitrary data type.
This function does not apply any SIMD instructions.
extendedSourceRow | The source row extended with a copy of the last pixel for which the interpolation will be applied, must be valid |
targetRow | The target row receiving the interpolation result, must be valid |
targetWidth | The with of the target row in pixel, with range [8, infinity) |
channels | The number of frame channels, must be identical with 'tChannels', possible values are 1, 4 |
interpolationLocations | The successive locations within the source row defining the location of the left pixels to be interpolated (specified in elements !not! in pixels - e.g., interpolationLocations[0] = firstInterpolationPixel * channels), one for each target pixel, with range [0, (targetWidth - 1) * channels] |
interpolationFactorsRight | The right interpolation factors for each right source pixel, with range [0, 1] |
T | The data type of each element, should be 'float' |
tChannels | The number of frame channels this function can handle, should be 1 |
|
staticprivate |
Applies a (horizontal) linear interpolation for one row with 8 bit per channel.
This function uses interpolation factors with 7 bit precision and does not apply any SIMD instructions.
extendedSourceRow | The source row extended with a copy of the last pixel for which the interpolation will be applied, must be valid |
targetRow | The target row receiving the interpolation result, must be valid |
targetWidth | The with of the target row in pixel, with range [8, infinity) |
channels | The number of frame channels, must be identical with 'tChannels', possible values are 1, 4 |
interpolationLocations | The successive locations within the source row defining the location of the left pixels to be interpolated (specified in elements !not! in pixels - e.g., interpolationLocations[0] = firstInterpolationPixel * channels), one for each target pixel, with range [0, (targetWidth - 1) * channels] |
interpolationFactors | The two successive (left !and! right) interpolation factors for each left and right source pixel, with range [0, 128] |
|
staticprivate |
Applies a (horizontal) linear interpolation for one row with 8 bit per channel.
This function applies NEON instructions and uses interpolation factors with 7 bit precision.
extendedSourceRow | The source row extended with a copy of the last pixel for which the interpolation will be applied, must be valid |
targetRow | The target row receiving the interpolation result, must be valid |
targetWidth | The with of the target row in pixel, with range [8, infinity) |
channels | The number of frame channels, must be identical with 'tChannels', possible values are 1, 4 |
interpolationLocations | The successive locations within the source row defining the location of the left pixels to be interpolated (specified in elements !not! in pixels - e.g., interpolationLocations[0] = firstInterpolationPixel * channels), one for each target pixel, with range [0, (targetWidth - 1) * channels] |
interpolationFactors | The two successive (left !and! right) interpolation factors for each left and right source pixel, with range [0, 128] |
tChannels | The number of frame channels this function can handle, possible values are 1, 4 |
|
inlinestaticprivate |
|
staticprivate |
Applies a (horizontal) linear interpolation for one row with arbitrary data type.
This function applies NEON instructions.
extendedSourceRow | The source row extended with a copy of the last pixel for which the interpolation will be applied, must be valid |
targetRow | The target row receiving the interpolation result, must be valid |
targetWidth | The with of the target row in pixel, with range [8, infinity) |
channels | The number of frame channels, must be identical with 'tChannels', possible values are 1, 4 |
interpolationLocations | The successive locations within the source row defining the location of the left pixels to be interpolated (specified in elements !not! in pixels - e.g., interpolationLocations[0] = firstInterpolationPixel * channels), one for each target pixel, with range [0, (targetWidth - 1) * channels] |
interpolationFactorsRight | The right interpolation factors for each right source pixel, with range [0, 1] |
T | The data type of each element, should be 'float' |
tChannels | The number of frame channels this function can handle, should be 1 |
|
staticprivate |
Applies a (vertical) linear interpolation between two rows with arbitrary data types.
This function does not apply any SIMD instructions.
The length of both source rows is identical with the length of the target row.
sourceRowTop | The top source row to be used for interpolation, must be valid |
sourceRowBottom | The bottom source row to be used for interpolation, must be valid |
targetRow | The target row receiving the interpolation result, must be valid |
elements | The number of elements in the row to (width * channels), with range [1, infinity) |
factorBottom | The interpolation factor for all elements of the bottom row, with factorTop = 1 - factorBottom, with range [0, 1] |
T | The data type of each element, should be 'float' |
|
staticprivate |
Applies a (vertical) linear interpolation between two rows with 8 bit per channel.
This function applies NEON instructions and uses interpolation factors with 7 bit precision.
The length of both source rows is identical with the length of the target row.
sourceRowTop | The top source row to be used for interpolation, must be valid |
sourceRowBottom | The bottom source row to be used for interpolation, must be valid |
targetRow | The target row receiving the interpolation result, must be valid |
elements | The number of elements in the row to (width * channels), with range [16, infinity) |
factorBottom | The interpolation factor for all elements of the bottom row, with factorTop = 128 - factorBottom, with range [0, 128] |
|
inlinestaticprivate |
|
staticprivate |
Applies a (vertical) linear interpolation between two rows with arbitrary data types.
This function applies NEON instructions.
The length of both source rows is identical with the length of the target row.
sourceRowTop | The top source row to be used for interpolation, must be valid |
sourceRowBottom | The bottom source row to be used for interpolation, must be valid |
targetRow | The target row receiving the interpolation result, must be valid |
elements | The number of elements in the row to (width * channels), with range [16, infinity) |
factorBottom | The interpolation factor for all elements of the bottom row, with factorTop = 1 - factorBottom, with range [0, 1] |
T | The data type of each element, should be 'float' |
|
inlinestatic |
Transforms a given input frame into an output frame by application of an interpolation lookup table.
The frame must have a 1-plane pixel format.
The output frame must have the same pixel format and pixel origin as the input frame.
input | The input frame which will be transformed, must be valid |
inputWidth | The width of the given input frame in pixel, with range [1, infinity) |
inputHeight | The height of the given input frame in pixel, with range [1, infinity) |
input_LT_output | The lookup table which defines the transformation from locations defined in the output frame to locations defined in the input frame (the lookup table stores the corresponding locations in the input frame), must be valid |
offset | True, if the lookup table store local offsets; False, if the lookup table stores absolute positions |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign T(0) to each channel |
output | Resulting output frame with frame dimension equal to the size of the given lookup table, must be valid |
inputPaddingElements | The number of padding elements at the end of each input row, in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each output row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
T | Data type of each pixel channel, e.g., float, double, int |
tChannels | Number of channels of the frame, with range [1, infinity) |
|
staticprivate |
Transforms a subset of a given input frame with uint8_t as element type into an output frame by application of an interpolation lookup table.
The output frame must have the same pixel format and pixel origin as the input frame.
input | The input frame which will be transformed, must be valid |
inputWidth | The width of the given input frame in pixel, with range [1, infinity) |
inputHeight | The height of the given input frame in pixel, with range [1, infinity) |
input_LT_output | The lookup table which defines the transformation from locations defined in the output frame to locations defined in the input frame (the lookup table stores the corresponding locations in the input frame), must be valid |
offset | True, if the lookup table store local offsets; False, if the lookup table stores absolute positions |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
output | Resulting output frame with frame dimension equal to the size of the given lookup table |
inputPaddingElements | Number of padding elements at the end of each input row, in elements, with range [0, infinity) |
outputPaddingElements | Number of padding elements at the end of each output row, in elements, with range [0, infinity) |
firstRow | First row to be handled, with range [0, input_LT_output->sizeY()) |
numberRows | Number of rows to be handled, with range [1, input_LT_output->sizeY() - firstRow] |
tChannels | Number of channels of the frame, with range [1, infinity) |
|
staticprivate |
Transforms a subset of a given input frame into an output frame by application of an interpolation lookup table and uses NEON instructions.
The output frame must have the same pixel format and pixel origin as the input frame.
input | The input frame which will be transformed, must be valid |
inputWidth | The width of the given input frame in pixel, with range [1, infinity) |
inputHeight | The height of the given input frame in pixel, with range [1, infinity) |
input_LT_output | The lookup table which defines the transformation from locations defined in the output frame to locations defined in the input frame (the lookup table stores the corresponding locations in the input frame), with table width >= 4, must be valid |
offset | True, if the lookup table store local offsets; False, if the lookup table stores absolute positions |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign 0x00 to each channel |
output | Resulting output frame with frame dimension equal to the size of the given lookup table |
inputPaddingElements | Number of padding elements at the end of each input row, in elements, with range [0, infinity) |
outputPaddingElements | Number of padding elements at the end of each output row, in elements, with range [0, infinity) |
firstRow | First row to be handled, with range [0, input_LT_output->sizeY()) |
numberRows | Number of rows to be handled, with range [1, input_LT_output->sizeY() - firstRow] |
tChannels | Number of channels of the frame, with range [1, infinity) |
|
inlinestaticprivate |
|
inlinestatic |
Transforms a given input frame into an output frame by application of an interpolation lookup table.
The frame must have a 1-plane pixel format with DT_UNSIGNED_INTEGER_8 as data type (e.g., FORMAT_Y8, FORMAT_RGB24, FORMAT_RGBA32, ...).
The output frame must have the same pixel format and pixel origin as the input frame.
Input frame pixels lying outside the frame will be masked in the resulting output mask frame, further theses pixels are untouched in the output frame.
input | The input frame which will be transformed |
inputWidth | The width of the given input frame in pixel, with range [1, infinity) |
inputHeight | The height of the given input frame in pixel, with range [1, infinity) |
input_LT_output | The lookup table which defines the transformation from locations defined in the output frame to locations defined in the input frame (the lookup table stores the corresponding locations in the input frame), must be valid |
offset | True, if the lookup table store local offsets; False, if the lookup table stores absolute positions |
output | Resulting output frame with frame dimension equal to the size of the given lookup table |
outputMask | Resulting mask frame with 8 bits per pixel defining whether an output frame pixel has a valid corresponding pixel in the input frame |
inputPaddingElements | The number of padding elements at the end of each row of input , in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each row of output , in elements, with range [0, infinity) |
outputMaskPaddingElements | The number of padding elements at the end of each row of outputMask , in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
maskValue | 8 bit mask values for pixels lying inside the input frame, pixels lying outside the input frame will be assigned with (0xFF - maskValue) |
tChannels | Number of channels of the frame |
|
staticprivate |
Transforms a given input frame into an output frame by application of an interpolation lookup table.
The output frame must have the same pixel format and pixel origin as the input frame.
Input frame pixels lying outside the frame will be masked in the resulting output mask frame, further theses pixels are untouched in the output frame.
input | The input frame which will be transformed |
inputWidth | The width of the given input frame in pixel, with range [1, infinity) |
inputHeight | The height of the given input frame in pixel, with range [1, infinity) |
input_LT_output | The lookup table which defines the transformation from locations defined in the output frame to locations defined in the input frame (the lookup table stores the corresponding locations in the input frame), must be valid |
offset | True, if the lookup table store local offsets; False, if the lookup table stores absolute positions |
output | Resulting output frame with frame dimension equal to the size of the given lookup table |
outputMask | Resulting mask frame with 8 bit per pixel defining whether an output frame pixel has a valid corresponding pixel in the input frame |
maskValue | 8 bit mask values for pixels lying inside the input frame, pixels lying outside the input frame will be assigned with (0xFF - maskValue) |
inputPaddingElements | The number of padding elements at the end of each row of input , in elements, with range [0, infinity) |
outputPaddingElements | The number of padding elements at the end of each row of output , in elements, with range [0, infinity) |
outputMaskPaddingElements | The number of padding elements at the end of each row of outputMask , in elements, with range [0, infinity) |
firstRow | First row to be handled |
numberRows | Number of rows to be handled |
tChannels | Number of channels of the frame |
|
staticprivate |
Transforms a subset of a given input frame with arbitrary element type into an output frame by application of an interpolation lookup table.
The output frame must have the same pixel format and pixel origin as the input frame.
input | The input frame which will be transformed, must be valid |
inputWidth | The width of the given input frame in pixel, with range [1, infinity) |
inputHeight | The height of the given input frame in pixel, with range [1, infinity) |
input_LT_output | The lookup table which defines the transformation from locations defined in the output frame to locations defined in the input frame (the lookup table stores the corresponding locations in the input frame), must be valid |
offset | True, if the lookup table store local offsets; False, if the lookup table stores absolute positions |
borderColor | Color of undefined pixel positions, the size of the buffer must match to the number of channels, nullptr to assign T(0) to each channel |
output | Resulting output frame with frame dimension equal to the size of the given lookup table, must be valid |
inputPaddingElements | Number of padding elements at the end of each input row, in elements, with range [0, infinity) |
outputPaddingElements | Number of padding elements at the end of each output row, in elements, with range [0, infinity) |
firstRow | First row to be handled, with range [0, input_LT_output->sizeY()) |
numberRows | Number of rows to be handled, with range [1, input_LT_output->sizeY() - firstRow] |
T | Data type of each pixel channel, must not be 'uint8_t' |
tChannels | Number of channels of the frame, with range [1, infinity) |
|
static |
Interpolate the sum of intensity values of an image patch in a frame, while the frame is provided as lined integral frame.
linedIntegralFrame | The lined integral image created from the actual gray-scale image for which the patch intensity sum will be determined, must be valid |
frameWidth | Width of the original frame in pixel (not the width of the lined-integral frame), with range [1, infinity) |
frameHeight | Height of the original frame in pixel (not the height of the lined-integral frame), with range [1, infinity) |
lineIntegralFramePaddingElements | The number of padding elements at the end of each integral image row, in elements, with range [0, infinity) |
center | 2D coordinates of the center point of the patch, with range [patchWidth/2, frameWidth - patchWidth/2)x[patchHeight/2, frameHeight - patchHeight/2) for PC_CENTER |
pixelCenter | The pixel center to be used during interpolation, either 'PC_TOP_LEFT' or 'PC_CENTER' |
patchWidth | Width of the calculated patch in pixel with range [1, frameWidth - 1] |
patchHeight | Height of the calculated patch in pixel with range [1, frameHeight - 1] |
|
static |
Re-samples a camera image which has been captured with a camera profile as if the image would have been captured with a second camera profile.
The function can be used e.g., to rectify a fisheye camera image into a pinhole camera image.
sourceFrame | The source image captured with the source camera profile, must be valid |
sourceCamera | The source camera profile which has been used to capture the source image, with resolution sourceFrame.width() x sourceFrame.height(), must be valid |
source_R_target | The rotation transforming 3D points defined in the coordinate system of the target camera image to 3D points defined in the coordinate system of the source camera image, must be valid |
targetCamera | The camera profile of the target frame, must be valid |
targetFrame | The resulting target image, with resolution targetCamera.width() x targetCamera.height(), must be valid |
sourceFramePaddingElements | The number of padding elements at the end of each source frame row, in elements, with range [0, infinity) |
targetFramePaddingElements | The number of padding elements at the end of each target frame row, in elements, with range [0, infinity) |
source_OLT_target | Optional resulting offset lookup table between target image points and source image points |
worker | Optional worker object to distribute the computational load |
binSizeInPixel | The size in pixel of the interpolation bins used for building the lookup table, with range [1, infinity) |
borderColor | The color of border pixels for which now visual content exists, provide one value for each channel, nullptr to use T(0) for each channel |
T | Data type of each pixel channel, e.g., uint8_t, int16_t, float, double |
tChannels | The number of frame channels, with range [1, infinity) |
|
inlinestatic |
Resizes a given frame with (almost) arbitrary data type (e.g., float, double, int) by using a bilinear interpolation.
This function is actually a wrapper for scale().
source | The source frame buffer providing the image information to be resized, must be valid |
target | The target frame buffer receiving the resized image information, must be valid |
sourceWidth | Width of the source frame in pixel, with range [1, infinity) |
sourceHeight | Height of the source frame in pixel, with range [1, infinity) |
targetWidth | Width of the target frame in pixel, with range [1, infinity) |
targetHeight | Height of the 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) |
worker | Optional worker object to distribute the computation to several CPU cores |
T | Data type of each pixel channel, e.g., float, double, int |
tChannels | Number of channels of the frame, with range [1, infinity) |
|
inlinestatic |
Rotates a given frame by a bilinear interpolation.
The frame will be rotated around a specified anchor position (inside or outside the frame).
source | The source frame to be rotated, must be valid |
target | The target frame which will receive the rotated image, with same frame type as the source frame, must be valid |
width | The width of the source and target frame in pixel, with range [1, infinity) |
height | The height of the source and target frame in pixel, with range [1, infinity) |
horizontalAnchorPosition | Position of the rotation anchor in the horizontal direction, with range (-infinity, infinity) |
verticalAnchorPosition | Position of the rotation anchor in the vertical direction, with range (-infinity, infinity) |
angle | The counter clockwise rotation angle in radian, with range [0, 2PI) |
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 to several CPU cores |
borderColor | The color of border pixels for which now visual content exists, provide one value for each channel, nullptr to use 0x00 for each channel |
tChannels | The number of channels both frames have, with range [1, infinity) |
|
staticprivate |
Rotates a subset of a given frame by a bilinear interpolation.
source | The source frame to be rotated, must be valid |
target | The target frame which will receive the rotated image, with same frame type as the source frame, must be valid |
width | The width of the source and target frame in pixel, with range [1, infinity) |
height | The height of the source and target frame in pixel, with range [1, infinity) |
horizontalAnchorPosition | Position of the rotation anchor in the horizontal direction, with range (-infinity, infinity) |
verticalAnchorPosition | Position of the rotation anchor in the vertical direction, with range (-infinity, infinity) |
angle | The counter clockwise rotation angle in radian, with range [0, 2PI) |
borderColor | The color of border pixels for which now visual content exists, provide one value for each channel, nullptr to use 0x00 for each channel |
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) |
firstTargetRow | The first row of the target frame to be handled, with range [0, height) |
numberTargetRows | The number of rows in the target frame to be handled, with range [1, height - firstTargetRow] |
tChannels | Number of frame channels, with range [1, infinity) |
|
inlinestatic |
Rescales a given frame with arbitrary data type (e.g., float, double, int) by using a bilinear interpolation with user-defined scaling factors.
Beware: This function is not optimized for performance but supports arbitrary data types.
Try to use scale8BitPerChannel() if possible.
source | The source frame buffer providing the image information to be resized, must be valid |
target | The target frame buffer receiving the rescaled image information, must be valid |
sourceWidth | Width of the source frame in pixel, with range [1, infinity) |
sourceHeight | Height of the source frame in pixel, with range [1, infinity) |
targetWidth | Width of the target frame in pixel, with range [1, infinity) |
targetHeight | Height of the target frame in pixel, with range [1, infinity) |
sourceX_s_targetX | The horizontal scale factor converting a location in the target frame to a location in the source frame (xSource = sourceX_s_targetX * xTarget), with range (0, sourceWidth/targetWidth] |
sourceY_s_targetY | The vertical scale factor converting a location in the target frame to a location in the source frame (ySource = sourceY_s_targetY * yTarget), with range (0, sourceHeight/targetHeight] |
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 to several CPU cores |
T | Data type of each pixel channel, e.g., float, double, int |
tChannels | Number of channels of the frame, with range [1, infinity) |
|
inlinestaticprivate |
Rescales a given frame with 8 bit per data channel by using a bilinear interpolation with user-defined scaling factors.
The frame must have a 1-plane pixel format with DT_UNSIGNED_INTEGER_8 as data type (e.g., FORMAT_Y8, FORMAT_RGB24, FORMAT_RGBA32, ...).
Information: This function is the equivalent to OpenCV's cv::resize().
source | The source frame buffer providing the image information to be resized, must be valid |
target | The target frame buffer receiving the rescaled image information, must be valid |
sourceWidth | Width of the source frame in pixel, with range [1, infinity) |
sourceHeight | Height of the source frame in pixel, with range [1, infinity) |
targetWidth | Width of the target frame in pixel, with range [1, infinity) |
targetHeight | Height of the target frame in pixel, with range [1, infinity) |
sourceX_s_targetX | The horizontal scale factor converting a location in the target frame to a location in the source frame (xSource = sourceX_s_targetX * xTarget), with range (0, sourceWidth/targetWidth] |
sourceY_s_targetY | The vertical scale factor converting a location in the target frame to a location in the source frame (ySource = sourceY_s_targetY * yTarget), with range (0, sourceHeight/targetHeight] |
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 to several CPU cores |
tChannels | Number of channels of the frame, with range [1, infinity) |
|
staticprivate |
Resizes a subset of a given frame with 8 bit per channel by a bilinear interpolation.
source | The image data of the source frame to be resized, must be valid |
target | The target frame buffer receiving the interpolated (resized) source frame, must be valid |
sourceWidth | Width of the source frame in pixel, with range [1, infinity) |
sourceHeight | Height of the source frame in pixel, with range [1, infinity) |
targetWidth | Width of the target frame in pixel, with range [1, infinity) |
targetHeight | Height of the target frame in pixel, with range [1, infinity) |
sourceX_s_targetX | The horizontal scale factor converting a location in the target frame to a location in the source frame (xSource = sourceX_s_targetX * xTarget), with range (0, sourceWidth/targetWidth] |
sourceY_s_targetY | The vertical scale factor converting a location in the target frame to a location in the source frame (ySource = sourceY_s_targetY * yTarget), with range (0, sourceHeight/targetHeight] |
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) |
firstTargetRow | The first target row to be handled, with range [0, targetHeight) |
numberTargetRows | The number of target row to be handled, with range [1, targetHeight - firstTargetRow] |
tChannels | Number of frame channels, with range [0, infinity) |
|
inlinestaticprivate |
Rescales a subset of a given frame with 8 bit per channel by a bilinear interpolation.
This function applies NEON instructions and uses interpolation factors with 7 bit precision.
source | The image data of the source frame to be resized, must be valid |
target | The target frame buffer receiving the interpolated (resized) source frame, must be valid |
sourceWidth | Width of the source frame in pixel, with range [2, 65.535] |
sourceHeight | Height of the source frame in pixel, with range [1, 65.535] |
targetWidth | Width of the target frame in pixel, with range [tMinimalTargetWidth, 65.535] |
targetHeight | Height of the target frame in pixel, with range [1, infinity) |
channels | The number of channels both frames have, with range [1, infinity) |
sourceX_s_targetX | The horizontal scale factor converting a location in the target frame to a location in the source frame (xSource = sourceX_s_targetX * xTarget), with range (0, sourceWidth/targetWidth] |
sourceY_s_targetY | The vertical scale factor converting a location in the target frame to a location in the source frame (ySource = sourceY_s_targetY * yTarget), with range (0, sourceHeight/targetHeight] |
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) |
firstTargetRow | The first target row to be handled, with range [0, targetHeight) |
numberTargetRows | The number of target row to be handled, with range [1, targetHeight - firstTargetRow] |
|
inlinestaticprivate |
|
staticprivate |
Resizes a subset of a given frame with arbitrary data type by a bilinear interpolation.
source | The image data of the source frame to be resized, must be valid |
target | The target frame buffer receiving the interpolated (resized) source frame, must be valid |
sourceWidth | Width of the source frame in pixel, with range [1, infinity) |
sourceHeight | Height of the source frame in pixel, with range [1, infinity) |
targetWidth | Width of the target frame in pixel, with range [1, infinity) |
targetHeight | Height of the target frame in pixel, with range [1, infinity) |
sourceX_s_targetX | The horizontal scale factor converting a location in the target frame to a location in the source frame (xSource = sourceX_s_targetX * xTarget), with range (0, sourceWidth/targetWidth] |
sourceY_s_targetY | The vertical scale factor converting a location in the target frame to a location in the source frame (ySource = sourceY_s_targetY * yTarget), with range (0, sourceHeight/targetHeight] |
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) |
firstTargetRow | The first target row to be handled, with range [0, targetHeight) |
numberTargetRows | The number of target row to be handled, with range [1, targetHeight - firstTargetRow] |
T | The data type of each pixel channel, e.g., float, double, int, short, ... |
TScale | The data type of the internal scaling factors to be used, should be 'float' or 'double' |
tChannels | Number of frame channels, with range [0, infinity) |