Functions
VXLIB_equalizeHist_i8u_o8u

Functions

VXLIB_STATUS VXLIB_equalizeHist_i8u_o8u (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, uint8_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr, uint32_t scratch[restrict])
 
VXLIB_STATUS VXLIB_equalizeHist_i8u_o8u_checkParams (const uint8_t src[], const VXLIB_bufParams2D_t *src_addr, const uint8_t dst[], const VXLIB_bufParams2D_t *dst_addr, const uint32_t scratch[restrict])
 

Detailed Description

Function Documentation

◆ VXLIB_equalizeHist_i8u_o8u()

VXLIB_STATUS VXLIB_equalizeHist_i8u_o8u ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
uint8_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr,
uint32_t  scratch[restrict] 
)
Description:
Equalizes the histogram of a grayscale image.
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,out]scratch[]Pointer to array containing the intermediate distribution data (UQ32.0)
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
  • scratch buffer assumed to have 1024 entries
  • scratch buffer pointer assumed to be 8-byte aligned.
  • PARAMETER INITIALIZATION:
    • All scratch entries should be externally initialized to zero before calling the function each time.
Performance Considerations:
  • For best performance, the following parameter settings are recommended:
    • Set widths equal to strides
    • Align src pointer to 4 byte boundaries
    • Set all stride values to a multiple of 8
    • Set all width values to a multiple of 8
    • If a user wants to divide processing of the image into smaller blocks, then user should instead call 3 different functions instead of this function:
      1. VXLIB_histogramSimple_i8u_o32u (for every block in the image)
      2. VXLIB_histogramCdfLut_i32u_o8u (once on the final output histogram of VXLIB_histogramSimple_i8u_o32u)
      3. VXLIB_tableLookup_i8u_o8u (for every block in the image)

◆ VXLIB_equalizeHist_i8u_o8u_checkParams()

VXLIB_STATUS VXLIB_equalizeHist_i8u_o8u_checkParams ( const uint8_t  src[],
const VXLIB_bufParams2D_t *  src_addr,
const uint8_t  dst[],
const VXLIB_bufParams2D_t *  dst_addr,
const uint32_t  scratch[restrict] 
)
Description:
Checks the parameters for programming errors for the VXLIB_equalizeHist_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 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,out]scratch[]Pointer to array containing the intermediate distribution data (UQ32.0)

Copyright 2022, Texas Instruments Incorporated