Qualcomm FastCV Library  1.7.1
Feature detection

Functions

FASTCV_API void fcvCornerFast9u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int barrier, unsigned int border, uint32_t *__restrict xy, unsigned int nCornersMax, uint32_t *__restrict nCorners)
 Extracts FAST corners from the image. This function tests the whole image for corners (apart from the border). FAST-9 looks for continuous segments on the pixel ring of 9 pixels or more.
FASTCV_API void fcvCornerFast9InMasku8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int barrier, unsigned int border, uint32_t *__restrict xy, unsigned int nCornersMax, uint32_t *__restrict nCorners, const uint8_t *__restrict mask, unsigned int maskWidth, unsigned int maskHeight)
 Extracts FAST corners from the image. This function takes a bit mask so that only image areas masked with '0' are tested for corners (if these areas are also not part of the border). FAST-9 looks for continuous segments on the pixel ring of 9 pixels or more.
FASTCV_API void fcvCornerFast10u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int32_t barrier, uint32_t border, uint32_t *__restrict xy, uint32_t nCornersMax, uint32_t *__restrict nCorners)
 Extracts FAST corners from the image. This function tests the whole image for corners (apart from the border). FAST-10 looks for continuous segments on the pixel ring of 10 pixels or more.
FASTCV_API void fcvCornerFast10InMasku8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int32_t barrier, uint32_t border, uint32_t *__restrict xy, uint32_t nCornersMax, uint32_t *__restrict nCorners, const uint8_t *__restrict mask, uint32_t maskWidth, uint32_t maskHeight)
 Extracts FAST corners from the image. This function takes a bit mask so that only image areas masked with '0' are tested for corners (if these areas are also not part of the border). FAST-10 looks for continuous segments on the pixel ring of 10 pixels or more.
FASTCV_API void fcvCornerHarrisu8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, unsigned int border, uint32_t *__restrict xy, unsigned int nCornersMax, uint32_t *__restrict nCorners, int threshold)
 Extracts Harris corners from the image. This function tests the whole image for corners (apart from the border).
FASTCV_API unsigned int fcvLocalHarrisMaxu8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, unsigned int posX, unsigned int posY, unsigned int *maxX, unsigned int *maxY, int *maxScore)
 Local Harris Max applies the Harris Corner algorithm on an 11x11 patch within an image to determine if a corner is present.
FASTCV_API void fcvCornerHarrisInMasku8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, unsigned int border, uint32_t *__restrict xy, unsigned int nCornersMax, uint32_t *__restrict nCorners, int threshold, const uint8_t *__restrict mask, unsigned int maskWidth, unsigned int maskHeight)
 Extracts Harris corners from the image. This function takes a bit mask so that only image areas masked with '0' are tested for corners (if these areas are also not part of the border).
FASTCV_API void fcvCornerHarrisAdaptiveu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t border, float32_t *__restrict xy, uint32_t nCornersMax, uint32_t *__restrict nCorners, int32_t threshold)
 Extracts Harris corners from the image. This function tests the whole image for corners (apart from the border). It is an improved version which is more robust to low contrast images.
FASTCV_API fcvStatus fcvCornerHarrisScoreu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t *__restrict harrisResp, uint32_t respStride, uint32_t *__restrict xy, uint32_t nCornersMax, uint32_t *__restrict nCorners, float32_t threshold, float32_t sensitivity, uint32_t kernelSize, uint32_t blockSize, uint32_t nmsEnabled, float32_t minDistance, uint32_t normalizeResponse)
 Extracts Harris corners from the image.
ATTENTION: Compared to fcvCornerHarrisu8, this API gives more accurate results in exchange for slower execution time.

.
FASTCV_API void fcvCornerFast9Scoreu8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int barrier, unsigned int border, uint32_t *__restrict xy, uint32_t *__restrict scores, unsigned int nCornersMax, uint32_t *__restrict nCorners)
 Extracts FAST corners and scores from the image.
FASTCV_API void fcvCornerFast9InMaskScoreu8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int barrier, unsigned int border, uint32_t *__restrict xy, uint32_t *__restrict scores, unsigned int nCornersMax, uint32_t *__restrict nCorners, const uint8_t *__restrict mask, unsigned int maskWidth, unsigned int maskHeight)
 Extracts FAST corners and scores from the image.
FASTCV_API void fcvCornerFast9Scoreu8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int barrier, unsigned int border, uint32_t *__restrict xy, uint32_t *__restrict scores, unsigned int nCornersMax, uint32_t *__restrict nCorners, uint32_t nmsEnabled, void *__restrict tempBuf)
 Extracts FAST corners and scores from the image.
FASTCV_API void fcvCornerFast9InMaskScoreu8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int barrier, unsigned int border, uint32_t *__restrict xy, uint32_t *__restrict scores, unsigned int nCornersMax, uint32_t *__restrict nCorners, const uint8_t *__restrict mask, unsigned int maskWidth, unsigned int maskHeight, uint32_t nmsEnabled, void *__restrict tempBuf)
 Extracts FAST corners and scores from the image based on the mask. The mask specifies pixels to be ignored by the detector.
FASTCV_API void fcvCornerFast10Scoreu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int32_t barrier, uint32_t border, uint32_t *__restrict xy, uint32_t *__restrict scores, uint32_t nCornersMax, uint32_t *__restrict nCorners, uint32_t nmsEnabled, void *__restrict tempBuf)
 Extracts FAST corners and scores from the image.
FASTCV_API void fcvCornerFast10InMaskScoreu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int32_t barrier, uint32_t border, uint32_t *__restrict xy, uint32_t *__restrict scores, uint32_t nCornersMax, uint32_t *__restrict nCorners, const uint8_t *__restrict mask, uint32_t maskWidth, uint32_t maskHeight, uint32_t nmsEnabled, void *__restrict tempBuf)
 Extracts FAST corners and scores from the image based on the mask. The mask specifies pixels to be ignored by the detector.
FASTCV_API void fcvBoundingRectangle (const uint32_t *__restrict xy, uint32_t numPoints, uint32_t *rectTopLeftX, uint32_t *rectTopLeftY, uint32_t *rectWidth, uint32_t *rectHeight)
 Function to find the bounding rectangle of a set of points.
FASTCV_API uint32_t fcvKMeansTreeSearch36x10s8 (const int8_t *__restrict nodeChildrenCenter, const uint32_t *__restrict nodeChildrenInvLenQ32, const uint32_t *__restrict nodeChildrenIndex, const uint8_t *__restrict nodeNumChildren, uint32_t numNodes, const int8_t *__restrict key)
 Search K-Means tree, where each node connects to up to 10 children, and the center (mean) is a 36-tuple vector of 8-bit signed value.
FASTCV_API int fcvLinearSearchPrepare8x36s8 (uint32_t *__restrict dbLUT, uint32_t numDBLUT, int8_t *__restrict descDB, uint32_t *__restrict descDBInvLenQ38, uint16_t *__restrict descDBTargetId, uint32_t *__restrict descDBOldIdx, uint32_t numDescDB)
 Sorts in-place the pairs of <descDB, descDBInvLenQ38 > according to descDBTargetId.
FASTCV_API void fcvLinearSearch8x36s8 (const uint32_t *__restrict dbLUT, uint32_t numDBLUT, const int8_t *__restrict descDB, const uint32_t *__restrict descDBInvLenQ38, const uint16_t *__restrict descDBTargetId, uint32_t numDescDB, const int8_t *__restrict srcDesc, const uint32_t *__restrict srcDescInvLenQ38, const uint32_t *__restrict srcDescIdx, uint32_t numSrcDesc, const uint16_t *__restrict targetsToIgnore, uint32_t numTargetsToIgnore, uint32_t maxDistanceQ31, uint32_t *__restrict correspondenceDBIdx, uint32_t *__restrict correspondenceSrcDescIdx, uint32_t *__restrict correspondenceDistanceQ31, uint32_t maxNumCorrespondences, uint32_t *__restrict numCorrespondences)
 Perform linear search of descriptor in a database.
FASTCV_API void fcvFindContoursExternalu8 (uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t maxNumContours, uint32_t *__restrict numContours, uint32_t *__restrict numContourPoints, uint32_t **__restrict contourStartPoints, uint32_t *__restrict pointBuffer, uint32_t pointBufferSize, int32_t hierarchy[][4], void *contourHandle)
 Finds only extreme outer contours in a binary image. There is no nesting relationship between contours. It sets hierarchy[i][2]=hierarchy[i][3]=-1 for all the contours.
FASTCV_API void fcvFindContoursListu8 (uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t maxNumContours, uint32_t *__restrict numContours, uint32_t *__restrict numContourPoints, uint32_t **__restrict contourStartPoints, uint32_t *__restrict pointBuffer, uint32_t pointBufferSize, void *contourHandle)
 Finds contours in a binary image without any hierarchical relationships.
FASTCV_API void fcvFindContoursCcompu8 (uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t maxNumContours, uint32_t *__restrict numContours, uint32_t *__restrict holeFlag, uint32_t *__restrict numContourPoints, uint32_t **__restrict contourStartPoints, uint32_t *__restrict pointBuffer, uint32_t pointBufferSize, int32_t hierarchy[][4], void *contourHandle)
 Finds contours in a binary image and organizes them into a two-level hierarchy. At the top level, there are external boundaries of the components. At the second level, there are boundaries of the holes. If there is another contour inside a hole of a connected component, it is still put at the top level.
FASTCV_API void fcvFindContoursTreeu8 (uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t maxNumContours, uint32_t *__restrict numContours, uint32_t *__restrict holeFlag, uint32_t *__restrict numContourPoints, uint32_t **__restrict contourStartPoints, uint32_t *__restrict pointBuffer, uint32_t pointBufferSize, int32_t hierarchy[][4], void *contourHandle)
 Finds contours in a binary image and reconstructs a full hierarchy of nested contours.
FASTCV_API void * fcvFindContoursAllocate (uint32_t srcStride)
 Allocates assistant and intermediate data for contour.
FASTCV_API void fcvFindContoursDelete (void *contourHandle)
 Deallocates assistant and intermediate data for contour.
FASTCV_API int fcvKDTreeCreate36s8f32 (const int8_t *__restrict vectors, const float32_t *__restrict invLengths, int numVectors, fcvKDTreeDatas8f32 **kdtrees)
 create KDTrees for dataset of 36D vectors
FASTCV_API int fcvKDTreeDestroy36s8f32 (fcvKDTreeDatas8f32 *kdtrees)
 release KDTrees data structures
FASTCV_API int fcvKDTreeQuery36s8f32 (fcvKDTreeDatas8f32 *kdtrees, const int8_t *__restrict query, float32_t queryInvLen, int maxNNs, float32_t maxDist, int maxChecks, const uint8_t *__restrict mask, int32_t *numNNsFound, int32_t *__restrict NNInds, float32_t *__restrict NNDists)
 find nearest neighbors (NN) for query
FASTCV_API void fcvHoughCircleu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, fcvCircle *__restrict circles, uint32_t *__restrict numCircle, uint32_t maxCircle, uint32_t minDist, uint32_t cannyThreshold, uint32_t accThreshold, uint32_t minRadius, uint32_t maxRadius, void *__restrict data)
 Finds circles in a grayscale image using Hough transform.
FASTCV_API void fcvHoughLineu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t threshold, uint32_t maxLines, uint32_t *__restrict pNumLines, fcvLine *__restrict pLines)
 Performs Hough Line detection.
FASTCV_API void fcvImageMomentsu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, fcvMoments *moments, uint8_t binary)
 Computes weighted average (moment) of the image pixels' intensities.
FASTCV_API void fcvImageMomentss32 (const int32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, fcvMoments *moments, uint8_t binary)
 Computes weighted average (moment) of the image pixels' intensities.
FASTCV_API void fcvImageMomentsf32 (const float32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, fcvMoments *moments, uint8_t binary)
 Computes weighted average (moment) of the image pixels' intensities.
FASTCV_API void fcvImageDetectEdgePixelsu8 (const int16_t *__restrict gxgy, const uint32_t *__restrict mag, uint32_t gradStride, uint32_t topLeftX, uint32_t topLeftY, uint32_t width, uint32_t height, uint32_t gridSize, float32_t threshold, uint32_t nEdgePixelsMax, uint32_t *__restrict nEdgePixels, uint32_t *__restrict coordEdgePixels)
 Extracts edge locations from the image. This function tests for edges a grid of pixels within a bounding box.
FASTCV_API fcvStatus fcvGLBPu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t radius, uint32_t neighbors, uint8_t *__restrict dst, uint32_t dstStride)
 Computes the Generalized Local Binary Pattern Features for a single channel image.
FASTCV_API fcvStatus fcvCornerRefineSubPixu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t blockWidth, uint32_t blockHeight, uint32_t maxIterations, float32_t stopCriteria, const uint32_t *__restrict xyInitial, uint32_t nCorners, float32_t *__restrict xyOut)
 Refine corner location.
FASTCV_API fcvStatus fcvGoodFeatureToTracku8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t distanceMin, uint32_t border, float32_t barrier, uint32_t *__restrict xy, uint32_t maxnumcorners, uint32_t *__restrict numcorners)
 Extract strong corners from image to track.
FASTCV_API fcvStatus fcvFindMultipleMaximau8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, const float32_t *__restrict pos, const float32_t *__restrict normal, uint32_t maxDistance, uint32_t maxNumMaxima, int32_t minGradient, float32_t maxAngleDiff, float32_t *__restrict maxima, uint32_t *__restrict numMaxima)
 Find multiple maxima along the normal direction of the line.
FASTCV_API fcvStatus fcvImageDetectLineSegmentsu8 (const fcvPyramidLevel_v2 *__restrict srcPyr, uint32_t pyrLevel, uint32_t doBlurImage, float32_t maxLineAngle, uint32_t minLineLength, uint32_t minMagnitude, uint32_t maxLineNum, uint32_t *__restrict indexBuffer, fcvLineSegment *__restrict lineSegments, uint32_t *__restrict numLineSegments)
 Extract the straight line segments from the image.

Detailed Description

Fast corner detection, harris corner detection, canny edge detection, etc.


Function Documentation

FASTCV_API void fcvBoundingRectangle ( const uint32_t *__restrict  xy,
uint32_t  numPoints,
uint32_t *  rectTopLeftX,
uint32_t *  rectTopLeftY,
uint32_t *  rectWidth,
uint32_t *  rectHeight 
)

Function to find the bounding rectangle of a set of points.

Parameters:
[in]xySet of points (x,y) for which the bounding rectangle has to be found. The points are expressed in interleaved format: [x1,y1,x2,y2....]
[in]numPointsNumber of points in the array.
[out]rectTopLeftXLower left's X value for the rectangle.
[out]rectTopLeftYLower Left's Y value for the rectangle;
[out]rectWidthWidth of the rectangle.
[out]rectHeightHeight of the rectangle.
FASTCV_API void fcvCornerFast10InMaskScoreu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int32_t  barrier,
uint32_t  border,
uint32_t *__restrict  xy,
uint32_t *__restrict  scores,
uint32_t  nCornersMax,
uint32_t *__restrict  nCorners,
const uint8_t *__restrict  mask,
uint32_t  maskWidth,
uint32_t  maskHeight,
uint32_t  nmsEnabled,
void *__restrict  tempBuf 
)

Extracts FAST corners and scores from the image based on the mask. The mask specifies pixels to be ignored by the detector.

Parameters:
src8-bit grayscale image where keypoints are detected
NOTE: data should be 128-bit aligned.
srcWidthimage width
NOTE: should be a multiple of 8.
srcHeightImage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
NOTE: should be a multiple of 8.
barrierFAST threshold. The threshold is used to compare difference between intensity value of the central pixel and pixels on a circle surrounding this pixel.
borderNumber for pixels to ignore from top,bottom,right,left of the image
WARNING: If border < 3, it will be default to 3.
WARNING: srcWidth and srcHeight must be > 2 x border
xyPointer to the output array cointaining the interleaved x,y position of the detected corners.
NOTE: Remember to allocate double the size of
nCornersMax
NOTE: data should be 128-bit aligned.
scoresPointer to the output array containing the scores of the detected corners. The score is the highest threshold that can still validate the detected corner. Must be greater than barrier. A higher score value indicates a stronger corner feature. For example, a corner of score 108 is stronger than a corner of score 50.
NOTE: data should be 128-bit aligned.
nCornersMaxMaximum number of corners. The function exits when the maximum number of corners is exceeded.
NOTE: This number should account for the number of key points before non-maximum suppression.
nCornerspointer to an integer storing the number of corners detected
maskMask used to omit regions of the image. For allowed mask sizes refer to
maskWidthand
maskHeight.The mask is so defined to work with multiple scales if necessary. For any pixel set to '1' in the mask, the corresponding pixel in the image will be ignored.
NOTE: data should be 128-bit aligned.
maskWidthWidth of the mask. Both width and height of the mask must be 'k' times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
maskHeightHeight of the mask. Both width and height of the mask must be 'k' times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
nmsEnabledEnable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key points before NMS
tempBufPointer to scratch buffer if nms is enabled, otherwise it can be NULL. Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
NOTE: data should be 128-bit aligned.
FASTCV_API void fcvCornerFast10InMasku8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int32_t  barrier,
uint32_t  border,
uint32_t *__restrict  xy,
uint32_t  nCornersMax,
uint32_t *__restrict  nCorners,
const uint8_t *__restrict  mask,
uint32_t  maskWidth,
uint32_t  maskHeight 
)

Extracts FAST corners from the image. This function takes a bit mask so that only image areas masked with '0' are tested for corners (if these areas are also not part of the border). FAST-10 looks for continuous segments on the pixel ring of 10 pixels or more.

Parameters:
srcpointer to grayscale image with one byte per pixel
WARNING: should be 128-bit aligned.
srcWidthimage width
WARNING: must be <= 2048.
WARNING: should be a multiple of 8.
srcHeightimage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
barrierFAST threshold. The threshold is used to compare difference between intensity value of the central pixel and pixels on a circle surrounding this pixel.
borderNumber for pixels to ignore from top,bottom,right,left of the image
WARNING: If border < 3, it will be default to 3.
WARNING: srcWidth and srcHeight must be > 2 x border
xypointer to the output array containing the interleaved x,y position of the detected corners
WARNING: should be 128-bit aligned.
NOTE: Remember to allocate double the size of
nCornersMax
nCornersMaxMaximum number of corners. The function exists when the maximum number of corners is exceeded
nCornerspointer to an integer storing the number of corners detected
maskPer-pixel mask for each pixel represented in input image. If a bit set to 0, pixel will be a candidate for corner detection. If a bit set to 1, pixel will be ignored.
maskWidthWidth of the mask. Both width and height of the mask must be 'k' times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
maskHeightHeight of the mask. Both width and height of the mask must be 'k' times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
FASTCV_API void fcvCornerFast10Scoreu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int32_t  barrier,
uint32_t  border,
uint32_t *__restrict  xy,
uint32_t *__restrict  scores,
uint32_t  nCornersMax,
uint32_t *__restrict  nCorners,
uint32_t  nmsEnabled,
void *__restrict  tempBuf 
)

Extracts FAST corners and scores from the image.

non-maximum suppression can be enabled to reduce the number of false corners.

Parameters:
src8-bit image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
NOTE: should be 128-bit aligned.
srcWidthImage width, the number of pixels in a row.
NOTE: should be a multiple of 8.
srcHeightImage height
srcStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
barrierFAST threshold. The threshold is used to compare difference between intensity value of the central pixel and pixels on a circle surrounding this pixel.
borderNumber for pixels to ignore from top,bottom,right,left of the image
WARNING: If border < 3, it will be default to 3.
WARNING: srcWidth and srcHeight must be > 2 x border
xyPointer to the output array cointaining the interleaved x,y position of the detected corners.
NOTE: Remember to allocate double the size of
nCornersMax
NOTE: should be 128-bit aligned.
scoresPointer to the output array containing the scores of the detected corners. The score is the highest threshold that can still validate the detected corner. Must be greater than barrier. A higher score value indicates a stronger corner feature. For example, a corner of score 108 is stronger than a corner of score 50.
NOTE: should be 128-bit aligned.
NOTE: size of buffer is
nCornersMax
nCornersMaxMaximum number of corners. The function exits when the maximum number of corners is exceeded.
NOTE: This number should account for the number of key points before non-maximum suppression.
nCornerspointer to an integer storing the number of corners detected
nmsEnabledEnable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key points before NMS
tempBufPointer to scratch buffer if nms is enabled, otherwise it can be NULL. Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
NOTE: should be 128-bit aligned.
FASTCV_API void fcvCornerFast10u8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
int32_t  barrier,
uint32_t  border,
uint32_t *__restrict  xy,
uint32_t  nCornersMax,
uint32_t *__restrict  nCorners 
)

Extracts FAST corners from the image. This function tests the whole image for corners (apart from the border). FAST-10 looks for continuous segments on the pixel ring of 10 pixels or more.

Parameters:
srcPointer to grayscale image with one byte per pixel
WARNING: should be 128-bit aligned.
srcWidthInput image width
WARNING: should be a multiple of 8.
WARNING: must be <= 2048.
srcHeightImage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). If 0 is passed, srcStride is set to width.
barrierFAST threshold. The threshold is used to compare difference between intensity value of the central pixel and pixels on a circle surrounding this pixel.
borderNumber for pixels to ignore from top,bottom,right,left of the image
WARNING: If border < 3, it will be default to 3.
WARNING: srcWidth and srcHeight must be > 2 x border
xypointer to the output array containing the interleaved x,y position of the detected corners
e.g. struct { int x, y; } xy;
WARNING: should be 128-bit aligned.
NOTE: Remember to allocate double the size of
nCornersMax
nCornersMaxMaximum number of corners. The function exists when the maximum number of corners is exceeded
nCornerspointer to an integer storing the number of corners detected
FASTCV_API void fcvCornerFast9InMaskScoreu8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
int  barrier,
unsigned int  border,
uint32_t *__restrict  xy,
uint32_t *__restrict  scores,
unsigned int  nCornersMax,
uint32_t *__restrict  nCorners,
const uint8_t *__restrict  mask,
unsigned int  maskWidth,
unsigned int  maskHeight 
)

Extracts FAST corners and scores from the image.

Parameters:
srcGrayscale image with one byte per pixel
NOTE: should be 128-bit aligned.
srcWidthimage width
NOTE: should be a multiple of 8.
WARNING: must be <= 2048.
srcHeightimage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
barrierFAST threshold. The threshold is used to compare difference between intensity value of the central pixel and pixels on a circle surrounding this pixel.
borderNumber for pixels to ignore from top,bottom,right,left of the image
WARNING: If border < 3, it will be default to 3.
WARNING: srcWidth and srcHeight must be > 2 x border
xyPointer to the output array cointaining the interleaved x,y position of the detected corners.
NOTE: Remember to allocate double the size of
nCornersMax
NOTE: should be 128-bit aligned.
scoresPointer to the output array containing the scores of the detected corners. The score is the highest threshold that can still validate the detected corner. Must be greater than barrier. A higher score value indicates a stronger corner feature. For example, a corner of score 108 is stronger than a corner of score 50.
NOTE: should be 128-bit aligned.
nCornersMaxMaximum number of corners. The function exits when the maximum number of corners is exceeded.
nCornerspointer to an integer storing the number of corners detected
maskPer-pixel mask for each pixel represented in input image. If a bit set to 0, pixel will be a candidate for corner detection. If a bit set to 1, pixel will be ignored.
maskWidthWidth of the mask. Both width and height of the mask must be 'k' times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
maskHeightHeight of the mask. Both width and height of the mask must be 'k' times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
FASTCV_API void fcvCornerFast9InMaskScoreu8_v2 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
int  barrier,
unsigned int  border,
uint32_t *__restrict  xy,
uint32_t *__restrict  scores,
unsigned int  nCornersMax,
uint32_t *__restrict  nCorners,
const uint8_t *__restrict  mask,
unsigned int  maskWidth,
unsigned int  maskHeight,
uint32_t  nmsEnabled,
void *__restrict  tempBuf 
)

Extracts FAST corners and scores from the image based on the mask. The mask specifies pixels to be ignored by the detector.


ATTENTION: This function is a duplication of fcvCornerFast9InMaskScoreu8() 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: fcvCornerFast9InMaskScoreu8, fcvCornerFast9InMaskScoreu8_v2 will be removed, and the current signature for fcvCornerFast9InMaskScoreu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvCornerFast9InMaskScoreu8 when transitioning to 2.0.0.

non-maximum suppression can be enabled to reduce the number of false corners.

Parameters:
src8-bit grayscale image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
NOTE: should be 128-bit aligned.
srcWidthImage width, the number of pixels in a row.
NOTE: should be a multiple of 8.
srcHeightImage height
srcStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
barrierFAST threshold. The threshold is used to compare difference between intensity value of the central pixel and pixels on a circle surrounding this pixel.
borderNumber for pixels to ignore from top,bottom,right,left of the image
WARNING: If border < 3, it will be default to 3.
WARNING: srcWidth and srcHeight must be > 2 x border
xyPointer to the output array cointaining the interleaved x,y position of the detected corners.
NOTE: Remember to allocate double the size of
nCornersMax
NOTE: should be 128-bit aligned.
scoresPointer to the output array containing the scores of the detected corners. The score is the highest threshold that can still validate the detected corner. Must be greater than barrier. A higher score value indicates a stronger corner feature. For example, a corner of score 108 is stronger than a corner of score 50.
NOTE: should be 128-bit aligned.
NOTE: size of buffer is
nCornersMax
nCornersMaxMaximum number of corners. The function exits when the maximum number of corners is exceeded.
NOTE: This number should account for the number of key points before non-maximum suppression.
nCornersPointer to an integer storing the number of corners detected
maskMask used to omit regions of the image. For allowed mask sizes refer to
maskWidthand
maskHeight. The mask is so defined to work with multiple scales if necessary. For any pixel set to '1' in the mask, the corresponding pixel in the image will be ignored.
NOTE: should be 128-bit aligned.
maskWidthWidth of the mask. Both width and height of the mask must be 'k' times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
maskHeightHeight of the mask. Both width and height of the mask must be 'k' times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
nmsEnabledEnable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key points before NMS
tempBufPointer to scratch buffer if nms is enabled, otherwise it can be NULL. Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
NOTE: should be 128-bit aligned.
FASTCV_API void fcvCornerFast9InMasku8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
int  barrier,
unsigned int  border,
uint32_t *__restrict  xy,
unsigned int  nCornersMax,
uint32_t *__restrict  nCorners,
const uint8_t *__restrict  mask,
unsigned int  maskWidth,
unsigned int  maskHeight 
)

Extracts FAST corners from the image. This function takes a bit mask so that only image areas masked with '0' are tested for corners (if these areas are also not part of the border). FAST-9 looks for continuous segments on the pixel ring of 9 pixels or more.

Parameters:
srcpointer to grayscale image with one byte per pixel
WARNING: should be 128-bit aligned.
srcWidthimage width
WARNING: must be <= 2048.
WARNING: should be a multiple of 8.
srcHeightimage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
WARNING: should be a multiple of 8. If left at 0 srcStride is default to srcWidth.
barrierFAST threshold. The threshold is used to compare difference between intensity value of the central pixel and pixels on a circle surrounding this pixel.
borderNumber for pixels to ignore from top,bottom,right,left of the image
WARNING: If border < 3, it will be default to 3.
WARNING: srcWidth and srcHeight must be > 2 x border
xypointer to the output array containing the interleaved x,y position of the detected corners
WARNING: should be 128-bit aligned.
NOTE: Remember to allocate double the size of
nCornersMax
nCornersMaxMaximum number of corners. The function exits when the maximum number of corners is exceeded
nCornerspointer to an integer storing the number of corners detected
maskPer-pixel mask for each pixel represented in input image. If a bit set to 0, pixel will be a candidate for corner detection. If a bit set to 1, pixel will be ignored.
maskWidthWidth of the mask. Both width and height of the mask must be 'k' times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
maskHeightHeight of the mask. Both width and height of the mask must be 'k' times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
FASTCV_API void fcvCornerFast9Scoreu8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
int  barrier,
unsigned int  border,
uint32_t *__restrict  xy,
uint32_t *__restrict  scores,
unsigned int  nCornersMax,
uint32_t *__restrict  nCorners 
)

Extracts FAST corners and scores from the image.

Parameters:
src8-bit image
NOTE: should be 128-bit aligned.
srcWidthImage width
NOTE: should be a multiple of 8.
WARNING: must be <= 2048.
srcHeightimage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
barrierFAST threshold. The threshold is used to compare difference between intensity value of the central pixel and pixels on a circle surrounding this pixel.
borderNumber for pixels to ignore from top,bottom,right,left of the image
WARNING: If border < 3, it will be default to 3.
WARNING: srcWidth and srcHeight must be > 2 x border
xypointer to the output array cointaining the interleaved x,y position of the detected corners.
NOTE: Remember to allocate double the size of
nCornersMax
NOTE: should be 128-bit aligned.
scoresPointer to the output array containing the scores of the detected corners. The score is the highest threshold that can still validate the detected corner. Must be greater than barrier. A higher score value indicates a stronger corner feature. For example, a corner of score 108 is stronger than a corner of score 50.
NOTE: should be 128-bit aligned.
nCornersMaxMaximum number of corners. The function exits when the maximum number of corners is exceeded.
nCornerspointer to an integer storing the number of corners detected
FASTCV_API void fcvCornerFast9Scoreu8_v2 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
int  barrier,
unsigned int  border,
uint32_t *__restrict  xy,
uint32_t *__restrict  scores,
unsigned int  nCornersMax,
uint32_t *__restrict  nCorners,
uint32_t  nmsEnabled,
void *__restrict  tempBuf 
)

Extracts FAST corners and scores from the image.


ATTENTION: This function is a duplication of fcvCornerFast9Scoreu8() 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: fcvCornerFast9Scoreu8, fcvCornerFast9Scoreu8_v2 will be removed, and the current signature for fcvCornerFast9Scoreu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvCornerFast9Scoreu8 when transitioning to 2.0.0.

non-maximum suppression can be enabled to reduce the number of false corners.

Parameters:
src8-bit image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
NOTE: should be 128-bit aligned.
srcWidthImage width, the number of pixels in a row.
NOTE: should be a multiple of 8.
srcHeightImage height
srcStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
barrierFAST threshold. The threshold is used to compare difference between intensity value of the central pixel and pixels on a circle surrounding this pixel.
borderNumber for pixels to ignore from top,bottom,right,left of the image
WARNING: If border < 3, it will be default to 3.
WARNING: srcWidth and srcHeight must be > 2 x border
xyPointer to the output array cointaining the interleaved x,y position of the detected corners.
NOTE: Remember to allocate double the size of
nCornersMax
NOTE: should be 128-bit aligned.
scoresPointer to the output array containing the scores of the detected corners. The score is the highest threshold that can still validate the detected corner. Must be greater than barrier. A higher score value indicates a stronger corner feature. For example, a corner of score 108 is stronger than a corner of score 50.
NOTE: should be 128-bit aligned.
NOTE: size of buffer is
nCornersMax
nCornersMaxMaximum number of corners. The function exits when the maximum number of corners is exceeded.
NOTE: This number should account for the number of key points before non-maximum suppression.
nCornersPointer to an integer storing the number of corners detected
nmsEnabledEnable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key points before NMS
tempBufPointer to scratch buffer if nms is enabled, otherwise it can be NULL. Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
NOTE: should be 128-bit aligned.
FASTCV_API void fcvCornerFast9u8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
int  barrier,
unsigned int  border,
uint32_t *__restrict  xy,
unsigned int  nCornersMax,
uint32_t *__restrict  nCorners 
)

Extracts FAST corners from the image. This function tests the whole image for corners (apart from the border). FAST-9 looks for continuous segments on the pixel ring of 9 pixels or more.

Parameters:
srcPointer to grayscale image with one byte per pixel
WARNING: should be 128-bit aligned.
srcWidthInput image width
WARNING: should be a multiple of 8.
WARNING: must be <= 2048.
srcHeightImage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). If 0 is passed, srcStride is set to width.
WARNING: should be a multiple of 8.
barrierFAST threshold. The threshold is used to compare difference between intensity value of the central pixel and pixels on a circle surrounding this pixel.
borderNumber for pixels to ignore from top,bottom,right,left of the image
WARNING: If border < 3, it will be default to 3.
WARNING: srcWidth and srcHeight must be > 2 x border
xypointer to the output array containing the interleaved x,y position of the detected corners
e.g. struct { int x, y; } xy;
WARNING: should be 128-bit aligned.
NOTE: Remember to allocate double the size of
nCornersMax
nCornersMaxMaximum number of corners. The function exits when the maximum number of corners is exceeded
nCornerspointer to an integer storing the number of corners detected
FASTCV_API void fcvCornerHarrisAdaptiveu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  border,
float32_t *__restrict  xy,
uint32_t  nCornersMax,
uint32_t *__restrict  nCorners,
int32_t  threshold 
)

Extracts Harris corners from the image. This function tests the whole image for corners (apart from the border). It is an improved version which is more robust to low contrast images.

Parameters:
srcPointer to grayscale image with one byte per pixel
WARNING: should be 128-bit aligned.
srcWidthInput image width
srcHeightImage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
WARNING: should be a multiple of 8.
borderNumber for pixels to ignore from top,bottom,right,left of the image
xypointer to the output array containing the interleaved x,y position of the detected corners
WARNING: should be 128-bit aligned.
NOTE: Remember to allocate double the size of
nCornersMax
nCornersMaxMaximum number of corners. The function exits when the maximum number of corners is exceeded
nCornerspointer to an integer storing the number of corners detected
thresholdMinimum "Harris Score" or "Harris Corner Response" of a pixel for it to be regarded as a corner.
FASTCV_API void fcvCornerHarrisInMasku8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
unsigned int  border,
uint32_t *__restrict  xy,
unsigned int  nCornersMax,
uint32_t *__restrict  nCorners,
int  threshold,
const uint8_t *__restrict  mask,
unsigned int  maskWidth,
unsigned int  maskHeight 
)

Extracts Harris corners from the image. This function takes a bit mask so that only image areas masked with '0' are tested for corners (if these areas are also not part of the border).

Parameters:
srcpointer to grayscale image with one byte per pixel
WARNING: should be 128-bit aligned.
srcWidthimage width
WARNING: should be a multiple of 8.
srcHeightimage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
borderNumber for pixels to ignore from top,bottom,right,left of the image
xypointer to the output array containing the interleaved x,y position of the detected corners
WARNING: should be 128-bit aligned.
nCornersMaxMaximum number of corners. The function exits when the maximum number of corners is exceeded
nCornerspointer to an integer storing the number of corners detected
thresholdMinimum "Harris Score" or "Harris Corner Respose" of a pixel for it to be regarded as a corner.
maskPer-pixel mask for each pixel represented in input image. If a bit set to 0, pixel will be a candidate for corner detection. If a bit set to 1, pixel will be ignored.
maskWidthWidth of the mask. Both width and height of the mask must be 'k' times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
maskHeightHeight of the mask. Both width and height of the mask must be 'k' times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
Returns:
0 if successful.
FASTCV_API fcvStatus fcvCornerHarrisScoreu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t *__restrict  harrisResp,
uint32_t  respStride,
uint32_t *__restrict  xy,
uint32_t  nCornersMax,
uint32_t *__restrict  nCorners,
float32_t  threshold,
float32_t  sensitivity,
uint32_t  kernelSize,
uint32_t  blockSize,
uint32_t  nmsEnabled,
float32_t  minDistance,
uint32_t  normalizeResponse 
)

Extracts Harris corners from the image.
ATTENTION: Compared to fcvCornerHarrisu8, this API gives more accurate results in exchange for slower execution time.

.

DO NOT USE THIS API unless for testing purposes. This API can be removed without notice.

This function extracts Harris Corner features from the image. The input is an unsigned 8 bit image. Based on the values of the kernel size, the block size, the sensitivity, the function generates a Harris Response map (Harris Score). This map is then thresholded using the threshold parameter to locate local maxima. Additionally, if the Non Maximum Suppression flag is enabled, the function performs non maximum suppression of the thresholded response using the min distance parameter to calculate the neighborhood.

Parameters:
srcInput unsigned 8 bit image from which corner features are to be detected
WARNING: should be 128-bit aligned.
srcWidthInput image width
srcHeightInput Image height
srcStrideInput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row. If srcStride is equal to 0, it will be set to srcWidth.
NOTE: should be a multiple of 8
harrisRespThe computed Harris Response Map of the image. If the
normalizeResponseflag is set, then all values in the map are normalized between 0 and 255. If the
normalizeResponseflag is not set, then the map is not normalized to this range. This buffer MUST be allocated as srcWidth*srcHeight*sizeof(float32_t).
respStrideHarris response stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row. If respStride is equal to 0, it will be set to srcWidth * sizeof(float32_t).
NOTE: should be a multiple of 8
xypointer to the output array containing the interleaved x,y positions of the detected corners.
WARNING: should be 128-bit aligned.
NOTE: Remember to allocate double the size of
nCornersMax
nCornersMaxMaximum number of corners that should be detected. The function exits when the maximum number of corners is exceeded.
NOTE: This number should account for the number of key points before non-maximum suppression.
nCornerspointer to an integer storing the number of corners detected
thresholdMinimum "Harris Score" or "Harris Corner Response" of a pixel for it to be regarded as a corner. If the
normalizeResponseflag is set, then this parameter MUST be a value between 0 and 255. If the
normalizeResponseflag is not set, then this parameter can be any value in the range of int32_t. This parameter is used to threshold
harrisRespto detect corner features.
sensitivityThis parameter represents the sensitivity threshold from the Harris Stephens equation. Typical values are between 0.04 and 0.06
kernelSizeSize of the Sobel Kernel used to compute the gradients from the input image MUST be 3,5 or 7.
blockSizeSize of an average block for computing a derivative covariation matrix over each pixel neighborhood.
nmsEnabledA flag to enable or disable non maximum suppression. Set flag to 1 to enable it and 0 to disable.
NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key points before NMS
minDistanceThe radial euclidean distance to perform non-maximum suppression.
normalizeResponseThis parameter is a flag to enable or disable normalization of the harris response. If it is set, then it enables normalization of the response to the range between 0 and 255. If it is not set, then the response is NOT normalized to this range.
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API void fcvCornerHarrisu8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
unsigned int  border,
uint32_t *__restrict  xy,
unsigned int  nCornersMax,
uint32_t *__restrict  nCorners,
int  threshold 
)

Extracts Harris corners from the image. This function tests the whole image for corners (apart from the border).

Parameters:
srcPointer to grayscale image with one byte per pixel
WARNING: should be 128-bit aligned.
srcWidthInput image width
WARNING: should be a multiple of 8.
srcHeightImage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
borderNumber for pixels to ignore from top,bottom,right,left of the image
xypointer to the output array containing the interleaved x,y position of the detected corners
WARNING: should be 128-bit aligned.
NOTE: Remember to allocate double the size of
nCornersMax
nCornersMaxMaximum number of corners. The function exits when the maximum number of corners is exceeded
nCornerspointer to an integer storing the number of corners detected
thresholdMinimum "Harris Score" or "Harris Corner Response" of a pixel for it to be regarded as a corner.
Returns:
0 if successful.
FASTCV_API fcvStatus fcvCornerRefineSubPixu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  blockWidth,
uint32_t  blockHeight,
uint32_t  maxIterations,
float32_t  stopCriteria,
const uint32_t *__restrict  xyInitial,
uint32_t  nCorners,
float32_t *__restrict  xyOut 
)

Refine corner location.

Refine the detected corners location into sub-Pixels which is more precise than integer pixels

Parameters:
srcInput uint8_t image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthInput image width.
srcHeightInput image height.
srcStrideInput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
blockWidthWidth of the location search window.
blockHeightHeight of the location search window.
maxIterationsMaximum number of iteration to refine
stopCriteriaImprovement threshold, iteration stop if the corner position moves less by this value
xyInitialPointer to the initial input array containing the interleaved x,y position of the corner
nCornersNumber of the corners
xyOutPointer to the output array containing the refined interleaved x,y position of the corner
FASTCV_API void* fcvFindContoursAllocate ( uint32_t  srcStride)

Allocates assistant and intermediate data for contour.

Parameters:
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
Returns:
Pointer to allocated data
FASTCV_API void fcvFindContoursCcompu8 ( uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  maxNumContours,
uint32_t *__restrict  numContours,
uint32_t *__restrict  holeFlag,
uint32_t *__restrict  numContourPoints,
uint32_t **__restrict  contourStartPoints,
uint32_t *__restrict  pointBuffer,
uint32_t  pointBufferSize,
int32_t  hierarchy[][4],
void *  contourHandle 
)

Finds contours in a binary image and organizes them into a two-level hierarchy. At the top level, there are external boundaries of the components. At the second level, there are boundaries of the holes. If there is another contour inside a hole of a connected component, it is still put at the top level.

Parameters:
srcGrayscale image with one byte per pixel. Non-zero pixels are treated as 1's. Zero pixels remain 0's, so the image is treated as binary.
srcWidthImage width
srcHeightImage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
maxNumContoursMaximum number of contours can be found (<= 126)
numContoursNumber of actually found contours
holeFlagHole flag for each found contour to indicate whether it is a hole or not
numContourPointsNumber of points in each found contour
contourStartPointsPointers to the start point of each found contour
pointBufferPointer to point buffer for contour points' coordinates. It should be allocated before calling this function.
pointBufferSizeSize of point buffer in terms of uint32_t
hierarchyInformation about the image topology. It has numContours elements. For each contour i, the elements hierarchy[i][0], hiearchy[i][1], hiearchy[i][2], and hiearchy[i][3] are set to 0-based indices of the next and previous contours at the same hierarchical level, the first child contour and the parent contour, respectively. If for a contour i there are no next, previous, parent, or nested contours, the corresponding elements of hierarchy[i] will be negative.
contourHandlePointer to assistant and intermediate data. It should be allocated by fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
FASTCV_API void fcvFindContoursDelete ( void *  contourHandle)

Deallocates assistant and intermediate data for contour.

Parameters:
contourHandlePointer to assistant and intermediate data
FASTCV_API void fcvFindContoursExternalu8 ( uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  maxNumContours,
uint32_t *__restrict  numContours,
uint32_t *__restrict  numContourPoints,
uint32_t **__restrict  contourStartPoints,
uint32_t *__restrict  pointBuffer,
uint32_t  pointBufferSize,
int32_t  hierarchy[][4],
void *  contourHandle 
)

Finds only extreme outer contours in a binary image. There is no nesting relationship between contours. It sets hierarchy[i][2]=hierarchy[i][3]=-1 for all the contours.

Parameters:
srcGrayscale image with one byte per pixel. Non-zero pixels are treated as 1's. Zero pixels remain 0's, so the image is treated as binary.
srcWidthImage width
srcHeightImage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
maxNumContoursMaximum number of contours can be found
numContoursNumber of actually found contours
numContourPointsNumber of points in each found contour
contourStartPointsPointers to the start point of each found contour
pointBufferPointer to point buffer for contour points' coordinates. It should be allocated before calling this function.
pointBufferSizeSize of point buffer in terms of uint32_t
hierarchyInformation about the image topology. It has numContours elements. For each contour i, the elements hierarchy[i][0], hiearchy[i][1], hiearchy[i][2], and hiearchy[i][3] are set to 0-based indices of the next and previous contours at the same hierarchical level, the first child contour and the parent contour, respectively. If for a contour i there are no next, previous, parent, or nested contours, the corresponding elements of hierarchy[i] will be negative.
contourHandlePointer to assistant and intermediate data. It should be allocated by fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
FASTCV_API void fcvFindContoursListu8 ( uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  maxNumContours,
uint32_t *__restrict  numContours,
uint32_t *__restrict  numContourPoints,
uint32_t **__restrict  contourStartPoints,
uint32_t *__restrict  pointBuffer,
uint32_t  pointBufferSize,
void *  contourHandle 
)

Finds contours in a binary image without any hierarchical relationships.

Parameters:
srcGrayscale image with one byte per pixel. Non-zero pixels are treated as 1's. Zero pixels remain 0's, so the image is treated as binary.
srcWidthImage width
srcHeightImage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
maxNumContoursMaximum number of contours can be found
numContoursNumber of actually found contours
numContourPointsNumber of points in each found contour
contourStartPointsPointers to the start point of each found contour
pointBufferPointer to point buffer for contour points' coordinates. It should be allocated before calling this function.
pointBufferSizeSize of point buffer in terms of uint32_t
contourHandlePointer to assistant and intermediate data. It should be allocated by fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
FASTCV_API void fcvFindContoursTreeu8 ( uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  maxNumContours,
uint32_t *__restrict  numContours,
uint32_t *__restrict  holeFlag,
uint32_t *__restrict  numContourPoints,
uint32_t **__restrict  contourStartPoints,
uint32_t *__restrict  pointBuffer,
uint32_t  pointBufferSize,
int32_t  hierarchy[][4],
void *  contourHandle 
)

Finds contours in a binary image and reconstructs a full hierarchy of nested contours.

Parameters:
srcGrayscale image with one byte per pixel. Non-zero pixels are treated as 1's. Zero pixels remain 0's, so the image is treated as binary.
srcWidthImage width
srcHeightImage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2).
numContoursNumber of actually found contours
maxNumContoursMaximum number of contours can be found (<= 126)
holeFlagHole flag for each found contour to indicate whether it is a hole or not
numContourPointsNumber of points in each found contour
contourStartPointsPointers to the start point of each found contour
pointBufferPointer to point buffer for contour points' coordinates. It should be allocated before calling this function.
pointBufferSizeSize of point buffer in terms of uint32_t
hierarchyInformation about the image topology. It has numContours elements. For each contour i, the elements hierarchy[i][0], hiearchy[i][1], hiearchy[i][2], and hiearchy[i][3] are set to 0-based indices of the next and previous contours at the same hierarchical level, the first child contour and the parent contour, respectively. If for a contour i there are no next, previous, parent, or nested contours, the corresponding elements of hierarchy[i] will be negative.
contourHandlePointer to assistant and intermediate data. It should be allocated by fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
FASTCV_API fcvStatus fcvFindMultipleMaximau8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
const float32_t *__restrict  pos,
const float32_t *__restrict  normal,
uint32_t  maxDistance,
uint32_t  maxNumMaxima,
int32_t  minGradient,
float32_t  maxAngleDiff,
float32_t *__restrict  maxima,
uint32_t *__restrict  numMaxima 
)

Find multiple maxima along the normal direction of the line.

Parameters:
src8-bit input image
srcWidthInput image width
srcHeightInput image height
srcStrideInput image stride
pos2D position to start searching maximas in the input image
normalNormalized line normal at pos
maxDistanceSearch distance along the normal direction; [-normal*maxDistance, normal*maxDistance]
maxNumMaximaMaximum maxima to find, e.g., 5
minGradientMinimum 1D gradient of the pixels on the search line (normal direction)
maxAngleDiffCosine value threshold to filter the pixels that have large angle difference
maximaList of found maxima 1D positions; Actuall 2D position of maxima = (normal * 1D position) + pos
numMaximaNumber of found maxima
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API fcvStatus fcvGLBPu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
uint32_t  radius,
uint32_t  neighbors,
uint8_t *__restrict  dst,
uint32_t  dstStride 
)

Computes the Generalized Local Binary Pattern Features for a single channel image.

The function computes the Circular Local Binary Pattern (LBP) Code of each pixel of an input image "src" A number of neighboring pixels "neighbors" are sampled from a circle of radius "radius" around each pixel to compute the LBP code. In this implementation, it is assumed that the number of neighbors vary between 1 & 8. It is also assumed that the dimensions of the output image "dst" is computed as follows from the size of the input image �src": dstWidth = srcWidth - 2*radius, and dstHeight = srcHeight - 2*radius.

Parameters:
srcInput unsigned 8-bit integer image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthWidth of the source image.
srcHeightHeight of the source image.
srcStrideStride of the Image in bytes.
NOTE: if 0, srcStride is set as srcWidth.
WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
radiusThe radius of the circle centered around each pixel. The value of radius specifies the size of the region around each pixel from which the neighbors are sampled.
neighborsThe number of neighbors sampled from the circle around each pixel.
NOTE : MUST be > 0 and less than or equal to 8.
dstOutput unsigned 8-bit integer image. Size of buffer is dstStride*srcHeight bytes. The dimensions of the image are dstWidth = srcWidth - 2*radius, and dstHeight = srcHeight - 2*radius.
dstStrideStride of the output image in bytes.
NOTE: dstWidth = srcWidth - 2*radius, dstHeight = srcHeight - 2*radius.
WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
FASTCV_API fcvStatus fcvGoodFeatureToTracku8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t  distanceMin,
uint32_t  border,
float32_t  barrier,
uint32_t *__restrict  xy,
uint32_t  maxnumcorners,
uint32_t *__restrict  numcorners 
)

Extract strong corners from image to track.

Extract strong corners from image to track based on the according paper "Good Feature to Track" by J.Shi and C.Tomasi

Parameters:
srcInput uint8_t image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned.
srcWidthInput image width.
srcHeightInput image height.
srcStrideInput image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
distanceMinMinimum Euclidean distance between the found corners
borderNumber for pixels to ignore from top,bottom
barrierQuality threshold
xyPointer to the output array containing the interleaved x,y position of the detected features

Maximum number of features to detect

Pointer to integer of actual detected features number

FASTCV_API void fcvHoughCircleu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
fcvCircle *__restrict  circles,
uint32_t *__restrict  numCircle,
uint32_t  maxCircle,
uint32_t  minDist,
uint32_t  cannyThreshold,
uint32_t  accThreshold,
uint32_t  minRadius,
uint32_t  maxRadius,
void *__restrict  data 
)

Finds circles in a grayscale image using Hough transform.

This function detect circles in a grayscale image. The number is up to maxCircle. The radius of circle varies from 0 to max(srcWidth, srcHeight).

Parameters:
src8-bit, single-channel, binary source image. Size of buffer is srcStride*srcHeight bytes.
WARNING: should be 128-bit aligned. must be a 1-channel image.
srcWidthWidth of input image, the number of pixels in a row.
srcHeightHeight of input image.
srcStrideStride of input image(in bytes) is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
circlesPointer to fcvCircle. fcvCircle is a struct including x, y position and radius
numCirclePointer to numCircle. numCircle is an algorithm result indicating the number of circle detected by this algorithm.
maxCircleMaximum number of circles.
minDistMinimum distance between the centers of the detected circles
cannyThresholdThe higher threshold of the two passed to the Canny() edge detector (the lower one is twice smaller). default is 100.
accThresholdThe accumulator threshold for the circle centers at the detection stage. The smaller it is, the more false circles may be detected. Circles, corresponding to the larger accumulator values, will be returned first. default is 100.
minRadiusMinimum circle radius. default is 0.
maxRadiusMaximum circle radius. default is 0.
dataPointer to a buffer required by this algorithm. The recommended size is 16 times of input image (16*srcStride*srcHeigth in bytes).
WARNING: should be 128-bit aligned.
Returns:
void
FASTCV_API void fcvHoughLineu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
float32_t  threshold,
uint32_t  maxLines,
uint32_t *__restrict  pNumLines,
fcvLine *__restrict  pLines 
)

Performs Hough Line detection.

This function detects lines in a grayscale image. The maximum number of lines detected is defined by the maxLines parameter.

Parameters:
src8bit, single-channel, binary source image. Size of buffer is srcStride * srcHeight bytes.
srcWidthWidth of the input image, the number of pixels in a row. should be a multiple of 8.
srcHeightInput image height in pixels.
srcStrideStride of input image in bytes 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 will default to srcWidth.
NOTE: should be a multiple of 8.
thresholdControls the minimal length of a detected line. Value must be between 0.0 and 1.0 Values close to 1.0 reduces the number of detected lines. Values close to 0.0 detect more lines, but may be noisy. Recommended value is 0.25.
maxLinesMaximum number of lines to be detected.
pNumLinesNumber of lines detected. The memory for this array must be allocated by the user of the function.
pLinesResulting lines detected. The memory for this array must be allocated by the user of the function.
Returns:
void
FASTCV_API void fcvImageDetectEdgePixelsu8 ( const int16_t *__restrict  gxgy,
const uint32_t *__restrict  mag,
uint32_t  gradStride,
uint32_t  topLeftX,
uint32_t  topLeftY,
uint32_t  width,
uint32_t  height,
uint32_t  gridSize,
float32_t  threshold,
uint32_t  nEdgePixelsMax,
uint32_t *__restrict  nEdgePixels,
uint32_t *__restrict  coordEdgePixels 
)

Extracts edge locations from the image. This function tests for edges a grid of pixels within a bounding box.

Parameters:
gxgyPointer to gradient direction image array containing the interleaved x,y components of the direction vector.
magPointer to gradient magnitude image array stored as a 4-byte unsigned integer per pixel.
gradStridegradStride is the number of pixels between column 0 of row 1 and column 0 of row 2 in data memory for gxgy and mag. should be multiple of 8
topLeftXThe x coordinate of the top-left corner of the bounding box.
topLeftYThe y coordinate of the top-left corner of the bounding box.
widthThe width of the bounding box.
heightThe height of the bounding box.
gridSizeThe spacing between pixels that are tested for edges.
thresholdThe threshold is used for early filtering edge candidate pixels based on gradient magnitude.
nEdgePixelsMaxMaximum number of edge pixels. The function exits when the maximum number of edges is exceeded.
nEdgePixelsPointer to an integer storing the number of edge pixels detected.
coordEdgePixelsPointer to the output array containing the interleaved x,y position of the detected edges.
FASTCV_API fcvStatus fcvImageDetectLineSegmentsu8 ( const fcvPyramidLevel_v2 *__restrict  srcPyr,
uint32_t  pyrLevel,
uint32_t  doBlurImage,
float32_t  maxLineAngle,
uint32_t  minLineLength,
uint32_t  minMagnitude,
uint32_t  maxLineNum,
uint32_t *__restrict  indexBuffer,
fcvLineSegment *__restrict  lineSegments,
uint32_t *__restrict  numLineSegments 
)

Extract the straight line segments from the image.

Parameters:
srcPyrPointer to an array of fcvPyramidLevel_v2. Only 2 levels at max will be used to extract the straight line segments.
pyrLevelImage pyramid level, if it is set to 1, then do not use multi-scale approach. pyrLevel should be greater than or equal to 1.
doBlurImageDo image-blurring inside the function (if the image is not blurred)
maxLineAngleCosine threshold to stop following (extending) pixels, e.g., cos(22.5 deg) maxLineAngle should be between [0.5 - 1.0]
minLineLengthMinimum line segment length in pixels
minMagnitudeMinimum pixel gradient magnitude, e.g., 10
maxLineNumMaximum line segments from the image
indexBufferOptionally store the index(:= y * image_width + x) of the pixels consisting of the line segments into pointsList in fcvLineSegment structure. e.g., One can provide the buffer[maxLineNum*(image width + height)] Pass NULL if it is not necessary.
lineSegmentsList of the detected line segments
numLineSegmentsNumber of found line segments
Returns:
FASTCV_SUCCESS upon success. Other status codes upon failure.
FASTCV_API void fcvImageMomentsf32 ( const float32_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
fcvMoments moments,
uint8_t  binary 
)

Computes weighted average (moment) of the image pixels' intensities.

This function computes image moment, i.e., a certain particular weighted average (moment) of the image pixels' intensities, or a function of such moments, usually chosen to have some attractive property or interpretation. Image moments are useful to describe objects after segmentation.

Parameters:
srcPointer to the original Input of data type float32_t. Size of buffer is srcStride*srcHeight bytes.
NOTE: should be 128-bit aligned.
srcWidthThe width of the input source image.
srcHeightThe height of the input source image.
srcStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
NOTE: should be a multiple of 8.
momentsPointer to the a struct of image moments which is a certain particular weighted average (moment) of the image pixels' intensities, it includes 18 elements.
binaryif 1, binary image (0x00-black, oxff-white); if 0, grayscale image
FASTCV_API void fcvImageMomentss32 ( const int32_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
fcvMoments moments,
uint8_t  binary 
)

Computes weighted average (moment) of the image pixels' intensities.

This function computes image moment, i.e., a certain particular weighted average (moment) of the image pixels' intensities, or a function of such moments, usually chosen to have some attractive property or interpretation. Image moments are useful to describe objects after segmentation.

Parameters:
srcPointer to the original input of data type int32_t. Size of buffer is srcStride*srcHeight bytes.
NOTE: should be 128-bit aligned.
srcWidthThe width of the input source image.
srcHeightThe height of the input source image.
srcStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
NOTE: should be a multiple of 8.
momentsPointer to the a struct of image moments which is a certain particular weighted average (moment) of the image pixels' intensities, it includes 18 elements.
binaryif 1, binary image (0x00-black, oxff-white); if 0, grayscale image
FASTCV_API void fcvImageMomentsu8 ( const uint8_t *__restrict  src,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcStride,
fcvMoments moments,
uint8_t  binary 
)

Computes weighted average (moment) of the image pixels' intensities.

This function computes image moment, i.e., a certain particular weighted average (moment) of the image pixels' intensities, or a function of such moments, usually chosen to have some attractive property or interpretation. Image moments are useful to describe objects after segmentation.

Parameters:
srcPointer to the original Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
NOTE: should be 128-bit aligned.
srcWidthThe width of the input source image.
srcHeightThe height of the input source image.
srcStrideStride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
NOTE: should be a multiple of 8.
momentsPointer to the a struct of image moments which is a certain particular weighted average (moment) of the image pixels' intensities, it includes 18 elements.
binaryif 1, binary image (0x00-black, oxff-white); if 0, grayscale image
FASTCV_API int fcvKDTreeCreate36s8f32 ( const int8_t *__restrict  vectors,
const float32_t *__restrict  invLengths,
int  numVectors,
fcvKDTreeDatas8f32 **  kdtrees 
)

create KDTrees for dataset of 36D vectors

KDTree is very efficient search structure for multidimensional data. Usage: assume we have 36D of type int8_t data e.g. target image feature descriptors in array named vectors

int8_t* descriptors;

the number of descriptors is numVectors

int numDescriptors;

the inverse length of each descriptor in array invLengths

float32_t* invLenghts;

pointer to KDTree structure

fcvKDTreeDatas8f32* kdTree = 0;

kdTree is created as

int err = fcvKDTreeCreate36s8f32( descriptors, invLengths, numDescriptors, kdTree );

Parameters:
vectorspointer to dataset being array of 36D vectors
invLengthsarray of inverse lengths for each vector in the dataset
numVectorsnumber of 36D vectors in the dataset
kdtreesaddress for pointer to the newly created KDTrees
Returns:
0 - success EINVAL - invalid parameter ENOMEM - not enough memory -1 - other error

release KDTrees data structures

Once we are done with all searches we should release kdTree resources

Parameters:
kdtreesKDTrees to be destroyed
Returns:
0 - success EINVAL - invalid parameter -1 - other error
FASTCV_API int fcvKDTreeQuery36s8f32 ( fcvKDTreeDatas8f32 kdtrees,
const int8_t *__restrict  query,
float32_t  queryInvLen,
int  maxNNs,
float32_t  maxDist,
int  maxChecks,
const uint8_t *__restrict  mask,
int32_t *  numNNsFound,
int32_t *__restrict  NNInds,
float32_t *__restrict  NNDists 
)

find nearest neighbors (NN) for query

Assuming KD tree creation is successful we may start using our kdTree for nearest neighbors (NN) for descriptors of camera features. Let our camera descriptors be in array camDescriptors and their number in numCamDescriptors

int8_t* camDescriptors; int numCamDescriptors;

The inverse lengths of descriptors is in

float* camDescriptorsInvLengths;

Assume we want to find 8 NNs for each camera descriptor. We declare variables for results of NN searches

#define NUM_NN 8 // number of NN required #define MAX_CHECKS 32 // max number of checks in kdtree

int32_t numFound = 0; // for numer of NNs found int32_t foundInds[ NUM_NN ]; // for indices to target descriptors float32_t foundDists[ NUM_NN ]; // for distances to target descriptors float32_t maxDist = 0.1f; // max distance to query allowed

the search for NNs for i-th query would be like this

err = fcvKDTreeQuery36s8f32( kdTree, camDescriptors + i * 36, camDescriptorsInvLengths[ i ], maxDist, MAX_CHECKS, 0, &numFound, foundInds, foundDists );

where maxDists is an upper bound on distance of NN from the query and MAX_CHECKS is max number of comparisons of query to target descriptors. The higher MAX_CHECKS the better NNs we get at the cost of longer search. Assuming everything went fine will return us search results. numFound will contain the number of target descriptors found whose distance to query is less than maxDist. foundInds will contain indices to target descriptors being NNs and foundDists their distances to query.

Parameters:
kdtreesKDTrees
queryquery vector
queryInvLeninverse length of query vector
maxNNsmax number of NNs to be found
maxDistmax distance between NN and query
maxChecksmax number of leafs to check
maskarray of flags for all vectors in the dataset; may be NULL; if not NULL then its legth must be equal to number of dataset vectors and i-th mask corresponds to i-th vector; values: 0x00 - corresponding vector must not be considered NN regardless of its distance to query 0xFF - corresponding vector may be candidate for NN other - not supported
numNNsFoundfor number of NNs found
NNIndsarray for indices of found NNs; must have maxNNs length
NNDistsarray for NN distances to query; must have maxNNs length
Returns:
0 - success EINVAL - invalid parameter -1 - other error
FASTCV_API uint32_t fcvKMeansTreeSearch36x10s8 ( const int8_t *__restrict  nodeChildrenCenter,
const uint32_t *__restrict  nodeChildrenInvLenQ32,
const uint32_t *__restrict  nodeChildrenIndex,
const uint8_t *__restrict  nodeNumChildren,
uint32_t  numNodes,
const int8_t *__restrict  key 
)

Search K-Means tree, where each node connects to up to 10 children, and the center (mean) is a 36-tuple vector of 8-bit signed value.

Parameters:
nodeChildrenCenterA pointer to uint8_t [numNodes][10][36], which stores the center vectors of node children. The outer-most dimension represents the nodes in the tree. The middle dimension represents the children of each node. The inner-most dimension represents the tuples of the center vector.
WARNING: must be 64-bit aligned.
nodeChildrenInvLenQ32A pointer to uint32_t [numNodes][10], which stores the inverse lengths of the center vectors. The inverse lengths are in Q32 format. The outer-most dimension represents the nodes in the tree. The inner-most dimension represents the children of each node.
WARNING: must be 64-bit aligned.
nodeChildrenIndexA pointer to uint32_t [numNodes][10], which stores the indices of the children nodes. If the MSB is 0, the index points to a node within the tree. If the MSB is 1, the index (with MSB removed) points to a leaf node, which is returned by this function as the search result. See nodeChildrenInvLenQ32 for the definition of each dimension.
WARNING: must be 64-bit aligned.
nodeNumChildrenA pointer to uint8_t [numNodes], which stores the number of children in each node.
numNodesNumber of nodes in the K-Means tree.
keyA pointer to int8_t [36], which stores the key to be searched.
Returns:
Index of the leaf node.
FASTCV_API void fcvLinearSearch8x36s8 ( const uint32_t *__restrict  dbLUT,
uint32_t  numDBLUT,
const int8_t *__restrict  descDB,
const uint32_t *__restrict  descDBInvLenQ38,
const uint16_t *__restrict  descDBTargetId,
uint32_t  numDescDB,
const int8_t *__restrict  srcDesc,
const uint32_t *__restrict  srcDescInvLenQ38,
const uint32_t *__restrict  srcDescIdx,
uint32_t  numSrcDesc,
const uint16_t *__restrict  targetsToIgnore,
uint32_t  numTargetsToIgnore,
uint32_t  maxDistanceQ31,
uint32_t *__restrict  correspondenceDBIdx,
uint32_t *__restrict  correspondenceSrcDescIdx,
uint32_t *__restrict  correspondenceDistanceQ31,
uint32_t  maxNumCorrespondences,
uint32_t *__restrict  numCorrespondences 
)

Perform linear search of descriptor in a database.

Parameters:
dbLUTA pointer to uint32_t [numDBLUT][2], which stores the starting index of descDB and the number of descriptors
WARNING: must be 64-bit aligned.
numDBLUTThe size of dbLUT
descDBA pointer to int8_t [numDescDB][36], which stores descriptors
WARNING: must be 64-bit aligned.
descDBInvLenQ38A pointer to uint32_t [numDescDB], which stores the inverse length of descDB. The value is in Q38 format.
descDBTargetIdA pointer to uint16_t [numDescDB], which stores the target id.
numDescDBNumber of descriptor in the database.
srcDescA pointer to int8_t [numSrcDesc][36], which stores descriptors.
WARNING: must be 64-bit aligned.
srcDescInvLenQ38A pointer to uint32_t [numSrcDec], which stores the inverse length of srcDesc. The value is in Q38 format.
srcDescIdxA pointer to the dbLUT data
numSrcDescNumber of source descriptor
targetsToIgnoreA list of target IDs to be ignored
numTargetsToIgnoreNumber of targets to be ignored
maxDistanceQ31Maximum distance for correspondences. In Q31 format.
correspondenceDBIdxA pointer to uint32_t [maxNumCorrespondences], which will be used by this function to output indices of featuresDB as a part of correspondences.
correspondenceSrcDescIdxA pointer to uint32_t [maxNumCorrespondences], which will be used by this function to output indices of descriptors as a part of correspondences.
correspondenceDistanceQ31A pointer to uint32_t [maxNumCorrespondences], which will be used by this function to output the distances as a part of correspondences. In Q31 format.
maxNumCorrespondencesMaximum number of correspondences allowed
numCorrespondencesNumber of correspondences returned by this function
FASTCV_API int fcvLinearSearchPrepare8x36s8 ( uint32_t *__restrict  dbLUT,
uint32_t  numDBLUT,
int8_t *__restrict  descDB,
uint32_t *__restrict  descDBInvLenQ38,
uint16_t *__restrict  descDBTargetId,
uint32_t *__restrict  descDBOldIdx,
uint32_t  numDescDB 
)

Sorts in-place the pairs of <descDB, descDBInvLenQ38 > according to descDBTargetId.

Parameters:
dbLUTA pointer to uint32_t [numDBLUT][2], which stores the starting index of descDB and the number of descriptors
WARNING: must be 64-bit aligned.
numDBLUTThe size of dbLUT
descDBA pointer to int8_t [numDescDB][36], which stores descriptors
WARNING: must be 64-bit aligned.
descDBInvLenQ38A pointer to uint32_t [numDescDB], which stores the inverse length of descDB. The value is in Q38 format.
descDBTargetIdA pointer to uint16_t [numDescDB], which stores the target id.
descDBOldIdxA pointer to uint32_t [numDescDB], which stores the old index of the desc before sorting
numDescDBNumber of descriptor in the database.
FASTCV_API unsigned int fcvLocalHarrisMaxu8 ( const uint8_t *__restrict  src,
unsigned int  srcWidth,
unsigned int  srcHeight,
unsigned int  srcStride,
unsigned int  posX,
unsigned int  posY,
unsigned int *  maxX,
unsigned int *  maxY,
int *  maxScore 
)

Local Harris Max applies the Harris Corner algorithm on an 11x11 patch within an image to determine if a corner is present.

Parameters:
srcPointer to grayscale image with one byte per pixel
WARNING: should be 128-bit aligned.
srcWidthInput image width
WARNING: should be a multiple of 8.
srcHeightImage height
srcStrideStride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). If srcStride == 0, then will use srcWidth.
posXCenter X coordinate of the search window
posYCenter Y coordinate of the search window
maxXpointer to the X coordinate identified as a corner
maxYpointer to the Y coordinate identified as a corner
maxScorepointer to the Harris score associated with the corner
Returns:
0 if no corner is found (maxX, maxY, and maxScore are invalid) or if posX and/or posY position the patch outside of the range of the source image. 1 if a corner is found (maxX, maxY, and maxScore are valid)
 All Data Structures Files Functions Variables Enumerations Enumerator Defines