Functions
VXLIB_sobel_7x7_i8u_o16s_o16s

Functions

VXLIB_STATUS VXLIB_sobel_7x7_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_7x7_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_7x7_i8u_o16s_o16s()

VXLIB_STATUS VXLIB_sobel_7x7_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 7x7 window of imput image, for each pixel. This kernel is required in order to support the 7x7 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  -4   -5  0   +5  +4  +1 |         | -1  -6 -15  -20 -15  -6 -1 |
       |  -6 -24  -30  0  +30 +24  +6 |         | -4 -24 -60  -80 -60 -24 -4 |
       | -15 -60  -75  0  +75 +60 +15 |         | -5 -30 -75 -100 -75 -30 -5 |
 Gx =  | -20 -80 -100  0 +100 +80 +20 |   Gy =  |  0   0   0    0   0   0  0 |
       | -15 -60  -75  0  +75 +60 +15 |         | +5 +30 +75 +100 +75 +30 +5 |
       |  -6 -24  -30  0  +30 +24  +6 |         | +4 +24 +60  +80 +60 +24 +4 |
       |  -1  -4   -5  0   +5  +4  +1 |         | +1  +6 +15  +20 +15  +6 +1 |

Since the ouput of this operation can overflow S16 bits, the outputs are saturated to the max and min values of S16 bit container.

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 - 6)
  • Output width should be == (Input width - 6) OR (Input width)
Performance Considerations:
  • For best performance, the following parameter settings are recommended:
    • Set widths equal to each other and equal to strides (allows processing over whole image in single loop)

◆ VXLIB_sobel_7x7_i8u_o16s_o16s_checkParams()

VXLIB_STATUS VXLIB_sobel_7x7_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_7x7_i8u_o16s_o16s function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • Output height should be == (Input height - 6)
  • 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