Functions
VXLIB_sobel_5x5_i8u_o16s_o16s

Functions

VXLIB_STATUS VXLIB_sobel_5x5_i8u_o16s_o16s (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, int16_t dst_x[restrict], const VXLIB_bufParams2D_t *dst_x_addr, int16_t dst_y[restrict], const VXLIB_bufParams2D_t *dst_y_addr)
 
VXLIB_STATUS VXLIB_sobel_5x5_i8u_o16s_o16s_checkParams (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, const int16_t dst_x[restrict], const VXLIB_bufParams2D_t *dst_x_addr, const int16_t dst_y[restrict], const VXLIB_bufParams2D_t *dst_y_addr)
 

Detailed Description

Function Documentation

◆ VXLIB_sobel_5x5_i8u_o16s_o16s()

VXLIB_STATUS VXLIB_sobel_5x5_i8u_o16s_o16s ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
int16_t  dst_x[restrict],
const VXLIB_bufParams2D_t *  dst_x_addr,
int16_t  dst_y[restrict],
const VXLIB_bufParams2D_t *  dst_y_addr 
)
Description:
Computes the sobel image filter kernel over a 5x5 window of imput image, for each pixel. This kernel is required in order to support the 5x5 mode of Canny Edge Detection.
Method:
Produces 2 separate output planes in a single pass through the image; one plane for X and one plane for Y. The sobel operators are defined as:
       | -1  -2  0  +2  +1 |           | -1 -4  -6 -4 -1 |
       | -4  -8  0  +8  +4 |           | -2 -8 -12 -8 -2 |
 Gx =  | -6 -12  0 +12  +6 |     Gy =  |  0  0   0  0  0 |
       | -4  -8  0  +8  +4 |           | +2 +8 +12 +8 +2 |
       | -1  -2  0  +2  +1 |           | +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_x[]Pointer to array containing X output image (SQ15.0)
[in]dst_x_addr[]Pointer to structure containing dimensional information of dst_x
[out]dst_y[]Pointer to array containing Y output image (SQ15.0)
[in]dst_y_addr[]Pointer to structure containing dimensional information of dst_y
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
  • Output height should be == (Input height - 4)
  • Output width should be == (Input width - 4) OR (Input width)
Performance Considerations:
  • For best performance, the following parameter settings are recommended:
    • Set output width values to a multiple of 2
    • Set widths equal to each other and equal to strides (allows processing over whole image in single loop)

◆ VXLIB_sobel_5x5_i8u_o16s_o16s_checkParams()

VXLIB_STATUS VXLIB_sobel_5x5_i8u_o16s_o16s_checkParams ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
const int16_t  dst_x[restrict],
const VXLIB_bufParams2D_t *  dst_x_addr,
const int16_t  dst_y[restrict],
const VXLIB_bufParams2D_t *  dst_y_addr 
)
Description:
Checks the parameters for programming errors for the VXLIB_sobel_5x5_i8u_o16s_o16s function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • Output height should be == (Input height - 4)
  • Output width should be <= Input width
  • 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_x[]Pointer to array containing X output image (SQ15.0)
[in]dst_x_addr[]Pointer to structure containing dimensional information of dst_x
[out]dst_y[]Pointer to array containing Y output image (SQ15.0)
[in]dst_y_addr[]Pointer to structure containing dimensional information of dst_y

Copyright 2022, Texas Instruments Incorporated