Qualcomm FastCV Library  1.7.1
Math / Vector Operations

Functions

FASTCV_API int32_t fcvDotProducts8 (const int8_t *__restrict a, const int8_t *__restrict b, unsigned int abSize)
 Dot product of two 8-bit vectors.
FASTCV_API uint32_t fcvDotProductu8 (const uint8_t *__restrict a, const uint8_t *__restrict b, unsigned int abSize)
 Dot product of two 8-bit vectors.
FASTCV_API int32_t fcvDotProduct36x1s8 (const int8_t *__restrict a, const int8_t *__restrict b)
 Dot product of two 36-byte vectors.
FASTCV_API void fcvDotProduct36x4s8 (const int8_t *__restrict a, const int8_t *__restrict b, const int8_t *__restrict c, const int8_t *__restrict d, const int8_t *__restrict e, int32_t *__restrict dotProducts)
 Dot product of one 36-byte vector against 4 others.
FASTCV_API void fcvDotProductNorm36x4s8 (const int8_t *__restrict a, float invLengthA, const int8_t *__restrict b0, const int8_t *__restrict b1, const int8_t *__restrict b2, const int8_t *__restrict b3, float *__restrict invLengthsB, float *__restrict dotProducts)
 Normalized dot product of one 36-byte vector against 4 others.
FASTCV_API uint32_t fcvDotProduct36x1u8 (const uint8_t *__restrict a, const uint8_t *__restrict b)
 Dot product of two 36-byte vectors.
FASTCV_API void fcvDotProduct36x4u8 (const uint8_t *__restrict a, const uint8_t *__restrict b, const uint8_t *__restrict c, const uint8_t *__restrict d, const uint8_t *__restrict e, uint32_t *__restrict dotProducts)
 Dot product of one 36-byte vector against 4 others.
FASTCV_API void fcvDotProductNorm36x4u8 (const uint8_t *__restrict a, float invLengthA, const uint8_t *__restrict b0, const uint8_t *__restrict b1, const uint8_t *__restrict b2, const uint8_t *__restrict b3, float *__restrict invLengthsB, float *__restrict dotProducts)
 Normalized dot product of one 36-byte vector against 4 others.
FASTCV_API int32_t fcvDotProduct64x1s8 (const int8_t *__restrict a, const int8_t *__restrict b)
 Dot product of two 64-byte vectors.
FASTCV_API void fcvDotProduct64x4s8 (const int8_t *__restrict a, const int8_t *__restrict b, const int8_t *__restrict c, const int8_t *__restrict d, const int8_t *__restrict e, int32_t *__restrict dotProducts)
 Dot product of one 64-byte vector against 4 others.
FASTCV_API void fcvDotProductNorm64x4s8 (const int8_t *__restrict a, float invLengthA, const int8_t *__restrict b0, const int8_t *__restrict b1, const int8_t *__restrict b2, const int8_t *__restrict b3, float *__restrict invLengthsB, float *__restrict dotProducts)
 Normalized dot product of one 64-byte vector against 4 others.
FASTCV_API uint32_t fcvDotProduct64x1u8 (const uint8_t *__restrict a, const uint8_t *__restrict b)
 Dot product of two 64-byte vectors.
FASTCV_API void fcvDotProduct64x4u8 (const uint8_t *__restrict a, const uint8_t *__restrict b, const uint8_t *__restrict c, const uint8_t *__restrict d, const uint8_t *__restrict e, uint32_t *__restrict dotProducts)
 Dot product of one 64-byte vector against 4 others.
FASTCV_API void fcvDotProductNorm64x4u8 (const uint8_t *__restrict a, float invLengthA, const uint8_t *__restrict b0, const uint8_t *__restrict b1, const uint8_t *__restrict b2, const uint8_t *__restrict b3, float *__restrict invLengthsB, float *__restrict dotProducts)
 Normalized dot product of one 64-byte vector against 4 others.
FASTCV_API int32_t fcvDotProduct128x1s8 (const int8_t *__restrict a, const int8_t *__restrict b)
 Dot product of two 128-byte vectors.
FASTCV_API void fcvDotProduct128x4s8 (const int8_t *__restrict a, const int8_t *__restrict b, const int8_t *__restrict c, const int8_t *__restrict d, const int8_t *__restrict e, int32_t *__restrict dotProducts)
 Dot product of one 128-byte vector against 4 others.
FASTCV_API void fcvDotProductNorm128x4s8 (const int8_t *__restrict a, float invLengthA, const int8_t *__restrict b0, const int8_t *__restrict b1, const int8_t *__restrict b2, const int8_t *__restrict b3, float *__restrict invLengthsB, float *__restrict dotProducts)
 Normalized dot product of one 128-byte vector against 4 others.
FASTCV_API uint32_t fcvDotProduct128x1u8 (const uint8_t *__restrict a, const uint8_t *__restrict b)
 Dot product of two 128-byte vectors.
FASTCV_API void fcvDotProduct128x4u8 (const uint8_t *__restrict a, const uint8_t *__restrict b, const uint8_t *__restrict c, const uint8_t *__restrict d, const uint8_t *__restrict e, uint32_t *__restrict dotProducts)
 Dot product of one 128-byte vector against 4 others.
FASTCV_API void fcvDotProductNorm128x4u8 (const uint8_t *__restrict a, float invLengthA, const uint8_t *__restrict b0, const uint8_t *__restrict b1, const uint8_t *__restrict b2, const uint8_t *__restrict b3, float *__restrict invLengthsB, float *__restrict dotProducts)
 Normalized dot product of one 128-byte vector against 4 others.
FASTCV_API void fcvDotProduct8x8u8 (const uint8_t *__restrict patchPixels, const uint8_t *__restrict imagePixels, unsigned short imgW, unsigned short imgH, int nX, int nY, unsigned int nNum, int32_t *__restrict dotProducts)
 Dot product of 1 patch (8x8 byte square) with several (n) 8x8 squares along a line of pixels in an image.
FASTCV_API void fcvDotProduct11x12u8 (const uint8_t *__restrict patchPixels, const uint8_t *__restrict imagePixels, unsigned short imgW, unsigned short imgH, int iX, int iY, int32_t *__restrict dotProducts)
 Dot product of 1 patch (8x8 byte square) with 8x8 squares in 11x12 rectangle around the center search pixel (iX,iY).
FASTCV_API int fcvVecNormalize36s8f32 (const int8_t *__restrict src, unsigned int srcStride, const float *__restrict invLen, unsigned int numVecs, float reqNorm, float *__restrict dst, int32_t *stopBuild)
 Translate to float and normalize 36 8-bit elements.
FASTCV_API void fcvSumOfSquaredDiffs36x4s8 (const int8_t *__restrict a, float invLenA, const int8_t *__restrict b0, const int8_t *__restrict b1, const int8_t *__restrict b2, const int8_t *__restrict b3, const float *__restrict invLenB, float *__restrict distances)
 Sum of squared differences of one 36-byte vector against 4 others.
FASTCV_API void fcvSumOfSquaredDiffs36xNs8 (const int8_t *__restrict a, float invLenA, const int8_t *const *__restrict b, const float *__restrict invLenB, unsigned int numB, float *__restrict distances)
 Sum of squared differences of one 36-byte vector against N others.
FASTCV_API void fcvSort8Scoresf32 (float *__restrict inScores, float *__restrict outScores)
 Sorting of 8 float numbers.
FASTCV_API uint32_t fcvBitCountu8 (const uint8_t *__restrict src, unsigned int srcLength)
 Counts "1" bits in supplied vector.
FASTCV_API uint32_t fcvBitCount32x1u8 (const uint8_t *__restrict src)
 Counts "1" bits in supplied 32-byte vector.
FASTCV_API void fcvBitCount32x4u8 (const uint8_t *__restrict a, const uint8_t *__restrict b, const uint8_t *__restrict c, const uint8_t *__restrict d, uint32_t *__restrict bitCount)
 Counts bits in supplied 4, 32-byte vectors.
FASTCV_API uint32_t fcvBitCount64x1u8 (const uint8_t *__restrict src)
 Counts bits in supplied 64-byte vector.
FASTCV_API void fcvBitCount64x4u8 (const uint8_t *__restrict a, const uint8_t *__restrict b, const uint8_t *__restrict c, const uint8_t *__restrict d, uint32_t *__restrict bitCount)
 Counts bits in supplied 4, 64-byte vectors.
FASTCV_API uint32_t fcvBitCountu32 (const uint32_t *__restrict src, unsigned int srcLength)
 Counts bits in supplied vector of unsigned intergers.
FASTCV_API uint32_t fcvHammingDistanceu8 (const uint8_t *__restrict a, const uint8_t *__restrict b, unsigned int abLength)
 Computes the Hamming distance between the two supplied arbitrary length vectors.
FASTCV_API uint32_t fcvHammingDistance32x1u8a4 (const uint8_t *__restrict a, const uint8_t *__restrict b)
 Computes the Hamming distance between the two supplied 32-byte vectors.
FASTCV_API uint32_t fcvHammingDistance64x1u8a4 (const uint8_t *__restrict a, const uint8_t *__restrict b)
 Computes the Hamming distance between the two supplied 64-byte vectors.
FASTCV_API uint32_t fcvHammingDistance32x1u8 (const uint8_t *__restrict a, const uint8_t *__restrict b)
 Computes the Hamming distance between the two supplied 32-byte vectors.
FASTCV_API uint32_t fcvHammingDistance64x1u8 (const uint8_t *__restrict a, const uint8_t *__restrict b)
 Computes the Hamming distance between the two supplied 64-byte vectors.
FASTCV_API void fcvHammingDistance32x4u8a4 (const uint8_t *__restrict a, const uint8_t *__restrict b, const uint8_t *__restrict c, const uint8_t *__restrict d, const uint8_t *__restrict e, uint32_t *__restrict hammingDistances)
 Computes the Hamming distance between A and each of B,C,D,E 32-byte vectors.
FASTCV_API void fcvHammingDistance64x4u8a4 (const uint8_t *__restrict a, const uint8_t *__restrict b, const uint8_t *__restrict c, const uint8_t *__restrict d, const uint8_t *__restrict e, uint32_t *__restrict hammingDistances)
 Computes the Hamming distance between A and each of B,C,D,E 64-byte vectors.
FASTCV_API void fcvHammingDistance64x4u8 (const uint8_t *__restrict a, const uint8_t *__restrict b, const uint8_t *__restrict c, const uint8_t *__restrict d, const uint8_t *__restrict e, uint32_t *__restrict hammingDistances)
 Computes the Hamming distance between A and each of B,C,D,E 64-byte vectors.
FASTCV_API void fcvSolvef32 (const float32_t *__restrict A, int32_t numCols, int32_t numRows, const float32_t *__restrict b, float32_t *__restrict x)
 Solve linear equation system Ax = b.
FASTCV_API void fcvSetElementsu8 (uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, uint8_t value, const uint8_t *__restrict mask, uint32_t maskStride)
 Sets every element of a uint8_t single channel array to a given value.
FASTCV_API void fcvSetElementss32 (int32_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, int32_t value, const uint8_t *__restrict mask, uint32_t maskStride)
 Sets every element of an int32_t single channel array to a given value.
FASTCV_API void fcvSetElementsf32 (float32_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, float32_t value, const uint8_t *__restrict mask, uint32_t maskStride)
 Sets every element of a float32_t single channel array to a given value.
FASTCV_API void fcvSetElementsc4u8 (uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, uint8_t value1, uint8_t value2, uint8_t value3, uint8_t value4, const uint8_t *__restrict mask, uint32_t maskStride)
 Sets every element of a uint8_t 4-channel array to a given 4-element scalar.
FASTCV_API void fcvSetElementsc4s32 (int32_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, int32_t value1, int32_t value2, int32_t value3, int32_t value4, const uint8_t *__restrict mask, uint32_t maskStride)
 Sets every element of an int32_t 4-channel array to a given 4-element scalar.
FASTCV_API void fcvSetElementsc4f32 (float32_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, float32_t value1, float32_t value2, float32_t value3, float32_t value4, const uint8_t *__restrict mask, uint32_t maskStride)
 Sets every element of a float32_t 4-channel array to a given 4-element scalar.
FASTCV_API void fcvSetElementsc3u8 (uint8_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, uint8_t value1, uint8_t value2, uint8_t value3, const uint8_t *__restrict mask, uint32_t maskStride)
 Sets every element of a uint8_t 3-channel array to a given 3-element scalar.
FASTCV_API void fcvSetElementsc3s32 (int32_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, int32_t value1, int32_t value2, int32_t value3, const uint8_t *__restrict mask, uint32_t maskStride)
 Sets every element of an int32_t 3-channel array to a given 3-element scalar.
FASTCV_API void fcvSetElementsc3f32 (float32_t *__restrict dst, uint32_t dstWidth, uint32_t dstHeight, uint32_t dstStride, float32_t value1, float32_t value2, float32_t value3, const uint8_t *__restrict mask, uint32_t maskStride)
 Sets every element of a float32_t 3-channel array to a given 3-element scalar.
FASTCV_API void fcvAbsDiffu8 (const uint8_t *__restrict src1, const uint8_t *__restrict src2, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride)
 Computes the per-element absolute difference between two uint8_t matrices.
FASTCV_API void fcvAbsDiffs32 (const int32_t *__restrict src1, const int32_t *__restrict src2, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int32_t *__restrict dst, uint32_t dstStride)
 Computes the per-element absolute difference between two int32_t matrices.
FASTCV_API void fcvAbsDifff32 (const float32_t *__restrict src1, const float32_t *__restrict src2, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t *__restrict dst, uint32_t dstStride)
 Computes the per-element absolute difference between two float32_t matrices.
FASTCV_API void fcvAbsDiffVu8 (const uint8_t *__restrict src, uint8_t value, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride)
 Computes the per-element absolute difference between one matrix and one value.
FASTCV_API void fcvAbsDiffVs32 (const int32_t *__restrict src, int32_t value, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int32_t *__restrict dst, uint32_t dstStride)
 Computes the per-element absolute difference between one matrix and one value.
FASTCV_API void fcvAbsDiffVf32 (const float32_t *__restrict src, float32_t value, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t *__restrict dst, uint32_t dstStride)
 Computes the per-element absolute difference between one matrix and one value.
FASTCV_API void fcvAbsDiffVc4u8 (const uint8_t *__restrict src, uint8_t value1, uint8_t value2, uint8_t value3, uint8_t value4, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride)
 Computes the per-element absolute difference between one 4-channel matrix and a 4-element Scalar.
FASTCV_API void fcvAbsDiffVc4s32 (const int32_t *__restrict src, int32_t value1, int32_t value2, int32_t value3, int32_t value4, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int32_t *__restrict dst, uint32_t dstStride)
 Computes the per-element absolute difference between one 4-channel matrix and a 4-element Scalar.
FASTCV_API void fcvAbsDiffVc4f32 (const float32_t *__restrict src, float32_t value1, float32_t value2, float32_t value3, float32_t value4, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t *__restrict dst, uint32_t dstStride)
 Computes the per-element absolute difference between one 4-channel matrix and a 4-element Scalar.
FASTCV_API void fcvAbsDiffVc3u8 (const uint8_t *__restrict src, uint8_t value1, uint8_t value2, uint8_t value3, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride)
 Computes the per-element absolute difference between one 3-channel matrix and a 3-element Scalar.
FASTCV_API void fcvAbsDiffVc3s32 (const int32_t *__restrict src, int32_t value1, int32_t value2, int32_t value3, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int32_t *__restrict dst, uint32_t dstStride)
 Computes the per-element absolute difference between one 3-channel matrix and a 3-element Scalar.
FASTCV_API void fcvAbsDiffVc3f32 (const float32_t *__restrict src, float32_t value1, float32_t value2, float32_t value3, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t *__restrict dst, uint32_t dstStride)
 Computes the per-element absolute difference between one 3-channel matrix and a 3-element Scalar.
FASTCV_API void fcvSVDf32 (const float32_t *__restrict A, uint32_t m, uint32_t n, float32_t *__restrict w, float32_t *__restrict U, float32_t *__restrict Vt, float32_t *tmpU, float32_t *tmpV)
 Compute a singular value decomposition of a matrix of a float type A = U*diag[w]*Vt; It is used for solving problems like least-squares, under-determined linear systems, matrix inversion and so forth. The algorithm used here does not compute the full U and V matrices however it computes a condensed version of U and V described below which is sufficient to solve most problems which use SVD.
FASTCV_API int32_t fcvSolveCholeskyf32 (float32_t *__restrict A, const float32_t *__restrict b, float32_t *__restrict diag, uint32_t N, float32_t *__restrict x)
 Executes Cholesky decomposition algorithm on a symmetric and positive definite matrix to solve the linear system A*x = b, where A is an NxN matrix and x & b are vectors of size N.
FASTCV_API void fcvJacobianSE2f32 (const uint8_t *__restrict warpedImage, const uint16_t *__restrict warpedBorder, const uint8_t *__restrict targetImage, const int16_t *__restrict targetDX, const int16_t *__restrict targetDY, uint32_t width, uint32_t height, uint32_t stride, float32_t *__restrict sumJTJ, float32_t *__restrict sumJTE, float32_t *__restrict sumError, uint32_t *__restrict numPixels)
 Calculates JTJ, JTE and the sum absolute, normalized pixel differences for a target image and a reference image of same size for an SE2 image motion model. Since gradients are required for this algorithm all border pixels in referenceImage and targetImage are ignored.
NOTE: Only works for images with even width and height.
FASTCV_API int32_t fcvSolveLDLf32 (float32_t *__restrict A, const float32_t *__restrict b, float32_t *__restrict diag, uint32_t N, float32_t *__restrict x)
 Executes LDL decomposition algorithm on a symmetric and positive definite matrix to solve the linear system A*x = b, where A is an NxN matrix and x & b are vectors of size N.
FASTCV_API float32_t fcvDotProductf32 (const float32_t *__restrict a, const float32_t *__restrict b, uint32_t N)
 Executes dot product of two floating point vectors.
FASTCV_API void fcvSumOfSquaredDiffsu8 (const uint8_t *__restrict a, float32_t invLenA, uint32_t dim, const uint8_t *const *__restrict bList, const float32_t *__restrict invLenB, uint32_t numB, float32_t *__restrict distances)
 Sum of squared differences of one L-byte vector against N others.
FASTCV_API void fcvSumOfSquaredDiffsf32 (const float32_t *__restrict a, float32_t invLenA, uint32_t dim, const float32_t *const *__restrict bList, const float32_t *__restrict invLenB, uint32_t numB, float32_t *__restrict distances)
 Sum of squared differences of one floating vector of L-elements against N others.
FASTCV_API void fcvTransposeu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride)
 Matrix transpose of one uint8_t type matrix.
FASTCV_API void fcvTransposeu16 (const uint16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint16_t *__restrict dst, uint32_t dstStride)
 Matrix transpose of one uint16_t type matrix.
FASTCV_API void fcvTransposef32 (const float32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t *__restrict dst, uint32_t dstStride)
 Matrix transpose of one float32_t type matrix.
FASTCV_API void fcvFlipu8 (const uint8_t *src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *dst, uint32_t dstStride, fcvFlipDir dir)
 Flip one uint8_t type matrix. If src and dst point to the same address and srcStride equals to dstStride, it will do in-place flip.
FASTCV_API void fcvFlipu16 (const uint16_t *src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint16_t *dst, uint32_t dstStride, fcvFlipDir dir)
 Flip one uint16_t type matrix. If src and dst point to the same address, and srcStride equals to dstStride, it will do in-place flip.
FASTCV_API fcvStatus fcvFlipRGB888u8 (const uint8_t *src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *dst, uint32_t dstStride, fcvFlipDir dir)
 Flips an interleaved RGB image.
FASTCV_API fcvStatus fcvRotateImageu8 (const uint8_t *src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *dst, uint32_t dstStride, fcvRotateDegree degree)
 Rotate one uint8_t type image.
FASTCV_API fcvStatus fcvRotateImageInterleavedu8 (const uint8_t *src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *dst, uint32_t dstStride, fcvRotateDegree degree)
 Rotate one interleaved uint8_t type image (e.g. UV channel in NV21).
FASTCV_API void fcvElementMultiplyu8u16 (const uint8_t *src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *src2, uint32_t src2Stride, uint16_t *__restrict dst, uint32_t dstStride)
 Element-wise multiplication of two uint8_t type matrices.
FASTCV_API void fcvElementMultiplyf32 (const float32_t *src1, uint32_t width, uint32_t height, uint32_t src1Stride, const float32_t *src2, uint32_t src2Stride, float32_t *__restrict dst, uint32_t dstStride)
 Element-wise multiplication of two float32_t type matrices.
FASTCV_API void fcvMatrixMultiplys8s32 (const int8_t *__restrict src1, uint32_t src1Width, uint32_t src1Height, uint32_t src1Stride, const int8_t *__restrict src2, uint32_t src2Width, uint32_t src2Stride, int32_t *__restrict dst, uint32_t dstStride)
 Matrix multiplication of two int8_t type matrices.
FASTCV_API void fcvMatrixMultiplyf32 (const float32_t *__restrict src1, uint32_t src1Width, uint32_t src1Height, uint32_t src1Stride, const float32_t *__restrict src2, uint32_t src2Width, uint32_t src2Stride, float32_t *__restrict dst, uint32_t dstStride)
 Matrix multiplication of two float32_t type matrices.
FASTCV_API uint32_t fcvBlockDotProductu8 (const uint8_t *__restrict src1, uint32_t blockWidth, uint32_t blockHeight, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride)
 Dot product of two uint8_t type blocks.
FASTCV_API float32_t fcvBlockDotProductf32 (const float32_t *__restrict src1, uint32_t blockWidth, uint32_t blockHeight, uint32_t src1Stride, const float32_t *__restrict src2, uint32_t src2Stride)
 Dot product of two float32_t type blocks.
FASTCV_API void fcvAddu8u16 (const uint8_t *__restrict src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride, uint16_t *__restrict dst, uint32_t dstStride)
 Matrix addition of two uint8_t type matrices.
FASTCV_API void fcvAdds16 (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)
 Matrix addition of two int16_t type matrices with saturation.
FASTCV_API void fcvAddf32 (const float32_t *__restrict src1, uint32_t width, uint32_t height, uint32_t src1Stride, const float32_t *__restrict src2, uint32_t src2Stride, float32_t *__restrict dst, uint32_t dstStride)
 Matrix addition of two float32_t type matrices.
FASTCV_API void fcvSumOfSquaredDiffss8 (const int8_t *__restrict a, float32_t invLenA, uint32_t dim, const int8_t *const *__restrict bList, const float32_t *__restrict invLenB, uint32_t numB, float32_t *__restrict distances)
 Sum of squared differences of one L-byte vector against N others.
FASTCV_API fcvStatus fcvAddScalarf32 (const float32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t scalar, float32_t *__restrict dst, uint32_t dstStride)
 Adds a scalar value to every element of a Matrix.
FASTCV_API fcvStatus fcvAddScalars16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t scalar, int16_t *__restrict dst, uint32_t dstStride)
 Adds a scalar value to every element of a Matrix.
FASTCV_API fcvStatus fcvMultiplyScalarf32 (const float32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t scalar, float32_t *__restrict dst, uint32_t dstStride)
 Multiplies a scalar value to every element of a Matrix.
FASTCV_API fcvStatus fcvMultiplyScalars16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int8_t scalar, int8_t shift, int16_t *__restrict dst, uint32_t dstStride)
 Multiplies a scalar value to every element of a Matrix.
FASTCV_API fcvStatus fcvMinMaxLocu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict minVal, uint8_t *__restrict maxVal, uint32_t *__restrict minLocX, uint32_t *__restrict minLocY, uint32_t *__restrict maxLocX, uint32_t *__restrict maxLocY)
 Finds the minimum and maximum values, and their location in a matrix.
FASTCV_API fcvStatus fcvMinMaxLocu16 (const uint16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint16_t *__restrict minVal, uint16_t *__restrict maxVal, uint32_t *__restrict minLocX, uint32_t *__restrict minLocY, uint32_t *__restrict maxLocX, uint32_t *__restrict maxLocY)
 Finds the minimum and maximum values, and their location in a matrix.
FASTCV_API fcvStatus fcvMinMaxLocs16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict minVal, int16_t *__restrict maxVal, uint32_t *__restrict minLocX, uint32_t *__restrict minLocY, uint32_t *__restrict maxLocX, uint32_t *__restrict maxLocY)
 Finds the minimum and maximum values, and their location in a matrix.
FASTCV_API fcvStatus fcvMinMaxLocu32 (const uint32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t *__restrict minVal, uint32_t *__restrict maxVal, uint32_t *__restrict minLocX, uint32_t *__restrict minLocY, uint32_t *__restrict maxLocX, uint32_t *__restrict maxLocY)
 Finds the minimum and maximum values, and their location in a matrix.
FASTCV_API fcvStatus fcvMinMaxLocs32 (const int32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int32_t *__restrict minVal, int32_t *__restrict maxVal, uint32_t *__restrict minLocX, uint32_t *__restrict minLocY, uint32_t *__restrict maxLocX, uint32_t *__restrict maxLocY)
 Finds the minimum and maximum values, and their location in a matrix.
FASTCV_API fcvStatus fcvMinMaxLocf32 (const float32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t *__restrict minVal, float32_t *__restrict maxVal, uint32_t *__restrict minLocX, uint32_t *__restrict minLocY, uint32_t *__restrict maxLocX, uint32_t *__restrict maxLocY)
 Finds the minimum and maximum values, and their location in a matrix.
FASTCV_API fcvStatus fcvMinMaxLocf32_v2 (const float32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t *__restrict minVal, float32_t *__restrict maxVal, uint32_t *__restrict minLocX, uint32_t *__restrict minLocY, uint32_t *__restrict maxLocX, uint32_t *__restrict maxLocY, uint32_t *__restrict minCount, uint32_t *__restrict maxCount, uint32_t nMinLocSize, uint32_t nMaxLocSize)
 Finds the minimum and maximum values, and their locations in a matrix.
FASTCV_API fcvStatus fcvMinMaxLocu8_v2 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict minVal, uint8_t *__restrict maxVal, uint32_t *__restrict minLocX, uint32_t *__restrict minLocY, uint32_t *__restrict maxLocX, uint32_t *__restrict maxLocY, uint32_t *__restrict minCount, uint32_t *__restrict maxCount, uint32_t nMinLocSize, uint32_t nMaxLocSize)
 Finds the minimum and maximum values, and their locations in a matrix.
FASTCV_API fcvStatus fcvMinMaxLocu16_v2 (const uint16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint16_t *__restrict minVal, uint16_t *__restrict maxVal, uint32_t *__restrict minLocX, uint32_t *__restrict minLocY, uint32_t *__restrict maxLocX, uint32_t *__restrict maxLocY, uint32_t *__restrict minCount, uint32_t *__restrict maxCount, uint32_t nMinLocSize, uint32_t nMaxLocSize)
 Finds the minimum and maximum values, and their locations in a matrix.
FASTCV_API fcvStatus fcvMinMaxLocs16_v2 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict minVal, int16_t *__restrict maxVal, uint32_t *__restrict minLocX, uint32_t *__restrict minLocY, uint32_t *__restrict maxLocX, uint32_t *__restrict maxLocY, uint32_t *__restrict minCount, uint32_t *__restrict maxCount, uint32_t nMinLocSize, uint32_t nMaxLocSize)
 Finds the minimum and maximum values, and their locations in a matrix.
FASTCV_API fcvStatus fcvMinMaxLocu32_v2 (const uint32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t *__restrict minVal, uint32_t *__restrict maxVal, uint32_t *__restrict minLocX, uint32_t *__restrict minLocY, uint32_t *__restrict maxLocX, uint32_t *__restrict maxLocY, uint32_t *__restrict minCount, uint32_t *__restrict maxCount, uint32_t nMinLocSize, uint32_t nMaxLocSize)
 Finds the minimum and maximum values, and their locations in a matrix.
FASTCV_API fcvStatus fcvMinMaxLocs32_v2 (const int32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int32_t *__restrict minVal, int32_t *__restrict maxVal, uint32_t *__restrict minLocX, uint32_t *__restrict minLocY, uint32_t *__restrict maxLocX, uint32_t *__restrict maxLocY, uint32_t *__restrict minCount, uint32_t *__restrict maxCount, uint32_t nMinLocSize, uint32_t nMaxLocSize)
 Finds the minimum and maximum values, and their locations in a matrix.
FASTCV_API fcvStatus fcvTransposeRGB888u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride)
 Transposes an interleaved RGB image.
FASTCV_API fcvStatus fcvCrossProduct3x1f32 (const float32_t *__restrict a, const float32_t *__restrict b, float32_t *__restrict c, uint32_t N)
 Computes the cross-product of N pairs of 3x1 vectors.
FASTCV_API fcvStatus fcvSolveLUf32 (float32_t *__restrict A, float32_t *__restrict b, uint32_t N, uint8_t *__restrict pivot, float32_t *__restrict x)
 Solves a Linear System of Equations using LU-Decomposition.
FASTCV_API fcvStatus fcvBitwiseAndu8 (const uint8_t *src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride, uint8_t *dst, uint32_t dstStride)
 Bitwise AND operation for each element of two uint8_t matrices.
FASTCV_API fcvStatus fcvBitwiseXoru8 (const uint8_t *src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride, uint8_t *dst, uint32_t dstStride)
 Bitwise Exclusive Or operation for each element of two uint8_t matrices.
FASTCV_API fcvStatus fcvBitwiseNotu8 (const uint8_t *src, uint32_t width, uint32_t height, uint32_t srcStride, uint8_t *dst, uint32_t dstStride)
 Bitwise Not operation for each element of two uint8_t matrices.
FASTCV_API fcvStatus fcvAddu8 (const uint8_t *src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride, fcvConvertPolicy policy, uint8_t *dst, uint32_t dstStride)
 Matrix addition of two uint8_t type matrices to one uint8_t matrix.
FASTCV_API fcvStatus fcvAdds16_v2 (const int16_t *src1, uint32_t width, uint32_t height, uint32_t src1Stride, const int16_t *__restrict src2, uint32_t src2Stride, fcvConvertPolicy policy, int16_t *dst, uint32_t dstStride)
 Matrix addition of two int16_t type matrices which allows in-place operation.
FASTCV_API fcvStatus fcvAddu16u8u16 (const uint16_t *src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride, fcvConvertPolicy policy, uint16_t *dst, uint32_t dstStride)
 Matrix addition of one uint16_t type matrix and one uint8_t matrix.
FASTCV_API fcvStatus fcvSubtractu8 (const uint8_t *src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride, fcvConvertPolicy policy, uint8_t *dst, uint32_t dstStride)
 Matrix substration of two uint8_t type matrices.
FASTCV_API fcvStatus fcvSubtracts16 (const int16_t *src1, uint32_t width, uint32_t height, uint32_t src1Stride, const int16_t *__restrict src2, uint32_t src2Stride, fcvConvertPolicy policy, int16_t *dst, uint32_t dstStride)
 Matrix substration of two uint16_t type matrices.
FASTCV_API fcvStatus fcvSubtractu8s16 (const uint8_t *__restrict src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride, int16_t *__restrict dst, uint32_t dstStride)
 Matrix substration of two uint8_t type matrices.
FASTCV_API fcvStatus fcvElementMultiplys16 (const int16_t *src1, uint32_t width, uint32_t height, uint32_t src1Stride, const int16_t *src2, uint32_t src2Stride, int8_t scaleFactor, fcvConvertPolicy policy, int16_t *__restrict dst, uint32_t dstStride)
 Element-wise multiplication of two int16_t type matrices.
FASTCV_API fcvStatus fcvElementMultiplyu8s16 (const uint8_t *src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *src2, uint32_t src2Stride, int8_t scaleFactor, fcvConvertPolicy policy, int16_t *__restrict dst, uint32_t dstStride)
 Element-wise multiplication of two uint8_t type matrices.
FASTCV_API fcvStatus fcvElementMultiplyu8 (const uint8_t *src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *src2, uint32_t src2Stride, int8_t scaleFactor, fcvConvertPolicy policy, uint8_t *__restrict dst, uint32_t dstStride)
 Element-wise multiplication of two uint8_t type matrices.
FASTCV_API fcvStatus fcvAddWeightedu8 (const uint8_t *src1, uint32_t srcWidth, uint32_t srcHeight, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride, float32_t alpha, float32_t beta, uint8_t *dst, uint32_t dstStride)
 Calculate the weighted sum of two uint8_t type matrices.
FASTCV_API fcvStatus fcvAddSquaredu8u16 (const uint8_t *__restrict src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint16_t *src2, uint32_t src2Stride, int8_t scaleFactor, uint16_t *dst, uint32_t dstStride)
 Add a squared value of one type uint8 matrix to the other type uint16 type matrix.

Detailed Description

Commonly used vector & math functions


Function Documentation

FASTCV_API void fcvAbsDifff32 ( const float32_t *__restrict  src1,
const float32_t *__restrict  src2,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the per-element absolute difference between two float32_t matrices.

Parameters:
src1First input matrix
src2Second input matrix which has the same width and length as src1
srcWidthInput matrix width
srcHeightInput matrix height
srcStrideStride for the input matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
dstOutput matrix which has the same width and length as src1
dstStrideStride for output image, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvAbsDiffs32 ( const int32_t *__restrict  src1,
const int32_t *__restrict  src2,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int32_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the per-element absolute difference between two int32_t matrices.

Parameters:
src1The first input matrix
src2Second input matrix which has the same width and length as src1
srcWidthInput matrix width
srcHeightInput matrix height
srcStrideStride for the input matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
dstOutput matrix which has the same width and length as src1
dstStrideStride for output image, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvAbsDiffu8 ( const uint8_t *__restrict  src1,
const uint8_t *__restrict  src2,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the per-element absolute difference between two uint8_t matrices.

Parameters:
src1The first input matrix
src2Second input matrix which has the same width and length as src1
srcWidthInput matrix width
srcHeightInput matrix height
srcStrideStride for the input matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
dstOutput matrix which has the same width and length as src1
dstStrideStride for output image, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvAbsDiffVc3f32 ( const float32_t *__restrict  src,
float32_t  value1,
float32_t  value2,
float32_t  value3,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the per-element absolute difference between one 3-channel matrix and a 3-element Scalar.

Parameters:
srcInput matrix
value1First value of the Scalar
value2Second value of the Scalar
value3Third value of the Scalar
srcWidthInput matrix width
srcHeightInput matrix height
srcStrideStride for the input matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
dstOutput matrix which has the same width, length and channel number as src
dstStrideStride for output image, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvAbsDiffVc3s32 ( const int32_t *__restrict  src,
int32_t  value1,
int32_t  value2,
int32_t  value3,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int32_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the per-element absolute difference between one 3-channel matrix and a 3-element Scalar.

Parameters:
srcInput matrix
value1First value of the Scalar
value2Second value of the Scalar
value3Third value of the Scalar
srcWidthInput matrix width
srcHeightInput matrix height
srcStrideStride for the input matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
dstOutput matrix which has the same width, length and channel number as src
dstStrideStride for output image, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvAbsDiffVc3u8 ( const uint8_t *__restrict  src,
uint8_t  value1,
uint8_t  value2,
uint8_t  value3,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the per-element absolute difference between one 3-channel matrix and a 3-element Scalar.

Parameters:
srcInput matrix
value1First value of the Scalar
value2Second value of the Scalar
value3Third value of the Scalar
srcWidthInput matrix width
srcHeightInput matrix height
srcStrideStride for the input matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
dstOutput matrix which has the same width, length and channel number as src
dstStrideStride for output image, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvAbsDiffVc4f32 ( const float32_t *__restrict  src,
float32_t  value1,
float32_t  value2,
float32_t  value3,
float32_t  value4,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the per-element absolute difference between one 4-channel matrix and a 4-element Scalar.

Parameters:
srcInput matrix
value1First value of the Scalar
value2Second value of the Scalar
value3Third value of the Scalar
value4Fourth value of the Scalar
srcWidthInput matrix width
srcHeightInput matrix height
srcStrideStride for the input matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
dstOutput matrix which has the same width, length and channel number as src
dstStrideStride for output image , i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvAbsDiffVc4s32 ( const int32_t *__restrict  src,
int32_t  value1,
int32_t  value2,
int32_t  value3,
int32_t  value4,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int32_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the per-element absolute difference between one 4-channel matrix and a 4-element Scalar.

Parameters:
srcInput matrix
value1First value of the Scalar
value2Second value of the Scalar
value3Third value of the Scalar
value4Fourth value of the Scalar
srcWidthInput matrix width
srcHeightInput matrix height
srcStrideStride for the input matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
dstOutput matrix which has the same width, length and channel number as src
dstStrideStride for output image, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvAbsDiffVc4u8 ( const uint8_t *__restrict  src,
uint8_t  value1,
uint8_t  value2,
uint8_t  value3,
uint8_t  value4,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the per-element absolute difference between one 4-channel matrix and a 4-element Scalar.

Parameters:
srcInput matrix
value1First value of the Scalar
value2Second value of the Scalar
value3Third value of the Scalar
value4Fourth value of the Scalar
srcWidthInput matrix width
srcHeightInput matrix height
srcStrideStride for the input matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
dstOutput matrix which has the same width, length and channel number as src
dstStrideStride for output image, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvAbsDiffVf32 ( const float32_t *__restrict  src,
float32_t  value,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the per-element absolute difference between one matrix and one value.

Parameters:
srcInput matrix
valueInput value
srcWidthInput matrix width
srcHeightInput matrix height
srcStrideStride for the input matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
dstOutput matrix which has the same width and length as src
dstStrideStride for output image, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvAbsDiffVs32 ( const int32_t *__restrict  src,
int32_t  value,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int32_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the per-element absolute difference between one matrix and one value.

Parameters:
srcInput matrix
valueInput value
srcWidthInput matrix width
srcHeightInput matrix height
srcStrideStride for the input matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
dstOutput matrix which has the same width and length as src
dstStrideStride for output image , i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvAbsDiffVu8 ( const uint8_t *__restrict  src,
uint8_t  value,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the per-element absolute difference between one matrix and one value.

Parameters:
srcInput matrix
valueInput value
srcWidthInput matrix width
srcHeightInput matrix height
srcStrideStride for the input matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
dstOutput matrix which has the same width and length as src
dstStrideStride for output image, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvAddf32 ( const float32_t *__restrict  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const float32_t *__restrict  src2,
uint32_t  src2Stride,
float32_t *__restrict  dst,
uint32_t  dstStride 
)

Matrix addition of two float32_t type matrices.

Parameters:
src1First source matrix.
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*4.
WARNING: should be multiple of 8
src2Second source matrix.
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*4.
WARNING: should be multiple of 8
dstthe result matrix (float32_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*4.
WARNING: should be multiple of 8
FASTCV_API void fcvAdds16 ( 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 
)

Matrix addition of two int16_t type matrices with saturation.

Parameters:
src1First source matrix.
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
src2Second source matrix.
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). The result will be saturated to int16_t.
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 fcvAdds16_v2 ( const int16_t *  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const int16_t *__restrict  src2,
uint32_t  src2Stride,
fcvConvertPolicy  policy,
int16_t *  dst,
uint32_t  dstStride 
)

Matrix addition of two int16_t type matrices which allows in-place operation.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
WARNING: should be multiple of 8
policyConversion policy that decides how data overflow should be handled
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
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvAddScalarf32 ( const float32_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t  scalar,
float32_t *__restrict  dst,
uint32_t  dstStride 
)

Adds a scalar value to every element of a Matrix.

Adds a floating point scalar value to each element of the source Matrix and stores the result of the addition in the corresponding element of the destination matrix.

Parameters:
srcInput floating point matrix. Size of buffer is srcStride*srcHeight bytes.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
scalarThe floating point scalar to be added to the source matrix.
dstOutput 32-bit floating point matrix. Size of buffer is dstStride*srcHeight bytes.
dstStrideStride of the output matrix in bytes.
NOTE: if 0, dstStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvAddScalars16 ( const int16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int16_t  scalar,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Adds a scalar value to every element of a Matrix.

Adds a signed 16-bit integer scalar value to each element of the source Matrix and stores the result of the addition in the corresponding element of the destination matrix.
NOTE : If the sum of the scalar and matrix element exceeds the maximum value of a signed 16-bit integer, the result is clipped to this maximum value, while if the sum goes below the minimum value of a signed 16-bit integer, it is clipped to this minimum value.

Parameters:
srcInput signed 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
scalarThe signed 16-bit integer scalar to be added to the source matrix.
dstOutput 16-bit signed integer matrix. Size of buffer is dstStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
dstStrideStride of the output matrix in bytes.
NOTE: if 0, dstStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvAddSquaredu8u16 ( const uint8_t *__restrict  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const uint16_t *  src2,
uint32_t  src2Stride,
int8_t  scaleFactor,
uint16_t *  dst,
uint32_t  dstStride 
)

Add a squared value of one type uint8 matrix to the other type uint16 type matrix.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
WARNING: should be multiple of 8
scaleFactorThe number of bits to be shifted to scale the result. When scaleFactor > 0, results are right-shifted; when scaleFactor < 0, results are left-shifted by absolute value of scaleFactor
dstthe result matrix (uint16_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
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvAddu16u8u16 ( const uint16_t *  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const uint8_t *__restrict  src2,
uint32_t  src2Stride,
fcvConvertPolicy  policy,
uint16_t *  dst,
uint32_t  dstStride 
)

Matrix addition of one uint16_t type matrix and one uint8_t matrix.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
WARNING: should be multiple of 8
policyConversion policy that decides how data overflow should be handled
dstthe result matrix (uint16_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
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvAddu8 ( const uint8_t *  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const uint8_t *__restrict  src2,
uint32_t  src2Stride,
fcvConvertPolicy  policy,
uint8_t *  dst,
uint32_t  dstStride 
)

Matrix addition of two uint8_t type matrices to one uint8_t matrix.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
WARNING: should be multiple of 8
policyConversion policy that decides how data overflow should be handled
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*2.
WARNING: should be multiple of 8
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API void fcvAddu8u16 ( const uint8_t *__restrict  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const uint8_t *__restrict  src2,
uint32_t  src2Stride,
uint16_t *__restrict  dst,
uint32_t  dstStride 
)

Matrix addition of two uint8_t type matrices.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
WARNING: should be multiple of 8
dstthe result matrix (uint16_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 fcvAddWeightedu8 ( const uint8_t *  src1,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  src1Stride,
const uint8_t *__restrict  src2,
uint32_t  src2Stride,
float32_t  alpha,
float32_t  beta,
uint8_t *  dst,
uint32_t  dstStride 
)

Calculate the weighted sum of two uint8_t type matrices.

Specifically, when 0 <= alpha <= 1 and beta = 1-alpha, the function accumulates a weighted value from an input image to an output image
NOTE: alpha and beta should be within the range of (-128.0, 127.996) and have up to three digits decimal precision

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
WARNING: should be multiple of 8
alphaThe weight value applied to src1 matrix, provided by float32_t type
betaThe weight value applied to src2 matrix, provided by float32_t type
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
Returns:
FASTCV_SUCCESS upon success, other values upon failure.
FASTCV_API uint32_t fcvBitCount32x1u8 ( const uint8_t *__restrict  src)

Counts "1" bits in supplied 32-byte vector.

Parameters:
srcPointer to 32-byte vector(s) to count bits that are 1.
Returns:
total number of "1" bits in supplied vector
FASTCV_API void fcvBitCount32x4u8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b,
const uint8_t *__restrict  c,
const uint8_t *__restrict  d,
uint32_t *__restrict  bitCount 
)

Counts bits in supplied 4, 32-byte vectors.

Parameters:
aPointer to 32-byte vector to count bits.
bPointer to 32-byte vector to count bits.
cPointer to 32-byte vector to count bits.
dPointer to 32-byte vector to count bits.
bitCountArray to store the four resultant bit counts.
FASTCV_API uint32_t fcvBitCount64x1u8 ( const uint8_t *__restrict  src)

Counts bits in supplied 64-byte vector.

Parameters:
srcPointer to 64-byte vector(s) to count bits.
Returns:
Bit count.
FASTCV_API void fcvBitCount64x4u8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b,
const uint8_t *__restrict  c,
const uint8_t *__restrict  d,
uint32_t *__restrict  bitCount 
)

Counts bits in supplied 4, 64-byte vectors.

Parameters:
aPointer to 64-byte vector to count bits.
bPointer to 64-byte vector to count bits.
cPointer to 64-byte vector to count bits.
dPointer to 64-byte vector to count bits.
bitCountArray to store the four resultant bit counts.
FASTCV_API uint32_t fcvBitCountu32 ( const uint32_t *__restrict  src,
unsigned int  srcLength 
)

Counts bits in supplied vector of unsigned intergers.

Parameters:
srcPointer to vector(s) to count bits.
srcLengthNumber of elements in vector
Returns:
Bit count.
FASTCV_API uint32_t fcvBitCountu8 ( const uint8_t *__restrict  src,
unsigned int  srcLength 
)

Counts "1" bits in supplied vector.

Parameters:
srcPointer to vector to count bits that are 1.
srcLengthLength of the vector to count bits. Assumed that the remainder of bits modulo 8 will be set to 0 a priori.
Returns:
total number of "1" bits in supplied vector
FASTCV_API fcvStatus fcvBitwiseAndu8 ( const uint8_t *  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const uint8_t *__restrict  src2,
uint32_t  src2Stride,
uint8_t *  dst,
uint32_t  dstStride 
)

Bitwise AND operation for each element of two uint8_t matrices.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
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
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvBitwiseNotu8 ( const uint8_t *  src,
uint32_t  width,
uint32_t  height,
uint32_t  srcStride,
uint8_t *  dst,
uint32_t  dstStride 
)

Bitwise Not operation for each element of two uint8_t matrices.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
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
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvBitwiseXoru8 ( const uint8_t *  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const uint8_t *__restrict  src2,
uint32_t  src2Stride,
uint8_t *  dst,
uint32_t  dstStride 
)

Bitwise Exclusive Or operation for each element of two uint8_t matrices.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
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
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API float32_t fcvBlockDotProductf32 ( const float32_t *__restrict  src1,
uint32_t  blockWidth,
uint32_t  blockHeight,
uint32_t  src1Stride,
const float32_t *__restrict  src2,
uint32_t  src2Stride 
)

Dot product of two float32_t type blocks.

Parameters:
src1First source block.
blockWidthWidth of the source block.
blockHeightHeight of the source block.
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 src1Width*4.
WARNING: should be multiple of 8
src2Second source block.
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 src2Width*4.
WARNING: should be multiple of 8
Returns:
Block dot product (float32_t).
FASTCV_API uint32_t fcvBlockDotProductu8 ( const uint8_t *__restrict  src1,
uint32_t  blockWidth,
uint32_t  blockHeight,
uint32_t  src1Stride,
const uint8_t *__restrict  src2,
uint32_t  src2Stride 
)

Dot product of two uint8_t type blocks.

Parameters:
src1First source block.
blockWidthWidth of the source block.
blockHeightHeight of the source block.
NOTE: blockWidth*blockHeight should not be larger than 65536
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 src1Width.
WARNING: should be multiple of 8
src2Second source block.
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 src2Width.
WARNING: should be multiple of 8
Returns:
Block dot product (uint32_t).
FASTCV_API fcvStatus fcvCrossProduct3x1f32 ( const float32_t *__restrict  a,
const float32_t *__restrict  b,
float32_t *__restrict  c,
uint32_t  N 
)

Computes the cross-product of N pairs of 3x1 vectors.

Computes the cross-product of N pairs of 3x1 vectors. For each pair of 3x1 vectors, ai and bi, the output vector ci is given by ci = ai x bi

Parameters:
aInput buffer containing "N" 3x1 Vectors. Must be of length N * 3. The layout of the array is as follows x0 y0 z0 x1 y1 z1 .......
bInput buffer containing "N" 3x1 Vectors. Must be of length N * 3. The layout of the array is as follows x0 y0 z0 x1 y1 z1 .......
cOutput buffer containing the resultant "N" 3x1 Vectors. Each 3 x 1 Vector in c is computed from the corresponding 3 x 1 pairs in a & b. Must be of length N * 3.
NNumber of vector pairs. For example if N = 10, then a, b and c will have to be 10 x 3 in length
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API void fcvDotProduct11x12u8 ( const uint8_t *__restrict  patchPixels,
const uint8_t *__restrict  imagePixels,
unsigned short  imgW,
unsigned short  imgH,
int  iX,
int  iY,
int32_t *__restrict  dotProducts 
)

Dot product of 1 patch (8x8 byte square) with 8x8 squares in 11x12 rectangle around the center search pixel (iX,iY).

Parameters:
patchPixelsPointer to 8-bit patch pixel values linearly laid out in memory.
imagePixelsPointer to 8-bit image pixel values linearly laid out in memory.
imgWWidth in pixels of the image.
imgHHeight in pixels of the image.
iXX location on image of the center of the search window.
iYY location on image of the center of the search window.
dotProductsOutput 11x12 dot product values.
WARNING: array should be 128-bit aligned
FASTCV_API int32_t fcvDotProduct128x1s8 ( const int8_t *__restrict  a,
const int8_t *__restrict  b 
)

Dot product of two 128-byte vectors.

Parameters:
aVector.
NOTE: array should be 128-bit aligned
bVector.
NOTE: array should be 128-bit aligned
Returns:
Dot product <a|b>.
FASTCV_API uint32_t fcvDotProduct128x1u8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b 
)

Dot product of two 128-byte vectors.

Parameters:
aVector.
NOTE: array should be 128-bit aligned
bVector.
NOTE: array should be 128-bit aligned
Returns:
Dot product <a|b>.
FASTCV_API void fcvDotProduct128x4s8 ( const int8_t *__restrict  a,
const int8_t *__restrict  b,
const int8_t *__restrict  c,
const int8_t *__restrict  d,
const int8_t *__restrict  e,
int32_t *__restrict  dotProducts 
)

Dot product of one 128-byte vector against 4 others.

Dot product of vector (a) against 4 others (b,c,d,e):
<a|b>, <a|c>, <a|d>, <a|e>

Parameters:
aVector.
NOTE: array should be 128-bit aligned
bVector.
NOTE: array should be 128-bit aligned
cVector.
NOTE: array should be 128-bit aligned
dVector.
NOTE: array should be 128-bit aligned
eVector.
NOTE: array should be 128-bit aligned
dotProductsOutput of the 4 results { <a|b>, <a|c>, <a|d>, <a|e> }.
WARNING: array should be 128-bit aligned
FASTCV_API void fcvDotProduct128x4u8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b,
const uint8_t *__restrict  c,
const uint8_t *__restrict  d,
const uint8_t *__restrict  e,
uint32_t *__restrict  dotProducts 
)

Dot product of one 128-byte vector against 4 others.

Dot product of vector (a) against 4 others (b,c,d,e):
<a|b>, <a|c>, <a|d>, <a|e>

Parameters:
aVector.
NOTE: array should be 128-bit aligned
bVector.
NOTE: array should be 128-bit aligned
cVector.
NOTE: array should be 128-bit aligned
dVector.
NOTE: array should be 128-bit aligned
eVector.
NOTE: array should be 128-bit aligned
dotProductsOutput of the 4 results { <a|b>, <a|c>, <a|d>, <a|e> }.
WARNING: array should be 128-bit aligned
FASTCV_API int32_t fcvDotProduct36x1s8 ( const int8_t *__restrict  a,
const int8_t *__restrict  b 
)

Dot product of two 36-byte vectors.

Parameters:
aVector.
bVector.
Returns:
Dot product <a|b>.
FASTCV_API uint32_t fcvDotProduct36x1u8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b 
)

Dot product of two 36-byte vectors.

Parameters:
aVector.
bVector.
Returns:
Dot product <a|b>.
FASTCV_API void fcvDotProduct36x4s8 ( const int8_t *__restrict  a,
const int8_t *__restrict  b,
const int8_t *__restrict  c,
const int8_t *__restrict  d,
const int8_t *__restrict  e,
int32_t *__restrict  dotProducts 
)

Dot product of one 36-byte vector against 4 others.

Dot product of 36-byte vector (a) against 4 others (b,c,d,e):
<a|b>, <a|c>, <a|d>, <a|e>

Parameters:
aVector.
bVector.
cVector.
dVector.
eVector.
dotProductsOutput of the 4 results { <a|b>, <a|c>, <a|d>, <a|e> }.
WARNING: array should be 128-bit aligned
FASTCV_API void fcvDotProduct36x4u8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b,
const uint8_t *__restrict  c,
const uint8_t *__restrict  d,
const uint8_t *__restrict  e,
uint32_t *__restrict  dotProducts 
)

Dot product of one 36-byte vector against 4 others.

Dot product of 36-byte vector (a) against 4 others (b,c,d,e):
<a|b>, <a|c>, <a|d>, <a|e>

Parameters:
aVector.
bVector.
cVector.
dVector.
eVector.
dotProductsOutput of the 4 results { <a|b>, <a|c>, <a|d>, <a|e> }.
WARNING: array should be 128-bit aligned
FASTCV_API int32_t fcvDotProduct64x1s8 ( const int8_t *__restrict  a,
const int8_t *__restrict  b 
)

Dot product of two 64-byte vectors.

Parameters:
aVector.
NOTE: array should be 128-bit aligned
bVector.
NOTE: array should be 128-bit aligned
Returns:
Dot product <a|b>.
FASTCV_API uint32_t fcvDotProduct64x1u8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b 
)

Dot product of two 64-byte vectors.

Parameters:
aVector.
bVector.
Returns:
Dot product <a|b>.
FASTCV_API void fcvDotProduct64x4s8 ( const int8_t *__restrict  a,
const int8_t *__restrict  b,
const int8_t *__restrict  c,
const int8_t *__restrict  d,
const int8_t *__restrict  e,
int32_t *__restrict  dotProducts 
)

Dot product of one 64-byte vector against 4 others.

Dot product of vector (a) against 4 others (b,c,d,e):
<a|b>, <a|c>, <a|d>, <a|e>

Parameters:
aVector.
NOTE: array should be 128-bit aligned
bVector.
NOTE: array should be 128-bit aligned
cVector.
NOTE: array should be 128-bit aligned
dVector.
NOTE: array should be 128-bit aligned
eVector.
NOTE: array should be 128-bit aligned
dotProductsOutput of the 4 results { <a|b>, <a|c>, <a|d>, <a|e> }.
WARNING: array should be 128-bit aligned
FASTCV_API void fcvDotProduct64x4u8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b,
const uint8_t *__restrict  c,
const uint8_t *__restrict  d,
const uint8_t *__restrict  e,
uint32_t *__restrict  dotProducts 
)

Dot product of one 64-byte vector against 4 others.

Dot product of 36-byte vector (a) against 4 others (b,c,d,e):
<a|b>, <a|c>, <a|d>, <a|e>

Parameters:
aVector.
bVector.
cVector.
dVector.
eVector.
dotProductsOutput of the 4 results { <a|b>, <a|c>, <a|d>, <a|e> }.
WARNING: array should be 128-bit aligned
FASTCV_API void fcvDotProduct8x8u8 ( const uint8_t *__restrict  patchPixels,
const uint8_t *__restrict  imagePixels,
unsigned short  imgW,
unsigned short  imgH,
int  nX,
int  nY,
unsigned int  nNum,
int32_t *__restrict  dotProducts 
)

Dot product of 1 patch (8x8 byte square) with several (n) 8x8 squares along a line of pixels in an image.

Parameters:
patchPixelsPointer to 8-bit patch pixel values linearly laid out in memory.
imagePixelsPointer to 8-bit image pixel values linearly laid out in memory.
imgWWidth in pixels of the source image.
imgHHeight in pixels of the source image.
nXX location on image of starting search pixel.
nYY location on image of starting search pixel.
nNumNumber of pixels (in X direction) on image to sweep.
dotProductsOutput dot product values of nNum pixels.
WARNING: array size must be a multiple of 4 (e.g., 4, 8, 12, ...)
NOTE: array should be 128-bit aligned
FASTCV_API float32_t fcvDotProductf32 ( const float32_t *__restrict  a,
const float32_t *__restrict  b,
uint32_t  N 
)

Executes dot product of two floating point vectors.

Parameters:
aPointer to the vector a of size N.
NOTE: should be 128-bit aligned.
bPointer to the vector b of size N.
NOTE: should be 128-bit aligned.
NSize of matrix and vectors.
Returns:
the dot product in float32_t.
FASTCV_API void fcvDotProductNorm128x4s8 ( const int8_t *__restrict  a,
float  invLengthA,
const int8_t *__restrict  b0,
const int8_t *__restrict  b1,
const int8_t *__restrict  b2,
const int8_t *__restrict  b3,
float *__restrict  invLengthsB,
float *__restrict  dotProducts 
)

Normalized dot product of one 128-byte vector against 4 others.

Dot product of vector (a) against 4 others (b0,b1,b2,b3):
<a|b0>, <a|b1>, <a|b2>, <a|b3> using their given inverse lengths for normalization.

Parameters:
aVector.
NOTE: array should be 128-bit aligned
invLengthAInverse of vector A.
b0Vector.
NOTE: array should be 128-bit aligned
b1Vector.
NOTE: array should be 128-bit aligned
b2Vector.
NOTE: array should be 128-bit aligned
b3Vector.
NOTE: array should be 128-bit aligned
invLengthsBPointer to an array of the inverse values of each B vector. The pointer must point to 4 floating point values.
WARNING: array should be 128-bit aligned
dotProductsOutput of the 4 results { <a|b0>, <a|b1>, <a|b2>, <a|b3> }.
WARNING: array should be 128-bit aligned
FASTCV_API void fcvDotProductNorm128x4u8 ( const uint8_t *__restrict  a,
float  invLengthA,
const uint8_t *__restrict  b0,
const uint8_t *__restrict  b1,
const uint8_t *__restrict  b2,
const uint8_t *__restrict  b3,
float *__restrict  invLengthsB,
float *__restrict  dotProducts 
)

Normalized dot product of one 128-byte vector against 4 others.

Dot product of vector (a) against 4 others (b0,b1,b2,b3):
<a|b0>, <a|b1>, <a|b2>, <a|b3> using their given inverse lengths for normalization.

Parameters:
aVector.
NOTE: array should be 128-bit aligned
invLengthAInverse of vector A.
b0Vector.
NOTE: array should be 128-bit aligned
b1Vector.
NOTE: array should be 128-bit aligned
b2Vector.
NOTE: array should be 128-bit aligned
b3Vector.
NOTE: array should be 128-bit aligned
invLengthsBPointer to an array of the inverse values of each B vector. The pointer must point to 4 floating point values.
dotProductsOutput of the 4 results { <a|b0>, <a|b1>, <a|b2>, <a|b3> }.
WARNING: array should be 128-bit aligned
FASTCV_API void fcvDotProductNorm36x4s8 ( const int8_t *__restrict  a,
float  invLengthA,
const int8_t *__restrict  b0,
const int8_t *__restrict  b1,
const int8_t *__restrict  b2,
const int8_t *__restrict  b3,
float *__restrict  invLengthsB,
float *__restrict  dotProducts 
)

Normalized dot product of one 36-byte vector against 4 others.

Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):
<a|b0>, <a|b1>, <a|b2>, <a|b3> using their given inverse lengths for normalization.

Parameters:
aVector.
invLengthAInverse of vector A.
b0Vector.
b1Vector.
b2Vector.
b3Vector.
invLengthsBPointer to an array of the inverse values of each B vector. The pointer must point to 4 floating point values.
WARNING: array should be 128-bit aligned
dotProductsOutput of the 4 results { <a|b0>, <a|b1>, <a|b2>, <a|b3> }.
WARNING: array should be 128-bit aligned
FASTCV_API void fcvDotProductNorm36x4u8 ( const uint8_t *__restrict  a,
float  invLengthA,
const uint8_t *__restrict  b0,
const uint8_t *__restrict  b1,
const uint8_t *__restrict  b2,
const uint8_t *__restrict  b3,
float *__restrict  invLengthsB,
float *__restrict  dotProducts 
)

Normalized dot product of one 36-byte vector against 4 others.

Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):
<a|b0>, <a|b1>, <a|b2>, <a|b3> using their given inverse lengths for normalization.

Parameters:
aVector.
invLengthAInverse of vector A.
b0Vector.
b1Vector.
b2Vector.
b3Vector.
invLengthsBPointer to an array of the inverse values of each B vector. The pointer must point to 4 floating point values.
WARNING: array should be 128-bit aligned
dotProductsOutput of the 4 results { <a|b0>, <a|b1>, <a|b2>, <a|b3> }.
WARNING: array should be 128-bit aligned
FASTCV_API void fcvDotProductNorm64x4s8 ( const int8_t *__restrict  a,
float  invLengthA,
const int8_t *__restrict  b0,
const int8_t *__restrict  b1,
const int8_t *__restrict  b2,
const int8_t *__restrict  b3,
float *__restrict  invLengthsB,
float *__restrict  dotProducts 
)

Normalized dot product of one 64-byte vector against 4 others.

Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):
<a|b0>, <a|b1>, <a|b2>, <a|b3> using their given inverse lengths for normalization.

Parameters:
aVector.
invLengthAInverse of vector A.
b0Vector.
b1Vector.
b2Vector.
b3Vector.
invLengthsBPointer to an array of the inverse values of each B vector. The pointer must point to 4 floating point values.
WARNING: array should be 128-bit aligned
dotProductsOutput of the 4 results { <a|b0>, <a|b1>, <a|b2>, <a|b3> }.
WARNING: array should be 128-bit aligned
FASTCV_API void fcvDotProductNorm64x4u8 ( const uint8_t *__restrict  a,
float  invLengthA,
const uint8_t *__restrict  b0,
const uint8_t *__restrict  b1,
const uint8_t *__restrict  b2,
const uint8_t *__restrict  b3,
float *__restrict  invLengthsB,
float *__restrict  dotProducts 
)

Normalized dot product of one 64-byte vector against 4 others.

Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):
<a|b0>, <a|b1>, <a|b2>, <a|b3> using their given inverse lengths for normalization.

Parameters:
aVector.
invLengthAInverse of vector A.
b0Vector.
b1Vector.
b2Vector.
b3Vector.
invLengthsBPointer to an array of the inverse values of each B vector. The pointer must point to 4 floating point values.
WARNING: array should be 128-bit aligned
dotProductsOutput of the 4 results { <a|b0>, <a|b1>, <a|b2>, <a|b3> }.
WARNING: array should be 128-bit aligned
FASTCV_API int32_t fcvDotProducts8 ( const int8_t *__restrict  a,
const int8_t *__restrict  b,
unsigned int  abSize 
)

Dot product of two 8-bit vectors.

Parameters:
aVector.
bVector.
abSizeNumber of elements in A and B.
Returns:
Dot product <A|B>.
FASTCV_API uint32_t fcvDotProductu8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b,
unsigned int  abSize 
)

Dot product of two 8-bit vectors.

Parameters:
aVector A.
bVector B.
abSizeNumber of elements in A and B.
Returns:
Dot product <A|B>.
FASTCV_API void fcvElementMultiplyf32 ( const float32_t *  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const float32_t *  src2,
uint32_t  src2Stride,
float32_t *__restrict  dst,
uint32_t  dstStride 
)

Element-wise multiplication of two float32_t type matrices.

Parameters:
src1First source matrix.
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*4.
WARNING: should be multiple of 8
src2Second source matrix.
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*4.
WARNING: should be multiple of 8
dstthe result matrix (float32_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*4.
WARNING: should be multiple of 8
FASTCV_API fcvStatus fcvElementMultiplys16 ( const int16_t *  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const int16_t *  src2,
uint32_t  src2Stride,
int8_t  scaleFactor,
fcvConvertPolicy  policy,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Element-wise multiplication of two int16_t type matrices.

Parameters:
src1First source matrix.
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
src2Second source matrix.
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
scaleFactorThe number of bits to be shifted to scale the result. When scaleFactor > 0, results are right-shifted; when scaleFactor < 0, results are left-shifted by absolute value of scaleFactor
policyConversion policy that decides how data overflow should be handled
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
Returns:
FASTCV_SUCCESS upon success, other values upon failure.
FASTCV_API fcvStatus fcvElementMultiplyu8 ( const uint8_t *  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const uint8_t *  src2,
uint32_t  src2Stride,
int8_t  scaleFactor,
fcvConvertPolicy  policy,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Element-wise multiplication of two uint8_t type matrices.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
WARNING: should be multiple of 8
scaleFactorThe number of bits to be shifted to scale the result. When scaleFactor > 0, results are right-shifted; when scaleFactor < 0, results are left-shifted by absolute value of scaleFactor
policyConversion policy that decides how data overflow should be handled
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
Returns:
FASTCV_SUCCESS upon success, other values upon failure.
FASTCV_API fcvStatus fcvElementMultiplyu8s16 ( const uint8_t *  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const uint8_t *  src2,
uint32_t  src2Stride,
int8_t  scaleFactor,
fcvConvertPolicy  policy,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Element-wise multiplication of two uint8_t type matrices.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
WARNING: should be multiple of 8
scaleFactorThe number of bits to be shifted to scale the result. When scaleFactor > 0, results are right-shifted; when scaleFactor < 0, results are left-shifted by absolute value of scaleFactor
policyConversion policy that decides how data overflow should be handled
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
Returns:
FASTCV_SUCCESS upon success, other values upon failure.
FASTCV_API void fcvElementMultiplyu8u16 ( const uint8_t *  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const uint8_t *  src2,
uint32_t  src2Stride,
uint16_t *__restrict  dst,
uint32_t  dstStride 
)

Element-wise multiplication of two uint8_t type matrices.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
WARNING: should be multiple of 8
dstthe result matrix (uint16_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 fcvFlipRGB888u8 ( const uint8_t *  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *  dst,
uint32_t  dstStride,
fcvFlipDir  dir 
)

Flips an interleaved RGB image.

Flips one uint8_t type interleaved RGB image . If src and dst point to the same address and srcStride equals to dstStride, it will do in-place flip.

Parameters:
srcInput unsigned 8-bit integer image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the image.
srcHeightHeight of the source image.
srcStrideStride of the Image in bytes.
NOTE: if 0, srcStride is set as 3 x srcWidth.
WARNING: should be multiple of 8, and at least as much as 3 x srcWidth if not 0.
dstOutput unsigned 8-bit integer image. Size of buffer is dstStride*srcHeight bytes. If src equals to dst and srcStride equals to dstStride,it will do in-place flip.
WARNING: should be 128-bit aligned.
dstStrideStride of the output image in bytes.
NOTE: if 0, dstStride is set as 3 x srcWidth.
WARNING: should be multiple of 8, and at least as much as 3 x srcWidth if not 0.
dirFlip direction (FASTCV_FLIP_HORIZ, FASTCV_FLIP_VERT or FASTCV_FLIP_BOTH).
FASTCV_API void fcvFlipu16 ( const uint16_t *  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint16_t *  dst,
uint32_t  dstStride,
fcvFlipDir  dir 
)

Flip one uint16_t type matrix. If src and dst point to the same address, and srcStride equals to dstStride, it will do in-place flip.

Parameters:
srcSource matrix.
NOTE: array should be 128-bit aligned
srcWidthWidth of the source matrix.
srcHeightHeight of the source matrix.
srcStrideStride 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*2.
WARNING: should be multiple of 8
dstthe result matrix. If src equals to dst and srcStride equals to dstStride, it will do in-place flip.
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 srcWidth*2.
WARNING: should be multiple of 8
dirFlip direction (FASTCV_FLIP_HORIZ, FASTCV_FLIP_VERT or FASTCV_FLIP_BOTH).
FASTCV_API void fcvFlipu8 ( const uint8_t *  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *  dst,
uint32_t  dstStride,
fcvFlipDir  dir 
)

Flip one uint8_t type matrix. If src and dst point to the same address and srcStride equals to dstStride, it will do in-place flip.

Parameters:
srcSource matrix.
NOTE: array should be 128-bit aligned
srcWidthWidth of the source matrix.
srcHeightHeight of the source matrix.
srcStrideStride 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.
WARNING: should be multiple of 8
dstthe result matrix. If src equals to dst and srcStride equals to dstStride, it will do in-place flip.
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 srcWidth.
WARNING: should be multiple of 8
dirFlip direction (FASTCV_FLIP_HORIZ, FASTCV_FLIP_VERT or FASTCV_FLIP_BOTH).
FASTCV_API uint32_t fcvHammingDistance32x1u8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b 
)

Computes the Hamming distance between the two supplied 32-byte vectors.

Parameters:
aPointer to 32-byte vector to compute distance.
bPointer to 32-byte vector to compute distance.
Returns:
Hamming distance between the two vectors.
FASTCV_API uint32_t fcvHammingDistance32x1u8a4 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b 
)

Computes the Hamming distance between the two supplied 32-byte vectors.

Parameters:
aPointer to 32-byte vector to compute distance.
WARNING: must be 32-bit aligned
bPointer to 32-byte vector to compute distance.
WARNING: must be 32-bit aligned
Returns:
Hamming distance between the two vectors.
FASTCV_API void fcvHammingDistance32x4u8a4 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b,
const uint8_t *__restrict  c,
const uint8_t *__restrict  d,
const uint8_t *__restrict  e,
uint32_t *__restrict  hammingDistances 
)

Computes the Hamming distance between A and each of B,C,D,E 32-byte vectors.

Parameters:
aPointer to 32-byte vector to compute distance.
WARNING: must be 32-bit aligned
bPointer to 32-byte vector to compute distance from A.
WARNING: must be 32-bit aligned
cPointer to 32-byte vector to compute distance from A.
WARNING: must be 32-bit aligned
dPointer to 32-byte vector to compute distance from A.
WARNING: must be 32-bit aligned
ePointer to 32-byte vector to compute distance from A.
WARNING: must be 32-bit aligned
hammingDistancesArray to store each Hamming distance between the vectors.
WARNING: should be 128-bit aligned
FASTCV_API uint32_t fcvHammingDistance64x1u8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b 
)

Computes the Hamming distance between the two supplied 64-byte vectors.

Parameters:
aPointer to 64-byte vector to compute distance.
WARNING: must be 32-bit aligned
bPointer to 64-byte vector to compute distance.
WARNING: must be 32-bit aligned
Returns:
Hamming distance between the two vectors.
FASTCV_API uint32_t fcvHammingDistance64x1u8a4 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b 
)

Computes the Hamming distance between the two supplied 64-byte vectors.

Parameters:
aPointer to 64-byte vector to compute distance.
WARNING: must be 32-bit aligned
bPointer to 64-byte vector to compute distance.
WARNING: must be 32-bit aligned
Returns:
Hamming distance between the two vectors.
FASTCV_API void fcvHammingDistance64x4u8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b,
const uint8_t *__restrict  c,
const uint8_t *__restrict  d,
const uint8_t *__restrict  e,
uint32_t *__restrict  hammingDistances 
)

Computes the Hamming distance between A and each of B,C,D,E 64-byte vectors.

Parameters:
aPointer to 64-byte vector to compute distance.
WARNING: must be 32-bit aligned
bPointer to 64-byte vector to compute distance from A.
WARNING: must be 32-bit aligned
cPointer to 64-byte vector to compute distance from A.
WARNING: must be 32-bit aligned
dPointer to 64-byte vector to compute distance from A.
WARNING: must be 32-bit aligned
ePointer to 64-byte vector to compute distance from A.
WARNING: must be 32-bit aligned
hammingDistancesArray to store each Hamming distance between the vectors.
FASTCV_API void fcvHammingDistance64x4u8a4 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b,
const uint8_t *__restrict  c,
const uint8_t *__restrict  d,
const uint8_t *__restrict  e,
uint32_t *__restrict  hammingDistances 
)

Computes the Hamming distance between A and each of B,C,D,E 64-byte vectors.

Parameters:
aPointer to 32-byte vector to compute distance.
WARNING: must be 32-bit aligned
bPointer to 32-byte vector to compute distance from A.
WARNING: must be 32-bit aligned
cPointer to 32-byte vector to compute distance from A.
WARNING: must be 32-bit aligned
dPointer to 32-byte vector to compute distance from A.
WARNING: must be 32-bit aligned
ePointer to 32-byte vector to compute distance from A.
WARNING: must be 32-bit aligned
hammingDistancesArray to store each Hamming distance between the vectors.
WARNING: should be 128-bit aligned
FASTCV_API uint32_t fcvHammingDistanceu8 ( const uint8_t *__restrict  a,
const uint8_t *__restrict  b,
unsigned int  abLength 
)

Computes the Hamming distance between the two supplied arbitrary length vectors.

Parameters:
aPointer to vector to compute distance.
bPointer to vector to compute distance.
abLengthLength in bits of each of the vectors. Assumed that the remainder of bits modulo 8 will be set to 0 a priori.
Returns:
Hamming distance between the two vectors.
FASTCV_API void fcvJacobianSE2f32 ( const uint8_t *__restrict  warpedImage,
const uint16_t *__restrict  warpedBorder,
const uint8_t *__restrict  targetImage,
const int16_t *__restrict  targetDX,
const int16_t *__restrict  targetDY,
uint32_t  width,
uint32_t  height,
uint32_t  stride,
float32_t *__restrict  sumJTJ,
float32_t *__restrict  sumJTE,
float32_t *__restrict  sumError,
uint32_t *__restrict  numPixels 
)

Calculates JTJ, JTE and the sum absolute, normalized pixel differences for a target image and a reference image of same size for an SE2 image motion model. Since gradients are required for this algorithm all border pixels in referenceImage and targetImage are ignored.
NOTE: Only works for images with even width and height.

Parameters:
warpedImageGrayscale 8-bit image.
NOTE: should be 128-bit aligned.
warpedBorderArray with the x-coordinates of left-most and right-most pixels for each scanline to consider in warpedImage. Format is l0,r0,l1,r1,l2,... where l_ and r_ are the left-most and right-most pixel coordinates for a scanline.
NOTE: should be 128-bit aligned.
targetImageGrayscale 8-bit image.
NOTE: should be 128-bit aligned.
targetDXX-gradients of the target image as 16-bit signed integers.
NOTE: share same width, height and stride as targetImage. Stride is in units of pixels instead of bytes for targetDX.
NOTE: should be 128-bit aligned.
targetDYY-gradients of the target image as 16-bit signed integers.
NOTE: share same width, height and stride as targetImage. Stride is in units of pixels instead of bytes for targetDY.
NOTE: should be 128-bit aligned.
widthWidth of the reference image and target image. Must be even.
heightHeight of the reference image and target image. Must be even.
strideStride (in bytes) of reference image and target 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 stride is default to width.
NOTE: should be a multiple of 8.
sumJTJ3x3 matrix (9 floats) receiving the sum of JTJ for all pixels. Only the upper half triangle matrix is filled.
NOTE: should be 128-bit aligned.
sumJTE3 vector (3 floats) receiving the sum of JTE for all pixels.
sumErrorSum of absolute, normalized pixel differences for all processed pixels (1 float).
numPixelsNumber of pixels that have been processed (1 integer).
FASTCV_API void fcvMatrixMultiplyf32 ( const float32_t *__restrict  src1,
uint32_t  src1Width,
uint32_t  src1Height,
uint32_t  src1Stride,
const float32_t *__restrict  src2,
uint32_t  src2Width,
uint32_t  src2Stride,
float32_t *__restrict  dst,
uint32_t  dstStride 
)

Matrix multiplication of two float32_t type matrices.

Parameters:
src1First source matrix. The size of src1 is src1Stride*src1Height.
NOTE: array should be 128-bit aligned
src1WidthWidth of the first source matrix.
src1HeightHeight of the first 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 src1Width*4.
WARNING: should be multiple of 8
src2Second source matrix. The size of src2 is src2Stride*src1Width.
NOTE: array should be 128-bit aligned
src2WidthWidth of the second source matrix.
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 src2Width*4.
WARNING: should be multiple of 8
dstthe result matrix (int32_t type). The size of dst is dstStride*src1Height.
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 src2Width*4.
WARNING: should be multiple of 8
FASTCV_API void fcvMatrixMultiplys8s32 ( const int8_t *__restrict  src1,
uint32_t  src1Width,
uint32_t  src1Height,
uint32_t  src1Stride,
const int8_t *__restrict  src2,
uint32_t  src2Width,
uint32_t  src2Stride,
int32_t *__restrict  dst,
uint32_t  dstStride 
)

Matrix multiplication of two int8_t type matrices.

Parameters:
src1First source matrix. The size of src1 is src1Stride*src1Height.
NOTE: array should be 128-bit aligned
src1WidthWidth of the first source matrix.
NOTE: src1Width should not be larger than 131072
src1HeightHeight of the first 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 src1Width.
WARNING: should be multiple of 8
src2Second source matrix. The size of src2 is src2Stride*src1Width.
NOTE: array should be 128-bit aligned
src2WidthWidth of the second source matrix.
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 src2Width.
WARNING: should be multiple of 8
dstthe result matrix (int32_t type). The size of dst is dstStride*src1Height.
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 src2Width*4.
WARNING: should be multiple of 8
FASTCV_API fcvStatus fcvMinMaxLocf32 ( const float32_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t *__restrict  minVal,
float32_t *__restrict  maxVal,
uint32_t *__restrict  minLocX,
uint32_t *__restrict  minLocY,
uint32_t *__restrict  maxLocX,
uint32_t *__restrict  maxLocY 
)

Finds the minimum and maximum values, and their location in a matrix.


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: fcvMinMaxLocf32_v2(). In the 2.0.0 release, fcvMinMaxLocf32_v2 will be renamed to fcvMinMaxLocf32 and the signature of fcvMinMaxLocf32 as it appears now, will be removed.

Finds the minimum and maximum values in a matrix, and returns them. In addition to this, it also returns the location (x,y) of the minimum and maximum values thus found.

Parameters:
srcInput unsigned 32-bit floating point matrix. Size of buffer is srcStride*srcHeight bytes.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
minValThis variable stores the minimum value of the src matrix found by the function
maxValThis variable stores the maximum value of the src matrix found by the function
minLocXThe X coordinate of the minimum value's location returned by the function
minLocYThe Y coordinate of the minimum value's location returned by the function
maxLocXThe X coordinate of the maximum value's location returned by the function
maxLocYThe Y coordinate of the maximum value's location returned by the function
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMinMaxLocf32_v2 ( const float32_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t *__restrict  minVal,
float32_t *__restrict  maxVal,
uint32_t *__restrict  minLocX,
uint32_t *__restrict  minLocY,
uint32_t *__restrict  maxLocX,
uint32_t *__restrict  maxLocY,
uint32_t *__restrict  minCount,
uint32_t *__restrict  maxCount,
uint32_t  nMinLocSize,
uint32_t  nMaxLocSize 
)

Finds the minimum and maximum values, and their locations in a matrix.


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: fcvMinMaxLocf32_v2(). In the 2.0.0 release, fcvMinMaxLocf32_v2 will be renamed to fcvMinMaxLocf32 and the signature of fcvMinMaxLocf32 as it appears now, will be removed.

Finds the minimum and maximum values in a matrix, and returns them. In addition to this, it also returns the location (x,y) of the minimum and maximum values thus found. If there are multiple minima/maxima, the function returns them all. If the the number of minima and maxima are greater than the capacity of the minLoc and maxLoc arrays, then the function returns as many locations as the capacity of these arrays.

Parameters:
srcInput 32-bit floating point matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(float32_t) if not 0.
minValThis variable stores the minimum value of the src matrix found by the function
maxValThis variable stores the maximum value of the src matrix found by the function
minLocXAn array of X coordinates of the minimum value's location returned by the function Must have
nMinLocSizeelements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
minLocYAn array of Y coordinates of the minimum value's location returned by the function Must have
nMinLocSizeelements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
maxLocXAn array of X coordinates of the maximum value's location returned by the function Must have
nMaxLocSizeelements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
maxLocYAn array of Y coordinates of the maximum value's location returned by the function Must have
nMaxLocSizeelements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
minCountThe number of minima found by the function
maxCountThe number of maxima found by the function
nMinLocSizeThe maximum number of minima requested by the user to be found in the input image src. The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
nMaxLocSizeThe maximum number of maxima requested by the user to be found in the input image src. The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMinMaxLocs16 ( const int16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int16_t *__restrict  minVal,
int16_t *__restrict  maxVal,
uint32_t *__restrict  minLocX,
uint32_t *__restrict  minLocY,
uint32_t *__restrict  maxLocX,
uint32_t *__restrict  maxLocY 
)

Finds the minimum and maximum values, and their location in a matrix.


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: fcvMinMaxLocs16_v2(). In the 2.0.0 release, fcvMinMaxLocs16_v2 will be renamed to fcvMinMaxLocs16 and the signature of fcvMinMaxLocs16 as it appears now, will be removed.

Finds the minimum and maximum values in a matrix, and returns them. In addition to this, it also returns the location (x,y) of the minimum and maximum values thus found.

Parameters:
srcInput signed 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
minValThis variable stores the minimum value of the src matrix found by the function
maxValThis variable stores the maximum value of the src matrix found by the function
minLocXThe X coordinate of the minimum value's location returned by the function
minLocYThe Y coordinate of the minimum value's location returned by the function
maxLocXThe X coordinate of the maximum value's location returned by the function
maxLocYThe Y coordinate of the maximum value's location returned by the function
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMinMaxLocs16_v2 ( const int16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int16_t *__restrict  minVal,
int16_t *__restrict  maxVal,
uint32_t *__restrict  minLocX,
uint32_t *__restrict  minLocY,
uint32_t *__restrict  maxLocX,
uint32_t *__restrict  maxLocY,
uint32_t *__restrict  minCount,
uint32_t *__restrict  maxCount,
uint32_t  nMinLocSize,
uint32_t  nMaxLocSize 
)

Finds the minimum and maximum values, and their locations in a matrix.


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: fcvMinMaxLocs16_v2(). In the 2.0.0 release, fcvMinMaxLocs16_v2 will be renamed to fcvMinMaxLocs16 and the signature of fcvMinMaxLocs16 as it appears now, will be removed.

Finds the minimum and maximum values in a matrix, and returns them. In addition to this, it also returns the location (x,y) of the minimum and maximum values thus found. If there are multiple minima/maxima, the function returns them all. If the the number of minima and maxima are greater than the capacity of the minLoc and maxLoc arrays, then the function returns as many locations as the capacity of these arrays.

Parameters:
srcInput signed 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(int16_t) if not 0.
minValThis variable stores the minimum value of the src matrix found by the function
maxValThis variable stores the maximum value of the src matrix found by the function
minLocXAn array of X coordinates of the minimum value's location returned by the function Must have
nMinLocSizeelements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
minLocYAn array of Y coordinates of the minimum value's location returned by the function Must have
nMinLocSizeelements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
maxLocXAn array of X coordinates of the maximum value's location returned by the function Must have
nMaxLocSizeelements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
maxLocYAn array of Y coordinates of the maximum value's location returned by the function Must have
nMaxLocSizeelements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
minCountThe number of minima found by the function
maxCountThe number of maxima found by the function
nMinLocSizeThe maximum number of minima requested by the user to be found in the input image src. The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
nMaxLocSizeThe maximum number of maxima requested by the user to be found in the input image src. The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMinMaxLocs32 ( const int32_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int32_t *__restrict  minVal,
int32_t *__restrict  maxVal,
uint32_t *__restrict  minLocX,
uint32_t *__restrict  minLocY,
uint32_t *__restrict  maxLocX,
uint32_t *__restrict  maxLocY 
)

Finds the minimum and maximum values, and their location in a matrix.


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: fcvMinMaxLocs32_v2(). In the 2.0.0 release, fcvMinMaxLocs32_v2 will be renamed to fcvMinMaxLocs32 and the signature of fcvMinMaxLocs32 as it appears now, will be removed.

Finds the minimum and maximum values in a matrix, and returns them. In addition to this, it also returns the location (x,y) of the minimum and maximum values thus found.

Parameters:
srcInput signed 32-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
minValThis variable stores the minimum value of the src matrix found by the function
maxValThis variable stores the maximum value of the src matrix found by the function
minLocXThe X coordinate of the minimum value's location returned by the function
minLocYThe Y coordinate of the minimum value's location returned by the function
maxLocXThe X coordinate of the maximum value's location returned by the function
maxLocYThe Y coordinate of the maximum value's location returned by the function
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMinMaxLocs32_v2 ( const int32_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int32_t *__restrict  minVal,
int32_t *__restrict  maxVal,
uint32_t *__restrict  minLocX,
uint32_t *__restrict  minLocY,
uint32_t *__restrict  maxLocX,
uint32_t *__restrict  maxLocY,
uint32_t *__restrict  minCount,
uint32_t *__restrict  maxCount,
uint32_t  nMinLocSize,
uint32_t  nMaxLocSize 
)

Finds the minimum and maximum values, and their locations in a matrix.


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: fcvMinMaxLocs32_v2(). In the 2.0.0 release, fcvMinMaxLocs32_v2 will be renamed to fcvMinMaxLocs32 and the signature of fcvMinMaxLocs32 as it appears now, will be removed.

Finds the minimum and maximum values in a matrix, and returns them. In addition to this, it also returns the location (x,y) of the minimum and maximum values thus found. If there are multiple minima/maxima, the function returns them all. If the the number of minima and maxima are greater than the capacity of the minLoc and maxLoc arrays, then the function returns as many locations as the capacity of these arrays.

Parameters:
srcInput signed 32-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(int32_t) if not 0.
minValThis variable stores the minimum value of the src matrix found by the function
maxValThis variable stores the maximum value of the src matrix found by the function
minLocXAn array of X coordinates of the minimum value's location returned by the function Must have
nMinLocSizeelements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
minLocYAn array of Y coordinates of the minimum value's location returned by the function Must have
nMinLocSizeelements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
maxLocXAn array of X coordinates of the maximum value's location returned by the function Must have
nMaxLocSizeelements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
maxLocYAn array of Y coordinates of the maximum value's location returned by the function Must have
nMaxLocSizeelements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
minCountThe number of minima found by the function
maxCountThe number of maxima found by the function
nMinLocSizeThe maximum number of minima requested by the user to be found in the input image src. The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
nMaxLocSizeThe maximum number of maxima requested by the user to be found in the input image src. The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMinMaxLocu16 ( const uint16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint16_t *__restrict  minVal,
uint16_t *__restrict  maxVal,
uint32_t *__restrict  minLocX,
uint32_t *__restrict  minLocY,
uint32_t *__restrict  maxLocX,
uint32_t *__restrict  maxLocY 
)

Finds the minimum and maximum values, and their location in a matrix.


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: fcvMinMaxLocu16_v2(). In the 2.0.0 release, fcvMinMaxLocu16_v2 will be renamed to fcvMinMaxLocu16 and the signature of fcvMinMaxLocu16 as it appears now, will be removed.

Finds the minimum and maximum values in a matrix, and returns them. In addition to this, it also returns the location (x,y) of the minimum and maximum values thus found.

Parameters:
srcInput unsigned 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
minValThis variable stores the minimum value of the src matrix found by the function
maxValThis variable stores the maximum value of the src matrix found by the function
minLocXThe X coordinate of the minimum value's location returned by the function
minLocYThe Y coordinate of the minimum value's location returned by the function
maxLocXThe X coordinate of the maximum value's location returned by the function
maxLocYThe Y coordinate of the maximum value's location returned by the function
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMinMaxLocu16_v2 ( const uint16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint16_t *__restrict  minVal,
uint16_t *__restrict  maxVal,
uint32_t *__restrict  minLocX,
uint32_t *__restrict  minLocY,
uint32_t *__restrict  maxLocX,
uint32_t *__restrict  maxLocY,
uint32_t *__restrict  minCount,
uint32_t *__restrict  maxCount,
uint32_t  nMinLocSize,
uint32_t  nMaxLocSize 
)

Finds the minimum and maximum values, and their locations in a matrix.


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: fcvMinMaxLocu16_v2(). In the 2.0.0 release, fcvMinMaxLocu16_v2 will be renamed to fcvMinMaxLocu16 and the signature of fcvMinMaxLocu16 as it appears now, will be removed.

Finds the minimum and maximum values in a matrix, and returns them. In addition to this, it also returns the location (x,y) of the minimum and maximum values thus found. If there are multiple minima/maxima, the function returns them all. If the the number of minima and maxima are greater than the capacity of the minLoc and maxLoc arrays, then the function returns as many locations as the capacity of these arrays.

Parameters:
srcInput unsigned 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(uint16_t) if not 0.
minValThis variable stores the minimum value of the src matrix found by the function
maxValThis variable stores the maximum value of the src matrix found by the function
minLocXAn array of X coordinates of the minimum value's location returned by the function Must have
nMinLocSizeelements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
minLocYAn array of Y coordinates of the minimum value's location returned by the function Must have
nMinLocSizeelements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
maxLocXAn array of X coordinates of the maximum value's location returned by the function Must have
nMaxLocSizeelements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
maxLocYAn array of Y coordinates of the maximum value's location returned by the function Must have
nMaxLocSizeelements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
minCountThe number of minima found by the function
maxCountThe number of maxima found by the function
nMinLocSizeThe maximum number of minima requested by the user to be found in the input image src. The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
nMaxLocSizeThe maximum number of maxima requested by the user to be found in the input image src. The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMinMaxLocu32 ( const uint32_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t *__restrict  minVal,
uint32_t *__restrict  maxVal,
uint32_t *__restrict  minLocX,
uint32_t *__restrict  minLocY,
uint32_t *__restrict  maxLocX,
uint32_t *__restrict  maxLocY 
)

Finds the minimum and maximum values, and their location in a matrix.


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: fcvMinMaxLocu32_v2(). In the 2.0.0 release, fcvMinMaxLocu32_v2 will be renamed to fcvMinMaxLocu32 and the signature of fcvMinMaxLocu32 as it appears now, will be removed.

Finds the minimum and maximum values in a matrix, and returns them. In addition to this, it also returns the location (x,y) of the minimum and maximum values thus found.

Parameters:
srcInput unsigned 32-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
minValThis variable stores the minimum value of the src matrix found by the function
maxValThis variable stores the maximum value of the src matrix found by the function
minLocXThe X coordinate of the minimum value's location returned by the function
minLocYThe Y coordinate of the minimum value's location returned by the function
maxLocXThe X coordinate of the maximum value's location returned by the function
maxLocYThe Y coordinate of the maximum value's location returned by the function
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMinMaxLocu32_v2 ( const uint32_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t *__restrict  minVal,
uint32_t *__restrict  maxVal,
uint32_t *__restrict  minLocX,
uint32_t *__restrict  minLocY,
uint32_t *__restrict  maxLocX,
uint32_t *__restrict  maxLocY,
uint32_t *__restrict  minCount,
uint32_t *__restrict  maxCount,
uint32_t  nMinLocSize,
uint32_t  nMaxLocSize 
)

Finds the minimum and maximum values, and their locations in a matrix.


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: fcvMinMaxLocu32_v2(). In the 2.0.0 release, fcvMinMaxLocu32_v2 will be renamed to fcvMinMaxLocu32 and the signature of fcvMinMaxLocu32 as it appears now, will be removed.

Finds the minimum and maximum values in a matrix, and returns them. In addition to this, it also returns the location (x,y) of the minimum and maximum values thus found. If there are multiple minima/maxima, the function returns them all. If the the number of minima and maxima are greater than the capacity of the minLoc and maxLoc arrays, then the function returns as many locations as the capacity of these arrays.

Parameters:
srcInput unsigned 32-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(uint32_t) if not 0.
minValThis variable stores the minimum value of the src matrix found by the function
maxValThis variable stores the maximum value of the src matrix found by the function
minLocXAn array of X coordinates of the minimum value's location returned by the function Must have
nMinLocSizeelements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
minLocYAn array of Y coordinates of the minimum value's location returned by the function Must have
nMinLocSizeelements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
maxLocXAn array of X coordinates of the maximum value's location returned by the function Must have
nMaxLocSizeelements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
maxLocYAn array of Y coordinates of the maximum value's location returned by the function Must have
nMaxLocSizeelements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
minCountThe number of minima found by the function
maxCountThe number of maxima found by the function
nMinLocSizeThe maximum number of minima requested by the user to be found in the input image src. The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
nMaxLocSizeThe maximum number of maxima requested by the user to be found in the input image src. The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMinMaxLocu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  minVal,
uint8_t *__restrict  maxVal,
uint32_t *__restrict  minLocX,
uint32_t *__restrict  minLocY,
uint32_t *__restrict  maxLocX,
uint32_t *__restrict  maxLocY 
)

Finds the minimum and maximum values, and their location in a matrix.


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: fcvMinMaxLocu8_v2(). In the 2.0.0 release, fcvMinMaxLocu8_v2 will be renamed to fcvMinMaxLocu8 and the signature of fcvMinMaxLocu8 as it appears now, will be removed.

Finds the minimum and maximum values in a matrix, and returns them. In addition to this, it also returns the location (x,y) of the minimum and maximum values thus found.

Parameters:
srcInput unsigned 8-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
minValThis variable stores the minimum value of the src matrix found by the function
maxValThis variable stores the maximum value of the src matrix found by the function
minLocXThe X coordinate of the minimum value's location returned by the function
minLocYThe Y coordinate of the minimum value's location returned by the function
maxLocXThe X coordinate of the maximum value's location returned by the function
maxLocYThe Y coordinate of the maximum value's location returned by the function
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMinMaxLocu8_v2 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  minVal,
uint8_t *__restrict  maxVal,
uint32_t *__restrict  minLocX,
uint32_t *__restrict  minLocY,
uint32_t *__restrict  maxLocX,
uint32_t *__restrict  maxLocY,
uint32_t *__restrict  minCount,
uint32_t *__restrict  maxCount,
uint32_t  nMinLocSize,
uint32_t  nMaxLocSize 
)

Finds the minimum and maximum values, and their locations in a matrix.


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: fcvMinMaxLocu8_v2(). In the 2.0.0 release, fcvMinMaxLocu8_v2 will be renamed to fcvMinMaxLocu8 and the signature of fcvMinMaxLocu8 as it appears now, will be removed.

Finds the minimum and maximum values in a matrix, and returns them. In addition to this, it also returns the location (x,y) of the minimum and maximum values thus found. If there are multiple minima/maxima, the function returns them all. If the the number of minima and maxima are greater than the capacity of the minLoc and maxLoc arrays, then the function returns as many locations as the capacity of these arrays.

Parameters:
srcInput unsigned 8-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(uint8_t) if not 0.
minValThis variable stores the minimum value of the src matrix found by the function
maxValThis variable stores the maximum value of the src matrix found by the function
minLocXAn array of X coordinates of the minimum value's location returned by the function Must have
nMinLocSizeelements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
minLocYAn array of Y coordinates of the minimum value's location returned by the function Must have
nMinLocSizeelements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
maxLocXAn array of X coordinates of the maximum value's location returned by the function Must have
nMaxLocSizeelements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
maxLocYAn array of Y coordinates of the maximum value's location returned by the function Must have
nMaxLocSizeelements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
minCountThe number of minima found by the function
maxCountThe number of maxima found by the function
nMinLocSizeThe maximum number of minima requested by the user to be found in the input image src. The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
nMaxLocSizeThe maximum number of maxima requested by the user to be found in the input image src. The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMultiplyScalarf32 ( const float32_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t  scalar,
float32_t *__restrict  dst,
uint32_t  dstStride 
)

Multiplies a scalar value to every element of a Matrix.

Multiplies a floating point scalar value to each element of the source Matrix and stores the result of the multiplication in the corresponding element of the destination matrix.

Parameters:
srcInput floating point matrix. Size of buffer is srcStride*srcHeight bytes.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
scalarThe floating point scalar to be multiplied to the source matrix.
dstOutput 32-bit floating point matrix. Size of buffer is dstStride*srcHeight bytes.
dstStrideStride of the output matrix in bytes.
NOTE: if 0, dstStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvMultiplyScalars16 ( const int16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int8_t  scalar,
int8_t  shift,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Multiplies a scalar value to every element of a Matrix.

Multiplies a signed 16-bit scalar value to each element of the source Matrix and stores the result of the multiplication in the corresponding element of the destination matrix.
NOTE : If the product of the scalar and matrix element exceeds the maximum value of a signed 16-bit integer, the result is clipped to this maximum value, while if the product goes below the minimum value of a signed 16-bit integer, it is clipped to this minimum value. The API can also handle fractional scalars. Use fixed point conversion and use the shift parameter to decide the number of bits by which the result is shifted by. This affects the precision of the result. If you wish to perform pure integer multiplication, set the shift parameter to 0.

Parameters:
srcInput signed 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Matrix.
srcHeightHeight of the Matrix.
srcStrideStride of the Matrix in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
scalarThe signed 8-bit integer scalar to be multiplied to the source matrix.
shiftThe number of bits that the result has to be shifted by. Used to handle fractional scalar multiplication. If your input scalar is a pure integer, set shift to 0.
dstOutput signed 16-bit integer matrix. Size of buffer is dstStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
dstStrideStride of the output matrix in bytes.
NOTE: if 0, dstStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvRotateImageInterleavedu8 ( const uint8_t *  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *  dst,
uint32_t  dstStride,
fcvRotateDegree  degree 
)

Rotate one interleaved uint8_t type image (e.g. UV channel in NV21).

Parameters:
srcSource image.
NOTE: array should be 128-bit aligned
srcWidthNumber of interleaved pairs in one row. For example, srcWidth = 4 in UVUVUVUV image row.
srcHeightHeight of the source image.
srcStrideStride 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 2*srcWidth.
WARNING: should be multiple of 8
dstthe result image.
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 2*srcWidth (FASTCV_ROTATE_180) or 2*srcHeight (FASTCV_ROTATE_90 or FASTCV_ROTATE_270).
WARNING: should be multiple of 8
degreeRotate degree (FASTCV_ROTATE_90, FASTCV_ROTATE_180 or FASTCV_ROTATE_270).
FASTCV_API fcvStatus fcvRotateImageu8 ( const uint8_t *  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *  dst,
uint32_t  dstStride,
fcvRotateDegree  degree 
)

Rotate one uint8_t type image.

Parameters:
srcSource image.
NOTE: array should be 128-bit aligned
srcWidthWidth of the source image.
srcHeightHeight of the source image.
srcStrideStride 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.
WARNING: should be multiple of 8
dstthe result image.
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 srcWidth (FASTCV_ROTATE_180) or srcHeight (FASTCV_ROTATE_90 or FASTCV_ROTATE_270).
WARNING: should be multiple of 8
degreeRotate degree (FASTCV_ROTATE_90, FASTCV_ROTATE_180 or FASTCV_ROTATE_270).
FASTCV_API void fcvSetElementsc3f32 ( float32_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
float32_t  value1,
float32_t  value2,
float32_t  value3,
const uint8_t *__restrict  mask,
uint32_t  maskStride 
)

Sets every element of a float32_t 3-channel array to a given 3-element scalar.

A non-zero element of the mask array indicates the corresponding element of the destination array to be changed. The mask itself equals to zero means that all elements of the dst array need to be changed. The mask is assumed to have the same width and height( in terms of pixels) as the destination array.

Parameters:
dstThe destination matrix
dstWidthDestination matrix width
dstHeightDestination matrix height
dstStrideStride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
value1First float32_t value of the Scalar
value2Second float32_t value of the Scalar
value3Third float32_t value of the Scalar
maskOperation mask, 8-bit single channel array; specifies elements of the src array to be changed
maskStrideStride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvSetElementsc3s32 ( int32_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
int32_t  value1,
int32_t  value2,
int32_t  value3,
const uint8_t *__restrict  mask,
uint32_t  maskStride 
)

Sets every element of an int32_t 3-channel array to a given 3-element scalar.

A non-zero element of the mask array indicates the corresponding element of the destination array to be changed. The mask itself equals to zero means that all elements of the dst array need to be changed. The mask is assumed to have the same width and height( in terms of pixels) as the destination array.

Parameters:
dstThe destination matrix
dstWidthDestination matrix width
dstHeightDestination matrix height
dstStrideStride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
value1First int32_t value of the Scalar
value2Second int32_t value of the Scalar
value3Third int32_t value of the Scalar
maskOperation mask, 8-bit single channel array; specifies elements of the src array to be changed.
maskStrideStride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvSetElementsc3u8 ( uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
uint8_t  value1,
uint8_t  value2,
uint8_t  value3,
const uint8_t *__restrict  mask,
uint32_t  maskStride 
)

Sets every element of a uint8_t 3-channel array to a given 3-element scalar.

A non-zero element of the mask array indicates the corresponding element of the destination array to be changed. The mask itself equals to zero means that all elements of the dst array need to be changed. The mask is assumed to have the same width and height( in terms of pixels) as the destination array.

Parameters:
dstThe destination matrix
dstWidthDestination matrix width
dstHeightDestination matrix height
dstStrideStride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
value1First uint8_t value of the Scalar
value2Second uint8_t value of the Scalar
value3Third uint8_t value of the Scalar
maskOperation mask, 8-bit single channel array; specifies elements of the src array to be changed
maskStrideStride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvSetElementsc4f32 ( float32_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
float32_t  value1,
float32_t  value2,
float32_t  value3,
float32_t  value4,
const uint8_t *__restrict  mask,
uint32_t  maskStride 
)

Sets every element of a float32_t 4-channel array to a given 4-element scalar.

A non-zero element of the mask array indicates the corresponding element of the destination array to be changed. The mask itself equals to zero means that all elements of the dst array need to be changed. The mask is assumed to have the same width and height( in terms of pixels) as the destination array.

Parameters:
dstThe destination matrix
dstWidthDestination matrix width
dstHeightDestination matrix height
dstStrideStride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
value1First float32_t value of the Scalar
value2Second float32_t value of the Scalar
value3Third float32_t value of the Scalar
value4Fourth float32_t value of the Scalar
maskOperation mask, 8-bit single channel array; specifies elements of the src array to be changed
maskStrideStride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvSetElementsc4s32 ( int32_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
int32_t  value1,
int32_t  value2,
int32_t  value3,
int32_t  value4,
const uint8_t *__restrict  mask,
uint32_t  maskStride 
)

Sets every element of an int32_t 4-channel array to a given 4-element scalar.

A non-zero element of the mask array indicates the corresponding element of the destination array to be changed. The mask itself equals to zero means that all elements of the dst array need to be changed. The mask is assumed to have the same width and height( in terms of pixels) as the destination array.

Parameters:
dstThe destination matrix
dstWidthDestination matrix width
dstHeightDestination matrix height
dstStrideStride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
value1First int32_t value of the Scalar
value2Second int32_t value of the Scalar
value3Third int32_t value of the Scalar
value4Fourth int32_t value of the Scalar
maskOperation mask, 8-bit single channel array; specifies elements of the src array to be changed.
maskStrideStride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvSetElementsc4u8 ( uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
uint8_t  value1,
uint8_t  value2,
uint8_t  value3,
uint8_t  value4,
const uint8_t *__restrict  mask,
uint32_t  maskStride 
)

Sets every element of a uint8_t 4-channel array to a given 4-element scalar.

A non-zero element of the mask array indicates the corresponding element of the destination array to be changed. The mask itself equals to zero means that all elements of the dst array need to be changed. The mask is assumed to have the same width and height( in terms of pixels) as the destination array.

Parameters:
dstThe destination matrix
dstWidthDestination matrix width
dstHeightDestination matrix height
dstStrideStride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
value1First uint8_t value of the Scalar
value2Second uint8_t value of the Scalar
value3Third uint8_t value of the Scalar
value4Fourth uint8_t value of the Scalar
maskOperation mask, 8-bit single channel array; specifies elements of the src array to be changed
maskStrideStride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvSetElementsf32 ( float32_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
float32_t  value,
const uint8_t *__restrict  mask,
uint32_t  maskStride 
)

Sets every element of a float32_t single channel array to a given value.

A non-zero element of the mask array indicates the corresponding element of the destination array to be changed. The mask itself equals to zero means that all elements of the dst array need to be changed. The mask is assumed to have the same width and height( in terms of pixels) as the destination array.

Parameters:
dstThe destination matrix
dstWidthDestination matrix width
dstHeightDestination matrix height
dstStrideStride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
valuethe input float32_t value
maskOperation mask, 8-bit single channel array; specifies elements of the src array to be changed
maskStrideStride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvSetElementss32 ( int32_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
int32_t  value,
const uint8_t *__restrict  mask,
uint32_t  maskStride 
)

Sets every element of an int32_t single channel array to a given value.

A non-zero element of the mask array indicates the corresponding element of the destination array to be changed. The mask itself equals to zero means that all elements of the dst array need to be changed. The mask is assumed to have the same width and height( in terms of pixels) as the destination array.

Parameters:
dstThe destination matrix
dstWidthDestination matrix width
dstHeightDestination matrix height
dstStrideStride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
valuethe input int32_t value
maskOperation mask, 8-bit single channel array; specifies elements of the src array to be changed
maskStrideStride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API void fcvSetElementsu8 ( uint8_t *__restrict  dst,
uint32_t  dstWidth,
uint32_t  dstHeight,
uint32_t  dstStride,
uint8_t  value,
const uint8_t *__restrict  mask,
uint32_t  maskStride 
)

Sets every element of a uint8_t single channel array to a given value.

A non-zero element of the mask array indicates the corresponding element of the destination array to be changed. The mask itself equals to zero means that all elements of the dst array need to be changed. The mask is assumed to have the same width and height( in terms of pixels) as the destination array.

Parameters:
dstThe destination matrix
dstWidthDestination matrix width
dstHeightDestination matrix height
dstStrideStride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
valuethe input uint8_t value
maskOperation mask, 8-bit single channel array; specifies elements of the src array to be changed.
maskStrideStride for the mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
Returns:
No return value
FASTCV_API int32_t fcvSolveCholeskyf32 ( float32_t *__restrict  A,
const float32_t *__restrict  b,
float32_t *__restrict  diag,
uint32_t  N,
float32_t *__restrict  x 
)

Executes Cholesky decomposition algorithm on a symmetric and positive definite matrix to solve the linear system A*x = b, where A is an NxN matrix and x & b are vectors of size N.

Parameters:
APointer to the matrix A or size NxN.
NOTE: This matrix WILL BE MODIFIED during computation. Please SAVE THE ORIGINAL MATRIX properly if necessary.
NOTE: should be 128-bit aligned.
bPointer to the vector b of size N.
NOTE: should be 128-bit aligned.
diagPointer to the buffer for the diagonal of matrix A. This buffer is used for computation.
NOTE: should be 128-bit aligned.
NSize of matrix and vectors.
xPointer to the output vector x of size N.
NOTE: should be 128-bit aligned.
Returns:
1 if the linear system could be solved or 0 otherwise.
FASTCV_API void fcvSolvef32 ( const float32_t *__restrict  A,
int32_t  numCols,
int32_t  numRows,
const float32_t *__restrict  b,
float32_t *__restrict  x 
)

Solve linear equation system Ax = b.

Parameters:
AThe matrix contains coefficients of the linear equation system
numRowsThe number of rows for the matrix A
numColsThe number of columns for the matrix A
bThe right side value
xThe solution vector
Returns:
FASTCV_API int32_t fcvSolveLDLf32 ( float32_t *__restrict  A,
const float32_t *__restrict  b,
float32_t *__restrict  diag,
uint32_t  N,
float32_t *__restrict  x 
)

Executes LDL decomposition algorithm on a symmetric and positive definite matrix to solve the linear system A*x = b, where A is an NxN matrix and x & b are vectors of size N.

Parameters:
APointer to the matrix A or size NxN.
NOTE: This matrix WILL BE MODIFIED during computation. Please SAVE THE ORIGINAL MATRIX properly if necessary.
NOTE: should be 128-bit aligned.
bPointer to the vector b of size N.
NOTE: should be 128-bit aligned.
diagPointer to the buffer for the diagonal of matrix A. This buffer is used for computation.
NOTE: should be 128-bit aligned.
NSize of matrix and vectors.
xPointer to the output vector x of size N.
NOTE: should be 128-bit aligned.
Returns:
1 if the linear system could be solved or 0 otherwise.
FASTCV_API fcvStatus fcvSolveLUf32 ( float32_t *__restrict  A,
float32_t *__restrict  b,
uint32_t  N,
uint8_t *__restrict  pivot,
float32_t *__restrict  x 
)

Solves a Linear System of Equations using LU-Decomposition.

Solves a Linear System of Equations using LU Decomposition. Given a system defined by A x = b, the function decomposes A into a lower triangular matrix L and an upper triangular matrix U. It then computes x by first solving L y = B by forward substitution for y, and then solving the system of linear equations U x = y by backward substitution for x.
NOTE : Pivoting is used here to ensure that any non singular matrix can be solved. This is because not all Matrices have a LU decomposition. Pivoting helps to overcome this issue.

Parameters:
AInput coefficient matrix of the linear system of dimension N x N
WARNING: must be square.
bComponent vector of the linear system of dimension N x 1
NDimension of the input Matrix A and component vector b
pivotAn N x 1 pivot array which is populated as follows : For each k = 0, 1,...., N-1 The ith element of pivot contains the row interchanged with row i when k = i. Pivoting is used both for numerical stability and also ensuring that an LU factorization exists for the input matrix A.
xThe solution of the linear system, an N x 1 Vector.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API void fcvSort8Scoresf32 ( float *__restrict  inScores,
float *__restrict  outScores 
)

Sorting of 8 float numbers.

Perform sorting of 8 scores in ascending order (output of SumOfSquaredDiffs)

Parameters:
inScoresInput 8 element float array
NOTE: array should be 128-bit aligned
outScoresOutput is 8 element sorted float array
WARNING: array should be 128-bit aligned
FASTCV_API fcvStatus fcvSubtracts16 ( const int16_t *  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const int16_t *__restrict  src2,
uint32_t  src2Stride,
fcvConvertPolicy  policy,
int16_t *  dst,
uint32_t  dstStride 
)

Matrix substration of two uint16_t type matrices.

Parameters:
src1First source matrix.
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
src2Second source matrix.
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
policyConversion policy that decides how data overflow should be handled
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
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvSubtractu8 ( const uint8_t *  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const uint8_t *__restrict  src2,
uint32_t  src2Stride,
fcvConvertPolicy  policy,
uint8_t *  dst,
uint32_t  dstStride 
)

Matrix substration of two uint8_t type matrices.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
WARNING: should be multiple of 8
policyConversion policy that decides how data overflow should be handled
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
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvSubtractu8s16 ( const uint8_t *__restrict  src1,
uint32_t  width,
uint32_t  height,
uint32_t  src1Stride,
const uint8_t *__restrict  src2,
uint32_t  src2Stride,
int16_t *__restrict  dst,
uint32_t  dstStride 
)

Matrix substration of two uint8_t type matrices.

Parameters:
src1First source matrix.
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.
WARNING: should be multiple of 8
src2Second source matrix.
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.
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
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API void fcvSumOfSquaredDiffs36x4s8 ( const int8_t *__restrict  a,
float  invLenA,
const int8_t *__restrict  b0,
const int8_t *__restrict  b1,
const int8_t *__restrict  b2,
const int8_t *__restrict  b3,
const float *__restrict  invLenB,
float *__restrict  distances 
)

Sum of squared differences of one 36-byte vector against 4 others.

SSD of one vector (a) against 4 others (b0,b1,b2,b3) using their given inverse lengths for normalization.

SSD(a,b0), SSD(a,b1), SSD(a,b2), SSD(a,b3)

Parameters:
aVector.
NOTE: array should be 128-bit aligned
invLenAInverse of vector A = 1/|A|
b0Vector.
NOTE: array should be 128-bit aligned
b1Vector.
NOTE: array should be 128-bit aligned
b2Vector.
NOTE: array should be 128-bit aligned
b3Vector.
NOTE: array should be 128-bit aligned
invLenBInverse of vectors b0...b3 = 1/|b0|,... 1/|b3|
WARNING: array should be 128-bit aligned
distancesOutput of the 4 results { SSD(a,b0), SSD(a,b1), SSD(a,b2), SSD(a,b3) }.
ACCURACY: 1.0e-6
WARNING: array should be 128-bit aligned
FASTCV_API void fcvSumOfSquaredDiffs36xNs8 ( const int8_t *__restrict  a,
float  invLenA,
const int8_t *const *__restrict  b,
const float *__restrict  invLenB,
unsigned int  numB,
float *__restrict  distances 
)

Sum of squared differences of one 36-byte vector against N others.

SSD of one vector (a) against N other 36-byte vectors ( b[0], b[1], ..., b[n-1] ) using their given inverse lengths for normalization.

SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])

Parameters:
aVector.
NOTE: array should be 128-bit aligned
invLenAInverse of vector A = 1/|A|
bVectors b[0]...b[n-1].
WARNING: should be 128-bit aligned.
invLenBInverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
WARNING: should be 128-bit aligned.
numBNumber of B vectors.
distancesOutput of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }.
ACCURACY: 1.0e-6
WARNING: should be 128-bit aligned.
FASTCV_API void fcvSumOfSquaredDiffsf32 ( const float32_t *__restrict  a,
float32_t  invLenA,
uint32_t  dim,
const float32_t *const *__restrict  bList,
const float32_t *__restrict  invLenB,
uint32_t  numB,
float32_t *__restrict  distances 
)

Sum of squared differences of one floating vector of L-elements against N others.

SSD of one vector (a) against N other L-elements vectors ( b[0], b[1], ..., b[n-1] ) using their given inverse lengths for normalization.

SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])

Parameters:
aVector.
NOTE: array should be 128-bit aligned
invLenAInverse of vector A = 1/|A|
dimNumber of element of vector A
bListVectors b[0]...b[n-1].
WARNING: should be 128-bit aligned.
invLenBInverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
WARNING: should be 128-bit aligned.
numBNumber of B vectors.
distancesOutput of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }
WARNING: should be 128-bit aligned.
FASTCV_API void fcvSumOfSquaredDiffss8 ( const int8_t *__restrict  a,
float32_t  invLenA,
uint32_t  dim,
const int8_t *const *__restrict  bList,
const float32_t *__restrict  invLenB,
uint32_t  numB,
float32_t *__restrict  distances 
)

Sum of squared differences of one L-byte vector against N others.

SSD of one vector (a) against N other L-byte vectors ( b[0], b[1], ..., b[n-1] ) using their given inverse lengths for normalization.

SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])

Parameters:
aVector.
NOTE: array should be 128-bit aligned
invLenAInverse of vector A = 1/|A|
dimNumber of element of vector A
bListVectors b[0]...b[n-1].
WARNING: should be 128-bit aligned.
invLenBInverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
WARNING: should be 128-bit aligned.
numBNumber of B vectors.
distancesOutput of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }.
WARNING: should be 128-bit aligned.
FASTCV_API void fcvSumOfSquaredDiffsu8 ( const uint8_t *__restrict  a,
float32_t  invLenA,
uint32_t  dim,
const uint8_t *const *__restrict  bList,
const float32_t *__restrict  invLenB,
uint32_t  numB,
float32_t *__restrict  distances 
)

Sum of squared differences of one L-byte vector against N others.

SSD of one vector (a) against N other L-byte vectors ( b[0], b[1], ..., b[n-1] ) using their given inverse lengths for normalization.

SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])

Parameters:
aVector.
NOTE: array should be 128-bit aligned
invLenAInverse of vector A = 1/|A|
dimNumber of element of vector A
bListVectors b[0]...b[n-1].
WARNING: should be 128-bit aligned.
invLenBInverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
WARNING: should be 128-bit aligned.
numBNumber of B vectors.
distancesOutput of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }
WARNING: should be 128-bit aligned.
FASTCV_API void fcvSVDf32 ( const float32_t *__restrict  A,
uint32_t  m,
uint32_t  n,
float32_t *__restrict  w,
float32_t *__restrict  U,
float32_t *__restrict  Vt,
float32_t *  tmpU,
float32_t *  tmpV 
)

Compute a singular value decomposition of a matrix of a float type A = U*diag[w]*Vt; It is used for solving problems like least-squares, under-determined linear systems, matrix inversion and so forth. The algorithm used here does not compute the full U and V matrices however it computes a condensed version of U and V described below which is sufficient to solve most problems which use SVD.

Parameters:
AThe input matrix of dimensions m x n
NOTE: should be 128-bit aligned.
mThe number of rows of matrix A
nThe number of columns of matrix A
wThe pointer to the buffer that holds n singular values. When m>n it contains n singular values while when m<n, only the first m singular values are of any significance. However, during allocation, it should be allocated as a buffer to hold n floats.
NOTE: should be 128-bit aligned.
UThe U matrix whose dimension is m x min(m,n). This is not the full size U matrix obtained from the conventional SVD algorithm but is sufficient for solving problems like least-squares, under-determined linear systems, matrix inversion and so forth. While allocating, allocate as a matrix of m x n floats.
NOTE: should be 128-bit aligned.
VtThe V matrix whose dimension is n x min(m,n). This is not the full size V matrix obtained from the conventional SVD algorithm but is sufficient for solving problems like least-squares, under-determined linear systems, matrix inversion and so forth. While allocating, allocate as a matrix of n x n floats.
NOTE: should be 128-bit aligned.
tmpUTemporary buffer used in processing. It must be allocated as an array of size m x n
NOTE: should be 128-bit aligned.
tmpVTemporary buffer used in processing. It must be allocated as an array of size n x n
NOTE: should be 128-bit aligned.
Returns:
FASTCV_API void fcvTransposef32 ( const float32_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t *__restrict  dst,
uint32_t  dstStride 
)

Matrix transpose of one float32_t type matrix.

Parameters:
srcSource matrix. The size of src is srcStride*srcHeight.
NOTE: array should be 128-bit aligned
srcWidthWidth of the source matrix.
srcHeightHeight of the source matrix.
srcStrideStride 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*4.
WARNING: should be multiple of 8
dstTranspose of the source matrix. The size of dst is dstStride*srcWidth.
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 srcHeight*4.
WARNING: should be multiple of 8
FASTCV_API fcvStatus fcvTransposeRGB888u8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Transposes an interleaved RGB image.

Computes the transpose of an interleaved RGB image src, and stores the result in dst

Parameters:
srcInput unsigned 8-bit integer image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the Image.
srcHeightHeight of the Image.
srcStrideStride of the Image in bytes.
NOTE: if 0, srcStride is set as 3 x srcWidth.
WARNING: should be multiple of 8, and at least as much as 3 x srcWidth if not 0.
dstOutput unsigned 8-bit integer image. Size of buffer is dstStride*srcWidth bytes.
WARNING: should be 128-bit aligned.
dstStrideStride of the output image in bytes.
NOTE: if 0, srcStride is set as 3 x srcHeight.
WARNING: should be multiple of 8, and at least as much as 3 x srcHeight if not 0.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API void fcvTransposeu16 ( const uint16_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint16_t *__restrict  dst,
uint32_t  dstStride 
)

Matrix transpose of one uint16_t type matrix.

Parameters:
srcSource matrix. The size of src is srcStride*srcHeight.
NOTE: array should be 128-bit aligned
srcWidthWidth of the source matrix.
srcHeightHeight of the source matrix.
srcStrideStride 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*2.
WARNING: should be multiple of 8
dstTranspose of the source matrix. The size of dst is dstStride*srcWidth.
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 srcHeight*2.
WARNING: should be multiple of 8
FASTCV_API void fcvTransposeu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Matrix transpose of one uint8_t type matrix.

Parameters:
srcSource matrix.The size of src is srcStride*srcHeight.
NOTE: array should be 128-bit aligned
srcWidthWidth of the source matrix.
srcHeightHeight of the source matrix.
srcStrideStride 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.
WARNING: should be multiple of 8
dstTranspose of the source matrix. The size of dst is dstStride*srcWidth.
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 srcHeight.
WARNING: should be multiple of 8
FASTCV_API int fcvVecNormalize36s8f32 ( const int8_t *__restrict  src,
unsigned int  srcStride,
const float *__restrict  invLen,
unsigned int  numVecs,
float  reqNorm,
float *__restrict  dst,
int32_t *  stopBuild 
)

Translate to float and normalize 36 8-bit elements.

Parameters:
srcPointer to the first input vector
invLenPointer to inverse length of the first input vector located right after each 36 element vector
numVecsNumber of vectors to translate
reqNormRequired norm
srcStrideStep in bytes to data of the next vector Each vector has 36 8-bit elements and 1 float invLen
dstPointer to contiguous block for output vectors
WARNING: should be 128-bit aligned.
stopBuildAllows other threads to break this function in the middle of processing. When set to 1, the function will exit on the next iteration.
Returns:
0 - success EFAULT - invalid address EINVAL - invalid argument
 All Data Structures Files Functions Variables Enumerations Enumerator Defines