Qualcomm FastCV Library  1.7.1
Object detection

Functions

FASTCV_API int fcvDescriptor17x17u8To36s8 (const uint8_t *__restrict patch, int8_t *__restrict descriptorChar, int32_t *__restrict descriptorNormSq)
 Create a 36-dimension gradient based descriptor on 17x17 patch.
FASTCV_API int fcvMserInit (const unsigned int width, const unsigned int height, unsigned int delta, unsigned int minArea, unsigned int maxArea, float maxVariation, float minDiversity, void **mserHandle)
 Function to initialize MSER. To invoke MSER functionality, 3 functions have to be called: fcvMserInit, fcvMseru8, fcvMserRelease. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserInit (width,........,&mserHandle)) { fcvMseru8 (mserHandle,...); fcvMserRelease(mserHandle); }.
FASTCV_API void fcvMserRelease (void *mserHandle)
 Function to release MSER resources.
FASTCV_API void fcvMseru8 (void *mserHandle, const uint8_t *__restrict srcPtr, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, unsigned int maxContours, unsigned int *__restrict numContours, unsigned int *__restrict numPointsInContour, unsigned int pointsArraySize, unsigned int *__restrict pointsArray)
 Function to invoke MSER. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserInit (width,........,&mserHandle)) { fcvMseru8 (mserHandle,...); fcvMserRelease(mserHandle); }.
FASTCV_API void fcvMserExtu8 (void *mserHandle, const uint8_t *__restrict srcPtr, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, unsigned int maxContours, unsigned int *__restrict numContours, unsigned int *__restrict numPointsInContour, unsigned int *__restrict pointsArray, unsigned int pointsArraySize, unsigned int *__restrict contourVariation, int *__restrict contourPolarity, unsigned int *__restrict contourNodeId, unsigned int *__restrict contourNodeCounter)
 Function to invoke MSER, with additional outputs for each contour. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserInit (width,........,&mserHandle)) { fcvMserExtu8 (mserHandle,...); fcvMserRelease(mserHandle); }.
FASTCV_API int fcvMseru8_v2 (void *mserHandle, const uint8_t *__restrict srcPtr, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t maxContours, uint32_t *__restrict numContours, uint16_t *__restrict recArray, uint32_t *__restrict numPointsInContour, uint32_t pointsArraySize, uint16_t *__restrict pointsArray)
 Function to invoke MSER with a smaller memory footprint and the (optional) output of contour bound boxes. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserInit (width,........,&mserHandle)) { if ( !fcvMseru8_v2 (mserHandle,...) ) { Error handle } fcvMserRelease(mserHandle); }.
FASTCV_API int fcvMserExtu8_v2 (void *mserHandle, const uint8_t *__restrict srcPtr, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t maxContours, uint32_t *__restrict numContours, uint16_t *__restrict recArray, uint32_t *__restrict numPointsInContour, uint32_t pointsArraySize, uint16_t *__restrict pointsArray, uint32_t *__restrict contourVariation, int8_t *__restrict contourPolarity, uint32_t *__restrict contourNodeId, uint32_t *__restrict contourNodeCounter)
 Function to invoke MSER with a smaller memory footprint, the (optional) output of contour bound boxes, and additional information. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserInit (width,........,&mserHandle)) { if ( !fcvMserExtu8_v2 (mserHandle,...) ) { Error handle } fcvMserRelease(mserHandle); }.
FASTCV_API int fcvMserExtu8_v3 (void *mserHandle, const uint8_t *__restrict srcPtr, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t maxContours, uint32_t *__restrict numContours, uint16_t *__restrict recArray, uint32_t *__restrict staPointsInPath, uint32_t *__restrict numPointsInContour, uint32_t pathArraySize, uint16_t *__restrict pathArray, uint32_t *__restrict contourVariation, int8_t *__restrict contourPolarity, uint32_t *__restrict contourNodeId, uint32_t *__restrict contourNodeCounter)
 Function to invoke MSER with a smaller memory footprint, the (optional) output of contour bound boxes, and additional information. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserInit (width,........,&mserHandle)) { if ( !fcvMserExtu8_v3 (mserHandle,...) ) { Error handle } fcvMserRelease(mserHandle); }.
FASTCV_API int fcvMserNN8Init (const uint32_t width, const uint32_t height, uint32_t delta, uint32_t minArea, uint32_t maxArea, float32_t maxVariation, float32_t minDiversity, void **mserHandle)
 Function to initialize 8-neighbor MSER. To invoke 8-neighbor MSER functionality, 3 functions have to be called: fcvMserNN8Init, fcvMserNN8u8, fcvMserRelease. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserNN8Init (width,........,&mserHandle)) { if ( !fcvMserNN8u8 (mserHandle,...) ) { Error handle } fcvMserRelease(mserHandle); }.
FASTCV_API int fcvMserNN8u8 (void *mserHandle, const uint8_t *__restrict srcPtr, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t maxContours, uint32_t *__restrict numContours, uint16_t *__restrict recArray, uint32_t *__restrict numPointsInContour, uint32_t pointsArraySize, uint16_t *__restrict pointsArray)
 Function to invoke 8-neighbor MSER. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserNN8Init (width,........,&mserHandle)) { if ( !fcvMserNN8u8 (mserHandle,...) ) { Error handle } fcvMserRelease(mserHandle); }.
FASTCV_API int fcvMserExtNN8u8 (void *mserHandle, const uint8_t *__restrict srcPtr, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t maxContours, uint32_t *__restrict numContours, uint16_t *__restrict recArray, uint32_t *__restrict numPointsInContour, uint32_t pointsArraySize, uint16_t *__restrict pointsArray, uint32_t *__restrict contourVariation, int8_t *__restrict contourPolarity, uint32_t *__restrict contourNodeId, uint32_t *__restrict contourNodeCounter)
 Function to invoke 8-neighbor MSER, , with additional outputs for each contour. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserNN8Init (width,........,&mserHandle)) { if ( !fcvMserExtNN8u8 (mserHandle,...) ) { Error handle } fcvMserRelease(mserHandle); }.
FASTCV_API int fcvDescriptorSampledMeanAndVar36f32 (const float *__restrict src, int first, int last, int32_t *vind, float *__restrict means, float *__restrict vars, float *__restrict temp)
 compute approximate mean and variance for the range of NFT4 float descriptors where descriptor elements along dimension are treated as random vars
FASTCV_API int fcvNCCPatchOnCircle8x8u8 (const uint8_t *__restrict patch, const uint8_t *__restrict src, unsigned short srcWidth, unsigned short srcHeight, unsigned short search_center_x, unsigned short search_center_y, unsigned short search_radius, uint16_t *best_x, uint16_t *best_y, uint32_t *bestNCC, int findSubPixel, float *subX, float *subY)
 Searches a 8x8 patch within radius around a center pixel for the max NCC.
FASTCV_API int fcvNCCPatchOnCircle8x8u8_v2 (const uint8_t *__restrict patch, const uint8_t *__restrict src, unsigned short srcWidth, unsigned short srcHeight, unsigned short search_center_x, unsigned short search_center_y, unsigned short search_radius, int filterLowVariance, uint16_t *best_x, uint16_t *best_y, uint32_t *bestNCC, int findSubPixel, float *subX, float *subY)
 Searches a 8x8 patch within radius around a center pixel for the max NCC.
FASTCV_API int fcvNCCPatchOnSquare8x8u8 (const uint8_t *__restrict patch, const uint8_t *__restrict src, unsigned short srcWidth, unsigned short srcHeight, unsigned short search_center_x, unsigned short search_center_y, unsigned short search_w, uint16_t *best_x, uint16_t *best_y, uint32_t *bestNCC, int doSubPixel, float *subX, float *subY)
 Searches a 8x8 patch within square region around a center pixel for the max NCC.
FASTCV_API int fcvNCCPatchOnSquare8x8u8_v2 (const uint8_t *__restrict patch, const uint8_t *__restrict src, unsigned short srcWidth, unsigned short srcHeight, unsigned short search_center_x, unsigned short search_center_y, unsigned short search_w, int filterLowVariance, uint16_t *best_x, uint16_t *best_y, uint32_t *bestNCC, int doSubPixel, float *subX, float *subY)
 Searches a 8x8 patch within square region around a center pixel for the max NCC.
FASTCV_API void fcvSumOfAbsoluteDiffs8x8u8 (const uint8_t *__restrict patch, const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint16_t *__restrict dst)
 Sum of absolute differences of an image against an 8x8 template.
FASTCV_API void fcvSumOfAbsoluteDiffs8x8u8_v2 (const uint8_t *__restrict patch, unsigned int patchStride, const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint16_t *__restrict dst, unsigned int dstStride)
 Sum of absolute differences of an image against an 8x8 template.
FASTCV_API void fcvTrackLKOpticalFlowu8 (const uint8_t *__restrict src1, const uint8_t *__restrict src2, int srcWidth, int srcHeight, const fcvPyramidLevel *src1Pyr, const fcvPyramidLevel *src2Pyr, const fcvPyramidLevel *dx1Pyr, const fcvPyramidLevel *dy1Pyr, const float *featureXY, float *featureXY_out, int32_t *featureStatus, int featureLen, int windowWidth, int windowHeight, int maxIterations, int nPyramidLevels, float maxResidue, float minDisplacement, float minEigenvalue, int lightingNormalized)
 Optical flow. Bitwidth optimized implementation.
FASTCV_API void fcvTrackLKOpticalFlowu8_v2 (const uint8_t *__restrict src1, const uint8_t *__restrict src2, uint32_t width, uint32_t height, uint32_t stride, const fcvPyramidLevel_v2 *src1Pyr, const fcvPyramidLevel_v2 *src2Pyr, const float32_t *featureXY, float32_t *featureXY_out, int32_t *featureStatus, int32_t featureLen, int32_t windowWidth, int32_t windowHeight, int32_t maxIterations, int32_t nPyramidLevels)
 Optical flow (with stride so ROI can be supported)
FASTCV_API void fcvTrackLKOpticalFlowf32 (const uint8_t *__restrict src1, const uint8_t *__restrict src2, unsigned int srcWidth, unsigned int srcHeight, const fcvPyramidLevel *src1Pyr, const fcvPyramidLevel *src2Pyr, const fcvPyramidLevel *dx1Pyr, const fcvPyramidLevel *dy1Pyr, const float *featureXY, float *featureXY_out, int32_t *featureStatus, int featureLen, int windowWidth, int windowHeight, int maxIterations, int nPyramidLevels, float maxResidue, float minDisplacement, float minEigenvalue, int lightingNormalized)
 Optical flow.
FASTCV_API int fcvTrackBMOpticalFlow16x16u8 (const uint8_t *__restrict src1, const uint8_t *__restrict src2, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t roiLeft, uint32_t roiTop, uint32_t roiRight, uint32_t roiBottom, uint32_t shiftSize, uint32_t searchWidth, uint32_t searchHeight, uint32_t searchStep, uint32_t usePrevious, uint32_t *numMv, uint32_t *locX, uint32_t *locY, uint32_t *mvX, uint32_t *mvY)
 Block Optical Flow 16x16 - Tracks all 16x16 blocks in the Region of Interest (ROI) from Source-1 to Source-2. Generates Motion Vectors for blocks where motion is detected.
FASTCV_API fcvStatus fcvNCCPatchesOnRectu8 (const uint8_t *__restrict patches, uint32_t patchWidth, uint32_t patchHeight, const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, const uint32_t *__restrict searchCenterX, const uint32_t *__restrict searchCenterY, uint32_t searchWidth, uint32_t searchHeight, int32_t filterLowVariance, uint32_t *__restrict bestX, uint32_t *__restrict bestY, uint32_t *__restrict bestNCC, int32_t findSubPixel, float32_t *__restrict subX, float32_t *__restrict subY, uint32_t numSearches)
 Searches a set of patches within the source image for the max NCCs. The search regions are corresponding to the patches in the search list.
FASTCV_API fcvStatus fcvTrackLKOpticalFlowu8_v3 (const uint8_t *__restrict src1, const uint8_t *__restrict src2, uint32_t width, uint32_t height, uint32_t stride, const fcvPyramidLevel_v2 *__restrict src1Pyr, const fcvPyramidLevel_v2 *__restrict src2Pyr, const float32_t *__restrict featureXY, const float32_t *__restrict featureXY_estimate, float32_t *__restrict featureXY_out, int32_t *__restrict featureStatus, int32_t featureLen, int32_t windowWidth, int32_t windowHeight, int32_t nPyramidLevels, fcvTerminationCriteria termCriteria, int32_t maxIterations, float32_t maxEpsilon, int32_t use_initial_estimate)
 Optical flow (with stride so ROI can be supported)
FASTCV_API fcvStatus fcvExtractHOGu16 (const uint16_t *__restrict strength, uint32_t width, uint32_t height, uint32_t strengthStride, const uint16_t *__restrict orientation, uint32_t orientationStride, uint32_t cellSize, uint32_t blockSize, uint32_t blockStep, uint32_t binSize, fcvHOGNormMethod normMethod, uint16_t *__restrict hogVector, uint32_t flen, void *handle)
 Extract Histogram of Oriented Gradients (HOG) descriptor given an image's gradient strength and orientation.
FASTCV_API fcvStatus fcvHOGInit (uint32_t width, uint32_t height, uint32_t cellSize, uint32_t blockSize, uint32_t blockStep, uint32_t binSize, fcvHOGNormMethod normMethod, uint32_t *vecLength, void **hogHandle)
 Calculate the length of the output vector for HOG extraction.
FASTCV_API void fcvHOGDeInit (void *hogHandle)
 Function to release HOG resources.

Detailed Description

Object detection functions such as NCC template match, etc.


Function Documentation

FASTCV_API int fcvDescriptor17x17u8To36s8 ( const uint8_t *__restrict  patch,
int8_t *__restrict  descriptorChar,
int32_t *__restrict  descriptorNormSq 
)

Create a 36-dimension gradient based descriptor on 17x17 patch.

Parameters:
patchInput luminance data for 17x17 patch to describe.
descriptorCharOutput descriptor vector. 36 x 8-bit vector. Normalized and quantized to range [-127, 127]
descriptorNormSqOutput squared norm (L2 norm) of the descriptor vector.
FASTCV_API int fcvDescriptorSampledMeanAndVar36f32 ( const float *__restrict  src,
int  first,
int  last,
int32_t *  vind,
float *__restrict  means,
float *__restrict  vars,
float *__restrict  temp 
)

compute approximate mean and variance for the range of NFT4 float descriptors where descriptor elements along dimension are treated as random vars

Parameters:
srccontiguous block of descriptors of dimension 36
firstindex of the first descriptor in range array vind for computing mean and var
lastindex of the last descriptor in range array vind for computing mean and range
vindarray of randomized indexes of descriptors
meansbuffer for approximate means, must be 36 long
varsbuffer for approximate variances, must be 36 long
tempbufffer, must be 46 long
Returns:
0 - success EFAULT - invalid address EINVAL - invalid argument
Remarks:
If descriptor range is > 100 then only 100 samples are drawn from the range to compute approximate means and variances.

Variances computed here do not have to be true variances because their values do not matter in kdtrees. The only thing that matters is that the ordering relation of variances is preserved

FASTCV_API fcvStatus fcvExtractHOGu16 ( const uint16_t *__restrict  strength,
uint32_t  width,
uint32_t  height,
uint32_t  strengthStride,
const uint16_t *__restrict  orientation,
uint32_t  orientationStride,
uint32_t  cellSize,
uint32_t  blockSize,
uint32_t  blockStep,
uint32_t  binSize,
fcvHOGNormMethod  normMethod,
uint16_t *__restrict  hogVector,
uint32_t  flen,
void *  handle 
)

Extract Histogram of Oriented Gradients (HOG) descriptor given an image's gradient strength and orientation.

Parameters:
strengthThe gradient strength at each pixel.
WARNING: should be 128-bit aligned.
widthInput window width.
heightInput window height.
strengthStrideStride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 strengthStride is default to width*2. NOTE: should be a multiple of 8.
orientationGradient orientation at each pixel. When normMethod is FASTCV_HOG_NORM_REGULAR or FASTCV_HOG_NORM_RENORMALIZATION, orientation should be within range of [0, 179]; while FASTCV_HOG_NORM_FHOG is used, orientation should be within [0, 359] to meet its contrast- sensitive requirements.
WARNING: should be 128-bit aligned.
orientationStrideStride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 orientationStride is default to width*2. NOTE: should be a multiple of 8.
cellSizeThe size of one cell in pixels. The typical cell size is 4.
blockSizeBlock size in pixels. It must be a multiple of cellSize.
WARNING: When normMethod is FASTCV_HOG_NORM_FHOG, blockSize is by default equal to cellSize
blockStepBlock step in pixels when sliding the block over the image. If the blockStep is a multiple of cellSize, faster approach would be taken when normMethod is FASTCV_HOG_NORM_REGULAR or FASTCV_HOG_NORM_RENORMALIZATION.
WARNING: When normMethod is FASTCV_HOG_NORM_FHOG, blockStep is by default equal to cellSize
binSizeNumber of bins in the gradient histogram. Typical binSize is 9.
normMethodThe enum parameter to specify the normalization method for HOG descriptor construction. See fcvHOGNormMethod for details.
hogVectorThe output descriptor vector in uint16_t. The length of the vector is obtained by fcvGetHOGVectorLengthu32
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API void fcvHOGDeInit ( void *  hogHandle)

Function to release HOG resources.

Parameters:
hogHandleHandle to be used to free up HOG resources.
FASTCV_API fcvStatus fcvHOGInit ( uint32_t  width,
uint32_t  height,
uint32_t  cellSize,
uint32_t  blockSize,
uint32_t  blockStep,
uint32_t  binSize,
fcvHOGNormMethod  normMethod,
uint32_t *  vecLength,
void **  hogHandle 
)

Calculate the length of the output vector for HOG extraction.

Parameters:
widthInput window width.
heightInput window height.
cellSizeThe size of one cell in pixels. The typical cell size is 4.
blockSizeBlock size in pixels. It must be a multiple of cellSize.
WARNING: When normMethod is FASTCV_HOG_NORM_FHOG, blockStep is by default equal to cellSize
blockStepBlock step in pixels when sliding the block over the image. If the blockStep is a multiple of cellSize, faster approach would be taken when normMethod is FASTCV_HOG_NORM_REGULAR or FASTCV_HOG_NORM_RENORMALIZATION.
WARNING: When normMethod is FASTCV_HOG_NORM_FHOG, blockStep is by default equal to cellSize
binSizeNumber of bins in the gradient histogram. Typical binSize is 9.
normMethodThe enum parameter to specify the normalization method for HOG descriptor construction. See fcvHOGNormMethod for details.
Thelength of HOG vector in uint32_t
hogHandleOutput. the hogHandle to be used in subsequent calls.
FASTCV_API int fcvMserExtNN8u8 ( void *  mserHandle,
const uint8_t *__restrict  srcPtr,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  maxContours,
uint32_t *__restrict  numContours,
uint16_t *__restrict  recArray,
uint32_t *__restrict  numPointsInContour,
uint32_t  pointsArraySize,
uint16_t *__restrict  pointsArray,
uint32_t *__restrict  contourVariation,
int8_t *__restrict  contourPolarity,
uint32_t *__restrict  contourNodeId,
uint32_t *__restrict  contourNodeCounter 
)

Function to invoke 8-neighbor MSER, , with additional outputs for each contour. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserNN8Init (width,........,&mserHandle)) { if ( !fcvMserExtNN8u8 (mserHandle,...) ) { Error handle } fcvMserRelease(mserHandle); }.

---------------------------------------------------------------------------

Parameters:
mserHandleThe MSER Handle returned by init.
srcPtrPointer to an image array (unsigned char ) for which MSER has to be done.
srcWidthWidth of the source image.
NOTE: srcWidth must be <= the width passed to fcvMserNN8Init.
srcHeightHeight of the source image.
NOTE: srcHeight must be <= the height passed to fcvMserNN8Init.
srcStrideStride of the source image.
maxContoursMaximum contours that will be returned.
numContoursOutput, Number of MSER contours in the region.
recArrayOutput, This is the bounding rectangle info for each contour. If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours. Typical allocation size: 4*maxContours. rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour, rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
Returns:
1 if successful. 0 if failure, e.g., to indicate detected contours are greater than maxContours. In that case, please consider increasing maxContours.
FASTCV_API void fcvMserExtu8 ( void *  mserHandle,
const uint8_t *__restrict  srcPtr,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
unsigned int  maxContours,
unsigned int *__restrict  numContours,
unsigned int *__restrict  numPointsInContour,
unsigned int *__restrict  pointsArray,
unsigned int  pointsArraySize,
unsigned int *__restrict  contourVariation,
int *__restrict  contourPolarity,
unsigned int *__restrict  contourNodeId,
unsigned int *__restrict  contourNodeCounter 
)

Function to invoke MSER, with additional outputs for each contour. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserInit (width,........,&mserHandle)) { fcvMserExtu8 (mserHandle,...); fcvMserRelease(mserHandle); }.

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

Parameters:
mserHandleThe MSER Handle returned by init.
srcPtrPointer to an image array (unsigned char ) for which MSER has to be done.
srcWidthWidth of the source image.
NOTE: srcWidth must be <= the width passed to fcvMserInit.
srcHeightHeight of the source image.
NOTE: srcHeight must be <= the height passed to fcvMserInit.
srcStrideStride of the source image.
maxContoursMaximum contours that will be returned. Application dependent. OCR usually requires 100-1000 contours. Segmentation usually requires 50-100
numContoursOutput, Number of MSER contours in the region.
numPointsInContourOutput, Number of points in each contour. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller.
pointsArraySizeSize of the output points Array. Typical size: (# of pixels in source image)*30
pointsArrayOutput. This is the points in all the contours. This is a linear array, whose memory has to be allocated by the caller. Typical allocation size: pointArraySize. pointsArray[0...numPointsInContour[0]-1] defines the first MSER region; pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region and so on.
contourVariationOutput, Variation for each contour from previous grey level. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller with size of maxContours.
contourPolarityOutput, Polarity for each contour. This value is 1 if this is a MSER+ region, -1 if this is a MSER- region. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller with size of maxContours.
contourNodeIdOutput, Node id for each contour. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller with size of maxContours
contourNodeCounterOutput, Node counter for each contour. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller with size of maxContours.
FASTCV_API int fcvMserExtu8_v2 ( void *  mserHandle,
const uint8_t *__restrict  srcPtr,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  maxContours,
uint32_t *__restrict  numContours,
uint16_t *__restrict  recArray,
uint32_t *__restrict  numPointsInContour,
uint32_t  pointsArraySize,
uint16_t *__restrict  pointsArray,
uint32_t *__restrict  contourVariation,
int8_t *__restrict  contourPolarity,
uint32_t *__restrict  contourNodeId,
uint32_t *__restrict  contourNodeCounter 
)

Function to invoke MSER with a smaller memory footprint, the (optional) output of contour bound boxes, and additional information. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserInit (width,........,&mserHandle)) { if ( !fcvMserExtu8_v2 (mserHandle,...) ) { Error handle } fcvMserRelease(mserHandle); }.

---------------------------------------------------------------------------

Parameters:
mserHandleThe MSER Handle returned by init.
srcPtrPointer to an image array (unsigned char ) for which MSER has to be done.
srcWidthWidth of the source image.
NOTE: srcWidth must be <= the width passed to fcvMserInit.
srcHeightHeight of the source image.
NOTE: srcHeight must be <= the height passed to fcvMserInit.
srcStrideStride of the source image.
maxContoursMaximum contours that will be returned.
numContoursOutput, Number of MSER contours in the region.
recArrayOutput, This is the bounding rectangle info for each contour. If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours. Typical allocation size: 4*maxContours. rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour, rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
numPointsInContourOutput, Number of points in each contour. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller.
pointsArraySizeSize of the output points Array. Typical size: (# of pixels in source image) * 30
pointsArrayOutput. This is the points in all the contours. This is a linear array, whose memory has to be allocated by the caller. Typical allocation size: pointArraySize. pointsArray[0...numPointsInContour[0]-1] defines the first MSER region, pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region and so on.
contourVariationOutput, Variation for each contour from previous grey level. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller with size of maxContours.
contourPolarityOutput, Polarity for each contour. This value is 1 if this is a MSER+ region, -1 if this is a MSER- region. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller with size of maxContours.
contourNodeIdOutput, Node id for each contour. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller with size of maxContours
contourNodeCounterOutput, Node counter for each contour. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller with size of maxContours.
Returns:
1 if successful. 0 if failure, e.g., to indicate detected contours are greater than maxContours. In that case, please consider increasing maxContours.
FASTCV_API int fcvMserExtu8_v3 ( void *  mserHandle,
const uint8_t *__restrict  srcPtr,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  maxContours,
uint32_t *__restrict  numContours,
uint16_t *__restrict  recArray,
uint32_t *__restrict  staPointsInPath,
uint32_t *__restrict  numPointsInContour,
uint32_t  pathArraySize,
uint16_t *__restrict  pathArray,
uint32_t *__restrict  contourVariation,
int8_t *__restrict  contourPolarity,
uint32_t *__restrict  contourNodeId,
uint32_t *__restrict  contourNodeCounter 
)

Function to invoke MSER with a smaller memory footprint, the (optional) output of contour bound boxes, and additional information. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserInit (width,........,&mserHandle)) { if ( !fcvMserExtu8_v3 (mserHandle,...) ) { Error handle } fcvMserRelease(mserHandle); }.

---------------------------------------------------------------------------

Parameters:
mserHandleThe MSER Handle returned by init.
srcPtrPointer to an image array (unsigned char ) for which MSER has to be done.
srcWidthWidth of the source image.
NOTE: srcWidth must be <= the width passed to fcvMserInit.
srcHeightHeight of the source image.
NOTE: srcHeight must be <= the height passed to fcvMserInit.
srcStrideStride of the source image.
maxContoursMaximum contours that will be returned.
numContoursOutput, Number of MSER contours in the region.
recArrayOutput, This is the bounding rectangle info for each contour. If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours. Typical allocation size: 4*maxContours. rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour, rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
staPointsInPathOutput. Return the index of contour starting points in pathArray. This memory has to be allocated by the caller. The allocated size should be maxContours*sizeof(uint32_t).
numPointsInContourOutput, Number of points in each contour. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller.
pathArraySizeInput. The size of output pathArray in terms of how many uint16_t numbers. Must be srcWidth*srcHeight*4. Note: this parameter is not measured in terms of bytes.
pathArrayOutput. This is the compressed representation of points in all the contours. This is a linear array, whose memory has to be allocated by the caller. Typical allocation size: pathArraySize*sizeof(uint16_t). For example: pathArray[ staPointsInPath[0] ] : x coord of the FIRST point in the FIRST mser region. pathArray[ staPointsInPath[0] + 1 ] : y coord of the FIRST point in the FIRST mser region. pathArray[ staPointsInPath[0] + 2 ] : x coord of the SECOND point in the FIRST mser region. pathArray[ staPointsInPath[0] + 3 ] : y coord of the SECOND point in the FIRST mser region. . . . pathArray[ staPointsInPath[0] + 2*numPointsInContour[0] - 2 ] : x coord of the LAST point in the FIRST mser region. pathArray[ staPointsInPath[0] + 2*numPointsInContour[0] - 1 ] : y coord of the LAST point in the FIRST mser region. and pathArray[ staPointsInPath[1] ] : x coord of the FIRST point in the SECOND mser region. pathArray[ staPointsInPath[1] + 1 ] : y coord of the FIRST point in the SECOND mser region. pathArray[ staPointsInPath[1] + 2 ] : x coord of the SECOND point in the SECOND mser region. pathArray[ staPointsInPath[1] + 3 ] : y coord of the SECOND point in the SECOND mser region. . . . pathArray[ staPointsInPath[1] + 2*numPointsInContour[1] - 2 ] : x coord of the LAST point in the SECOND mser region. pathArray[ staPointsInPath[1] + 2*numPointsInContour[1] - 1 ] : y coord of the LAST point in the SECOND mser region. . . .
contourVariationOutput, Variation for each contour from previous grey level. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller with size of maxContours.
contourPolarityOutput, Polarity for each contour. This value is 1 if this is a MSER+ region, -1 if this is a MSER- region. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller with size of maxContours.
contourNodeIdOutput, Node id for each contour. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller with size of maxContours
contourNodeCounterOutput, Node counter for each contour. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller with size of maxContours.
Returns:
1 if successful. 0 if failure, e.g., to indicate detected contours are greater than maxContours. In that case, please consider increasing maxContours.
FASTCV_API int fcvMserInit ( const unsigned int  width,
const unsigned int  height,
unsigned int  delta,
unsigned int  minArea,
unsigned int  maxArea,
float  maxVariation,
float  minDiversity,
void **  mserHandle 
)

Function to initialize MSER. To invoke MSER functionality, 3 functions have to be called: fcvMserInit, fcvMseru8, fcvMserRelease. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserInit (width,........,&mserHandle)) { fcvMseru8 (mserHandle,...); fcvMserRelease(mserHandle); }.

Parameters:
widthWidth of the image for which MSER has to be done.
heightHeight of the image for which MSER has to be done.
deltaDelta to be used in MSER algorithm (the difference in grayscale values within which the region is stable ). Typical value range [0.8 8], typical value 2
minAreaMinimum area (number of pixels) of a mser contour. Typical value range [10 50], typical value 30
maxAreaMaximum area (number of pixels) of a mser contour. Typical value 14400 or 0.25*width*height
maxVariationMaximum variation in grayscale between 2 levels allowed. Typical value range [0.1 1.0], typical value 0.15
minDiversityMinimum diversity in grayscale between 2 levels allowed. Typical value range [0.1 1.0], typical value 0.2
mserHandleOutput. the mserHandle to be used in subsequent calls.
Returns:
1 if successful. 0 if unsuccessful, mserHandle is invalid.
FASTCV_API int fcvMserNN8Init ( const uint32_t  width,
const uint32_t  height,
uint32_t  delta,
uint32_t  minArea,
uint32_t  maxArea,
float32_t  maxVariation,
float32_t  minDiversity,
void **  mserHandle 
)

Function to initialize 8-neighbor MSER. To invoke 8-neighbor MSER functionality, 3 functions have to be called: fcvMserNN8Init, fcvMserNN8u8, fcvMserRelease. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserNN8Init (width,........,&mserHandle)) { if ( !fcvMserNN8u8 (mserHandle,...) ) { Error handle } fcvMserRelease(mserHandle); }.

Parameters:
widthWidth of the image for which MSER has to be done.
heightHeight of the image for which MSER has to be done.
deltaDelta to be used in MSER algorithm (the difference in grayscale values within which the region is stable ). Typical value range [0.8 8], typical value 2
minAreaMinimum area (number of pixels) of a mser contour. Typical value range [10 50], typical value 30
maxAreaMaximum area (number of pixels) of a mser contour. Typical value 14400 or 0.25*width*height
maxVariationMaximum variation in grayscale between 2 levels allowed. Typical value range [0.1 1.0], typical value 0.15
minDiversityMinimum diversity in grayscale between 2 levels allowed. Typical value range [0.1 1.0], typical value 0.2
mserHandleOutput. the mserHandle to be used in subsequent calls.
Returns:
1 if successful. 0 if unsuccessful, mserHandle is invalid.
FASTCV_API int fcvMserNN8u8 ( void *  mserHandle,
const uint8_t *__restrict  srcPtr,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  maxContours,
uint32_t *__restrict  numContours,
uint16_t *__restrict  recArray,
uint32_t *__restrict  numPointsInContour,
uint32_t  pointsArraySize,
uint16_t *__restrict  pointsArray 
)

Function to invoke 8-neighbor MSER. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserNN8Init (width,........,&mserHandle)) { if ( !fcvMserNN8u8 (mserHandle,...) ) { Error handle } fcvMserRelease(mserHandle); }.

---------------------------------------------------------------------------

Parameters:
mserHandleThe MSER Handle returned by init.
srcPtrPointer to an image array (unsigned char ) for which MSER has to be done.
srcWidthWidth of the source image.
NOTE: srcWidth must be <= the width passed to fcvMserNN8Init.
srcHeightHeight of the source image.
NOTE: srcHeight must be <= the height passed to fcvMserNN8Init.
srcStrideStride of the source image.
maxContoursMaximum contours that will be returned.
numContoursOutput, Number of MSER contours in the region.
recArrayOutput, This is the bounding rectangle info for each contour. If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours. Typical allocation size: 4*maxContours. rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour, rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
numPointsInContourOutput, Number of points in each contour. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller.
pointsArraySizeSize of the output points Array. Typical size: (# of pixels in source image) * 30
pointsArrayOutput. This is the points in all the contours. This is a linear array, whose memory has to be allocated by the caller. Typical allocation size: pointArraySize. pointsArray[0...numPointsInContour[0]-1] defines the first MSER region, pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region and so on.
Returns:
1 if successful. 0 if failure, e.g., to indicate detected contours are greater than maxContours. In that case, please consider increasing maxContours.
FASTCV_API void fcvMserRelease ( void *  mserHandle)

Function to release MSER resources.

Parameters:
mserHandleHandle to be used to free up MSER resources.
FASTCV_API void fcvMseru8 ( void *  mserHandle,
const uint8_t *__restrict  srcPtr,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
unsigned int  maxContours,
unsigned int *__restrict  numContours,
unsigned int *__restrict  numPointsInContour,
unsigned int  pointsArraySize,
unsigned int *__restrict  pointsArray 
)

Function to invoke MSER. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserInit (width,........,&mserHandle)) { fcvMseru8 (mserHandle,...); fcvMserRelease(mserHandle); }.

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

Parameters:
mserHandleThe MSER Handle returned by init.
srcPtrPointer to an image array (unsigned char ) for which MSER has to be done.
srcWidthWidth of the source image.
NOTE: srcWidth must be <= the width passed to fcvMserInit.
srcHeightHeight of the source image.
NOTE: srcHeight must be <= the height passed to fcvMserInit.
srcStrideStride of the source image.
maxContoursMaximum contours that will be returned.
numContoursOutput, Number of MSER contours in the region.
numPointsInContourOutput, Number of points in each contour. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller.
pointsArraySizeSize of the output points Array. Typical size: (# of pixels in source image) * 30
pointsArrayOutput. This is the points in all the contours. This is a linear array, whose memory has to be allocated by the caller. Typical allocation size: pointArraySize. pointsArray[0...numPointsInContour[0]-1] defines the first MSER region, pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region and so on.
FASTCV_API int fcvMseru8_v2 ( void *  mserHandle,
const uint8_t *__restrict  srcPtr,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  maxContours,
uint32_t *__restrict  numContours,
uint16_t *__restrict  recArray,
uint32_t *__restrict  numPointsInContour,
uint32_t  pointsArraySize,
uint16_t *__restrict  pointsArray 
)

Function to invoke MSER with a smaller memory footprint and the (optional) output of contour bound boxes. Image width has to be greater than 50, and image height has to be greater than 5. Pixels at the image boundary are not processed. If boundary pixels are important for a particular application, please consider padding the input image with dummy pixels of one pixel wide. Here is the typical usage: void *mserHandle; if (fcvMserInit (width,........,&mserHandle)) { if ( !fcvMseru8_v2 (mserHandle,...) ) { Error handle } fcvMserRelease(mserHandle); }.

---------------------------------------------------------------------------

Parameters:
mserHandleThe MSER Handle returned by init.
srcPtrPointer to an image array (unsigned char ) for which MSER has to be done.
srcWidthWidth of the source image.
NOTE: srcWidth must be <= the width passed to fcvMserInit.
srcHeightHeight of the source image.
NOTE: srcHeight must be <= the height passed to fcvMserInit.
srcStrideStride of the source image.
maxContoursMaximum contours that will be returned.
numContoursOutput, Number of MSER contours in the region.
recArrayOutput, This is the bounding rectangle info for each contour. If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours. Typical allocation size: 4*maxContours. rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour, rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
numPointsInContourOutput, Number of points in each contour. This will have values filled up for the first (*numContours) values. This memory has to be allocated by the caller.
pointsArraySizeSize of the output points Array. Typical size: (# of pixels in source image) * 30
pointsArrayOutput. This is the points in all the contours. This is a linear array, whose memory has to be allocated by the caller. Typical allocation size: pointArraySize. pointsArray[0...numPointsInContour[0]-1] defines the first MSER region, pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region and so on.
Returns:
1 if successful. 0 if failure, e.g., to indicate detected contours are greater than maxContours. In that case, please consider increasing maxContours.
FASTCV_API fcvStatus fcvNCCPatchesOnRectu8 ( const uint8_t *__restrict  patches,
uint32_t  patchWidth,
uint32_t  patchHeight,
const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
const uint32_t *__restrict  searchCenterX,
const uint32_t *__restrict  searchCenterY,
uint32_t  searchWidth,
uint32_t  searchHeight,
int32_t  filterLowVariance,
uint32_t *__restrict  bestX,
uint32_t *__restrict  bestY,
uint32_t *__restrict  bestNCC,
int32_t  findSubPixel,
float32_t *__restrict  subX,
float32_t *__restrict  subY,
uint32_t  numSearches 
)

Searches a set of patches within the source image for the max NCCs. The search regions are corresponding to the patches in the search list.

Parameters:
patchesPointer to a set of 8-bit patches, each patch takes patchWidth *patchHeight pixel values which are linearly laid out in memory.
WARNING: patchWidth * patchHeight must be <= 256
patchWidthWidth in pixels of the patch.
patchHeightHeight in pixels of the patch.
srcPointer to 8-bit image for search.
WARNING: should be 128-bit aligned.
srcWidthWidth in pixels of the image.
srcHeightHeight in pixels of the image.
srcStrideThe stride of the imge. Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src1Stride is default to srcWidth.
WARNING: should be multiple of 8
searchCenterXThe list of Center X coordinate of each search window
searchCenterYThe list of Center Y coordinate of each search window
searchWidthWidth of search range in pixels
WARNING: must be odd number.
searchHeightHeight of search range in pixels
WARNING: must be odd number.
filterLowVarianceMinimum variance. Used to as threshold to compare against variance of the block of src or patch.
bestXThe list of Center X location on the image of the best NCC matches. The center X has (patchWidth/2) pixels to the left and (patchWidth - (patchWidth/2) - 1) to the right.
bestYThe list of Center Y location on the image of the best NCC matches. The center Y has (patchWidth/2) pixels above and (patchWidth - (patchWidth/2) - 1) below.
bestNCCNCC value of the best match blocks. It's quantized to integer value in Q7 (between -128 and 128).
findSubPixel(0 or 1) Use parabolic interpolation of NCC values to find sub-pixel estimates.
subXSub-pixel estimate for optimal NCC relative to bestX.
e.g., float x = (float)bestX + subX;
subYSub-pixel estimate for optimal NCC relative to bestY.
numSearchesnumber of patch searches in the image.
Returns:
FASTCV_SUCCESS upon success, other values upon failure.
FASTCV_API int fcvNCCPatchOnCircle8x8u8 ( const uint8_t *__restrict  patch,
const uint8_t *__restrict  src,
unsigned short  srcWidth,
unsigned short  srcHeight,
unsigned short  search_center_x,
unsigned short  search_center_y,
unsigned short  search_radius,
uint16_t *  best_x,
uint16_t *  best_y,
uint32_t *  bestNCC,
int  findSubPixel,
float *  subX,
float *  subY 
)

Searches a 8x8 patch within radius around a center pixel for the max NCC.


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

Parameters:
patchPointer to 8-bit patch pixel values linearly laid out in memory.
srcPointer to 8-bit image pixel values linearly laid out in memory.
WARNING: should be 128-bit aligned.
srcWidthWidth in pixels of the image.
WARNING: should be multiple of 8.
srcHeightHeight in pixels of the image.
search_center_xX location of search center in pixels of the image.
search_center_yY location of search center in pixels of the image.
search_radiusRadius of search in pixels. Must be <=5.
best_xCenter X location on the image of the best NCC match. The center X has 4 pixels to the left and 3 to the right.
best_yCenter Y location on the image of the best NCC match. The center Y has 4 pixels above and 3 pixels below.
bestNCCLargest value of the normalized cross-correlation found in the NCC search. It's quantized to integer value in Q7 (between -128 and 128).
findSubPixel(0 or 1) Use parabolic interpolation of NCC values to find sub-pixel estimates.
subXSub-pixel estimate for optimal NCC relative to best_x.
e.g., float x = (float)best_x + subX;
subYSub-pixel estimate for optimal NCC relative to best_y.
Returns:
0 = OK
1 = "search_radius" too large
2 = invalid "search_center_x,y"
3 = not found
FASTCV_API int fcvNCCPatchOnCircle8x8u8_v2 ( const uint8_t *__restrict  patch,
const uint8_t *__restrict  src,
unsigned short  srcWidth,
unsigned short  srcHeight,
unsigned short  search_center_x,
unsigned short  search_center_y,
unsigned short  search_radius,
int  filterLowVariance,
uint16_t *  best_x,
uint16_t *  best_y,
uint32_t *  bestNCC,
int  findSubPixel,
float *  subX,
float *  subY 
)

Searches a 8x8 patch within radius around a center pixel for the max NCC.


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

Parameters:
patchPointer to 8-bit patch pixel values linearly laid out in memory.
srcPointer to 8-bit image pixel values linearly laid out in memory.
WARNING: should be 128-bit aligned.
srcWidthWidth in pixels of the image.
WARNING: should be multiple of 8.
srcHeightHeight in pixels of the image.
search_center_xX location of search center in pixels of the image.
search_center_yY location of search center in pixels of the image.
search_radiusRadius of search in pixels. Must be <=5.
filterLowVarianceMinimum variance. Used to as threshold to compare against variance of 8x8 block of src or patch.
best_xCenter X location on the image of the best NCC match. The center X has 4 pixels to the left and 3 to the right.
best_yCenter Y location on the image of the best NCC match. The center Y has 4 pixels above and 3 pixels below.
bestNCCLargest value of the normalized cross-correlation found in the NCC search. It's quantized to integer value in Q7 (between -128 and 128).
findSubPixel(0 or 1) Use parabolic interpolation of NCC values to find sub-pixel estimates.
subXSub-pixel estimate for optimal NCC relative to best_x.
e.g., float x = (float)best_x + subX;
subYSub-pixel estimate for optimal NCC relative to best_y.
Returns:
0 = OK
1 = "search_radius" too large
2 = invalid "search_center_x,y"
3 = not found
4 = Patch has too low variance
5 = Image region has too low variance
FASTCV_API int fcvNCCPatchOnSquare8x8u8 ( const uint8_t *__restrict  patch,
const uint8_t *__restrict  src,
unsigned short  srcWidth,
unsigned short  srcHeight,
unsigned short  search_center_x,
unsigned short  search_center_y,
unsigned short  search_w,
uint16_t *  best_x,
uint16_t *  best_y,
uint32_t *  bestNCC,
int  doSubPixel,
float *  subX,
float *  subY 
)

Searches a 8x8 patch within square region around a center pixel for the max NCC.


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

Parameters:
patchPointer to 8-bit patch pixel values linearly laid out in memory.
srcPointer to 8-bit image pixel values linearly laid out in memory.
WARNING: should be 128-bit aligned.
srcWidthWidth in pixels of the image.
WARNING: should be multiple of 8.
srcHeightHeight in pixels of the image.
search_center_xCenter X coordinate of the search window
search_center_yCenter Y coordinate of the search window
search_wWidth of search square in pixels
WARNING: must be 11 or less.
best_xCenter X location on the image of the best NCC match. The center X has 4 pixels to the left and 3 to the right.
best_yCenter Y location on the image of the best NCC match. The center Y has 4 pixels above and 3 pixels below.
bestNCCNCC value of the best match block. It's quantized to integer value in Q7 (between -128 and 128).
doSubPixel(0 or 1) Use parabolic interpolation of NCC values to find sub-pixel estimates.
subXSub-pixel estimate for optimal NCC relative to best_x.
e.g., float x = (float)best_x + subX;
subYSub-pixel estimate for optimal NCC relative to best_y.
Returns:
0 = OK
1 = "search_radius" too large
2 = invalid "search_center_x,y"
3 = not found
FASTCV_API int fcvNCCPatchOnSquare8x8u8_v2 ( const uint8_t *__restrict  patch,
const uint8_t *__restrict  src,
unsigned short  srcWidth,
unsigned short  srcHeight,
unsigned short  search_center_x,
unsigned short  search_center_y,
unsigned short  search_w,
int  filterLowVariance,
uint16_t *  best_x,
uint16_t *  best_y,
uint32_t *  bestNCC,
int  doSubPixel,
float *  subX,
float *  subY 
)

Searches a 8x8 patch within square region around a center pixel for the max NCC.


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

Parameters:
patchPointer to 8-bit patch pixel values linearly laid out in memory.
srcPointer to 8-bit image pixel values linearly laid out in memory.
WARNING: should be 128-bit aligned.
srcWidthWidth in pixels of the image.
WARNING: should be multiple of 8.
srcHeightHeight in pixels of the image.
search_center_xCenter X coordinate of the search window
search_center_yCenter Y coordinate of the search window
search_wWidth of search square in pixels
WARNING: must be 11 or less.
filterLowVarianceMinimum variance. Used to as threshold to compare against variance of 8x8 block of src or patch.
best_xCenter X location on the image of the best NCC match. The center X has 4 pixels to the left and 3 to the right.
best_yCenter Y location on the image of the best NCC match. The center Y has 4 pixels above and 3 pixels below.
bestNCCNCC value of the best match block. It's quantized to integer value in Q7 (between -128 and 128).
doSubPixel(0 or 1) Use parabolic interpolation of NCC values to find sub-pixel estimates.
subXSub-pixel estimate for optimal NCC relative to best_x.
e.g., float x = (float)best_x + subX;
subYSub-pixel estimate for optimal NCC relative to best_y.
Returns:
0 = OK
1 = "search_radius" too large
2 = invalid "search_center_x,y"
3 = not found
4 = Patch has too low variance
5 = Image region has too low variance
FASTCV_API void fcvSumOfAbsoluteDiffs8x8u8 ( const uint8_t *__restrict  patch,
const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
uint16_t *__restrict  dst 
)

Sum of absolute differences of an image against an 8x8 template.


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

8x8 sum of ||A-B||. The template patch is swept over the entire image and the results are put in dst.

Parameters:
patch8x8 template
srcReference Image.
NOTE: should be 128-bit aligned.
srcWidthWidth of the src image.
srcHeightHeight of the src image.
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
dstThe dst buffer shall be width X height bytes in length. Output of SAD(A,B). dst[4][4] correspondes to the 0,0 pixel of the template aligned with the 0,0 pixel of src. The dst border values not covered by entire 8x8 patch window will remain unmodified by the function. The caller should either initialize these to 0 or ignore.
NOTE: should be 128-bit aligned.
FASTCV_API void fcvSumOfAbsoluteDiffs8x8u8_v2 ( const uint8_t *__restrict  patch,
unsigned int  patchStride,
const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
uint16_t *__restrict  dst,
unsigned int  dstStride 
)

Sum of absolute differences of an image against an 8x8 template.


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

8x8 sum of ||A-B||. The template patch is swept over the entire image and the results are put in dst.

Parameters:
patch8x8 template
patchStrideStride of the 8x8 template buffer
dstStrideStride of the patch (in bytes) - i.e., how many bytes between column 0 of row N and column 0 of row N+1.
srcReference Image.
NOTE: should be 128-bit aligned.
srcWidthWidth of the src image.
srcHeightHeight of the src image.
srcStrideStride of image (in bytes) - i.e., how many bytes between column 0 of row N and column 0 of row N+1.
dstThe dst buffer shall be at least ( width x height ) values in length. Output of SAD(A,B). dst[4][4]correspondes to the 0,0 pixel of the template aligned with the 0,0 pixel of src. The dst border values not covered by entire 8x8 patch window will remain unmodified by the function. The caller should either initialize these to 0 or ignore.
NOTE: should be 128-bit aligned.
dstStrideStride of destination (in bytes) - i.e., how many bytes between column 0 of row N and column 0 of row N+1.
FASTCV_API int fcvTrackBMOpticalFlow16x16u8 ( const uint8_t *__restrict  src1,
const uint8_t *__restrict  src2,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  roiLeft,
uint32_t  roiTop,
uint32_t  roiRight,
uint32_t  roiBottom,
uint32_t  shiftSize,
uint32_t  searchWidth,
uint32_t  searchHeight,
uint32_t  searchStep,
uint32_t  usePrevious,
uint32_t *  numMv,
uint32_t *  locX,
uint32_t *  locY,
uint32_t *  mvX,
uint32_t *  mvY 
)

Block Optical Flow 16x16 - Tracks all 16x16 blocks in the Region of Interest (ROI) from Source-1 to Source-2. Generates Motion Vectors for blocks where motion is detected.

Parameters:
[in]src1Pointer to source image where the original blocks are present.
Dimensions should be same as src2, and equal to srcWidth, srcHeight, srcStride.
WARNING: should be 128-bit aligned. Buffer size is srcStride*srcHeight bytes.
[in]src2Pointer to second source image where motion vectors for blocks in img1 are to be located.
Dimensions should be same as src1, and equal to srcWidth, srcHeight, srcStride.
WARNING: should be 128-bit aligned.
[in]srcWidthWidth of source images pointed by src1 and src2.
[in]srcHeightHeight of source images pointed by src1 and src2.
[in]srcStrideStride of source images pointed by src1 and src2.
[in]roiLeftLeft co-ordinate (x0) of Region-of-Interest (ROI).
[in]roiTopTop co-orgdinate (y0) of Region-of-Interest (ROI).
[in]roiRightRight co-ordinate (x1) of Region-of-Interest (ROI).
[in]roiBottomBottom co-ordinate (y1) of Region-of-Interest (ROI).
[in]shiftSizeDistance in number of pixels (both horizontally and vertically) between consecutive blocks for which motion vector is searched.
NOTE: Larger the value, less number of blocks will be tracked, and hence the function will run faster.
[in]searchWidthNumbers of pixels horizontally on left and right of the source block (src2) where a match is searched for. For example, if searchWidth is 8 and searchHeight is 8, then the search area for any given block will be 32x32 around the location of that block.
[in]searchHeightNumbers of pixels vertically on top and bottom of the source block (src2) where a match is searched for. For example, if searchWidth is 8 and searchHeight is 8, then the search area for any given block will be 32x32 around the location of that block.
[in]searchStepDistance in number of pixels between consecutive search targets within the above search window.
NOTE: Larger the value, more coarse the search will be and thus will make the fucntion run faster. Smaller the value, more dense the search will be, making the funciton run slower.
[in]usePreviousIndicates if the function should use the existing motion vectors in locX and locY as the starting point for motion vector search.
NOTE: This parameter is redundant at the moment.
[out]numMvPointer to variable that will store the count of Motion Vectors generated by the function.
WARNING: This pointer should be Non-NULL.
[out]locXPointer to an array which will store the X co-ordinates of the original Block for which a Motion Vector is generated.
NOTE: The array will contain numMv valid entries.
NOTE: the maximum number of MVs is related to ROI size and shiftSize, as follows: (roiRight-roiLeft)/shiftSize * (roiBottom-roiTop)/shiftSize;
WARNING: This pointer should be Non-NULL, and the array size should be >= number of 16x16 blocks in ROI.
[out]locYPointer to an array which will store the Y co-ordinates of the original Block for which a Motion Vector is generated.
NOTE: The array will contain numMv valid entries.
NOTE: the maximum number of MVs is related to ROI size and shiftSize, as follows: (roiRight-roiLeft)/shiftSize * (roiBottom-roiTop)/shiftSize;
WARNING: This pointer should be Non-NULL, and the array size should be >= number of 16x16 blocks in ROI.
[out]mvXPointer to an array which will store the X co-ordinates of the block in src2 corresponding block in src1. (mvX[i]-locX[i]) will give the motion vector for the block in src1.
NOTE: The array will contain numMv valid entries.
NOTE: the maximum number of MVs is related to ROI size and shiftSize, as follows: (roiRight-roiLeft)/shiftSize * (roiBottom-roiTop)/shiftSize;
WARNING: This pointer should be Non-NULL, and the array size should be >= number of 16x16 blocks in ROI.
[out]mvYPointer to an array which will store the Y co-ordinates of the block in src2 corresponding block in src1. (mvY[i]-locY[i]) will give the motion vector for the block in src1.
NOTE: The array will contain numMv valid entries.
NOTE: the maximum number of MVs is related to ROI size and shiftSize, as follows: (roiRight-roiLeft)/shiftSize * (roiBottom-roiTop)/shiftSize;
WARNING: This pointer should be Non-NULL, and the array size should be >= number of 16x16 blocks in ROI.
Returns:
0 - Success, Failure otherwise.
FASTCV_API void fcvTrackLKOpticalFlowf32 ( const uint8_t *__restrict  src1,
const uint8_t *__restrict  src2,
unsigned int  srcWidth,
unsigned int  srcHeight,
const fcvPyramidLevel src1Pyr,
const fcvPyramidLevel src2Pyr,
const fcvPyramidLevel dx1Pyr,
const fcvPyramidLevel dy1Pyr,
const float *  featureXY,
float *  featureXY_out,
int32_t *  featureStatus,
int  featureLen,
int  windowWidth,
int  windowHeight,
int  maxIterations,
int  nPyramidLevels,
float  maxResidue,
float  minDisplacement,
float  minEigenvalue,
int  lightingNormalized 
)

Optical flow.


ATTENTION: This function will be removed when the 2.0.0 release of this library is made. Until 2.0.0, the developer should use this implementation with the expectation of using fcvTrackLKOpticalFlowu8 when transitioning to 2.0.0.

Parameters:
src1Input image from frame #1.
WARNING: should be 128-bit aligned.
src2Input image from frame #2.
WARNING: should be 128-bit aligned.
srcWidthInput image width.
WARNING: should be multiple of 8.
srcHeightInput image height.
src1PyrImage Pyradmid of src1
WARNING: obtained by calling fcvPyramidCreateu8
src2PyrImage Pyradmid of src2
WARNING: obtained by calling fcvPyramidCreateu8
dx1PyrHorizontal Sobel gradient pyramid for src1
NOTE: To be left NULL. In this case the function will build the pyramid internally.
dy1PyrVertical Sobel grading pyraid for src1
NOTE: To be left NULL. In this case the function will build the pyramid internally.
featureXYPointer to X,Y floating point, sub-pixel coordinates for features to track. Stored as X,Y tuples. featureXY array storage must be >= featureLen*2.
featureXY_outPointer to X,Y floating point, sub-pixel coordinates for tracked features Stored as X,Y tuples. featureXY array storage must be >= featureLen*2.
featureStatusPointer to integer array for status of each feature defined in featureXY. featureStatus array storage must be >= featureLen.
NOTE: Possible status are :
TRACKED 1
NOT_FOUND -1
SMALL_DET -2
MAX_ITERATIONS -3
OUT_OF_BOUNDS -4
LARGE_RESIDUE -5
SMALL_EIGVAL -6
INVALID -99
featureLenNumber of features in featuresXY and featureStatus array.
windowWidthWidth of window for optical flow searching. Must be odd number.
NOTE: suggested value 5, 7 or 9
windowHeightHeight of window for optical flow searching. Must be odd number.
NOTE:: suggested value 5, 7 or 9
maxIterationsMaximum number of LK iterations to perform per pyramid level.
NOTE: suggested value 5 or 7
nPyramidLevelsNumber of pyramid levels.
NOTE: suggested value 3 or 4 depending on size of image
maxResidueMaximum feature residue above which feature is declared lost.
NOTE: obsolete parameters, set to 0
minDisplacementMinimum displacement solved below which iterations are stopped.
NOTE : Suggest that be set to between 0.1 and 0.2, say 0.15
NOTE: obsolete parameters, set to 0
minEigenvalueThreshold for feature goodness. If it is set it to 0, the check is disabled.
NOTE: If good features are passed to the function, then it is suggested that you set it to 0 to have faster function time
NOTE: obsolete parameters, set to 0
lightingNormalizedif 1 Enable lightning normalization
if 0 Disable lightning normalization
NOTE: obsolete parameters, set to 0
FASTCV_API void fcvTrackLKOpticalFlowu8 ( const uint8_t *__restrict  src1,
const uint8_t *__restrict  src2,
int  srcWidth,
int  srcHeight,
const fcvPyramidLevel src1Pyr,
const fcvPyramidLevel src2Pyr,
const fcvPyramidLevel dx1Pyr,
const fcvPyramidLevel dy1Pyr,
const float *  featureXY,
float *  featureXY_out,
int32_t *  featureStatus,
int  featureLen,
int  windowWidth,
int  windowHeight,
int  maxIterations,
int  nPyramidLevels,
float  maxResidue,
float  minDisplacement,
float  minEigenvalue,
int  lightingNormalized 
)

Optical flow. Bitwidth optimized implementation.


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

Parameters:
src1Input image from frame #1.
WARNING: should be 128-bit aligned.
src2Input image from frame #2.
WARNING: should be 128-bit aligned.
srcWidthInput image width.
WARNING: should be multiple of 8.
srcHeightInput image height.
src1PyrImage Pyradmid of src1
WARNING: obtained by calling fcvPyramidCreateu8
src2PyrImage Pyradmid of src2
WARNING: obtained by calling fcvPyramidCreateu8
dx1PyrHorizontal Sobel gradient pyramid for src1
NOTE: To be left NULL. In this case the function will build the pyramid internally.
dy1PyrVertical Sobel grading pyraid for src1
NOTE: To be left NULL. In this case the function will build the pyramid internally.
featureXYPointer to X,Y floating point, sub-pixel coordinates for features to track. Stored as X,Y tuples. featureXY array storage must be >= featureLen*2.
featureXY_outPointer to X,Y floating point, sub-pixel coordinates for tracked features Stored as X,Y tuples. featureXY array storage must be >= featureLen*2.
featureStatusPointer to integer array for status of each feature defined in featureXY. featureStatus array storage must be >= featureLen.
featureLenNumber of features in featuresXY and featureStatus array.
windowWidthWidth of window for optical flow searching. Must be odd number.
NOTE: suggested value 5, 7 or 9
windowHeightHeight of window for optical flow searching. Must be odd number.
NOTE:: suggested value 5, 7 or 9
maxIterationsMaximum number of LK iterations to perform per pyramid level.
NOTE: suggested value 5 or 7
nPyramidLevelsNumber of pyramid levels.
NOTE: suggested value 3 or 4 depending on size of image
maxResidueMaximum feature residue above which feature is declared lost.
NOTE: obsolete parameters, set to 0
minDisplacementMinimum displacement solved below which iterations are stopped.
NOTE: obsolete parameters, set to 0
minEigenvalueThreshold for feature goodness. If it is set it to 0, the check is disabled.
NOTE: If good features are passed to the function, then it is suggested that you set it to 0 to have faster function time
NOTE: obsolete parameters, set to 0
lightingNormalizedif 1 Enable lightning normalization
if 0 Disable lightning normalization
NOTE: obsolete parameters, set to 0
FASTCV_API void fcvTrackLKOpticalFlowu8_v2 ( const uint8_t *__restrict  src1,
const uint8_t *__restrict  src2,
uint32_t  width,
uint32_t  height,
uint32_t  stride,
const fcvPyramidLevel_v2 src1Pyr,
const fcvPyramidLevel_v2 src2Pyr,
const float32_t *  featureXY,
float32_t *  featureXY_out,
int32_t *  featureStatus,
int32_t  featureLen,
int32_t  windowWidth,
int32_t  windowHeight,
int32_t  maxIterations,
int32_t  nPyramidLevels 
)

Optical flow (with stride so ROI can be supported)


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

Parameters:
src1Input image from frame #1.
WARNING: should be 128-bit aligned.
src2Input image from frame #2.
WARNING: should be 128-bit aligned.
widthInput image width.
heightInput image height.
strideStride 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 width. NOTE: should be a multiple of 8.
src1PyrImage Pyramid of src1 (with stride)
WARNING: obtained by calling fcvPyramidCreateu8_v2
src2PyrImage Pyradmid of src2 (with stride)
WARNING: obtained by calling fcvPyramidCreateu8_v2
featureXYPointer to X,Y floating point, sub-pixel coordinates for features to track. Stored as X,Y tuples. featureXY array storage must be >= featureLen*2.
featureXY_outPointer to X,Y floating point, sub-pixel coordinates for tracked features Stored as X,Y tuples. featureXY array storage must be >= featureLen*2.
featureStatusPointer to integer array for status of each feature defined in featureXY. featureStatus array storage must be >= featureLen.
featureLenNumber of features in featuresXY and featureStatus array.
windowWidthWidth of window for optical flow searching. Must be odd number.
NOTE: suggested value 5, 7 or 9
windowHeightHeight of window for optical flow searching. Must be odd number.
NOTE:: suggested value 5, 7 or 9
maxIterationsMaximum number of LK iterations to perform per pyramid level.
NOTE: suggested value 5 or 7
nPyramidLevelsNumber of pyramid levels.
NOTE: suggested value 3 or 4 depending on size of image
FASTCV_API fcvStatus fcvTrackLKOpticalFlowu8_v3 ( const uint8_t *__restrict  src1,
const uint8_t *__restrict  src2,
uint32_t  width,
uint32_t  height,
uint32_t  stride,
const fcvPyramidLevel_v2 *__restrict  src1Pyr,
const fcvPyramidLevel_v2 *__restrict  src2Pyr,
const float32_t *__restrict  featureXY,
const float32_t *__restrict  featureXY_estimate,
float32_t *__restrict  featureXY_out,
int32_t *__restrict  featureStatus,
int32_t  featureLen,
int32_t  windowWidth,
int32_t  windowHeight,
int32_t  nPyramidLevels,
fcvTerminationCriteria  termCriteria,
int32_t  maxIterations,
float32_t  maxEpsilon,
int32_t  use_initial_estimate 
)

Optical flow (with stride so ROI can be supported)


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

Parameters:
src1Input image from frame #1.
WARNING: should be 128-bit aligned.
src2Input image from frame #2.
WARNING: should be 128-bit aligned.
widthInput image width.
heightInput image height.
strideStride 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 width. NOTE: should be a multiple of 8.
src1PyrImage Pyramid of src1 (with stride)
WARNING: obtained by calling fcvPyramidCreateu8_v3
src2PyrImage Pyradmid of src2 (with stride)
WARNING: obtained by calling fcvPyramidCreateu8_v3
featureXYPointer to X,Y floating point, sub-pixel coordinates for features to track. Stored as X,Y tuples. featureXY array storage must be >= featureLen*2.
featureXY_outPointer to X,Y floating point, sub-pixel coordinates for tracked features Stored as X,Y tuples. featureXY array storage must be >= featureLen*2.
featureXY_estimatePointer to X,Y floating point, sub-pixel coordinates for estimated features on the new frame stored as X,Y tuples. featureXY array storage must has the same length as featureXY
featureStatusPointer to integer array for status of each feature defined in featureXY. featureStatus array storage must be >= featureLen.
featureLenNumber of features in featuresXY and featureStatus array.
windowWidthWidth of window for optical flow searching. Must be odd number.
NOTE: suggested value 5, 7 or 9
windowHeightHeight of window for optical flow searching. Must be odd number.
NOTE:: suggested value 5, 7 or 9
nPyramidLevelsNumber of pyramid levels.
NOTE: suggested value 3 or 4 depending on size of image
termCriteriaThe enum parameter to specify termination criteria. See fcvTerminationCriteria for details
maxIterationsMaximum number of LK iterations to perform per pyramid level if FASTCV_TERM_CRITERIA_ITERATIONS is set as the termCriteria
NOTE: will be saturated to range [1, 100]; suggested value 5 or 7
maxEpsilonEpsilon value in float32_t for error measure to determine the iteration
NOTE: the value should be within [0, 10]; suggested value 0.03*0.03
use_initial_estimateThe flag indicatiing if to use initial estimations stored in featureXY_estimate to start the search.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
 All Data Structures Files Functions Variables Enumerations Enumerator Defines