Functions
VXLIB_trackFeaturesLK_i8u

Functions

VXLIB_STATUS VXLIB_trackFeaturesLK_i8u (const uint8_t old_image[restrict], const VXLIB_bufParams2D_t *old_image_addr, const uint8_t new_image[restrict], const VXLIB_bufParams2D_t *new_image_addr, const int16_t old_gradX[restrict], const VXLIB_bufParams2D_t *old_gradX_addr, const int16_t old_gradY[restrict], const VXLIB_bufParams2D_t *old_gradY_addr, __float2_t old_points[restrict], __float2_t new_points[restrict], uint8_t tracking_status[restrict], uint32_t num_points, uint32_t max_iters, VXLIB_F32 epsilon, VXLIB_F32 scale, uint8_t window_size, uint8_t level, uint8_t termination, uint8_t scratch[restrict], uint32_t scratch_size)
 
VXLIB_STATUS VXLIB_trackFeaturesLK_i8u_checkParams (const uint8_t old_image[restrict], const VXLIB_bufParams2D_t *old_image_addr, const uint8_t new_image[restrict], const VXLIB_bufParams2D_t *new_image_addr, const int16_t old_gradX[restrict], const VXLIB_bufParams2D_t *old_gradX_addr, const int16_t old_gradY[restrict], const VXLIB_bufParams2D_t *old_gradY_addr, const __float2_t old_points[restrict], const __float2_t new_points[restrict], const uint8_t tracking_status[restrict], uint32_t num_points, uint32_t max_iters, VXLIB_F32 epsilon, VXLIB_F32 scale, uint8_t window_size, uint8_t level, uint8_t termination, const uint8_t scratch[restrict], uint32_t scratch_size)
 

Detailed Description

Function Documentation

◆ VXLIB_trackFeaturesLK_i8u()

VXLIB_STATUS VXLIB_trackFeaturesLK_i8u ( const uint8_t  old_image[restrict],
const VXLIB_bufParams2D_t *  old_image_addr,
const uint8_t  new_image[restrict],
const VXLIB_bufParams2D_t *  new_image_addr,
const int16_t  old_gradX[restrict],
const VXLIB_bufParams2D_t *  old_gradX_addr,
const int16_t  old_gradY[restrict],
const VXLIB_bufParams2D_t *  old_gradY_addr,
__float2_t  old_points[restrict],
__float2_t  new_points[restrict],
uint8_t  tracking_status[restrict],
uint32_t  num_points,
uint32_t  max_iters,
VXLIB_F32  epsilon,
VXLIB_F32  scale,
uint8_t  window_size,
uint8_t  level,
uint8_t  termination,
uint8_t  scratch[restrict],
uint32_t  scratch_size 
)
Description:
Performs the Lucas Kanade tracking method of features between two images.
Method:
Parameters
[in]old_image[]Pointer to array containing old input image (UQ8.0)
[in]*old_image_addrPointer to structure containing dimensional information of old_image
[in]new_image[]Pointer to array containing new input image (UQ8.0)
[in]*new_image_addrPointer to structure containing dimensional information of new_image
[in]old_gradX[]Pointer to array containing old X gradient image (SQ15.0)
[in]*old_gradX_addrPointer to structure containing dimensional information of old_gradX
[in]old_gradY[]Pointer to array containing old Y gradient image (SQ15.0)
[in]*old_gradY_addrPointer to structure containing dimensional information of old_gradY
[in,out]old_points[]Pointer to array containing keypoint list from old_image (F32.0)
[in,out]new_points[]Pointer to array containing keypoint list for new_image (F32.0)
[in,out]tracking_status[]Status of each point in the list (0: not tracked; 1: tracked)
[in]num_pointsNumber of entries in each : old_points, new_points, and tracking_status arrays.
[in]max_itersMaximum number of iterations allowed before terminating the algorithm for each point.
[in]epsilonMaximum error allowed before terminating the algorithm for each point.
[in]scaleScale factor to apply to both the old_points and new_points list before tracking.
[in]window_sizeWindow size
[in]levelFlag to indicate if tracking_status[] should be updated or not (0: update; non-zero: no update)
[in]terminationTermination criteria: VXLIB_TERM_ITERATIONS, VXLIB_TERM_EPSILON, or VXLIB_TERM_BOTH
[in]scratch[]Scratch buffer. Should allocate window_size*window_size*6 + 2 bytes.
[in]scratch_sizeSize of the scratch buffer (for parameter checking)
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
  • The old_image and new_image should be the same size (although they may have different strides)
  • The old_gradX and old_gradY images should have the same size and strides.
  • Each 64-bit word in old_points[] and new_points[] arrays are composed of 2 32-bit float words representing x and y coordinates, such that old_points[i] = (y(i) << 32) | x(i);
  • The tracking_status[] array corresponds to the old_points and new_points lists
  • The scratch buffer should be at least window_size*window_size*6 + 2 bytes

◆ VXLIB_trackFeaturesLK_i8u_checkParams()

VXLIB_STATUS VXLIB_trackFeaturesLK_i8u_checkParams ( const uint8_t  old_image[restrict],
const VXLIB_bufParams2D_t *  old_image_addr,
const uint8_t  new_image[restrict],
const VXLIB_bufParams2D_t *  new_image_addr,
const int16_t  old_gradX[restrict],
const VXLIB_bufParams2D_t *  old_gradX_addr,
const int16_t  old_gradY[restrict],
const VXLIB_bufParams2D_t *  old_gradY_addr,
const __float2_t  old_points[restrict],
const __float2_t  new_points[restrict],
const uint8_t  tracking_status[restrict],
uint32_t  num_points,
uint32_t  max_iters,
VXLIB_F32  epsilon,
VXLIB_F32  scale,
uint8_t  window_size,
uint8_t  level,
uint8_t  termination,
const uint8_t  scratch[restrict],
uint32_t  scratch_size 
)
Description:
Checks the parameters for programming errors for the VXLIB_trackFeaturesLK_i8u function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • The old_image and new_image shall have the same dimentions
  • The old_gradX and old_gradY images shall have the same dimentions and strides
  • The termination value shall be in the valid range
  • The scratch memory shall be at least window_size*window_size*6 + 2 bytes
Parameters
[in]old_image[]Pointer to array containing old input image (UQ8.0)
[in]*old_image_addrPointer to structure containing dimensional information of old_image
[in]new_image[]Pointer to array containing new input image (UQ8.0)
[in]*new_image_addrPointer to structure containing dimensional information of new_image
[in]old_gradX[]Pointer to array containing old X gradient image (SQ15.0)
[in]*old_gradX_addrPointer to structure containing dimensional information of old_gradX
[in]old_gradY[]Pointer to array containing old Y gradient image (SQ15.0)
[in]*old_gradY_addrPointer to structure containing dimensional information of old_gradY
[in,out]old_points[]Pointer to array containing keypoint list from old_image (F32.0)
[in,out]new_points[]Pointer to array containing keypoint list for new_image (F32.0)
[in,out]tracking_status[]Status of each point in the list (0: not tracked; 1: tracked)
[in]num_pointsNumber of entries in each : old_points, new_points, and tracking_status arrays.
[in]max_itersMaximum number of iterations allowed before terminating the algorithm for each point.
[in]epsilonMaximum error allowed before terminating the algorithm for each point.
[in]scaleScale factor to apply to both the old_points and new_points list before tracking.
[in]window_sizeWindow size
[in]levelFlag to indicate if tracking_status[] should be updated or not (0: update; non-zero: no update)
[in]terminationTermination criteria: VXLIB_TERM_ITERATIONS, VXLIB_TERM_EPSILON, or VXLIB_TERM_BOTH
[in]scratch[]Scratch buffer. Should allocate window_size*window_size*6 + 2 bytes.
[in]scratch_sizeSize of the scratch buffer (for parameter checking)

Copyright 2023, Texas Instruments Incorporated