NVIDIA DeepStream SDK API Reference

9.2 Release
9.2/sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/dump_utils.h File Reference

Go to the source code of this file.

Functions

void DumpNvBufSurface (NvBufSurface *in_surface, NvDsBatchMeta *batch_meta, const std::string &image_name, guint frame_num, GstVideoFormat video_fmt, void *&scratch_nvbuf_surface, bool batched_mode=true, PrettyLogger *logger=nullptr)
 Dumps NvBufSurface data to file. More...
 
bool dump_tensor (const Tensor &tensor, const std::string &image_name, bool batched_mode=true, PrettyLogger *logger=nullptr)
 Dump tensor as a raw data file. More...
 

Function Documentation

◆ dump_tensor()

bool dump_tensor ( const Tensor &  tensor,
const std::string &  image_name,
bool  batched_mode = true,
PrettyLogger *  logger = nullptr 
)

Dump tensor as a raw data file.

This function dumps the tensor data to a raw file format with appropriate extensions based on the tensor data type and channel count.

Parameters
tensorThe Tensor structure containing all tensor information
image_nameBase name for the output file
batched_modeTrue to create a single tiled image with all batches, false for individual files
loggerPrettyLogger instance for logging dump operations
Returns
bool True if successfully dumped, false otherwise

◆ DumpNvBufSurface()

void DumpNvBufSurface ( NvBufSurface *  in_surface,
NvDsBatchMeta *  batch_meta,
const std::string &  image_name,
guint  frame_num,
GstVideoFormat  video_fmt,
void *&  scratch_nvbuf_surface,
bool  batched_mode = true,
PrettyLogger *  logger = nullptr 
)

Dumps NvBufSurface data to file.

This function dumps the raw frame data from an NvBufSurface to a file. The file format is determined by the video format of the surface.

Parameters
in_surfaceThe NvBufSurface to dump
batch_metaMetadata associated with the surface
image_nameBase name for output files
frame_numCurrent frame number for naming
video_fmtInput video format enumeration
scratch_nvbuf_surfaceScratch buffer for copying device memory to host
batched_modeTrue to create a single tiled image with all batches, false for individual files
loggerPrettyLogger instance for logging dump operations