Functions
VXLIB_doubleThreshold_i16u_i8u

Functions

VXLIB_STATUS VXLIB_doubleThreshold_i16u_i8u (const uint16_t src_mag[restrict], const VXLIB_bufParams2D_t *src_mag_addr, uint8_t edgeMap[restrict], const VXLIB_bufParams2D_t *edgeMap_addr, uint16_t edgeMapLineOffset, uint32_t edgeList[restrict], uint32_t edgeListCapacity, uint32_t *numEdges, uint32_t startPosition, uint32_t loThreshold, uint32_t hiThreshold)
 
VXLIB_STATUS VXLIB_doubleThreshold_i16u_i8u_checkParams (const uint16_t src_mag[restrict], const VXLIB_bufParams2D_t *src_mag_addr, const uint8_t edgeMap[restrict], const VXLIB_bufParams2D_t *edgeMap_addr, uint16_t edgeMapLineOffset, const uint32_t edgeList[restrict], uint32_t edgeListCapacity, const uint32_t *numEdges, uint32_t startPosition, uint32_t loThreshold, uint32_t hiThreshold)
 

Detailed Description

Function Documentation

◆ VXLIB_doubleThreshold_i16u_i8u()

VXLIB_STATUS VXLIB_doubleThreshold_i16u_i8u ( const uint16_t  src_mag[restrict],
const VXLIB_bufParams2D_t *  src_mag_addr,
uint8_t  edgeMap[restrict],
const VXLIB_bufParams2D_t *  edgeMap_addr,
uint16_t  edgeMapLineOffset,
uint32_t  edgeList[restrict],
uint32_t  edgeListCapacity,
uint32_t *  numEdges,
uint32_t  startPosition,
uint32_t  loThreshold,
uint32_t  hiThreshold 
)
Description:
Applies a double theshold to the edgeMap based on the magnitude values.
Method:
For each pixel in the edgeMap:
  • If value was 127 and is above high threshold, then it is now 255
  • If value was 127 and is above low threshold, then it is still 127
  • If value was 127 and is below low threshold, then it is now 0
  • If value was 0, then it is still 0
Parameters
[in]src_mag[]Pointer to array containing magnitude input image (UQ16.0)
[in]src_mag_addr[]Pointer to structure containing dimensional information of src_mag
[in,out]edgeMap[]Pointer to array containing edge map image image (UQ8.0)
[in]edgeMap_addr[]Pointer to structure containing dimensional information of edgeMap
[in]edgeMapLineOffsetLine offset of the full edgeMap in external memory. This is normally equal to edgeMap_addr.stride_y, but if this is being called on smaller blocks which have been copied to a separate memory than the original image, then this value should be set to the original stride of the full image in memory so that the edgeList indices are computed relative to the full image for downstream processing.
[out]edgeList[]Pointer to array containing list of strong edges (UQ32.0)
[in]edgeListCapacityNumber of entries allocated in the edgeList array
[out]*numEdgesNumber of strong edges added to the edgeList array
[in]startPositionNumber corresponding to the starting index of a larger array This is normally zero, but if this is being called on blocks, then the index of the pixel associated with the starting pixel of this block can be put here, and downstream processing can index into the full image.
[in]loThresholdMagnitudes less than or equal to this value will be marked as non-edges
[in]hiThresholdMagnitudes greater than this value will be marked as edges
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
  • Max value of magnitude supported is 0xfffe.
Performance Considerations:
  • For best performance, the following parameter settings are recommended:
    • Set all width values to a multiple of 4

◆ VXLIB_doubleThreshold_i16u_i8u_checkParams()

VXLIB_STATUS VXLIB_doubleThreshold_i16u_i8u_checkParams ( const uint16_t  src_mag[restrict],
const VXLIB_bufParams2D_t *  src_mag_addr,
const uint8_t  edgeMap[restrict],
const VXLIB_bufParams2D_t *  edgeMap_addr,
uint16_t  edgeMapLineOffset,
const uint32_t  edgeList[restrict],
uint32_t  edgeListCapacity,
const uint32_t *  numEdges,
uint32_t  startPosition,
uint32_t  loThreshold,
uint32_t  hiThreshold 
)
Description:
Checks the parameters for programming errors for the VXLIB_doubleThreshold_i16u_i8u function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • edgeListCapacity shall be > 0
  • The strides of each image shall be equal to or greater than the x dimension
  • The hiThreshold must be > than loThreshold
Parameters
[in]src_mag[]Pointer to array containing magnitude input image (UQ16.0)
[in]src_mag_addr[]Pointer to structure containing dimensional information of src_mag
[in,out]edgeMap[]Pointer to array containing edge map image image (UQ8.0)
[in]edgeMap_addr[]Pointer to structure containing dimensional information of edgeMap
[in]edgeMapLineOffsetLine offset of the full edgeMap in external memory. This is normally equal to edgeMap_addr.stride_y, but if this is being called on smaller blocks which have been copied to a separate memory than the original image, then this value should be set to the original stride of the full image in memory so that the edgeList indices are computed relative to the full image for downstream processing.
[out]edgeList[]Pointer to array containing list of strong edges (UQ32.0)
[in]edgeListCapacityNumber of entries allocated in the edgeList array
[out]*numEdgesNumber of strong edges added to the edgeList array
[in]startPositionNumber corresponding to the starting index of a larger array This is normally zero, but if this is being called on blocks, then the index of the pixel associated with the starting pixel of this block can be put here, and downstream processing can index into the full image.
[in]loThresholdMagnitudes less than or equal to this value will be marked as non-edges
[in]hiThresholdMagnitudes greater than this value will be marked as edges

Copyright 2022, Texas Instruments Incorporated