Qualcomm FastCV Library
1.7.1
|
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. |
Object detection functions such as NCC template match, etc.
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.
patch | Input luminance data for 17x17 patch to describe. |
descriptorChar | Output descriptor vector. 36 x 8-bit vector. Normalized and quantized to range [-127, 127] |
descriptorNormSq | Output 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
src | contiguous block of descriptors of dimension 36 |
first | index of the first descriptor in range array vind for computing mean and var |
last | index of the last descriptor in range array vind for computing mean and range |
vind | array of randomized indexes of descriptors |
means | buffer for approximate means, must be 36 long |
vars | buffer for approximate variances, must be 36 long |
temp | bufffer, must be 46 long |
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.
strength | The gradient strength at each pixel. WARNING: should be 128-bit aligned. |
width | Input window width. |
height | Input window height. |
strengthStride | 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 strengthStride is default to width*2. NOTE: should be a multiple of 8. |
orientation | Gradient 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. |
orientationStride | 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 orientationStride is default to width*2. NOTE: should be a multiple of 8. |
cellSize | The size of one cell in pixels. The typical cell size is 4. |
blockSize | Block 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 |
blockStep | Block 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 |
binSize | Number of bins in the gradient histogram. Typical binSize is 9. |
normMethod | The enum parameter to specify the normalization method for HOG descriptor construction. See fcvHOGNormMethod for details. |
hogVector | The output descriptor vector in uint16_t. The length of the vector is obtained by fcvGetHOGVectorLengthu32 |
FASTCV_API void fcvHOGDeInit | ( | void * | hogHandle | ) |
Function to release HOG resources.
hogHandle | Handle 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.
width | Input window width. |
height | Input window height. |
cellSize | The size of one cell in pixels. The typical cell size is 4. |
blockSize | Block 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 |
blockStep | Block 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 |
binSize | Number of bins in the gradient histogram. Typical binSize is 9. |
normMethod | The enum parameter to specify the normalization method for HOG descriptor construction. See fcvHOGNormMethod for details. |
The | length of HOG vector in uint32_t |
hogHandle | Output. 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); }.
---------------------------------------------------------------------------
mserHandle | The MSER Handle returned by init. |
srcPtr | Pointer to an image array (unsigned char ) for which MSER has to be done. |
srcWidth | Width of the source image. NOTE: srcWidth must be <= the width passed to fcvMserNN8Init. |
srcHeight | Height of the source image. NOTE: srcHeight must be <= the height passed to fcvMserNN8Init. |
srcStride | Stride of the source image. |
maxContours | Maximum contours that will be returned. |
numContours | Output, Number of MSER contours in the region. |
recArray | Output, 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. |
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.
mserHandle | The MSER Handle returned by init. |
srcPtr | Pointer to an image array (unsigned char ) for which MSER has to be done. |
srcWidth | Width of the source image. NOTE: srcWidth must be <= the width passed to fcvMserInit. |
srcHeight | Height of the source image. NOTE: srcHeight must be <= the height passed to fcvMserInit. |
srcStride | Stride of the source image. |
maxContours | Maximum contours that will be returned. Application dependent. OCR usually requires 100-1000 contours. Segmentation usually requires 50-100 |
numContours | Output, Number of MSER contours in the region. |
numPointsInContour | Output, 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. |
pointsArraySize | Size of the output points Array. Typical size: (# of pixels in source image)*30 |
pointsArray | Output. 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. |
contourVariation | Output, 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. |
contourPolarity | Output, 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. |
contourNodeId | Output, 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 |
contourNodeCounter | Output, 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); }.
---------------------------------------------------------------------------
mserHandle | The MSER Handle returned by init. |
srcPtr | Pointer to an image array (unsigned char ) for which MSER has to be done. |
srcWidth | Width of the source image. NOTE: srcWidth must be <= the width passed to fcvMserInit. |
srcHeight | Height of the source image. NOTE: srcHeight must be <= the height passed to fcvMserInit. |
srcStride | Stride of the source image. |
maxContours | Maximum contours that will be returned. |
numContours | Output, Number of MSER contours in the region. |
recArray | Output, 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. |
numPointsInContour | Output, 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. |
pointsArraySize | Size of the output points Array. Typical size: (# of pixels in source image) * 30 |
pointsArray | Output. 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. |
contourVariation | Output, 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. |
contourPolarity | Output, 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. |
contourNodeId | Output, 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 |
contourNodeCounter | Output, 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_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); }.
---------------------------------------------------------------------------
mserHandle | The MSER Handle returned by init. |
srcPtr | Pointer to an image array (unsigned char ) for which MSER has to be done. |
srcWidth | Width of the source image. NOTE: srcWidth must be <= the width passed to fcvMserInit. |
srcHeight | Height of the source image. NOTE: srcHeight must be <= the height passed to fcvMserInit. |
srcStride | Stride of the source image. |
maxContours | Maximum contours that will be returned. |
numContours | Output, Number of MSER contours in the region. |
recArray | Output, 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. |
staPointsInPath | Output. 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). |
numPointsInContour | Output, 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. |
pathArraySize | Input. 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. |
pathArray | Output. 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. . . . |
contourVariation | Output, 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. |
contourPolarity | Output, 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. |
contourNodeId | Output, 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 |
contourNodeCounter | Output, 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 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); }.
width | Width of the image for which MSER has to be done. |
height | Height of the image for which MSER has to be done. |
delta | Delta 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 |
minArea | Minimum area (number of pixels) of a mser contour. Typical value range [10 50], typical value 30 |
maxArea | Maximum area (number of pixels) of a mser contour. Typical value 14400 or 0.25*width*height |
maxVariation | Maximum variation in grayscale between 2 levels allowed. Typical value range [0.1 1.0], typical value 0.15 |
minDiversity | Minimum diversity in grayscale between 2 levels allowed. Typical value range [0.1 1.0], typical value 0.2 |
mserHandle | Output. the mserHandle to be used in subsequent calls. |
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); }.
width | Width of the image for which MSER has to be done. |
height | Height of the image for which MSER has to be done. |
delta | Delta 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 |
minArea | Minimum area (number of pixels) of a mser contour. Typical value range [10 50], typical value 30 |
maxArea | Maximum area (number of pixels) of a mser contour. Typical value 14400 or 0.25*width*height |
maxVariation | Maximum variation in grayscale between 2 levels allowed. Typical value range [0.1 1.0], typical value 0.15 |
minDiversity | Minimum diversity in grayscale between 2 levels allowed. Typical value range [0.1 1.0], typical value 0.2 |
mserHandle | Output. the mserHandle to be used in subsequent calls. |
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); }.
---------------------------------------------------------------------------
mserHandle | The MSER Handle returned by init. |
srcPtr | Pointer to an image array (unsigned char ) for which MSER has to be done. |
srcWidth | Width of the source image. NOTE: srcWidth must be <= the width passed to fcvMserNN8Init. |
srcHeight | Height of the source image. NOTE: srcHeight must be <= the height passed to fcvMserNN8Init. |
srcStride | Stride of the source image. |
maxContours | Maximum contours that will be returned. |
numContours | Output, Number of MSER contours in the region. |
recArray | Output, 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. |
numPointsInContour | Output, 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. |
pointsArraySize | Size of the output points Array. Typical size: (# of pixels in source image) * 30 |
pointsArray | Output. 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 void fcvMserRelease | ( | void * | mserHandle | ) |
Function to release MSER resources.
mserHandle | Handle 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.
mserHandle | The MSER Handle returned by init. |
srcPtr | Pointer to an image array (unsigned char ) for which MSER has to be done. |
srcWidth | Width of the source image. NOTE: srcWidth must be <= the width passed to fcvMserInit. |
srcHeight | Height of the source image. NOTE: srcHeight must be <= the height passed to fcvMserInit. |
srcStride | Stride of the source image. |
maxContours | Maximum contours that will be returned. |
numContours | Output, Number of MSER contours in the region. |
numPointsInContour | Output, 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. |
pointsArraySize | Size of the output points Array. Typical size: (# of pixels in source image) * 30 |
pointsArray | Output. 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); }.
---------------------------------------------------------------------------
mserHandle | The MSER Handle returned by init. |
srcPtr | Pointer to an image array (unsigned char ) for which MSER has to be done. |
srcWidth | Width of the source image. NOTE: srcWidth must be <= the width passed to fcvMserInit. |
srcHeight | Height of the source image. NOTE: srcHeight must be <= the height passed to fcvMserInit. |
srcStride | Stride of the source image. |
maxContours | Maximum contours that will be returned. |
numContours | Output, Number of MSER contours in the region. |
recArray | Output, 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. |
numPointsInContour | Output, 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. |
pointsArraySize | Size of the output points Array. Typical size: (# of pixels in source image) * 30 |
pointsArray | Output. 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 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.
patches | Pointer 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 |
patchWidth | Width in pixels of the patch. |
patchHeight | Height in pixels of the patch. |
src | Pointer to 8-bit image for search. WARNING: should be 128-bit aligned. |
srcWidth | Width in pixels of the image. |
srcHeight | Height in pixels of the image. |
srcStride | The 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 |
searchCenterX | The list of Center X coordinate of each search window |
searchCenterY | The list of Center Y coordinate of each search window |
searchWidth | Width of search range in pixels WARNING: must be odd number. |
searchHeight | Height of search range in pixels WARNING: must be odd number. |
filterLowVariance | Minimum variance. Used to as threshold to compare against variance of the block of src or patch. |
bestX | The 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. |
bestY | The 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. |
bestNCC | NCC 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. |
subX | Sub-pixel estimate for optimal NCC relative to bestX. e.g., float x = (float)bestX + subX; |
subY | Sub-pixel estimate for optimal NCC relative to bestY. |
numSearches | number of patch searches in the image. |
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.
patch | Pointer to 8-bit patch pixel values linearly laid out in memory. |
src | Pointer to 8-bit image pixel values linearly laid out in memory. WARNING: should be 128-bit aligned. |
srcWidth | Width in pixels of the image. WARNING: should be multiple of 8. |
srcHeight | Height in pixels of the image. |
search_center_x | X location of search center in pixels of the image. |
search_center_y | Y location of search center in pixels of the image. |
search_radius | Radius of search in pixels. Must be <=5. |
best_x | Center 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_y | Center Y location on the image of the best NCC match. The center Y has 4 pixels above and 3 pixels below. |
bestNCC | Largest 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. |
subX | Sub-pixel estimate for optimal NCC relative to best_x. e.g., float x = (float)best_x + subX; |
subY | Sub-pixel estimate for optimal NCC relative to best_y. |
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.
patch | Pointer to 8-bit patch pixel values linearly laid out in memory. |
src | Pointer to 8-bit image pixel values linearly laid out in memory. WARNING: should be 128-bit aligned. |
srcWidth | Width in pixels of the image. WARNING: should be multiple of 8. |
srcHeight | Height in pixels of the image. |
search_center_x | X location of search center in pixels of the image. |
search_center_y | Y location of search center in pixels of the image. |
search_radius | Radius of search in pixels. Must be <=5. |
filterLowVariance | Minimum variance. Used to as threshold to compare against variance of 8x8 block of src or patch. |
best_x | Center 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_y | Center Y location on the image of the best NCC match. The center Y has 4 pixels above and 3 pixels below. |
bestNCC | Largest 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. |
subX | Sub-pixel estimate for optimal NCC relative to best_x. e.g., float x = (float)best_x + subX; |
subY | Sub-pixel estimate for optimal NCC relative to best_y. |
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.
patch | Pointer to 8-bit patch pixel values linearly laid out in memory. |
src | Pointer to 8-bit image pixel values linearly laid out in memory. WARNING: should be 128-bit aligned. |
srcWidth | Width in pixels of the image. WARNING: should be multiple of 8. |
srcHeight | Height in pixels of the image. |
search_center_x | Center X coordinate of the search window |
search_center_y | Center Y coordinate of the search window |
search_w | Width of search square in pixels WARNING: must be 11 or less. |
best_x | Center 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_y | Center Y location on the image of the best NCC match. The center Y has 4 pixels above and 3 pixels below. |
bestNCC | NCC 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. |
subX | Sub-pixel estimate for optimal NCC relative to best_x. e.g., float x = (float)best_x + subX; |
subY | Sub-pixel estimate for optimal NCC relative to best_y. |
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.
patch | Pointer to 8-bit patch pixel values linearly laid out in memory. |
src | Pointer to 8-bit image pixel values linearly laid out in memory. WARNING: should be 128-bit aligned. |
srcWidth | Width in pixels of the image. WARNING: should be multiple of 8. |
srcHeight | Height in pixels of the image. |
search_center_x | Center X coordinate of the search window |
search_center_y | Center Y coordinate of the search window |
search_w | Width of search square in pixels WARNING: must be 11 or less. |
filterLowVariance | Minimum variance. Used to as threshold to compare against variance of 8x8 block of src or patch. |
best_x | Center 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_y | Center Y location on the image of the best NCC match. The center Y has 4 pixels above and 3 pixels below. |
bestNCC | NCC 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. |
subX | Sub-pixel estimate for optimal NCC relative to best_x. e.g., float x = (float)best_x + subX; |
subY | Sub-pixel estimate for optimal NCC relative to best_y. |
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.
patch | 8x8 template |
src | Reference Image. NOTE: should be 128-bit aligned. |
srcWidth | Width of the src image. |
srcHeight | Height of the src image. |
srcStride | Stride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). |
dst | The 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.
patch | 8x8 template |
patchStride | Stride of the 8x8 template buffer |
dstStride | Stride of the patch (in bytes) - i.e., how many bytes between column 0 of row N and column 0 of row N+1. |
src | Reference Image. NOTE: should be 128-bit aligned. |
srcWidth | Width of the src image. |
srcHeight | Height of the src image. |
srcStride | Stride of image (in bytes) - i.e., how many bytes between column 0 of row N and column 0 of row N+1. |
dst | The 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. |
dstStride | Stride 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.
[in] | src1 | Pointer 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] | src2 | Pointer 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] | srcWidth | Width of source images pointed by src1 and src2. |
[in] | srcHeight | Height of source images pointed by src1 and src2. |
[in] | srcStride | Stride of source images pointed by src1 and src2. |
[in] | roiLeft | Left co-ordinate (x0) of Region-of-Interest (ROI). |
[in] | roiTop | Top co-orgdinate (y0) of Region-of-Interest (ROI). |
[in] | roiRight | Right co-ordinate (x1) of Region-of-Interest (ROI). |
[in] | roiBottom | Bottom co-ordinate (y1) of Region-of-Interest (ROI). |
[in] | shiftSize | Distance 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] | searchWidth | Numbers 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] | searchHeight | Numbers 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] | searchStep | Distance 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] | usePrevious | Indicates 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] | numMv | Pointer to variable that will store the count of Motion Vectors generated by the function. WARNING: This pointer should be Non-NULL. |
[out] | locX | Pointer 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] | locY | Pointer 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] | mvX | Pointer 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] | mvY | Pointer 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. |
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.
src1 | Input image from frame #1. WARNING: should be 128-bit aligned. |
src2 | Input image from frame #2. WARNING: should be 128-bit aligned. |
srcWidth | Input image width. WARNING: should be multiple of 8. |
srcHeight | Input image height. |
src1Pyr | Image Pyradmid of src1 WARNING: obtained by calling fcvPyramidCreateu8 |
src2Pyr | Image Pyradmid of src2 WARNING: obtained by calling fcvPyramidCreateu8 |
dx1Pyr | Horizontal Sobel gradient pyramid for src1 NOTE: To be left NULL. In this case the function will build the pyramid internally. |
dy1Pyr | Vertical Sobel grading pyraid for src1 NOTE: To be left NULL. In this case the function will build the pyramid internally. |
featureXY | Pointer 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_out | Pointer to X,Y floating point, sub-pixel coordinates for tracked features Stored as X,Y tuples. featureXY array storage must be >= featureLen*2. |
featureStatus | Pointer 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 |
featureLen | Number of features in featuresXY and featureStatus array. |
windowWidth | Width of window for optical flow searching. Must be odd number. NOTE: suggested value 5, 7 or 9 |
windowHeight | Height of window for optical flow searching. Must be odd number. NOTE:: suggested value 5, 7 or 9 |
maxIterations | Maximum number of LK iterations to perform per pyramid level. NOTE: suggested value 5 or 7 |
nPyramidLevels | Number of pyramid levels. NOTE: suggested value 3 or 4 depending on size of image |
maxResidue | Maximum feature residue above which feature is declared lost. NOTE: obsolete parameters, set to 0 |
minDisplacement | Minimum 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 |
minEigenvalue | Threshold 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 |
lightingNormalized | if 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.
src1 | Input image from frame #1. WARNING: should be 128-bit aligned. |
src2 | Input image from frame #2. WARNING: should be 128-bit aligned. |
srcWidth | Input image width. WARNING: should be multiple of 8. |
srcHeight | Input image height. |
src1Pyr | Image Pyradmid of src1 WARNING: obtained by calling fcvPyramidCreateu8 |
src2Pyr | Image Pyradmid of src2 WARNING: obtained by calling fcvPyramidCreateu8 |
dx1Pyr | Horizontal Sobel gradient pyramid for src1 NOTE: To be left NULL. In this case the function will build the pyramid internally. |
dy1Pyr | Vertical Sobel grading pyraid for src1 NOTE: To be left NULL. In this case the function will build the pyramid internally. |
featureXY | Pointer 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_out | Pointer to X,Y floating point, sub-pixel coordinates for tracked features Stored as X,Y tuples. featureXY array storage must be >= featureLen*2. |
featureStatus | Pointer to integer array for status of each feature defined in featureXY. featureStatus array storage must be >= featureLen. |
featureLen | Number of features in featuresXY and featureStatus array. |
windowWidth | Width of window for optical flow searching. Must be odd number. NOTE: suggested value 5, 7 or 9 |
windowHeight | Height of window for optical flow searching. Must be odd number. NOTE:: suggested value 5, 7 or 9 |
maxIterations | Maximum number of LK iterations to perform per pyramid level. NOTE: suggested value 5 or 7 |
nPyramidLevels | Number of pyramid levels. NOTE: suggested value 3 or 4 depending on size of image |
maxResidue | Maximum feature residue above which feature is declared lost. NOTE: obsolete parameters, set to 0 |
minDisplacement | Minimum displacement solved below which iterations are stopped. NOTE: obsolete parameters, set to 0 |
minEigenvalue | Threshold 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 |
lightingNormalized | if 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.
src1 | Input image from frame #1. WARNING: should be 128-bit aligned. |
src2 | Input image from frame #2. WARNING: should be 128-bit aligned. |
width | Input image width. |
height | Input image height. |
stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to width. NOTE: should be a multiple of 8. |
src1Pyr | Image Pyramid of src1 (with stride) WARNING: obtained by calling fcvPyramidCreateu8_v2 |
src2Pyr | Image Pyradmid of src2 (with stride) WARNING: obtained by calling fcvPyramidCreateu8_v2 |
featureXY | Pointer 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_out | Pointer to X,Y floating point, sub-pixel coordinates for tracked features Stored as X,Y tuples. featureXY array storage must be >= featureLen*2. |
featureStatus | Pointer to integer array for status of each feature defined in featureXY. featureStatus array storage must be >= featureLen. |
featureLen | Number of features in featuresXY and featureStatus array. |
windowWidth | Width of window for optical flow searching. Must be odd number. NOTE: suggested value 5, 7 or 9 |
windowHeight | Height of window for optical flow searching. Must be odd number. NOTE:: suggested value 5, 7 or 9 |
maxIterations | Maximum number of LK iterations to perform per pyramid level. NOTE: suggested value 5 or 7 |
nPyramidLevels | Number 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.
src1 | Input image from frame #1. WARNING: should be 128-bit aligned. |
src2 | Input image from frame #2. WARNING: should be 128-bit aligned. |
width | Input image width. |
height | Input image height. |
stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to width. NOTE: should be a multiple of 8. |
src1Pyr | Image Pyramid of src1 (with stride) WARNING: obtained by calling fcvPyramidCreateu8_v3 |
src2Pyr | Image Pyradmid of src2 (with stride) WARNING: obtained by calling fcvPyramidCreateu8_v3 |
featureXY | Pointer 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_out | Pointer to X,Y floating point, sub-pixel coordinates for tracked features Stored as X,Y tuples. featureXY array storage must be >= featureLen*2. |
featureXY_estimate | Pointer 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 |
featureStatus | Pointer to integer array for status of each feature defined in featureXY. featureStatus array storage must be >= featureLen. |
featureLen | Number of features in featuresXY and featureStatus array. |
windowWidth | Width of window for optical flow searching. Must be odd number. NOTE: suggested value 5, 7 or 9 |
windowHeight | Height of window for optical flow searching. Must be odd number. NOTE:: suggested value 5, 7 or 9 |
nPyramidLevels | Number of pyramid levels. NOTE: suggested value 3 or 4 depending on size of image |
termCriteria | The enum parameter to specify termination criteria. See fcvTerminationCriteria for details |
maxIterations | Maximum 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 |
maxEpsilon | Epsilon 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_estimate | The flag indicatiing if to use initial estimations stored in featureXY_estimate to start the search. |