Functions
VXLIB_sobel_3x3_i8u_o16s_o16s

Functions

VXLIB_STATUS VXLIB_sobel_3x3_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_3x3_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_3x3_i8u_o16s_o16s()

VXLIB_STATUS VXLIB_sobel_3x3_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 3x3 window of imput image, for each pixel.
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 0 +1 |              | -1 -2 -1 |
 Gx =  | -2 0 +2 |        Gy =  |  0  0  0 |
       | -1 0 +1 |              | +1 +2 +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 - 2)
  • Output width should be == (Input width - 2) OR (Input width)
Performance Considerations:
  • For best performance, the following parameter settings are recommended:
    • Set output width values to a multiple of 8
    • Set widths equal to each other and equal to strides (allows processing over whole image in single loop)
    • If only x or y gradient is needed instead of both, one should use VXLIB_sobelX_3x3_i8u_o16s or VXLIB_sobelY_3x3_i8u_o16s, respecively.

◆ VXLIB_sobel_3x3_i8u_o16s_o16s_checkParams()

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