Vision Apps User Guide
TIVX Kernels for Image Pre/Post Processing

Introduction

This section documents the kernels defined for Image Pre/Post Processing.

Data Structures

struct  tivxImgPreProcParams
 
struct  tivxOCPreProcParams
 
struct  tivxOCPostProcParams
 
struct  tivxOCPostProcOutput
 
struct  tivxODPostProcParams
 
struct  tivxDofPlaneSepParams
 
struct  tivxVisualLocalizationParams
 
struct  tivxPixelVizParams
 
struct  tivxImgMosaicParams
 
struct  tivxDrawKeypointDetectionsParams
 
struct  tivxDrawBoxDetectionsParams
 
struct  tivxSFMParams
 SFM frame level control parameter. More...
 
struct  tivxDLPreProcParams
 DL Pre processing to be used with DL-RT. More...
 
struct  tivxDLColorBlendParams
 DL color blend to be used with DL-RT. More...
 
struct  tivxDLRectangle
 DL rectangles to be used with DL Draw Box. More...
 
struct  tivxDLDrawBoxParams
 DL draw box to be used with DL-RT. More...
 

Functions

void tivxImgProcLoadKernels (vx_context context)
 Used for the Application to load the img_proc kernels into the context. More...
 
void tivxImgProcUnLoadKernels (vx_context context)
 Used for the Application to unload the img_proc kernels from the context. More...
 
vx_kernel tivxAddKernelPixelViz (vx_context context, vx_int32 num_output_tensors)
 Used for the Application to create the pix viz kernel from the context. More...
 
vx_kernel tivxAddKernelImgMosaic (vx_context context, vx_int32 num_inputs)
 Used by the application to create the mosaic kernel from the context. More...
 
void tivxImgMosaicParamsSetDefaults (tivxImgMosaicParams *prms)
 Set default parameters for tivxImgMosaicParams. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxImgPreProcNode (vx_graph graph, vx_array config, vx_image in_img, vx_tensor out_tensor)
 Creates a Image Pre Processing Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxOCPreProcNode (vx_graph graph, vx_user_data_object config, vx_image in_img, vx_tensor out_tensor)
 Creates a OC Pre Processing Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxOCPostProcNode (vx_graph graph, vx_user_data_object config, vx_user_data_object in_args, vx_tensor in_tensor, vx_user_data_object results)
 Creates a OC Post Processing Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxODPostProcNode (vx_graph graph, vx_array configuration, vx_tensor input_key_points, vx_tensor fwd_table_tensor, vx_tensor rev_table_tensor, vx_tensor kp_tensor, vx_tensor kp_valid)
 Creates a Post processing Node for Parking Spot Detection Algorithm. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxDofPlaneSepNode (vx_graph graph, vx_user_data_object config, vx_image dof_flow, vx_tensor out_planes)
 Creates a Dense Optical Flow (Dof) 3 plane creation Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxPixelVizNode (vx_graph graph, vx_kernel kernel, vx_user_data_object configuration, vx_user_data_object tidl_out_args, vx_image in_img, vx_int32 num_output_tensors, vx_tensor detection[], vx_image out_img[])
 Creates an image with pixel level detection/label overlayed. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxVisualLocalizationNode (vx_graph graph, vx_array configuration, vx_tensor voxel_info, vx_tensor map_3d_points, vx_tensor map_desc, vx_tensor ext_feat_pt, vx_tensor ext_feat_desc, vx_tensor up_samp_wt, vx_tensor lens_dist_table, vx_user_data_object tidl_out_args, vx_matrix pose_tensor)
 Estimating the camera location from captured image and map information. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxPoseVizNode (vx_graph graph, vx_array configuration, vx_image background_image, vx_matrix pose_tensor, vx_image output_image)
 Visualization of the estimated location. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxImgMosaicNode (vx_graph graph, vx_kernel kernel, vx_user_data_object config, vx_image output_image, vx_image background_image, vx_object_array input_arr[], vx_uint32 num_inputs)
 Image Mosiac Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxDrawKeypointDetectionsNode (vx_graph graph, vx_user_data_object configuration, vx_tensor kp_tensor, vx_tensor kp_valid, vx_tensor input_tensor, vx_image input_image, vx_image output_image)
 Draw Keypoint Detections Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxDrawBoxDetectionsNode (vx_graph graph, vx_user_data_object configuration, vx_tensor input_tensor, vx_image input_image, vx_image output_image)
 Draw Box Detections Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxImgHistNode (vx_graph graph, vx_image input_image, vx_distribution output_histogram)
 Image Histogram Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxSFMNode (vx_graph graph, vx_user_data_object config, vx_user_data_object create_params, vx_user_data_object in_args, vx_user_data_object out_args, vx_image input_image, vx_image flow_vectors, vx_image output_ptcld_image, vx_image output_og_image, vx_user_data_object output_feat)
 Structure From Motion Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxDLPreProcNode (vx_graph graph, vx_user_data_object config, vx_image input_image, vx_tensor output_tensor)
 DL Pre-processing Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxDLColorBlendNode (vx_graph graph, vx_user_data_object config, vx_image input_image, vx_tensor input_tensor, vx_image output_image)
 DL Color Blend Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxDLDrawBoxNode (vx_graph graph, vx_user_data_object config, vx_image input_image, vx_tensor input_tensor, vx_image output_image)
 DL Draw Box Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxDLColorConvertNode (vx_graph graph, vx_image input_image, vx_image output_image)
 DL Color Convert Node. More...
 

Macros

#define TIVX_MODULE_NAME_IMG_PROC   "img_proc"
 OpenVX module name. More...
 
#define TIVX_PIXEL_VIZ_MAX_TENSOR   (3U)
 

Macro Definition Documentation

◆ TIVX_MODULE_NAME_IMG_PROC

#define TIVX_MODULE_NAME_IMG_PROC   "img_proc"

OpenVX module name.

◆ TIVX_PIXEL_VIZ_MAX_TENSOR

#define TIVX_PIXEL_VIZ_MAX_TENSOR   (3U)

Function Documentation

◆ tivxImgProcLoadKernels()

void tivxImgProcLoadKernels ( vx_context  context)

Used for the Application to load the img_proc kernels into the context.

◆ tivxImgProcUnLoadKernels()

void tivxImgProcUnLoadKernels ( vx_context  context)

Used for the Application to unload the img_proc kernels from the context.

◆ tivxAddKernelPixelViz()

vx_kernel tivxAddKernelPixelViz ( vx_context  context,
vx_int32  num_output_tensors 
)

Used for the Application to create the pix viz kernel from the context.

◆ tivxAddKernelImgMosaic()

vx_kernel tivxAddKernelImgMosaic ( vx_context  context,
vx_int32  num_inputs 
)

Used by the application to create the mosaic kernel from the context.

◆ tivxImgMosaicParamsSetDefaults()

void tivxImgMosaicParamsSetDefaults ( tivxImgMosaicParams prms)

Set default parameters for tivxImgMosaicParams.

◆ tivxImgPreProcNode()

VX_API_ENTRY vx_node VX_API_CALL tivxImgPreProcNode ( vx_graph  graph,
vx_array  config,
vx_image  in_img,
vx_tensor  out_tensor 
)

Creates a Image Pre Processing Node.

Node does pre processing needed for conventional deep learning algorithm. Preprocessing steps such as mean subtraction, scaling and plane deinterleaving is supported by this Node.

Parameters
[in]graphThe reference to the graph.
[in]configArray element type tivxImgPreProcParams, max number of elements = 1
[in]in_imginput image
[in]out_tensoroutput tensor
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxOCPreProcNode()

VX_API_ENTRY vx_node VX_API_CALL tivxOCPreProcNode ( vx_graph  graph,
vx_user_data_object  config,
vx_image  in_img,
vx_tensor  out_tensor 
)

Creates a OC Pre Processing Node.

Node does pre processing needed for image classification operation Performs only NV12 to BGR conversion

Parameters
[in]graphThe reference to the graph.
[in]configUser data object element type tivxOCPreProcParams
[in]in_imginput image
[out]out_tensoroutput tensor
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxOCPostProcNode()

VX_API_ENTRY vx_node VX_API_CALL tivxOCPostProcNode ( vx_graph  graph,
vx_user_data_object  config,
vx_user_data_object  in_args,
vx_tensor  in_tensor,
vx_user_data_object  results 
)

Creates a OC Post Processing Node.

Node does post processing needed for conventional image classification algorithm. Returns top N classes from a list of probabilities

Parameters
[in]graphThe reference to the graph.
[in]configUser data object element type tivxOCPostProcParams
[in]in_argsinput user data object
[in]in_tensorinput tensor
[out]resultsoutput user data object
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxODPostProcNode()

VX_API_ENTRY vx_node VX_API_CALL tivxODPostProcNode ( vx_graph  graph,
vx_array  configuration,
vx_tensor  input_key_points,
vx_tensor  fwd_table_tensor,
vx_tensor  rev_table_tensor,
vx_tensor  kp_tensor,
vx_tensor  kp_valid 
)

Creates a Post processing Node for Parking Spot Detection Algorithm.

Node does generates interpolated points on parking spot periphery from four corners points detected from deep learning based algorithm

Parameters
[in]graphThe reference to the graph.
[in]configurationArray element type tivxODPostProcParams, max number of elements = 1
[in]input_key_pointsInterleaved 4 corner points of multiple parking spots.
[in]fwd_table_tensorAngular map table for rectilinear angle to fish eye angle
[in]rev_table_tensorAngular map table for fish eye angle to rectilinear angle
[in]kp_tensoroutput interpolated points on periphery of parking spot
[in]kp_validoutput flag of validity for each parking spot
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxDofPlaneSepNode()

VX_API_ENTRY vx_node VX_API_CALL tivxDofPlaneSepNode ( vx_graph  graph,
vx_user_data_object  config,
vx_image  dof_flow,
vx_tensor  out_planes 
)

Creates a Dense Optical Flow (Dof) 3 plane creation Node.

Node does creation of three planes (each of 8 bit) from the raw 32 bit output from Dof hardware accelerator 3 planes corresponds to horizontal, vertical flow vectors and confidence

Parameters
[in]graphThe reference to the graph.
[in]configArray element type tivxDofPlaneSepParams, max number of elements = 1
[in]dof_flowinput dof flow vectors
[out]out_planesoutput planes.
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxPixelVizNode()

VX_API_ENTRY vx_node VX_API_CALL tivxPixelVizNode ( vx_graph  graph,
vx_kernel  kernel,
vx_user_data_object  configuration,
vx_user_data_object  tidl_out_args,
vx_image  in_img,
vx_int32  num_output_tensors,
vx_tensor  detection[],
vx_image  out_img[] 
)

Creates an image with pixel level detection/label overlayed.

Node does blending of input image with pixel level detection/classification data for visualization purpose.

Parameters
[in]graphThe reference to the graph.
[in]kernelThe reference to openvx kernel
[in]configurationArray element type tivxODPostProcParams, max number of elements = 1
[in]tidl_out_argsout args of tidl to receive the scale values of each output tensor
[in]in_imgInput image.
[in]num_output_tensorsNumber of output tensors/images.
[in]detectionDetection planes
[out]out_imgovelayed output image
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxVisualLocalizationNode()

VX_API_ENTRY vx_node VX_API_CALL tivxVisualLocalizationNode ( vx_graph  graph,
vx_array  configuration,
vx_tensor  voxel_info,
vx_tensor  map_3d_points,
vx_tensor  map_desc,
vx_tensor  ext_feat_pt,
vx_tensor  ext_feat_desc,
vx_tensor  up_samp_wt,
vx_tensor  lens_dist_table,
vx_user_data_object  tidl_out_args,
vx_matrix  pose_tensor 
)

Estimating the camera location from captured image and map information.

Node estimates the location in 3d world co-ordinate

Parameters
[in]graphThe reference to the graph.
[in]configurationArray element type tivxODPostProcParams, max number of elements = 1
[in]voxel_infoVoxel info. voxels are cuboid in real world
[in]map_3d_pointsMap 3D points
[in]map_descMap descriptors
[in]ext_feat_ptExternally computed feature points(x,y)
[in]ext_feat_descFeature descriptor for each feature point
[in]up_samp_wtFilter weights for upsampling
[in]lens_dist_tableFish eye lens distortion table
[in]tidl_out_argsTIDL outatgs needed for scale
[out]pose_tensorOutput pose matrix of size 3x4
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxPoseVizNode()

VX_API_ENTRY vx_node VX_API_CALL tivxPoseVizNode ( vx_graph  graph,
vx_array  configuration,
vx_image  background_image,
vx_matrix  pose_tensor,
vx_image  output_image 
)

Visualization of the estimated location.

Node generated an image with visualization of X, Y location of 3D world on image plane

Parameters
[in]graphThe reference to the graph.
[in]configurationArray element type tivxODPostProcParams, max number of elements = 1
[in]background_imageBackground image on which pose information will be visualized
[in]pose_tensorInput pose matrix created by tivxVisualLocalizationNode Node
[out]output_imageOutput image
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxImgMosaicNode()

VX_API_ENTRY vx_node VX_API_CALL tivxImgMosaicNode ( vx_graph  graph,
vx_kernel  kernel,
vx_user_data_object  config,
vx_image  output_image,
vx_image  background_image,
vx_object_array  input_arr[],
vx_uint32  num_inputs 
)

Image Mosiac Node.

Used to mosiac a list of images onto to a sigle image

Parameters
[in]graphThe reference to the graph.
[in]kernelThe reference to the openvx kernel
[in]configMosaic configuration of type tivxImgMosaicParams
[out]output_imageOutput image of type vx_image, only VX_DF_IMAGE_NV12, VX_DF_IMAGE_U8, VX_DF_IMAGE_U16 supported
[in]background_imageOptional background image of type vx_image, only VX_DF_IMAGE_NV12, VX_DF_IMAGE_U8, VX_DF_IMAGE_U16 supported
[in]input_arrArray of inputs of type vx_image, only VX_DF_IMAGE_NV12, VX_DF_IMAGE_U8, VX_DF_IMAGE_U16 supported
[in]num_inputsNumber of inputs, i.e number of elements in input_arr[]
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxDrawKeypointDetectionsNode()

VX_API_ENTRY vx_node VX_API_CALL tivxDrawKeypointDetectionsNode ( vx_graph  graph,
vx_user_data_object  configuration,
vx_tensor  kp_tensor,
vx_tensor  kp_valid,
vx_tensor  input_tensor,
vx_image  input_image,
vx_image  output_image 
)

Draw Keypoint Detections Node.

Used to draw keypoint detections on an image

Parameters
[in]graphreference to the graph.
[in]configurationconfiguration of type tivxDrawKeyPointDetectionParams
[in]kp_tensorkeypoint tensor from OD postprocessing node
[in]kp_validvalid keypoints tensor from OD postprocessing node
[in]input_tensorTIDL output tensor of detected key points
[in]input_imageInput image to draw detections
[out]output_imageOutput image with detections drawn
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxDrawBoxDetectionsNode()

VX_API_ENTRY vx_node VX_API_CALL tivxDrawBoxDetectionsNode ( vx_graph  graph,
vx_user_data_object  configuration,
vx_tensor  input_tensor,
vx_image  input_image,
vx_image  output_image 
)

Draw Box Detections Node.

Used to draw box detections on an image

Parameters
[in]graphreference to the graph.
[in]configurationconfiguration of type tivxDrawBoxDetectionParams
[in]input_tensorTIDL output tensor of detected key points
[in]input_imageInput image to draw detections
[out]output_imageOutput image with detections drawn
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxImgHistNode()

VX_API_ENTRY vx_node VX_API_CALL tivxImgHistNode ( vx_graph  graph,
vx_image  input_image,
vx_distribution  output_histogram 
)

Image Histogram Node.

Used to get histogram of image intensity, done on A72

Parameters
[in]graphreference to the graph.
[in]input_imageInput image to draw detections
[out]output_histogramOutput histogram of image intensities (luma only)
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxSFMNode()

VX_API_ENTRY vx_node VX_API_CALL tivxSFMNode ( vx_graph  graph,
vx_user_data_object  config,
vx_user_data_object  create_params,
vx_user_data_object  in_args,
vx_user_data_object  out_args,
vx_image  input_image,
vx_image  flow_vectors,
vx_image  output_ptcld_image,
vx_image  output_og_image,
vx_user_data_object  output_feat 
)

Structure From Motion Node.

Structure From Motion (SFM), done on C71

Parameters
[in]graphreference to the graph.
[in]configSFM parameters defined in tivxSFMParams
[in]create_paramsSFM parameters defined in tivxSFMParams
[in]in_argsSFM parameters defined in tivxSFMParams
[in]out_argsSFM parameters defined in tivxSFMParams
[in]input_imageInput image in NV12 format to overlay depth estimations
[in]flow_vectorsFlow vectors in VX_DF_IMAGE_U32 format
[out]output_ptcld_imageOutput point cloud image
[out]output_og_imageOutput occupancy grid map
[out]output_featOutput features
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxDLPreProcNode()

VX_API_ENTRY vx_node VX_API_CALL tivxDLPreProcNode ( vx_graph  graph,
vx_user_data_object  config,
vx_image  input_image,
vx_tensor  output_tensor 
)

DL Pre-processing Node.

Transforms input image to a format as required for DL processing

Parameters
[in]graphreference to the graph
[in]configreference to tivxDLPreProcPrams
[in]input_imageInput image
[out]output_tensorOutput tensor
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxDLColorBlendNode()

VX_API_ENTRY vx_node VX_API_CALL tivxDLColorBlendNode ( vx_graph  graph,
vx_user_data_object  config,
vx_image  input_image,
vx_tensor  input_tensor,
vx_image  output_image 
)

DL Color Blend Node.

Takes the DL output and blends the provided color-map to the input image

Parameters
[in]graphreference to the graph
[in]configreference to tivxDLPreProcPrams
[in]input_imageInput image
[in]input_tensorInput tensor
[out]output_imageOutput image
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxDLDrawBoxNode()

VX_API_ENTRY vx_node VX_API_CALL tivxDLDrawBoxNode ( vx_graph  graph,
vx_user_data_object  config,
vx_image  input_image,
vx_tensor  input_tensor,
vx_image  output_image 
)

DL Draw Box Node.

Takes the DL output and draws boxes around an object on input image

Parameters
[in]graphreference to the graph
[in]configreference to tivxDLPreProcPrams
[in]input_imageInput image
[in]input_tensorInput tensor
[out]output_imageOutput image
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxDLColorConvertNode()

VX_API_ENTRY vx_node VX_API_CALL tivxDLColorConvertNode ( vx_graph  graph,
vx_image  input_image,
vx_image  output_image 
)

DL Color Convert Node.

Performs limited color conversions required for DL pipeline which is DMA optimized

Parameters
[in]graphreference to the graph
[in]input_imageInput image
[out]output_imageOutput image
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus