Qualcomm FastCV Library  1.7.1
Image transformation

Functions

FASTCV_API int fcvScaleDownBy2u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst)
 Down-scale the image to half width and height by averaging 2x2 pixels into one.
FASTCV_API int fcvScaleDownBy2u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride)
 Down-scale the image to half width and height by averaging 2x2 pixels into one.
FASTCV_API void fcvScaleDownBy2Gaussian5x5u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst)
 Downscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel.
FASTCV_API void fcvScaleDownBy2Gaussian5x5u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride)
 Downscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel.
FASTCV_API int fcvScaleDownBy4u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst)
 Downscale the image to quarter width and height by averaging 4x4 pixels into one..
FASTCV_API int fcvScaleDownBy4u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride)
 Downscale the image to quarter width and height by averaging 4x4 pixels into one..
FASTCV_API int fcvScaleDown3To2u8 (const uint8_t *__restrict src, unsigned srcWidth, unsigned srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride)
 Downscale the image to 2/3 width and height by averaging 3x3 pixels into one..
FASTCV_API int fcvScaleDownNNu8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstWidth, unsigned int dstHeight, unsigned int dstStride)
 Downsample Horizontaly and/or Vertically by an *integer* scale.
FASTCV_API void fcvScaleDownu8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst, unsigned int dstWidth, unsigned int dstHeight)
 Downsample Horizontaly and/or Vertically by an *integer* scale.
FASTCV_API void fcvScaleDownu8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstWidth, unsigned int dstHeight, unsigned int dstStride)
 Downsample Horizontaly and/or Vertically by an *integer* scale.
FASTCV_API void fcvScaleUpBy2Gaussian5x5u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst)
 Upscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel.
FASTCV_API void fcvScaleUpBy2Gaussian5x5u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride)
 Upscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel.
FASTCV_API int fcvTransformAffine8x8u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, const int32_t *__restrict nPos, const int32_t *__restrict nAffine, uint8_t *__restrict nPatch)
 Warps the patch centered at nPos in the input image using the affine transform in nAffine.
FASTCV_API int fcvTransformAffine8x8u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, const int32_t *__restrict nPos, const int32_t *__restrict nAffine, uint8_t *__restrict patch, unsigned int patchStride)
 Warps the patch centered at nPos in the input image using the affine transform in nAffine.
FASTCV_API void fcvWarpPerspectiveu8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst, unsigned int dstWidth, unsigned int dstHeight, float *__restrict projectionMatrix)
 Warps a grayscale image using the a perspective projection transformation matrix (also known as a homography). This type of transformation is an invertible transformation which maps straight lines to straight lines. Bi-linear interpolation is used where applicable.
FASTCV_API void fcvWarpPerspectiveu8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstWidth, unsigned int dstHeight, unsigned int dstStride, float *__restrict projectionMatrix)
 Warps a grayscale image using the a perspective projection transformation matrix (also known as a homography). This type of transformation is an invertible transformation which maps straight lines to straight lines. Bi-linear interpolation is used where applicable.
FASTCV_API void fcv3ChannelWarpPerspectiveu8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst, unsigned int dstWidth, unsigned int dstHeight, float *__restrict projectionMatrix)
 Warps a 3 color channel image based on a 3x3 perspective projection matrix using bilinear interpolation.
FASTCV_API void fcv3ChannelWarpPerspectiveu8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstWidth, unsigned int dstHeight, unsigned int dstStride, float *__restrict projectionMatrix)
 Warps a 3 color channel image based on a 3x3 perspective projection matrix using bilinear interpolation.
FASTCV_API int fcvTransformAffineu8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, const float *__restrict position, const float *__restrict affine, uint8_t *__restrict patch, unsigned int patchWidth, unsigned int patchHeight)
 Warps the patch centered at nPos in the input image using the affine transform in nAffine.
FASTCV_API int fcvTransformAffineu8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, const float *__restrict position, const float *__restrict affine, uint8_t *__restrict patch, unsigned int patchWidth, unsigned int patchHeight, unsigned int patchStride)
 Warps the patch centered at nPos in the input image using the affine transform in nAffine.
FASTCV_API void fcvCopyRotated17x17u8 (const uint8_t *__restrict src, uint8_t *__restrict dst, int orientation)
 Extracts a 17x17 rotation corrected patch from a 25x25 image.
FASTCV_API void fcvDWTHarrTransposeu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dst, uint32_t dstStride)
 Performs forward Haar discrete wavelet transform on input image and transpose the result.
FASTCV_API void fcvDWTHaarTransposeu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dst, uint32_t dstStride)
 Performs forward Haar discrete wavelet transform on input image and transposes the result.
FASTCV_API void fcvDWT53TabTransposes16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dst, uint32_t dstStride)
 Performs forward 5-3 Tab discrete wavelet transform on input image and transposes the result.
FASTCV_API void fcvIDWT53TabTransposes16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dst, uint32_t dstStride)
 Performs inverse 5-3 Tab discrete wavelet transform on input image and transposes the result.
FASTCV_API void fcvIDWTHarrTransposes16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride)
 Performs inverse Haar discrete wavelet transform on input image and transpose the result.
FASTCV_API void fcvIDWTHaarTransposes16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride)
 Performs inverse Haar discrete wavelet transform on input image and transposes the result.
FASTCV_API void fcvDWTHaaru8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dst, uint32_t dstStride)
 Performs forward Haar discrete wavelet transform on input image.
FASTCV_API void fcvDWT53Tabs16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dst, uint32_t dstStride)
 Performs forward 5-3 Tab discrete wavelet transform on input image.
FASTCV_API void fcvIDWT53Tabs16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dst, uint32_t dstStride)
 Performs inverse 5-3 Tab discrete wavelet transform on input image.
FASTCV_API void fcvIDWTHaars16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride)
 Performs inverse Haar discrete wavelet transform on input image.
FASTCV_API void fcvDCTu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dst, uint32_t dstStride)
 Performs forward discrete Cosine transform on uint8_t pixels.
FASTCV_API void fcvIDCTs16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride)
 Performs inverse discrete cosine transform on int16_t coefficients.
FASTCV_API void fcvScaleUpPolyu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride)
 Perform image upscaling using polyphase filters.
FASTCV_API void fcvScaleUpPolyInterleaveu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride)
 Interleaved image (CbCr or CrCb) upscaling using polyphase filters.
FASTCV_API void fcvScaleDownMNu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride)
 Image downscaling using MN method
NOTE: This MN downscalar supports up to 1/20x downscaling.
FASTCV_API void fcvScaleDownMNInterleaveu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride)
 Interleaved image downscaling using MN method.
FASTCV_API void fcvGetPerspectiveTransformf32 (const float32_t src1[8], const float32_t src2[8], float32_t transformCoefficient[9])
 Calculates a perspective transform from four pairs of the corresponding points. NOTE: in order to guarantee a valid output transform, any three points in src1 or src2 cannot be collinear.
FASTCV_API void fcvRemapRGBA8888NNu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, const float32_t *__restrict mapX, const float32_t *__restrict mapY, uint32_t mapStride)
 Applies a generic geometrical transformation to a 4-channel uint8 image. The interpolation method is nearest neighbor.
FASTCV_API void fcvRemapRGBA8888BLu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, const float32_t *__restrict mapX, const float32_t *__restrict mapY, uint32_t mapStride)
 Applies a generic geometrical transformation to a 4-channel uint8 image with bilinear interpolation.
FASTCV_API void fcvTransformAffineClippedu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, const float32_t *__restrict affineMatrix, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, uint32_t *__restrict dstBorder)
 Applies an affine transformation on a grayscale image using a 2x3 matrix. Pixels are sampled using bi-linear interpolation. Pixels that would be sampled from outside the source image are not modified in the target image. The left-most and right-most pixel coordinates of each scanline are written to dstBorder.
FASTCV_API fcvStatus fcvTransformAffineClippedu8_v2 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, const float32_t *__restrict affineMatrix, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, uint32_t *__restrict dstBorder, fcvInterpolationType interpolation)
 Applies an affine transformation on a grayscale image using a 2x3 matrix. Pixels that would be sampled from outside the source image are not modified in the target image. The left-most and right-most pixel coordinates of each scanline are written to dstBorder.
FASTCV_API fcvStatus fcvTransformAffineClippedu8_v3 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, const float32_t *__restrict affineMatrix, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, uint32_t *__restrict dstBorder, fcvInterpolationType interpolation, fcvBorderType borderType, uint8_t borderValue)
 Applies an affine transformation on a grayscale image using a 2x3 matrix. Pixels that would be sampled from outside the source image are not modified in the target image. The left-most and right-most pixel coordinates of each scanline are written to dstBorder.
FASTCV_API void fcv3ChannelTransformAffineClippedBCu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, const float32_t *__restrict affineMatrix, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, uint32_t *__restrict dstBorder)
 Applies an affine transformation on a 3-color channel image using a 2x3 matrix using bicubic interpolation. Pixels that would be sampled from outside the source image are not modified in the target image. The left-most and right-most pixel coordinates of each scanline are written to dstBorder.
FASTCV_API void fcvScaleDownBLu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride)
 Image downscaling using bilinear method.
FASTCV_API fcvStatus fcvTableLookupu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, const uint8_t *__restrict lut, uint8_t *__restrict dst, uint32_t dstStride)
 Applies a Table Look-up transformation to a single-channel uint8 image.
FASTCV_API fcvStatus fcvWarpPerspectiveu8_v3 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, float *__restrict projectionMatrix, fcvInterpolationType interpolation)
 Warps a grayscale image using the a perspective projection transformation matrix (also known as a homography). This type of transformation is an invertible transformation which maps straight lines to straight lines.
FASTCV_API fcvStatus fcvWarpPerspectiveu8_v4 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, float *__restrict projectionMatrix, fcvInterpolationType interpolation, fcvBorderType borderType, uint8_t borderValue)
 Warps a grayscale image using the a perspective projection transformation matrix (also known as a homography). This type of transformation is an invertible transformation which maps straight lines to straight lines.
FASTCV_API fcvStatus fcvRemapu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, const float32_t *__restrict mapX, const float32_t *__restrict mapY, uint32_t mapStride, fcvInterpolationType interpolation)
 Applies a generic geometrical transformation to a greyscale uint8 image. The interpolation method is specified through a parameter.
FASTCV_API fcvStatus fcvRemapu8_v2 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, const float32_t *__restrict mapX, const float32_t *__restrict mapY, uint32_t mapStride, fcvInterpolationType interpolation, fcvBorderType borderType, uint8_t borderValue)
 Applies a generic geometrical transformation to a greyscale uint8 image. The interpolation method is specified through a parameter.
FASTCV_API fcvStatus fcvMagnitudes16 (const int16_t *__restrict src1, uint32_t width, uint32_t height, uint32_t src1Stride, const int16_t *__restrict src2, uint32_t src2Stride, int16_t *__restrict dst, uint32_t dstStride)
 Gradient Magnitude Computation from two int16_t type matrices.
FASTCV_API fcvStatus fcvPhases16 (const int16_t *__restrict src1, uint32_t width, uint32_t height, uint32_t src1Stride, const int16_t *__restrict src2, uint32_t src2Stride, uint8_t *__restrict dst, uint32_t dstStride)
 Gradient Phase Computation from two int16_t type matrices.
FASTCV_API fcvStatus fcvFFTu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t *__restrict dst, uint32_t dstStride)
FASTCV_API fcvStatus fcvIFFTf32 (const float32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride)
 Computes the 1D or 2D Inverse Fast Fourier Transform of a matrix.
FASTCV_API fcvStatus fcvScaleu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, fcvInterpolationType interpolation)
 Scale an image Horizontaly and/or Vertically by arbitrary ratio. The scaling ratios are automatically determined from the specified source image size and destination image size.
FASTCV_API fcvStatus fcvScaleu8_v2 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, fcvInterpolationType interpolation, fcvBorderType borderType, uint8_t borderValue)
 Scale an image Horizontaly and/or Vertically by arbitrary ratio. The scaling ratios are automatically determined from the specified source image size and destination image size.
FASTCV_API fcvStatus fcv2PlaneWarpPerspectiveu8 (const uint8_t *__restrict src1, const uint8_t *__restrict src2, uint32_t srcWidth, uint32_t srcHeight, uint32_t src1Stride, uint32_t src2Stride, uint8_t *__restrict dst1, uint8_t *__restrict dst2, uint32_t dstWidth, uint32_t dstHeight, uint32_t dst1Stride, uint32_t dst2Stride, float32_t *__restrict warpmatrix)
 Perspective warp two images using the same transformation. Bi-linear interpolation is used where applicable.
FASTCV_API fcvStatus fcvScaleDownBy2Gaussian3x3u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride)
 Downscale a grayscale image by a factor of two using a 3x3 Gaussian filter kernel.

Detailed Description

Warp perspective, affine transformations


Function Documentation

FASTCV_API fcvStatus fcv2PlaneWarpPerspectiveu8 ( const uint8_t *__restrict  src1,
const uint8_t *__restrict  src2,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  src1Stride,
uint32_t  src2Stride,
uint8_t *__restrict  dst1,
uint8_t *__restrict  dst2,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dst1Stride,
uint32_t  dst2Stride,
float32_t *__restrict  warpmatrix 
)

Perspective warp two images using the same transformation. Bi-linear interpolation is used where applicable.

Perspective warp two images (or buffer) using the same transformation in one function call. This can be used, for example, to warp a grayscale image and an alpha image at the same time, or warp two color channels (for example u and v de-interleaved for YUV).

Parameters:
src1First input 8-bit image. Size of buffer is src1Stride*srcHeight bytes.
src2Second input 8-bit image. Size of buffer is src2Stride*srcHeight bytes.
srcWidthInput image width.
srcHeightInput image height.
src1StrideInput image 1 stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row. If srcStride is equal to 0, it will be set to srcWidth.
src2StrideInput image 2 stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row. If srcStride is equal to 0, it will be set to srcWidth.
dst1First warped output image (correspond to src1). Size of buffer is dst1Stride*dstHeight bytes.
dst2Second warped output image (correspond to src2). Size of buffer is dst2Stride*dstHeight bytes.
dstWidthDst image width.
dstHeightDst image height.
dst1StrideOutput image 1 stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row. If srcStride is equal to 0, it will be set to dstWidth.
dst2StrideOutput image 2 stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row. If srcStride is equal to 0, it will be set to dstWidth.
warpmatrix3x3 perspective transformation matrix (generally a homography).
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API void fcv3ChannelTransformAffineClippedBCu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
const float32_t *__restrict  affineMatrix,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
uint32_t *__restrict  dstBorder 
)

Applies an affine transformation on a 3-color channel image using a 2x3 matrix using bicubic interpolation. Pixels that would be sampled from outside the source image are not modified in the target image. The left-most and right-most pixel coordinates of each scanline are written to dstBorder.

Parameters:
srcInput image. Size of buffer is srcStride*srcHeight bytes.
WARNING: data should be 128-bit aligned.
srcWidthInput image width.
srcHeightInput image height.
srcStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory.
NOTE: if 0, srcStride is set as srcWidth*3.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth*3 if not 0.
affineMatrix2x3 perspective transformation matrix. The matrix stored in affineMatrix is using row major ordering:
a11, a12, a13, a21, a22, a23 where the matrix is:
| a11, a12, a13 |
| a21, a22, a23 |
Warning: the convention for rotation angle is: positive for clockwise rotation and negative for counter-clockwise rotation. If there's unexpected result, it could be due to different rotation convention. If that's the case, negate the angle before calculating transform matrix.

The affine matrix follows the so-called inverse mapping convention. It is applied to the dst coordinates to produce the corresponding src coordinates. In other 3rd party tools, the so-called forward mapping convention may be used, where the affine matrix refers to the one applied to the src coordinates to produce the dst coordinates. When comparing with 3rd party results, please make sure the same convention of affine matrices are assumed. If not, please transform the affine matrix into an equivalent form under the forward mapping convention before feeding it into 3rd party tools.

Parameters:
dstWarped output image. Size of buffer is dstStride*dstHeight bytes.
WARNING: should be 128-bit aligned.
dstWidthOutput image width.
dstHeightOutput image height.
dstStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory.
NOTE: if 0, dstStride is set as dstWidth*3.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth*3 if not 0.
NOTE: data should be 128-bit aligned.
dstBorderOutput array receiving the x-coordinates of left-most and right-most pixels for each scanline. The format of the array is: l0,r0,l1,r1,l2,r2,... where l0 is the left-most pixel coordinate in scanline 0 and r0 is the right-most pixel coordinate in scanline 0. The buffer must therefore be 2*dstHeight integers in size.
NOTE: data should be 128-bit aligned.
FASTCV_API void fcv3ChannelWarpPerspectiveu8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
uint8_t *__restrict  dst,
unsigned int  dstWidth,
unsigned int  dstHeight,
float *__restrict  projectionMatrix 
)

Warps a 3 color channel image based on a 3x3 perspective projection matrix using bilinear interpolation.


ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcv3ChannelWarpPerspectiveu8_v2(). In the 2.0.0 release, fcv3ChannelWarpPerspectiveu8_v2 will be renamed to fcv3ChannelWarpPerspectiveu8 and the signature of fcv3ChannelWarpPerspectiveu8 as it appears now, will be removed.

Parameters:
srcInput image. Size of buffer is srcWidth*srcHeight*3 bytes.
NOTE: data should be 128-bit aligned.
srcWidthInput image width.
NOTE: should be multiple of 8
srcHeightInput image height.
NOTE: should be multiple of 8
dstWarped output image. Size of buffer is dstWidth*dstHeight*3 bytes.
NOTE: data should be 128-bit aligned.
dstWidthOutput image width.
NOTE: should be multiple of 8.
dstHeightOutput image height.
NOTE: should be multiple of 8.
projectionMatrix3x3 perspective transformation matrix (generally a homography). The matrix stored in homography is row major ordering:
a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is:
| a11, a12, a13 |
| a21, a22, a23 |
| a31, a32, a33 |

WARNING: should be 128-bit aligned.

Note: The projection matrix follows the so-called inverse mapping convention. It is applied to the dst coordinates to produce the corresponding src coordinates. In other 3rd party tools, the so-called forward mapping convention may be used, where the projection matrix refers to the one applied to the src coordinates to produce the dst coordinates. When comparing with 3rd party results, please make sure the same convention of projection matrices are assumed. If not, please transform the projection matrix into an equivalent form under the forward mapping convention before feeding it into 3rd party tools.

FASTCV_API void fcv3ChannelWarpPerspectiveu8_v2 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
uint8_t *__restrict  dst,
unsigned int  dstWidth,
unsigned int  dstHeight,
unsigned int  dstStride,
float *__restrict  projectionMatrix 
)

Warps a 3 color channel image based on a 3x3 perspective projection matrix using bilinear interpolation.


ATTENTION: This function is a duplication of fcv3ChannelWarpPerspectiveu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcv3ChannelWarpPerspectiveu8, fcv3ChannelWarpPerspectiveu8_v2 will be removed, and the current signature for fcv3ChannelWarpPerspectiveu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcv3ChannelWarpPerspectiveu8 when transitioning to 2.0.0.

Parameters:
srcInput image. Size of buffer is srcStride*srcHeight bytes.
WARNING: data should be 128-bit aligned.
srcWidthInput image width.
WARNING: should be multiple of 8
srcHeightInput image height.
WARNING: should be multiple of 8
srcStrideInput image stride (in bytes).
NOTE: if 0, srcStride is set as srcWidth*3.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth*3 if not 0.
dstWarped output image. Size of buffer is dstStride*dstHeight bytes.
WARNING: should be 128-bit aligned.
dstWidthOutput image width.
WARNING: should be multiple of 8.
dstHeightOutput image height.
WARNING: should be multiple of 8.
dstStrideOutput image stride (in bytes).
NOTE: if 0, dstStride is set as dstWidth*3.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth*3 if not 0.
projectionMatrix3x3 perspective transformation matrix (generally a homography). The matrix stored in homography is row major ordering:
a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is:
| a11, a12, a13 |
| a21, a22, a23 |
| a31, a32, a33 |

WARNING: should be 128-bit aligned.

Note: The projection matrix follows the so-called inverse mapping convention. It is applied to the dst coordinates to produce the corresponding src coordinates. In other 3rd party tools, the so-called forward mapping convention may be used, where the projection matrix refers to the one applied to the src coordinates to produce the dst coordinates. When comparing with 3rd party results, please make sure the same convention of projection matrices are assumed. If not, please transform the projection matrix into an equivalent form under the forward mapping convention before feeding it into 3rd party tools.

FASTCV_API void fcvCopyRotated17x17u8 ( const uint8_t *__restrict  src,
uint8_t *__restrict  dst,
int  orientation 
)

Extracts a 17x17 rotation corrected patch from a 25x25 image.

Parameters:
src25x25 input image in continuous memory.
dst17x17 output patch.
orientationRotation angle of patch relative to src.
10-bit fixed-point angle around unit circle.
NOTE: 0 = 0 degrees and 1024 = 360 degrees.
FASTCV_API void fcvDCTu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Performs forward discrete Cosine transform on uint8_t pixels.

This function performs 8x8 forward discrete Cosine transform on input image

Parameters:
srcPointer to input single plane image
NOTE: should be 128-bit aligned.
srcWidthWidth of the input image
NOTE: should be a multiple of 8.
srcHeightHeight of the input image
srcStrideStride of input image (i.e., number of bytes between column 0 of row 1 and column 0 of row 2). If left at 0, srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
dstPointer to output image
NOTE: should be 128-bit aligned.
dstStrideStride of output image (i.e., number of bytes between column 0 of row 1 and column 0 of row 2). If left at 0, dstStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
FASTCV_API void fcvDWT53Tabs16 ( const int16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Performs forward 5-3 Tab discrete wavelet transform on input image.

This function performs forward discrete wavelet transform on the input image using 5-3 Tab kernel.

Parameters:
srcPointer to input single plane image
NOTE: should be 128-bit aligned.
srcWidthWidth of the input image
NOTE: should be a multiple of 8.
srcHeightHeight of the input image
srcStrideStride of input image (i.e., number of bytes between column 0 of row 1 and column 0 of row 2). If left at 0, srcStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
dstPointer to output image
NOTE: should be 128-bit aligned.
dstStrideStride of output image (i.e., number of bytes between column 0 of row 1 and column 0 of row 2). If left at 0, dstStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
FASTCV_API void fcvDWT53TabTransposes16 ( const int16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Performs forward 5-3 Tab discrete wavelet transform on input image and transposes the result.

This function performs forward discrete wavelet transform on input image using the 5-tab low pass filter and the 3-tab high pass filter: 5-tab low pass: [ -1/8 1/4 3/4 1/4 -1/8 ] * 2^(1/2) 3-tab high pass: [ -1/2 1 -1/2 ] * 2^(-1/2) This function also transposes the result.

Parameters:
srcInput image
NOTE: should be 128-bit aligned.
srcWidthImage width
NOTE: should be a multiple of 8.
srcHeightImage height
srcStrideStride of input image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, srcStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
dstOutput image that has been transformed and transposed
NOTE: should be 128-bit aligned.
dstStrideStride of output image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, dstStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
FASTCV_API void fcvDWTHaarTransposeu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Performs forward Haar discrete wavelet transform on input image and transposes the result.

This function performs forward discrete wavelet transform on input image using the Haar kernel: Low pass: [ 1 1 ] * 2^(-1/2) High pass: [ 1 -1 ] * 2^(-1/2) This function also transposes the result.

Parameters:
srcInput image
NOTE: should be 128-bit aligned.
srcWidthImage width
NOTE: should be a multiple of 8.
srcHeightImage height
srcStrideStride of input image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
dstOutput image that has been transformed and transposed
NOTE: should be 128-bit aligned.
dstStrideStride of output image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, dstStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
FASTCV_API void fcvDWTHaaru8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Performs forward Haar discrete wavelet transform on input image.

This function performs forward discrete wavelet transform on the input image using Haar kernel.

Parameters:
srcPointer to input single plane image
NOTE: should be 128-bit aligned.
srcWidthWidth of the input image
NOTE: should be a multiple of 8.
srcHeightHeight of the input image
srcStrideStride of input image (i.e., number of bytes between column 0 of row 1 and column 0 of row 2). If left at 0, srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
dstPointer to output image
NOTE: should be 128-bit aligned.
dstStrideStride of output image (i.e., number of bytes between column 0 of row 1 and column 0 of row 2). If left at 0, dstStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
FASTCV_API void fcvDWTHarrTransposeu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Performs forward Haar discrete wavelet transform on input image and transpose the result.


ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvDWTHaarTransposeu8(). In the 2.0.0 release, the signature of fcvDWTHarrTransposeu8 as it appears now, will be removed.

Parameters:
srcInput image
NOTE: should be 128-bit aligned.
srcWidthImage width
NOTE: should be a multiple of 8.
srcHeightImage height
srcStrideStride of input image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1) If left at 0, srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
dstOutput image
NOTE: should be 128-bit aligned.
dstStrideStride of output image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1) If left at 0, dstStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
FASTCV_API fcvStatus fcvFFTu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the 1D or 2D Fast Fourier Transform of a matrix.

Computes the 1D or 2D Fast Fourier Transform of a real valued matrix. For the 2D case, The width and height of the input and output matrix must be powers of 2. For the 1D case, the height of the matrices must be 1, while the width must be a power of 2.

Parameters:
srcAn 8 bit unsigned real valued input matrix. The dimensions of the matrix must be powers of 2 for the 2D case, and in the 1D case, the height must be 1, while the width must be a power of 2.
NOTE: array should be 128-bit aligned
srcWidthWidth of the source matrix.
NOTE: Must be a power of 2
srcHeightHeight of the source matrix.
NOTE: Must be a power of 2 for the 2D case, and must be set to 1 for the 1D case
srcStrideStride of the input matrix. Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is set to srcWidth.
WARNING: should be multiple of 8
dstThe computed FFT matrix. The FFT coefficients are stored in interleaved fashion, i.e., Re1 Im1 Re2 Im2 and so on. Hence the dimensions of the dst are (2 x srcWidth, srcHeight)
NOTE: array should be 128-bit aligned
dstStrideStride of the output matrix. Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0, dstStride is set to 2 x srcWidth x sizeof(float32_t).
WARNING: should be multiple of 8
FASTCV_API void fcvGetPerspectiveTransformf32 ( const float32_t  src1[8],
const float32_t  src2[8],
float32_t  transformCoefficient[9] 
)

Calculates a perspective transform from four pairs of the corresponding points. NOTE: in order to guarantee a valid output transform, any three points in src1 or src2 cannot be collinear.

Parameters:
src1Coordinates of quadrangle vertices in the source image
src2Coordinates of the corresponding quadrangle vertices in the destination image
transformCoefficient3x3 matrix of a perspective transform
FASTCV_API void fcvIDCTs16 ( const int16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Performs inverse discrete cosine transform on int16_t coefficients.

This function performs 8x8 inverse discrete Cosine transform on input image

Parameters:
srcPointer to input single plane image
NOTE: should be 128-bit aligned.
srcWidthWidth of the input image
NOTE: should be a multiple of 8.
srcHeightHeight of the input image
srcStrideStride of input image (i.e., number of bytes between column 0 of row 1 and column 0 of row 2). If left at 0, srcStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
dstPointer to output image
NOTE: should be 128-bit aligned.
dstStrideStride of output image (i.e., number of bytes between column 0 of row 1 and column 0 of row 2). If left at 0, dstStride is default to srcWidth.
NOTE: should be a multiple of 8.
FASTCV_API void fcvIDWT53Tabs16 ( const int16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Performs inverse 5-3 Tab discrete wavelet transform on input image.

This function performs inverse discrete wavelet transform on the input image using 5-3 Tab kernel.

Parameters:
srcPointer to input single plane image
NOTE: should be 128-bit aligned.
srcWidthWidth of the input image
NOTE: should be a multiple of 8.
srcHeightHeight of the input image
srcStrideStride of input image (i.e., number of bytes between column 0 of row 1 and column 0 of row 2). If left at 0, srcStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
dstPointer to output image
NOTE: should be 128-bit aligned.
dstStrideStride of output image (i.e., number of bytes between column 0 of row 1 and column 0 of row 2). If left at 0, dstStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
FASTCV_API void fcvIDWT53TabTransposes16 ( const int16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Performs inverse 5-3 Tab discrete wavelet transform on input image and transposes the result.

This function performs inverse discrete wavelet transform on input image using the 3-tab low pass filter and the 5-tab high pass filter: 3-tab low pass: [ -1/2 1 -1/2 ] * 2^(-1/2) 5-tab high pass: [ -1/8 1/4 3/4 1/4 -1/8 ] * 2^(1/2) This function also transposes the result.

Parameters:
srcInput image
NOTE: should be 128-bit aligned.
srcWidthImage width
NOTE: should be a multiple of 8.
srcHeightImage height
srcStrideStride of input image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, srcStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
dstOutput image that has been transformed and transposed
NOTE: should be 128-bit aligned.
dstStrideStride of output image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, dstStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
FASTCV_API void fcvIDWTHaars16 ( const int16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Performs inverse Haar discrete wavelet transform on input image.

This function performs inverse discrete wavelet transform on the input image using Haar kernel.

Parameters:
srcPointer to input single plane image
NOTE: should be 128-bit aligned.
srcWidthWidth of the input image
NOTE: should be a multiple of 8.
srcHeightHeight of the input image
srcStrideStride of input image (i.e., number of bytes between column 0 of row 1 and column 0 of row 2). If left at 0, srcStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
dstPointer to output image
NOTE: should be 128-bit aligned.
dstStrideStride of output image (i.e., number of bytes between column 0 of row 1 and column 0 of row 2). If left at 0, dstStride is default to srcWidth.
NOTE: should be a multiple of 8.
FASTCV_API void fcvIDWTHaarTransposes16 ( const int16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Performs inverse Haar discrete wavelet transform on input image and transposes the result.

This function performs inverse discrete wavelet transform on input image using the Haar kernel: Low pass: [ 1 1 ] * 2^(-1/2) High pass: [ 1 -1 ] * 2^(-1/2) This function also transposes the result.

Parameters:
srcInput image
NOTE: should be 128-bit aligned.
srcWidthImage width
NOTE: should be a multiple of 8.
srcHeightImage height
srcStrideStride of input image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, srcStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
dstOutput image that has been transformed and transposed
NOTE: should be 128-bit aligned.
dstStrideStride of output image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, dstStride is default to srcWidth.
NOTE: should be a multiple of 8.
FASTCV_API void fcvIDWTHarrTransposes16 ( const int16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Performs inverse Haar discrete wavelet transform on input image and transpose the result.


ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvIDWTHaarTransposes16(). In the 2.0.0 release, the signature of fcvIDWTHarrTransposes16 as it appears now, will be removed.

Parameters:
srcInput image
NOTE: should be 128-bit aligned.
srcWidthImage width
NOTE: should be a multiple of 8.
srcHeightImage height
srcStrideStride of input image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, srcStride is default to srcWidth * sizeof(int16_t).
NOTE: should be a multiple of 8.
dstOutput image
NOTE: should be 128-bit aligned.
dstStrideStride of output image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, dstStride is default to srcWidth.
NOTE: should be a multiple of 8.
FASTCV_API fcvStatus fcvIFFTf32 ( const float32_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the 1D or 2D Inverse Fast Fourier Transform of a matrix.

Computes the 1D or 2D Inverse Fast Fourier Transform of a complex valued matrix. For the 2D case, The width and height of the input and output matrix must be powers of 2. For the 1D case, the height of the matrices must be 1, while the width must be a power of 2.

Parameters:
srcAn 32 bit floating point complex valued input matrix. The data in the matrix must be stored in an interleaved fashion, i.e., Re1 Im1 Re2 Im2 and so on. The dimensions of the matrix must be powers of 2 for the 2D case, and in the 1D case, the height must be 1, while the width must be a power of 2.
NOTE: array should be 128-bit aligned
srcWidthWidth of the source matrix. The width here is the number of floating point units in the matrix. Since the data is interleaved fashion, i.e., Re1 Im1 Re2 Im2 and so on, the width is the total number of real and complex units in the matrix. For example, if the Matrix has data values Re1 Im1 Re2 Im2 Re3 Im3 Re4 Im4, then the width here is 8 units.
NOTE: Must be a power of 2
srcHeightHeight of the source matrix.
NOTE: Must be a power of 2 for the 2D case, and must be set to 1 for the 1D case
srcStrideStride of the input matrix. Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is set to srcWidth x sizeof(float32_t).
WARNING: should be multiple of 8
dstThe computed IFFT matrix. The matrix is real valued and has no imaginary components. Hence the dimensions of the dst are (srcWidth / 2 , srcHeight)
NOTE: array should be 128-bit aligned
dstStrideStride of the output matrix. Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0, dstStride is set to (srcWidth / 2).
WARNING: should be multiple of 8
FASTCV_API fcvStatus fcvMagnitudes16 ( const int16_t *__restrict  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const int16_t *__restrict  src2,
uint32_t  src2Stride,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Gradient Magnitude Computation from two int16_t type matrices.

The function takes two gradient matrices in int16_t and computes the magnitude in int16_t.
NOTE: Saturation is used when computed magnitude value is larger than max limit of int16_t.

Parameters:
src1The gradient matrix in X direction.
NOTE: array should be 128-bit aligned
widthWidth of the source matrix.
heightHeight of the source matrix.
src1StrideStride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*2.
WARNING: should be multiple of 8
src2The gradient matrix in Y direction.
NOTE: array should be 128-bit aligned
src2StrideStride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*2.
WARNING: should be multiple of 8
dstthe result matrix (int16_t type).
NOTE: array should be 128-bit aligned
dstStrideStride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
WARNING: should be multiple of 8
FASTCV_API fcvStatus fcvPhases16 ( const int16_t *__restrict  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const int16_t *__restrict  src2,
uint32_t  src2Stride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Gradient Phase Computation from two int16_t type matrices.

The function takes two gradient matrices in int16_t and computes the phase for each pixel, storing results in a uint8_t matrix. The phase angle is translated to [0, 2*PI) and then mapped to range [0, 255).

Parameters:
src1The gradient matrix in X direction.
NOTE: array should be 128-bit aligned
widthWidth of the source matrix.
heightHeight of the source matrix.
src1StrideStride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*2.
WARNING: should be multiple of 8
src2The gradient matrix in Y direction.
NOTE: array should be 128-bit aligned
src2StrideStride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*2.
WARNING: should be multiple of 8
dstthe result matrix (uint8_t type).
NOTE: array should be 128-bit aligned
dstStrideStride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
WARNING: should be multiple of 8
FASTCV_API void fcvRemapRGBA8888BLu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
const float32_t *__restrict  mapX,
const float32_t *__restrict  mapY,
uint32_t  mapStride 
)

Applies a generic geometrical transformation to a 4-channel uint8 image with bilinear interpolation.

The brightness of each pixel in the destination image is obtained from a location of the source image through a per-element mapping as defined in the mapping matrices. The mapping has subpixel precision, thus interpolations are involved.

Parameters:
srcInput uint8_t image. The size of buffer is srcStride*srcHeight bytes.
NOTE: should be 128-bit aligned.
srcWidthInput image width.
NOTE: should be a multiple of 8.
srcHeightInput image height.
srcStrideInput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if srcStride is equal to 0, it will be set to srcWidth*4.
NOTE: should be a multiple of 8.
dstOutput image which has the same type, and size as the input image. The size of buffer is dstStride*dstHeight bytes.
NOTE: should be 128-bit aligned.
dstWidthOutput image width.
dstHeightOutput image height.
dstStrideOutput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if dstStride equals to 0, it will be set to dstWidth*4.
NOTE: should be a multiple of 8.
mapXa floating point matrix, each element is the column coordinate of the mapped location in the src image. E.g. if dst(i,j) is mapped to src(ii,jj), then mapX(i,j) =jj. the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
NOTE: should be 128-bit aligned.
mapYa floating point matrix, each element is the row coordinate of the mapped location in the src image.E.g. if dst(i,j) is mapped to src(ii,jj), then mapY(i,j) =ii. the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
NOTE: should be 128-bit aligned.
mapStridethe stride of the mapX and mapY if mapStride equals to 0, it will be set to dstWidth*4.
NOTE: should be a multiple of 8.
Returns:
No return value
FASTCV_API void fcvRemapRGBA8888NNu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
const float32_t *__restrict  mapX,
const float32_t *__restrict  mapY,
uint32_t  mapStride 
)

Applies a generic geometrical transformation to a 4-channel uint8 image. The interpolation method is nearest neighbor.

The brightness of each pixel in the destination image is obtained from a location of the source image through a per-element mapping as defined in the mapping matrices. The mapping has subpixel precision, thus interpolations are involved.

Parameters:
srcInput uint8_t image. The size of buffer is srcStride*srcHeight bytes.
NOTE: should be 128-bit aligned.
srcWidthInput image width.
NOTE: should be a multiple of 8.
srcHeightInput image height.
srcStrideInput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if srcStride is equal to 0, it will be set to srcWidth*4.
NOTE: should be a multiple of 8.
dstOutput image which has the same type, and size as the input image. The size of buffer is dstStride*dstHeight bytes.
NOTE: should be 128-bit aligned.
dstWidthOutput image width.
dstHeightOutput image height.
dstStrideOutput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if dstStride is equal to 0, it will be set to dstWidth*4.
NOTE: should be a multiple of 8.
mapXa floating point matrix, each element is the column coordinate of the mapped location in the src image. E.g. if dst(i,j) is mapped to src(ii,jj), then mapX(i,j) =jj. the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
NOTE: should be 128-bit aligned.
mapYa floating point matrix, each element is the row coordinate of the mapped location in the src image.E.g. if dst(i,j) is mapped to src(ii,jj), then mapY(i,j) =ii. the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
NOTE: should be 128-bit aligned.
mapStridethe stride of the mapX and mapY if mapStride is equal to 0, it will be set to dstWidth*4.
NOTE: should be a multiple of 8.
Returns:
No return value
FASTCV_API fcvStatus fcvRemapu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
const float32_t *__restrict  mapX,
const float32_t *__restrict  mapY,
uint32_t  mapStride,
fcvInterpolationType  interpolation 
)

Applies a generic geometrical transformation to a greyscale uint8 image. The interpolation method is specified through a parameter.

The greyscale of each pixel in the destination image is obtained from a location of the source image through a per-element mapping as defined in the mapping matrices. The mapping has subpixel precision, thus interpolations are involved.

Parameters:
srcInput uint8_t image. The size of buffer is srcStride*srcHeight bytes.
NOTE: should be 128-bit aligned.
srcWidthInput image width.
NOTE: should be a multiple of 8.
srcHeightInput image height.
srcStrideInput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if srcStride is equal to 0, it will be set to srcWidth.
NOTE: should be a multiple of 8.
dstOutput image which has the same type, and size as the input image. The size of buffer is dstStride*dstHeight bytes.
NOTE: should be 128-bit aligned.
dstWidthOutput image width.
dstHeightOutput image height.
dstStrideOutput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if dstStride is equal to 0, it will be set to dstWidth.
NOTE: should be a multiple of 8.
mapXa floating point matrix, each element is the column coordinate of the mapped location in the src image. E.g. if dst(i,j) is mapped to src(ii,jj), then mapX(i,j) =jj. the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
NOTE: should be 128-bit aligned.
mapYa floating point matrix, each element is the row coordinate of the mapped location in the src image.E.g. if dst(i,j) is mapped to src(ii,jj), then mapY(i,j) =ii. the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
NOTE: should be 128-bit aligned.
mapStridethe stride of the mapX and mapY if mapStride is equal to 0, it will be set to dstWidth*sizeof(float32_t).
NOTE: should be a multiple of 8.
interpolationthe interpolation method to derive the dst pixel value. supported methods are nearest neighbor, bilinear and area.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvRemapu8_v2 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
const float32_t *__restrict  mapX,
const float32_t *__restrict  mapY,
uint32_t  mapStride,
fcvInterpolationType  interpolation,
fcvBorderType  borderType,
uint8_t  borderValue 
)

Applies a generic geometrical transformation to a greyscale uint8 image. The interpolation method is specified through a parameter.


ATTENTION: This function is a duplication of fcvRemapu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvRemapu8, fcvRemapu8_v2 will be removed, and the current signature for fcvRemapu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvRemapu8 when transitioning to 2.0.0.

The greyscale of each pixel in the destination image is obtained from a location of the source image through a per-element mapping as defined in the mapping matrices. The mapping has subpixel precision, thus interpolations are involved.

Parameters:
srcInput uint8_t image. The size of buffer is srcStride*srcHeight bytes.
NOTE: should be 128-bit aligned.
srcWidthInput image width.
NOTE: should be a multiple of 8.
srcHeightInput image height.
srcStrideInput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if srcStride is equal to 0, it will be set to srcWidth.
NOTE: should be a multiple of 8.
dstOutput image which has the same type, and size as the input image. The size of buffer is dstStride*dstHeight bytes.
NOTE: should be 128-bit aligned.
dstWidthOutput image width.
dstHeightOutput image height.
dstStrideOutput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if dstStride is equal to 0, it will be set to dstWidth.
NOTE: should be a multiple of 8.
mapXa floating point matrix, each element is the column coordinate of the mapped location in the src image. E.g. if dst(i,j) is mapped to src(ii,jj), then mapX(i,j) =jj. the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
NOTE: should be 128-bit aligned.
mapYa floating point matrix, each element is the row coordinate of the mapped location in the src image.E.g. if dst(i,j) is mapped to src(ii,jj), then mapY(i,j) =ii. the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
NOTE: should be 128-bit aligned.
mapStridethe stride of the mapX and mapY if mapStride is equal to 0, it will be set to dstWidth*sizeof(float32_t).
NOTE: should be a multiple of 8.
interpolationthe interpolation method to derive the dst pixel value. supported methods are nearest neighbor, bilinear and area.
borderTypeThe border mode for dst pixels not mapped to the src image. Supported modes are FASTCV_BORDER_UNDEFINED and FASTCV_BORDER_CONSTANT.
borderValueThe user-specified constant pixel value, in case FASTCV_BORDER_CONSTANT is chosen for borderType.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API int fcvScaleDown3To2u8 ( const uint8_t *__restrict  src,
unsigned  srcWidth,
unsigned  srcHeight,
unsigned int  srcStride,
uint8_t *__restrict  dst,
unsigned int  dstStride 
)

Downscale the image to 2/3 width and height by averaging 3x3 pixels into one..

A 3x3 downsampling box filter across adjacent pixels is applied.

Parameters:
srcInput 8-bit image.
WARNING: should be 128-bit aligned.
srcWidthImage width.
NOTE: In case of non multiple of 3, it will crop to the closest multiple of 3
srcHeightImage height.
NOTE: In case of non multiple of 3, it will crop to the closest multiple of 3
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). If 0 is passed, srcStride is set to srcWidth.
dstOutput 8-bit image.
WARNING: should be 128-bit aligned. Memory must be pre-allocated at least srcWidth * srcHeight * 2 / 3 dstWidth = srcWidth/3*2 dstHeight = srcHeight/3*2
dstStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). If 0 is passed, dstStride is set to dstWidth which is srcWidth *2/3.
Returns:
0 if successful
FASTCV_API void fcvScaleDownBLu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride 
)

Image downscaling using bilinear method.

Parameters:
srcInput image
NOTE: should be 128-bit aligned.
srcWidthInput image width
srcHeightInput image height
srcStrideStride of input image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
dstOutput image
NOTE: should be 128-bit aligned.
dstWidthOutput image width
dstHeightOutput image height
dstStrideStride of image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, dstStride is default to dstWidth.
NOTE: should be a multiple of 8.
Returns:
No return value.
FASTCV_API fcvStatus fcvScaleDownBy2Gaussian3x3u8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Downscale a grayscale image by a factor of two using a 3x3 Gaussian filter kernel.

This function first blurs the input image using a 3x3 Gaussian kernel, and then downsamples the image by selecting every other row and column. The dimensions of the destination image are computed as follows : dstWidth = (srcWidth + 1)/2 , dstHeight = (srcHeight + 1)/2

Parameters:
srcInput 8-bit image. Size of buffer is srcStride*srcHeight bytes.
srcWidthWidth of the input image.
srcHeightHeight of the input image
srcStrideImage stride (in bytes).
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
dstOutput 8-bit downscale image of size (srcWidth + 1) / 2 x (srcHeight + 1) / 2.
NOTE: border values have been taken care of w.r.t. the pixel coordinate.
dstStrideOutput stride (in bytes).
NOTE: if 0, dstStride is set as (srcWidth+1)/2.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as (srcWidth+1)/2 if not 0.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API void fcvScaleDownBy2Gaussian5x5u8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
uint8_t *__restrict  dst 
)

Downscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel.


ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvScaleDownBy2Gaussian5x5u8_v2(). In the 2.0.0 release, fcvScaleDownBy2Gaussian5x5u8_v2 will be renamed to fcvScaleDownBy2Gaussian5x5u8 and the signature of fcvScaleDownBy2Gaussian5x5u8 as it appears now, will be removed.

Downsamples the image using a 5x5 Gaussian filter kernel.

Parameters:
srcInput 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthImage width.
NOTE: should be multiple of 8
srcHeightImage height.
NOTE:must be a multiple of 2
dstOutput 8-bit downscale image of size (width / 2) x (height / 2).
NOTE: border values have been taken cared w.r.t. the pixel coordinate.
FASTCV_API void fcvScaleDownBy2Gaussian5x5u8_v2 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
uint8_t *__restrict  dst,
unsigned int  dstStride 
)

Downscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel.


ATTENTION: This function is a duplication of fcvScaleDownBy2Gaussian5x5u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvScaleDownBy2Gaussian5x5u8, fcvScaleDownBy2Gaussian5x5u8_v2 will be removed, and the current signature for fcvScaleDownBy2Gaussian5x5u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvScaleDownBy2Gaussian5x5u8 when transitioning to 2.0.0.

Downsamples the image using a 5x5 Gaussian filter kernel.

Parameters:
srcInput 8-bit image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthImage width.
NOTE: should be multiple of 8
srcHeightImage height.
srcStrideImage stride (in bytes).
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
dstOutput 8-bit downscale image of size (width / 2) x (height / 2).
NOTE: border values have been taken cared w.r.t. the pixel coordinate.
dstStrideOutput stride (in bytes).
NOTE: if 0, dstStride is set as srcWidth/2.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth/2 if not 0.
FASTCV_API int fcvScaleDownBy2u8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
uint8_t *__restrict  dst 
)

Down-scale the image to half width and height by averaging 2x2 pixels into one.


ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvScaleDownBy2u8_v2(). In the 2.0.0 release, fcvScaleDownBy2u8_v2 will be renamed to fcvScaleDownBy2u8 and the signature of fcvScaleDownBy2u8 as it appears now, will be removed.

A box filter downsampling the next pixel, the pixel below, and the next pixel to the pixel below into one pixel.
| px00 px01 px02 px03 |
| px10 px11 px12 px13 |
to:
| (px00+px01+px10+px11)/4 (px02+px03+px12+px13)/4 |

Parameters:
srcInput 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
NOTE: data should be 128-bit aligned.
srcWidthImage width.
WARNING: should be multiple of 8.
srcHeightImage height.
NOTE:must be a multiple of 2
dstOutput 8-bit image. Size of buffer is srcWidth*srcHeight/4 bytes.
NOTE: data should be 128-bit aligned.
FASTCV_API int fcvScaleDownBy2u8_v2 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
uint8_t *__restrict  dst,
unsigned int  dstStride 
)

Down-scale the image to half width and height by averaging 2x2 pixels into one.


ATTENTION: This function is a duplication of fcvScaleDownBy2u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvScaleDownBy2u8, fcvScaleDownBy2u8_v2 will be removed, and the current signature for fcvScaleDownBy2u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvScaleDownBy2u8 when transitioning to 2.0.0.

A box filter downsampling the next pixel, the pixel below, and the next pixel to the pixel below into one pixel.
| px00 px01 px02 px03 |
| px10 px11 px12 px13 |
to:
| (px00+px01+px10+px11)/4 (px02+px03+px12+px13)/4 |

Parameters:
srcInput 8-bit image. Size of buffer is srcStride*srcHeight bytes.
NOTE: data should be 128-bit aligned.
srcWidthImage width.
WARNING: should be multiple of 8.
srcHeightImage height.
NOTE:must be a multiple of 2
srcStrideImage stride (in bytes).
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
dstOutput 8-bit image. Size of buffer is dstStride*srcHeight/2 bytes.
NOTE: data should be 128-bit aligned.
dstStrideOutput stride (in bytes).
NOTE: if 0, dstStride is set as srcWidth/2.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth/2 if not 0.
FASTCV_API int fcvScaleDownBy4u8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
uint8_t *__restrict  dst 
)

Downscale the image to quarter width and height by averaging 4x4 pixels into one..


ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvScaleDownBy4u8_v2(). In the 2.0.0 release, fcvScaleDownBy4u8_v2 will be renamed to fcvScaleDownBy4u8 and the signature of fcvScaleDownBy4u8 as it appears now, will be removed.

A 4x4 downsampling box filter across adjacent pixels is applied.

Parameters:
srcInput 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthImage width.
NOTE: should be multiple of 8
srcHeightImage height.
NOTE:must be a multiple of 4
dstOutput 8-bit image. Size of buffer is srcWidth*srcHeight/16 bytes.
WARNING: should be 128-bit aligned.
FASTCV_API int fcvScaleDownBy4u8_v2 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
uint8_t *__restrict  dst,
unsigned int  dstStride 
)

Downscale the image to quarter width and height by averaging 4x4 pixels into one..


ATTENTION: This function is a duplication of fcvScaleDownBy4u8_v2() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvScaleDownBy4u8_v2, fcvScaleDownBy4u8_v2 will be removed, and the current signature for fcvScaleDownBy4u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvScaleDownBy4u8 when transitioning to 2.0.0.

A 4x4 downsampling box filter across adjacent pixels is applied.

Parameters:
srcInput 8-bit image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthImage width.
NOTE: should be multiple of 8
srcHeightImage height.
NOTE:must be a multiple of 4
srcStrideImage stride (in bytes).
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
dstOutput 8-bit image. Size of buffer is dstStride*srcHeight/4 bytes.
WARNING: should be 128-bit aligned.
dstStrideOutput stride (in bytes).
NOTE: if 0, dstStride is set as srcWidth/4.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth/4 if not 0.
FASTCV_API void fcvScaleDownMNInterleaveu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride 
)

Interleaved image downscaling using MN method.

The M over N downscale algorithm works on an arbitrary length (N) of input data, and generates another arbitrary length (M) of output data, with the output length M less or equal to the input length N.

Parameters:
srcInput image
NOTE: should be 128-bit aligned.
srcWidthInput image width, number of (CrCb/CbCr) pair
NOTE: should be a multiple of 8.
srcHeightInput image height
srcStrideStride of input image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, srcStride is default to srcWidth * 2.
NOTE: should be a multiple of 8.
dstOutput image
NOTE: should be 128-bit aligned.
dstWidthOutput image width , number of (CrCb/CbCr) pair
NOTE: should be a multiple of 8.
dstHeightOutput image height
dstStrideStride of output image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, dstStride is default to dstWidth * 2.
NOTE: should be a multiple of 8.
Returns:
No return value.
FASTCV_API void fcvScaleDownMNu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride 
)

Image downscaling using MN method
NOTE: This MN downscalar supports up to 1/20x downscaling.

The M over N downscale algorithm works on an arbitrary length (N) of input data, and generates another arbitrary length (M) of output data, with the output length M less or equal to the input length N.

Parameters:
srcInput image
NOTE: should be 128-bit aligned.
srcWidthInput image width
srcHeightInput image height
srcStrideStride of input image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
dstOutput image
NOTE: should be 128-bit aligned.
dstWidthOutput image width
dstHeightOutput image height
dstStrideStride of output image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1) If left at 0, dstStride is default to dstWidth.
NOTE: should be a multiple of 8.
Returns:
No return value.
FASTCV_API int fcvScaleDownNNu8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
uint8_t *__restrict  dst,
unsigned int  dstWidth,
unsigned int  dstHeight,
unsigned int  dstStride 
)

Downsample Horizontaly and/or Vertically by an *integer* scale.

Uses Nearest Neighbor method

Parameters:
srcInput 8-bit image.
WARNING: should be 128-bit aligned.
srcWidthSource Image width.
WARNING: should be multiple of 8.
srcHeightSource Image height.
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). If 0 is passed, srcStride is set to srcWidth.
dstOutput 8-bit image.
WARNING: should be 128-bit aligned.
dstWidthDestination Image width.
dstHeightDestination Image height.
dstStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). If 0 is passed, dstStride is set to dstWidth which is srcWidth *2/3.
Returns:
0 if successful
FASTCV_API void fcvScaleDownu8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
uint8_t *__restrict  dst,
unsigned int  dstWidth,
unsigned int  dstHeight 
)

Downsample Horizontaly and/or Vertically by an *integer* scale.


ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvScaleDownu8_v2(). In the 2.0.0 release, fcvScaleDownu8_v2 will be renamed to fcvScaleDownu8 and the signature of fcvScaleDownu8 as it appears now, will be removed.

Uses an box averaging filter of size MxN where M is the scale factor in horizontal dimension and N is the scale factor in the vertical dimension.
NOTE: input dimensions should be multiple of output dimensions.
NOTE: On different processors, some output pixel values may be off by 1

Parameters:
srcInput 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthSource Image width.
WARNING: should be multiple of 8.
srcHeightSource Image height.
dstOutput 8-bit image. Size of buffer is dstWidth*dstHeight bytes.
WARNING: should be 128-bit aligned.
dstWidthDestination Image width.
dstHeightDestination Image height.
FASTCV_API void fcvScaleDownu8_v2 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
uint8_t *__restrict  dst,
unsigned int  dstWidth,
unsigned int  dstHeight,
unsigned int  dstStride 
)

Downsample Horizontaly and/or Vertically by an *integer* scale.


ATTENTION: This function is a duplication of fcvScaleDownu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvScaleDownu8, fcvScaleDownu8_v2 will be removed, and the current signature for fcvScaleDownu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvScaleDownu8 when transitioning to 2.0.0.

Uses an box averaging filter of size MxN where M is the scale factor in horizontal dimension and N is the scale factor in the vertical dimension
NOTE: input dimensions should be multiple of output dimensions.
NOTE: On different processors, some output pixel values may be off by 1

Parameters:
srcInput 8-bit image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthSource Image width.
WARNING: should be multiple of 8.
srcHeightSource Image height.
srcStrideImage stride (in bytes).
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
dstOutput 8-bit image. Size of buffer is dstStride*dstHeight bytes.
WARNING: should be 128-bit aligned.
dstWidthDestination Image width.
dstHeightDestination Image height.
dstStrideOutput stride (in bytes).
NOTE: if 0, dstStride is set as dstWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
FASTCV_API fcvStatus fcvScaleu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
fcvInterpolationType  interpolation 
)

Scale an image Horizontaly and/or Vertically by arbitrary ratio. The scaling ratios are automatically determined from the specified source image size and destination image size.

Scale up or down the source image of size srcWidth-by-srcHeight to the destination image of size dstWidth-by-dstHeight. NOTE: dstWidth > 0 && dstHeight > 0.

Parameters:
srcInput 8-bit image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthSource Image width.
WARNING: should be multiple of 8.
srcHeightSource Image height.
srcStrideStride of source image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If set to 0, srcStride=srcWidth as default
dstOutput 8-bit image. Size of buffer is dstStride*dstHeight bytes.
WARNING: should be 128-bit aligned.
dstWidthDestination Image width.
dstHeightDestination Image height.
dstStrideStride of destination image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If set to 0, dstStride=dstWidth as default
interpolationThe interpolation method used for scaling. Please see fcvInterpolationType. FASTCV_INTERPOLATION_TYPE_NEAREST_NEIGHBOR: Nearest neighbor interpolation. FASTCV_INTERPOLATION_TYPE_BILINEAR: Bilinear interpolation. FASTCV_INTERPOLATION_TYPE_AREA: Interpolation by area. Output values are determined by weighted averages of the source pixels covered by the destination pixel. The averaging weight for each source pixel is proportional to its area overlapping with the destination pixel. Interpolation by area may produce more precise images for scale down operations.
Returns:
FASTCV_SUCCESS upon success. Other values otherwise.
FASTCV_API fcvStatus fcvScaleu8_v2 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
fcvInterpolationType  interpolation,
fcvBorderType  borderType,
uint8_t  borderValue 
)

Scale an image Horizontaly and/or Vertically by arbitrary ratio. The scaling ratios are automatically determined from the specified source image size and destination image size.


ATTENTION: This function is a duplication of fcvScaleu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvScaleu8, fcvScaleu8_v2 will be removed, and the current signature for fcvScaleu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvWarpPerspectiveu8 when transitioning to 2.0.0.

Scale up or down the source image of size srcWidth-by-srcHeight to the destination image of size dstWidth-by-dstHeight. NOTE: dstWidth > 0 && dstHeight > 0.

Parameters:
srcInput 8-bit image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthSource Image width.
WARNING: should be multiple of 8.
srcHeightSource Image height.
srcStrideStride of source image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If set to 0, srcStride=srcWidth as default
dstOutput 8-bit image. Size of buffer is dstStride*dstHeight bytes.
WARNING: should be 128-bit aligned.
dstWidthDestination Image width.
dstHeightDestination Image height.
dstStrideStride of destination image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If set to 0, dstStride=dstWidth as default
interpolationThe interpolation method used for scaling. Please see fcvInterpolationType. FASTCV_INTERPOLATION_TYPE_NEAREST_NEIGHBOR: Nearest neighbor interpolation. FASTCV_INTERPOLATION_TYPE_BILINEAR: Bilinear interpolation. FASTCV_INTERPOLATION_TYPE_AREA: Interpolation by area. Output values are determined by weighted averages of the source pixels covered by the destination pixel. The averaging weight for each source pixel is proportional to its area overlapping with the destination pixel. Interpolation by area may produce more precise images for scale down operations.
borderTypeThe border mode for dst pixels not mapped to the src image. Supported modes are FASTCV_BORDER_UNDEFINED, FASTCV_BORDER_CONSTANT and FASTCV_BORDER_REPLICATE.
borderValueThe user-specified constant pixel value, in case FASTCV_BORDER_CONSTANT is chosen for borderType.
Returns:
FASTCV_SUCCESS upon success. Other values otherwise.
FASTCV_API void fcvScaleUpBy2Gaussian5x5u8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
uint8_t *__restrict  dst 
)

Upscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel.


ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvScaleUpBy2Gaussian5x5u8_v2(). In the 2.0.0 release, fcvScaleUpBy2Gaussian5x5u8_v2 will be renamed to fcvScaleUpBy2Gaussian5x5u8 and the signature of fcvScaleUpBy2Gaussian5x5u8 as it appears now, will be removed.

Upsamples the image using a 5x5 Gaussian filter kernel. /n/b NOTE: border values have been taken care with Gaussion coefficients.

Parameters:
srcInput 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthImage width.
WARNING: should be multiple of 8.
srcHeightImage height.
dstOutput 8-bit upsampled image of size (2*width) x (2*height).
WARNING: should be 128-bit aligned.
FASTCV_API void fcvScaleUpBy2Gaussian5x5u8_v2 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
uint8_t *__restrict  dst,
unsigned int  dstStride 
)

Upscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel.


ATTENTION: This function is a duplication of fcvScaleUpBy2Gaussian5x5u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvScaleUpBy2Gaussian5x5u8, fcvScaleUpBy2Gaussian5x5u8_v2 will be removed, and the current signature for fcvScaleUpBy2Gaussian5x5u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvScaleUpBy2Gaussian5x5u8 when transitioning to 2.0.0.

Upsamples the image using a 5x5 Gaussian filter kernel. /n/b NOTE: border values have been taken care with Gaussion coefficients.

Parameters:
srcInput 8-bit image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthImage width.
WARNING: should be multiple of 8.
srcStrideImage stride (in bytes).
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
srcHeightImage height.
dstOutput 8-bit upsampled image of size (2*dstStride) x (2*srcHeight).
WARNING: should be 128-bit aligned.
dstStrideOutput stride (in bytes).
NOTE: if 0, dstStride is set as srcWidth*2.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth*2 if not 0.
FASTCV_API void fcvScaleUpPolyInterleaveu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride 
)

Interleaved image (CbCr or CrCb) upscaling using polyphase filters.

Perform interleaved image (CbCr or CrCb) upscaling using polyphase filters. Data type is unsigned byte.

Parameters:
srcInput image
NOTE: should be 128-bit aligned.
srcWidthInput image width, number of (CrCb/CbCr) pairs
NOTE: should be a multiple of 8.
srcHeightInput image height
srcStrideStride of input image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, srcStride is default to srcWidth * 2.
NOTE: should be a multiple of 8.
dstOutput image
NOTE: should be 128-bit aligned.
dstWidthOutput image width, number of (CrCb/CbCr) pairs
NOTE: should be a multiple of 8.
dstHeightOutput image height
dstStrideStride of output image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, dstStride is default to dstWidth * 2.
NOTE: should be a multiple of 8.
Returns:
No return value.
FASTCV_API void fcvScaleUpPolyu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride 
)

Perform image upscaling using polyphase filters.

Perform image upscaling using polyphase filters. The image data type is unsigned byte.

Parameters:
srcInput image
NOTE: should be 128-bit aligned.
srcWidthInput image width
NOTE: should be a multiple of 8.
srcHeightInput image height
srcStrideStride of input image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
dstOutput image
NOTE: should be 128-bit aligned.
dstWidthOutput image width
NOTE: should be a multiple of 8.
dstHeightOutput image height
dstStrideStride of output image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, dstStride is default to dstWidth.
NOTE: should be a multiple of 8.
Returns:
No return value.
FASTCV_API fcvStatus fcvTableLookupu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
const uint8_t *__restrict  lut,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Applies a Table Look-up transformation to a single-channel uint8 image.

Each pixel in the input image is used to index into a look-up table and the indexed look-up table value is then put into the output image

Parameters:
srcInput uint8_t image. The size of buffer is srcStride*srcHeight bytes
NOTE: should be 128-bit aligned
srcWidthInput image width
srcHeightInput image height
srcStrideInput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if srcStride is equal to 0, it will be set to srcWidth
NOTE: should be a multiple of 8
lutThe Look-up Table given as a 256-element array of type uint8_t
dstOutput image which has the same dimension as the input image in uint8_t type
NOTE: should be 128-bit aligned
dstStrideOutput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if dstStride is equal to 0, it will be set to srcWidth
NOTE: should be a multiple of 8
Returns:
FASTCV_SUCCESS upon success, other values upon failure.
FASTCV_API int fcvTransformAffine8x8u8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
const int32_t *__restrict  nPos,
const int32_t *__restrict  nAffine,
uint8_t *__restrict  nPatch 
)

Warps the patch centered at nPos in the input image using the affine transform in nAffine.


ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvTransformAffine8x8u8_v2(). In the 2.0.0 release, fcvTransformAffine8x8u8_v2 will be renamed to fcvTransformAffine8x8u8 and the signature of fcvTransformAffine8x8u8 as it appears now, will be removed.

Parameters:
srcInput image. Size of buffer is srcWidth*srcHeight bytes.
srcWidthImage width.
srcHeightImage height.
nPos[2 ] Position in the image in 32 bit fixed point (Q16)
NOTE: if any 1 coordinates of the warped square are inside the image, return 1 and
leave function. Otherwise, return 0.
WARNING: must be 64-bit aligned.
nAffine[2 ][ 2 ] Transformation matrix in 32 bit fixed point (Q16). The matrix stored in nAffine is using row major ordering:
a11, a12, a21, a22 where the matrix is:
| a11, a12 |
| a21, a22 |


WARNING: should be 128-bit aligned.

Parameters:
nPatchTransformed patch.
Returns:
0 if the transformation is valid
FASTCV_API int fcvTransformAffine8x8u8_v2 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
const int32_t *__restrict  nPos,
const int32_t *__restrict  nAffine,
uint8_t *__restrict  patch,
unsigned int  patchStride 
)

Warps the patch centered at nPos in the input image using the affine transform in nAffine.


ATTENTION: This function is a duplication of fcvTransformAffine8x8u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvTransformAffine8x8u8, fcvTransformAffine8x8u8_v2 will be removed, and the current signature for fcvTransformAffine8x8u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvTransformAffine8x8u8 when transitioning to 2.0.0.

Parameters:
srcInput image. Size of buffer is srcStride*srcHeight bytes.
srcWidthImage width.
srcHeightImage height.
srcStrideStride of image (in bytes) - i.e., how many bytes between column 0 of row N and column 0 of row N+1.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: must be at least as much as srcWidth if not 0.
nPos[2 ] Position in the image in 32 bit fixed point (Q16)
NOTE: if any 1 coordinates of the warped square are inside the image, return 1 and
leave function. Otherwise, return 0.
WARNING: must be 64-bit aligned.
nAffine[2 ][ 2 ] Transformation matrix in 32 bit fixed point (Q16). The matrix stored in nAffine is using row major ordering:
a11, a12, a21, a22 where the matrix is:
| a11, a12 |
| a21, a22 |


WARNING: should be 128-bit aligned.

Parameters:
patchTransformed patch.
patchStrideStride of patch (in bytes) - i.e., how many bytes between column 0 of row N and column 0 of row N+1.
NOTE: if 0, srcStride is set as 8.
WARNING: must be at least as much as 8 if not 0.
Returns:
0 if the transformation is valid
FASTCV_API void fcvTransformAffineClippedu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
const float32_t *__restrict  affineMatrix,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
uint32_t *__restrict  dstBorder 
)

Applies an affine transformation on a grayscale image using a 2x3 matrix. Pixels are sampled using bi-linear interpolation. Pixels that would be sampled from outside the source image are not modified in the target image. The left-most and right-most pixel coordinates of each scanline are written to dstBorder.


ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvTransformAffineClippedu8_v2(). In the 2.0.0 release, fcvTransformAffineClippedu8_v2 will be renamed to fcvTransformAffineClippedu8 and the signature of fcvTransformAffineClippedu8 as it appears now, will be removed.

Parameters:
srcInput 8-bit image.
NOTE: data should be 128-bit aligned. Size of buffer is srcStride*srcHeight bytes.
srcWidthInput image width. The number of pixels in a row.
srcHeightInput image height.
srcStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
affineMatrix2x3 perspective transformation matrix. The matrix stored in affineMatrix is using row major ordering:
a11, a12, a13, a21, a22, a23 where the matrix is:
| a11, a12, a13 |
| a21, a22, a23 |

Warning: The convention for rotation angle is: positive for clockwise rotation and negative for counter-clockwise rotation. If there's unexpected result, it could be due to different rotation convention. If that's the case, negate the angle before calculating transform matrix.

The affine matrix follows the so-called inverse mapping convention. It is applied to the dst coordinates to produce the corresponding src coordinates. In other 3rd party tools, the so-called forward mapping convention may be used, where the affine matrix refers to the one applied to the src coordinates to produce the dst coordinates. When comparing with 3rd party results, please make sure the same convention of affine matrices are assumed. If not, please transform the affine matrix into an equivalent form under the forward mapping convention before feeding it into 3rd party tools.
NOTE: data should be 128-bit aligned.

Parameters:
dstTransformed output 8-bit image.
NOTE: data should be 128-bit aligned.
dstWidthDst image width.
dstHeightDst image height.
dstStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 dstStride is default to dstWidth.
NOTE: should be a multiple of 8.
dstBorderOutput array receiving the x-coordinates of left-most and right-most pixels for each scanline. The format of the array is: l0,r0,l1,r1,l2,r2,... where l0 is the left-most pixel coordinate in scanline 0 and r0 is the right-most pixel coordinate in scanline 0. The buffer must therefore be 2*dstHeight integers in size. If dstBorder is set as NULL, then the border isn't processed.
NOTE: data should be 128-bit aligned.
FASTCV_API fcvStatus fcvTransformAffineClippedu8_v2 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
const float32_t *__restrict  affineMatrix,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
uint32_t *__restrict  dstBorder,
fcvInterpolationType  interpolation 
)

Applies an affine transformation on a grayscale image using a 2x3 matrix. Pixels that would be sampled from outside the source image are not modified in the target image. The left-most and right-most pixel coordinates of each scanline are written to dstBorder.


ATTENTION: This function is a duplication of fcvTransformAffineClippedu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvTransformAffineClippedu8, fcvTransformAffineClippedu8_v2 will be removed, and the current signature for fcvTransformAffineClippedu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvTransformAffineClippedu8 when transitioning to 2.0.0.

Parameters:
srcInput 8-bit image.
NOTE: data should be 128-bit aligned. Size of buffer is srcStride*srcHeight bytes.
srcWidthInput image width. The number of pixels in a row.
srcHeightInput image height.
srcStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
affineMatrix2x3 perspective transformation matrix. The matrix stored in affineMatrix is using row major ordering:
a11, a12, a13, a21, a22, a23 where the matrix is:
| a11, a12, a13 |
| a21, a22, a23 |
Warning: The convention for rotation angle is: positive for clockwise rotation and negative for counter-clockwise rotation. If there's unexpected result, it could be due to different rotation convention. If that's the case, negate the angle before calculating transform matrix.

The affine matrix follows the so-called inverse mapping convention. It is applied to the dst coordinates to produce the corresponding src coordinates. In other 3rd party tools, the so-called forward mapping convention may be used, where the affine matrix refers to the one applied to the src coordinates to produce the dst coordinates. When comparing with 3rd party results, please make sure the same convention of affine matrices are assumed. If not, please transform the affine matrix into an equivalent form under the forward mapping convention before feeding it into 3rd party tools.
NOTE: data should be 128-bit aligned.

Parameters:
dstTransformed output 8-bit image.
NOTE: data should be 128-bit aligned.
dstWidthDst image width.
dstHeightDst image height.
dstStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 dstStride is default to dstWidth.
NOTE: should be a multiple of 8.
dstBorderOutput array receiving the x-coordinates of left-most and right-most pixels for each scanline. The format of the array is: l0,r0,l1,r1,l2,r2,... where l0 is the left-most pixel coordinate in scanline 0 and r0 is the right-most pixel coordinate in scanline 0. The buffer must therefore be 2*dstHeight integers in size. If the dstBorder is set as NULL, then the border isn't processed.
NOTE: data should be 128-bit aligned.
interpolationSpecifies the interpolation method to use for sampling.
FASTCV_API fcvStatus fcvTransformAffineClippedu8_v3 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
const float32_t *__restrict  affineMatrix,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
uint32_t *__restrict  dstBorder,
fcvInterpolationType  interpolation,
fcvBorderType  borderType,
uint8_t  borderValue 
)

Applies an affine transformation on a grayscale image using a 2x3 matrix. Pixels that would be sampled from outside the source image are not modified in the target image. The left-most and right-most pixel coordinates of each scanline are written to dstBorder.


ATTENTION: This function is a duplication of fcvTransformAffineClippedu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvTransformAffineClippedu8, fcvTransformAffineClippedu8_v3 will be removed, and the current signature for fcvTransformAffineClippedu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvTransformAffineClippedu8 when transitioning to 2.0.0.

Parameters:
srcInput 8-bit image.
NOTE: data should be 128-bit aligned. Size of buffer is srcStride*srcHeight bytes.
srcWidthInput image width. The number of pixels in a row.
srcHeightInput image height.
srcStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
affineMatrix2x3 perspective transformation matrix. The matrix stored in affineMatrix is using row major ordering:
a11, a12, a13, a21, a22, a23 where the matrix is:
| a11, a12, a13 |
| a21, a22, a23 |
Warning: The convention for rotation angle is: positive for clockwise rotation and negative for counter-clockwise rotation. If there's unexpected result, it could be due to different rotation convention. If that's the case, negate the angle before calculating transform matrix.

The affine matrix follows the so-called inverse mapping convention. It is applied to the dst coordinates to produce the corresponding src coordinates. In other 3rd party tools, the so-called forward mapping convention may be used, where the affine matrix refers to the one applied to the src coordinates to produce the dst coordinates. When comparing with 3rd party results, please make sure the same convention of affine matrices are assumed. If not, please transform the affine matrix into an equivalent form under the forward mapping convention before feeding it into 3rd party tools.
NOTE: data should be 128-bit aligned.

Parameters:
dstTransformed output 8-bit image.
NOTE: data should be 128-bit aligned.
dstWidthDst image width.
dstHeightDst image height.
dstStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 dstStride is default to dstWidth.
NOTE: should be a multiple of 8.
dstBorderOutput array receiving the x-coordinates of left-most and right-most pixels for each scanline. The format of the array is: l0,r0,l1,r1,l2,r2,... where l0 is the left-most pixel coordinate in scanline 0 and r0 is the right-most pixel coordinate in scanline 0. The buffer must therefore be 2*dstHeight integers in size. If the dstBorder is set as NULL, then the border isn't processed.
NOTE: data should be 128-bit aligned.
interpolationSpecifies the interpolation method to use for sampling.
borderTypeThe border mode for dst pixels not mapped to the src image. Supported modes are FASTCV_BORDER_UNDEFINED and FASTCV_BORDER_CONSTANT.
borderValueThe user-specified constant pixel value, in case FASTCV_BORDER_CONSTANT is chosen for borderType.
FASTCV_API int fcvTransformAffineu8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
const float *__restrict  position,
const float *__restrict  affine,
uint8_t *__restrict  patch,
unsigned int  patchWidth,
unsigned int  patchHeight 
)

Warps the patch centered at nPos in the input image using the affine transform in nAffine.


ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvTransformAffineu8_v2(). In the 2.0.0 release, fcvTransformAffineu8_v2 will be renamed to fcvTransformAffineu8 and the signature of fcvTransformAffineu8 as it appears now, will be removed.

Parameters:
srcInput image. Size of buffer is srcWidth*srcHeight bytes.
srcWidthImage width.
srcHeightImage height.
position[2 ] Position in the image
WARNING: must be 64-bit aligned.
affine[2 ][ 2 ] Transformation matrix. The matrix stored in affine is using row major ordering:
a11, a12, a21, a22 where the matrix is:
| a11, a12 |
| a21, a22 |


WARNING: should be 128-bit aligned.

Parameters:
patchTransformed patch.
patchWidthPatch width.
patchHeightPatch height.
Returns:
0 if the transformation is valid
FASTCV_API int fcvTransformAffineu8_v2 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
const float *__restrict  position,
const float *__restrict  affine,
uint8_t *__restrict  patch,
unsigned int  patchWidth,
unsigned int  patchHeight,
unsigned int  patchStride 
)

Warps the patch centered at nPos in the input image using the affine transform in nAffine.


ATTENTION: This function is a duplication of fcvTransformAffineu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvTransformAffineu8, fcvTransformAffineu8_v2 will be removed, and the current signature for fcvTransformAffineu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvTransformAffineu8 when transitioning to 2.0.0.

Parameters:
srcInput image. Size of buffer is srcStride*srcHeight bytes.
srcWidthImage width.
srcHeightImage height.
srcStrideStride of image (in bytes) - i.e., how many bytes between column 0 of row N and column 0 of row N+1.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: must be at least as much as srcWidth if not 0.
position[2 ] Position in the image
WARNING: must be 64-bit aligned.
affine[2 ][ 2 ] Transformation matrix. The matrix stored in affine is using row major ordering:
a11, a12, a21, a22 where the matrix is:
| a11, a12 |
| a21, a22 |


WARNING: should be 128-bit aligned.

Parameters:
patchTransformed patch.
patchWidthPatch width.
patchHeightPatch height.
patchStrideStride of patch (in bytes) - i.e., how many bytes between column 0 of row N and column 0 of row N+1.
NOTE: if 0, patchStride is set as patchWidth.
WARNING: must be at least as much as patchWidth if not 0.
Returns:
0 if the transformation is valid
FASTCV_API void fcvWarpPerspectiveu8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
uint8_t *__restrict  dst,
unsigned int  dstWidth,
unsigned int  dstHeight,
float *__restrict  projectionMatrix 
)

Warps a grayscale image using the a perspective projection transformation matrix (also known as a homography). This type of transformation is an invertible transformation which maps straight lines to straight lines. Bi-linear interpolation is used where applicable.


ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvWarpPerspectiveu8_v2(). In the 2.0.0 release, fcvWarpPerspectiveu8_v2 will be renamed to fcvWarpPerspectiveu8 and the signature of fcvWarpPerspectiveu8 as it appears now, will be removed.

Warps an image taking into consideration the perspective scaling.

Parameters:
srcInput 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthInput image width.
WARNING: should be multiple of 8.
srcHeightInput image height.
WARNING: should be multiple of 8.
dstWarped output image. Size of buffer is dstWidth*dstHeight bytes.
WARNING: should be 128-bit aligned.
dstWidthDst image width.
NOTE: data should be multiple of 8.
dstHeightDst image height.
NOTE: should be multiple of 8
projectionMatrix3x3 perspective transformation matrix (generally a homography). The matrix stored in homography is row major ordering:
a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is:
| a11, a12, a13 |
| a21, a22, a23 |
| a31, a32, a33 |

WARNING: should be 128-bit aligned.

Note: The projection matrix follows the so-called inverse mapping convention. It is applied to the dst coordinates to produce the corresponding src coordinates. In other 3rd party tools, the so-called forward mapping convention may be used, where the projection matrix refers to the one applied to the src coordinates to produce the dst coordinates. When comparing with 3rd party results, please make sure the same convention of projection matrices are assumed. If not, please transform the projection matrix into an equivalent form under the forward mapping convention before feeding it into 3rd party tools.

FASTCV_API void fcvWarpPerspectiveu8_v2 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
uint8_t *__restrict  dst,
unsigned int  dstWidth,
unsigned int  dstHeight,
unsigned int  dstStride,
float *__restrict  projectionMatrix 
)

Warps a grayscale image using the a perspective projection transformation matrix (also known as a homography). This type of transformation is an invertible transformation which maps straight lines to straight lines. Bi-linear interpolation is used where applicable.


ATTENTION: This function is a duplication of fcvWarpPerspectiveu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvWarpPerspectiveu8, fcvWarpPerspectiveu8_v2 will be removed, and the current signature for fcvWarpPerspectiveu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvWarpPerspectiveu8 when transitioning to 2.0.0.

Warps an image taking into consideration the perspective scaling.

Parameters:
srcInput 8-bit image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthInput image width.
WARNING: should be multiple of 8.
srcHeightInput image height.
WARNING: should be multiple of 8.
srcStrideInput image stride (in bytes).
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
dstWarped output image. Size of buffer is dstStride*dstHeight bytes.
WARNING: should be 128-bit aligned.
dstWidthDst image width.
NOTE: data should be multiple of 8.
dstHeightDst image height.
NOTE: should be multiple of 8
dstStrideOutput image stride (in bytes).
NOTE: if 0, dstStride is set as dstWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
projectionMatrix3x3 perspective transformation matrix (generally a homography). The matrix stored in homography is row major ordering:
a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is:
| a11, a12, a13 |
| a21, a22, a23 |
| a31, a32, a33 |

WARNING: should be 128-bit aligned.

Note: The projection matrix follows the so-called inverse mapping convention. It is applied to the dst coordinates to produce the corresponding src coordinates. In other 3rd party tools, the so-called forward mapping convention may be used, where the projection matrix refers to the one applied to the src coordinates to produce the dst coordinates. When comparing with 3rd party results, please make sure the same convention of projection matrices are assumed. If not, please transform the projection matrix into an equivalent form under the forward mapping convention before feeding it into 3rd party tools.

FASTCV_API fcvStatus fcvWarpPerspectiveu8_v3 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
float *__restrict  projectionMatrix,
fcvInterpolationType  interpolation 
)

Warps a grayscale image using the a perspective projection transformation matrix (also known as a homography). This type of transformation is an invertible transformation which maps straight lines to straight lines.


ATTENTION: This function is a duplication of fcvWarpPerspectiveu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvWarpPerspectiveu8, fcvWarpPerspectiveu8_v3 will be removed, and the current signature for fcvWarpPerspectiveu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvWarpPerspectiveu8 when transitioning to 2.0.0.

Warps an image taking into consideration the perspective scaling.

Parameters:
srcInput 8-bit image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthInput image width.
WARNING: should be multiple of 8.
srcHeightInput image height.
WARNING: should be multiple of 8.
srcStrideInput image stride (in bytes).
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
dstWarped output image. Size of buffer is dstStride*dstHeight bytes.
WARNING: should be 128-bit aligned.
dstWidthDst image width.
NOTE: data should be multiple of 8.
dstHeightDst image height.
NOTE: should be multiple of 8
dstStrideOutput image stride (in bytes).
NOTE: if 0, dstStride is set as dstWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
projectionMatrix3x3 perspective transformation matrix (generally a homography). The matrix stored in homography is row major ordering:
a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is:
| a11, a12, a13 |
| a21, a22, a23 |
| a31, a32, a33 |

WARNING: should be 128-bit aligned.

Note: The projection matrix follows the so-called inverse mapping convention. It is applied to the dst coordinates to produce the corresponding src coordinates. In other 3rd party tools, the so-called forward mapping convention may be used, where the projection matrix refers to the one applied to the src coordinates to produce the dst coordinates. When comparing with 3rd party results, please make sure the same convention of projection matrices are assumed. If not, please transform the projection matrix into an equivalent form under the forward mapping convention before feeding it into 3rd party tools.

Specifies the interpolation method to be used.

FASTCV_API fcvStatus fcvWarpPerspectiveu8_v4 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
float *__restrict  projectionMatrix,
fcvInterpolationType  interpolation,
fcvBorderType  borderType,
uint8_t  borderValue 
)

Warps a grayscale image using the a perspective projection transformation matrix (also known as a homography). This type of transformation is an invertible transformation which maps straight lines to straight lines.


ATTENTION: This function is a duplication of fcvWarpPerspectiveu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvWarpPerspectiveu8, fcvWarpPerspectiveu8_v4 will be removed, and the current signature for fcvWarpPerspectiveu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvWarpPerspectiveu8 when transitioning to 2.0.0.

Warps an image taking into consideration the perspective scaling.

Parameters:
srcInput 8-bit image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthInput image width.
WARNING: should be multiple of 8.
srcHeightInput image height.
WARNING: should be multiple of 8.
srcStrideInput image stride (in bytes).
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
dstWarped output image. Size of buffer is dstStride*dstHeight bytes.
WARNING: should be 128-bit aligned.
dstWidthDst image width.
NOTE: data should be multiple of 8.
dstHeightDst image height.
NOTE: should be multiple of 8
dstStrideOutput image stride (in bytes).
NOTE: if 0, dstStride is set as dstWidth.
WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
projectionMatrix3x3 perspective transformation matrix (generally a homography). The matrix stored in homography is row major ordering:
a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is:
| a11, a12, a13 |
| a21, a22, a23 |
| a31, a32, a33 |

WARNING: should be 128-bit aligned.

Note: The projection matrix follows the so-called inverse mapping convention. It is applied to the dst coordinates to produce the corresponding src coordinates. In other 3rd party tools, the so-called forward mapping convention may be used, where the projection matrix refers to the one applied to the src coordinates to produce the dst coordinates. When comparing with 3rd party results, please make sure the same convention of projection matrices are assumed. If not, please transform the projection matrix into an equivalent form under the forward mapping convention before feeding it into 3rd party tools.

Specifies the interpolation method to be used.

Parameters:
borderTypeThe border mode for dst pixels not mapped to the src image. Supported modes are FASTCV_BORDER_UNDEFINED and FASTCV_BORDER_CONSTANT.
borderValueThe user-specified constant pixel value, in case FASTCV_BORDER_CONSTANT is chosen for borderType.
 All Data Structures Files Functions Variables Enumerations Enumerator Defines