Functions
VXLIB_harrisCornersNMS_i32f

Functions

VXLIB_STATUS VXLIB_harrisCornersNMS_i32f (const uint32_t corners_in[restrict], const VXLIB_F32 strengths_in[restrict], uint32_t num_corners_in, uint32_t corners_out[restrict], VXLIB_F32 strengths_out[restrict], uint32_t corners_out_capacity, uint32_t *num_corners_out, int8_t scratch[restrict], uint32_t scratch_size, VXLIB_F32 min_distance, uint8_t *iterations)
 
VXLIB_STATUS VXLIB_harrisCornersNMS_i32f_checkParams (const uint32_t corners_in[], const VXLIB_F32 strengths_in[], uint32_t num_corners_in, const uint32_t corners_out[], const VXLIB_F32 strengths_out[], uint32_t corners_out_capacity, const uint32_t *num_corners_out, const int8_t scratch[], uint32_t scratch_size, VXLIB_F32 min_distance, const uint8_t *iterations)
 

Detailed Description

Function Documentation

◆ VXLIB_harrisCornersNMS_i32f()

VXLIB_STATUS VXLIB_harrisCornersNMS_i32f ( const uint32_t  corners_in[restrict],
const VXLIB_F32  strengths_in[restrict],
uint32_t  num_corners_in,
uint32_t  corners_out[restrict],
VXLIB_F32  strengths_out[restrict],
uint32_t  corners_out_capacity,
uint32_t *  num_corners_out,
int8_t  scratch[restrict],
uint32_t  scratch_size,
VXLIB_F32  min_distance,
uint8_t *  iterations 
)
Description:
Performs the Euclidian distance based non-max suppression for harris corner detector.
Method:
If all input features are sorted from largest to smallest, then each feature is added to the output list if there is not already a feature in this output list which is within the Euclidean distance given.
Parameters
[in]corners_in[]Pointer to array containing input corner keypoint list (UQ32.0)
[in]strengths_in[]Pointer to array containing input strength list, coresponding to corners_in[] (F32)
[in]num_corners_inTotal number of corners in the corners_in list.
[out]corners_out[]Pointer to array containing output corner keypoint list (UQ32.0)
[out]strengths_out[]Pointer to array containing output strength list, coresponding to corners_out[] (F32)
[in]corners_out_capacityNumber of keypoints allocated in the corners and strengths output buffers.
[out]*num_corners_outTotal number of corners returned in the corners_out list.
[in]scratch[]Pointer to scratch buffer (UQ8.0)
[in]scratch_sizeSize of the scratch buffer (for parameter checking)
[in]min_distanceRadial Euclidean distance for non-maximum suppression
[in,out]*iterations[Input] Maximum number of iterations, [Output] Actual number of iterations
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
  • The corners_in[] array is ordered in raster-scan across and image
  • Each 32-bit word in corners_in[] array is composed of 2 16-bit half words representing x and y coordinates, such that corners_in[i] = (y(i) << 16) | x(i);
  • The strengths_in[] array corresponds to the corners_in list
  • The corners_out[] array is ordered in raster-scan across and image
  • Each 32-bit word in corners_out[] array is composed of 2 16-bit half words representing x and y coordinates, such that corners_out[i] = (y(i) << 16) | x(i);
  • The strengths_out[] array corresponds to the corners_out list
  • The scratch buffer should be 2 byte aligned.
  • The scratch buffer should be at least 2*min( ((min_distance+1)*2)^2 / 9, num_corners_in) + num_corners_in bytes
  • The iterations parameter may be set to NULL in most cases. The algorithm may take a few iterations to converge on the answer, but it typically converges in less than 5 iterations.
    • The user can pass a pointer to a location with a non-zero number to set the the maximum number of iterations, but if this number is too small, too many features will be suppressed. In this case, the algorithm will return the actual number of iterations it took.
    • If the user passes a pointer to a location with a zero, then the algorithm will take as many iterations as it needs and return the actual number of iterations it took.

◆ VXLIB_harrisCornersNMS_i32f_checkParams()

VXLIB_STATUS VXLIB_harrisCornersNMS_i32f_checkParams ( const uint32_t  corners_in[],
const VXLIB_F32  strengths_in[],
uint32_t  num_corners_in,
const uint32_t  corners_out[],
const VXLIB_F32  strengths_out[],
uint32_t  corners_out_capacity,
const uint32_t *  num_corners_out,
const int8_t  scratch[],
uint32_t  scratch_size,
VXLIB_F32  min_distance,
const uint8_t *  iterations 
)
Description:
Checks the parameters for programming errors for the VXLIB_harrisCornersNMS_i32f function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • The scratch memory should be at least 2*min( ((min_distance+1)*2)^2 / 9, num_corners_in) + num_corners_in bytes
Parameters
[in]corners_in[]Pointer to array containing input corner keypoint list (UQ32.0)
[in]strengths_in[]Pointer to array containing input strength list, coresponding to corners_in[] (F32)
[in]num_corners_inTotal number of corners in the corners_in list.
[out]corners_out[]Pointer to array containing output corner keypoint list (UQ32.0)
[out]strengths_out[]Pointer to array containing output strength list, coresponding to corners_out[] (F32)
[in]corners_out_capacityNumber of keypoints allocated in the corners and strengths output buffers.
[out]*num_corners_outTotal number of corners returned in the corners_out list.
[in]scratch[]Pointer to scratch buffer (UQ8.0)
[in]scratch_sizeSize of the scratch buffer (for parameter checking)
[in]min_distanceRadial Euclidean distance for non-maximum suppression
[in,out]*iterations[Input] Maximum number of iterations, [Output] Actual number of iterations

Copyright 2023, Texas Instruments Incorporated