Functions
VXLIB_thresholdBinary_i8u_o8u

Functions

VXLIB_STATUS VXLIB_thresholdBinary_i8u_o8u (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, uint8_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr, uint8_t threshold, uint8_t trueValue, uint8_t falseValue)
 
VXLIB_STATUS VXLIB_thresholdBinary_i8u_o8u_checkParams (const uint8_t src[], const VXLIB_bufParams2D_t *src_addr, const uint8_t dst[], const VXLIB_bufParams2D_t *dst_addr)
 

Detailed Description

Function Documentation

◆ VXLIB_thresholdBinary_i8u_o8u()

VXLIB_STATUS VXLIB_thresholdBinary_i8u_o8u ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
uint8_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr,
uint8_t  threshold,
uint8_t  trueValue,
uint8_t  falseValue 
)
Description:
Thresholds an unsigned 8-bit input image and produces an unsigned 8-bit output Boolean image.
Method:
The thresholding is computed using the following equation:
 dst(x,y) = trueValue    if src(x,y) > threshold
 dst(x,y) = falseValue   otherwise
Parameters
[in]src[]Pointer to array containing first input image (UQ8.0)
[in]src_addr[]Pointer to structure containing dimensional information of src
[out]dst[]Pointer to array containing output image (UQ8.0)
[in]dst_addr[]Pointer to structure containing dimensional information of dst
[in]thresholdParameter indicating threshold value
[in]trueValueParameter indicating true value for the output, if the input is > threshold
[in]falseValueParameter indicating false value for the output, if the input is <= threshold
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
Performance Considerations:
  • For best performance, the following parameter settings are recommended:
    • Set widths equal to strides
    • Align all pointers to 8 byte boundaries
    • Set all stride values to a multiple of 16
    • Set all width values to a multiple of 16

◆ VXLIB_thresholdBinary_i8u_o8u_checkParams()

VXLIB_STATUS VXLIB_thresholdBinary_i8u_o8u_checkParams ( const uint8_t  src[],
const VXLIB_bufParams2D_t *  src_addr,
const uint8_t  dst[],
const VXLIB_bufParams2D_t *  dst_addr 
)
Description:
Checks the parameters for programming errors for the VXLIB_thresholdBinary_i8u_o8u function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • All images shall have the same x and y dimensions
  • The strides of each image shall be equal to or greater than the x dimension
Parameters
[in]src[]Pointer to array containing first input image (UQ8.0)
[in]src_addr[]Pointer to structure containing dimensional information of src
[out]dst[]Pointer to array containing output image (UQ8.0)
[in]dst_addr[]Pointer to structure containing dimensional information of dst

Copyright 2022, Texas Instruments Incorporated