Functions
VXLIB_gaussian_5x5_br_i8u_o8u

Functions

VXLIB_STATUS VXLIB_gaussian_5x5_br_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 shift, int16_t dstOffsetX, int16_t dstOffsetY)
 
VXLIB_STATUS VXLIB_gaussian_5x5_br_i8u_o8u_checkParams (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, const uint8_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr, uint8_t shift, int16_t dstOffsetX, int16_t dstOffsetY)
 

Detailed Description

Function Documentation

◆ VXLIB_gaussian_5x5_br_i8u_o8u()

VXLIB_STATUS VXLIB_gaussian_5x5_br_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  shift,
int16_t  dstOffsetX,
int16_t  dstOffsetY 
)
Description:
Computes a gaussian filter over the 5x5 neighborhood of each input pixel using "replicate border" mode.
Method:
This filter uses the following convolution matrix:
         | 1  4  6  4  1 |
         | 4 16 24 16  4 |
    K =  | 6 24 36 24  6 | >> shift (shift is typically 8 to divide the result by 256)
         | 4 16 24 16  4 |
         | 1  4  6  4  1 |
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]shiftRight shift value after the sum of products of the 25 neighborhood pixels Sum of all coefficients are equal to 256, so "shift" value used is typically 8 to divide by 256. This parameter is configurable in case the user wants to multiply or divide the result by a power of 2. For example, if the user wants to multiply the result of the gaussian by 4, then the shift value should be 8-2 = 6.
[in]dstOffsetXParameter indicating x offset of dst pointer relative to position of src pointer in the image (SQ15.0)
[in]dstOffsetYParameter indicating y offset of dst pointer relative to position of src pointer in the image (SQ15.0)
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
  • Output height should be <= input height
  • Output width should be <= input width
Performance Considerations:
  • For best performance, the following parameter settings are recommended:

◆ VXLIB_gaussian_5x5_br_i8u_o8u_checkParams()

VXLIB_STATUS VXLIB_gaussian_5x5_br_i8u_o8u_checkParams ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
const uint8_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr,
uint8_t  shift,
int16_t  dstOffsetX,
int16_t  dstOffsetY 
)
Description:
Checks the parameters for programming errors for the VXLIB_gaussian_5x5_br_i8u_o8u function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • Output height should be <= Input height
  • Output width should be <= Input width
  • The strides of each image shall be equal to or greater than the x dimension
  • shift should be <=15
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]shiftRight shift value after the sum of products of the 25 neighborhood pixels Sum of all coefficients are equal to 256, so "shift" value used is typically '8'. This parameter is configurable in case the user wants to multiply or divide the result by a power of 2. For example, if the user wants to multiply the result of the gaussian by 4, then the shift value should be 8-2 = 6.
[in]dstOffsetXParameter indicating x offset of dst pointer relative to position of src pointer in image (SQ15.0)
[in]dstOffsetYParameter indicating y offset of dst pointer relative to position of src pointer in image (SQ15.0)

Copyright 2023, Texas Instruments Incorporated