NVIDIA DeepStream SDK API Reference

6.4 Release
nvds_mask_utils.h File Reference

Detailed Description

NVIDIA DeepStream mask utils API

Description: This file specifies the APIs used to transform mask buffers

Definition in file nvds_mask_utils.h.

Go to the source code of this file.

Functions

bool nvds_mask_utils_resize_to_binary_argb32 (float *src, uint32_t *dst, uint32_t src_width, uint32_t src_height, uint32_t dst_width, uint32_t dst_height, uint32_t channel, float threshold, uint32_t argb32_px, uint32_t interpolation, cudaStream_t stream)
 resize FP32 Tensor and apply threshold to create INT32 binary tensor Output INT32 tensor pixels are assumed ARGB32 For resized pixels > threshold, transparency is set to 50% and other pixels are set to 100% transparent; RGB = 0 for all pixels More...
 

Function Documentation

◆ nvds_mask_utils_resize_to_binary_argb32()

bool nvds_mask_utils_resize_to_binary_argb32 ( float *  src,
uint32_t *  dst,
uint32_t  src_width,
uint32_t  src_height,
uint32_t  dst_width,
uint32_t  dst_height,
uint32_t  channel,
float  threshold,
uint32_t  argb32_px,
uint32_t  interpolation,
cudaStream_t  stream 
)

resize FP32 Tensor and apply threshold to create INT32 binary tensor Output INT32 tensor pixels are assumed ARGB32 For resized pixels > threshold, transparency is set to 50% and other pixels are set to 100% transparent; RGB = 0 for all pixels

Parameters
src[IN/OUT] source FP32 tensor
dst[IN/OUT] dst INT32 (ARGB32) tensor
src_width[IN] source FP32 tensor width
src_height[IN] source FP32 tensor height
dst_width[IN] dst INT32 (ARGB32) tensor width
dst_height[IN] dst INT32 (ARGB32) tensor height
channel[IN]
threshold[IN]
argb_32[IN] The pixel value in dst when src pixel > threshold
interpolation[IN] The NPP interpolation method to use Enumeration copied below: NPPI_INTER_NN =1, Nearest neighbor filtering. NPPI_INTER_LINEAR Linear interpolation. NPPI_INTER_CUBIC Cubic interpolation. NPPI_INTER_CUBIC2P_BSPLINE Two-parameter cubic filter (B=1, C=0) NPPI_INTER_CUBIC2P_CATMULLROM Two-parameter cubic filter (B=0, C=1/2) NPPI_INTER_CUBIC2P_B05C03 Two-parameter cubic filter (B=1/2, C=3/10) NPPI_INTER_SUPER Super sampling. NPPI_INTER_LANCZOS Lanczos filtering. NPPI_INTER_LANCZOS3_ADVANCED Generic Lanczos filtering with order 3. NPPI_SMOOTH_EDGE Smooth edge filtering.
stream[IN] The cuda-stream to use for scaling operation on GPU