OpenCV  4.10.0-dev
Open Source Computer Vision
No Matches
Public Member Functions | Public Attributes | List of all members
cv::cudacodec::VideoReaderInitParams Struct Reference

VideoReader initialization parameters. More...

#include <opencv2/cudacodec.hpp>

Collaboration diagram for cv::cudacodec::VideoReaderInitParams:

Public Member Functions

 VideoReaderInitParams ()

Public Attributes

bool allowFrameDrop
bool enableHistogram
int firstFrameIdx
int minNumDecodeSurfaces
bool rawMode
cv::Rect srcRoi
cv::Rect targetRoi
cv::Size targetSz
bool udpSource

Detailed Description

VideoReader initialization parameters.

udpSourceRemove validation which can cause VideoReader() to throw exceptions when reading from a UDP source.
allowFrameDropAllow frames to be dropped when ingesting from a live capture source to prevent delay and eventual disconnection when calls to nextFrame()/grab() cannot keep up with the source's fps. Only use if delay and disconnection are a problem, i.e. not when decoding from video files where setting this flag will cause frames to be unnecessarily discarded.
minNumDecodeSurfacesMinimum number of internal decode surfaces used by the hardware decoder. NVDEC will automatically determine the minimum number of surfaces it requires for correct functionality and optimal video memory usage but not necessarily for best performance, which depends on the design of the overall application. The optimal number of decode surfaces (in terms of performance and memory utilization) should be decided by experimentation for each application, but it cannot go below the number determined by NVDEC.
rawModeAllow the raw encoded data which has been read up until the last call to grab() to be retrieved by calling retrieve(rawData,RAW_DATA_IDX).
targetSzPost-processed size (width/height should be multiples of 2) of the output frame, defaults to the size of the encoded video source.
srcRoiRegion of interest (x/width should be multiples of 4 and y/height multiples of 2) decoded from video source, defaults to the full frame.
targetRoiRegion of interest (x/width should be multiples of 4 and y/height multiples of 2) within the output frame to copy and resize the decoded frame to, defaults to the full frame.
enableHistogramRequest output of decoded luma histogram hist from VideoReader::nextFrame(GpuMat& frame, GpuMat& hist, Stream& stream), if hardware supported.
firstFrameIdxIndex of the first frame to seek to on initialization of the VideoReader.

Constructor & Destructor Documentation

◆ VideoReaderInitParams()

cv::cudacodec::VideoReaderInitParams::VideoReaderInitParams ( )

Member Data Documentation

◆ allowFrameDrop

bool cv::cudacodec::VideoReaderInitParams::allowFrameDrop

◆ enableHistogram

bool cv::cudacodec::VideoReaderInitParams::enableHistogram

◆ firstFrameIdx

int cv::cudacodec::VideoReaderInitParams::firstFrameIdx

◆ minNumDecodeSurfaces

int cv::cudacodec::VideoReaderInitParams::minNumDecodeSurfaces

◆ rawMode

bool cv::cudacodec::VideoReaderInitParams::rawMode

◆ srcRoi

cv::Rect cv::cudacodec::VideoReaderInitParams::srcRoi

◆ targetRoi

cv::Rect cv::cudacodec::VideoReaderInitParams::targetRoi

◆ targetSz

cv::Size cv::cudacodec::VideoReaderInitParams::targetSz

◆ udpSource

bool cv::cudacodec::VideoReaderInitParams::udpSource

The documentation for this struct was generated from the following file: