OpenCV
4.5.5
Open Source Computer Vision
|
Classes | |
class | cv::cudacodec::EncoderCallBack |
Callbacks for CUDA video encoder. More... | |
struct | cv::cudacodec::EncoderParams |
Different parameters for CUDA video encoder. More... | |
struct | cv::cudacodec::FormatInfo |
Struct providing information about video file format. : More... | |
class | cv::cudacodec::RawVideoSource |
Interface for video demultiplexing. : More... | |
class | cv::cudacodec::VideoReader |
Video reader interface. More... | |
class | cv::cudacodec::VideoWriter |
Video writer interface. More... | |
Functions | |
Ptr< VideoReader > | cv::cudacodec::createVideoReader (const String &filename, const bool rawMode=false) |
Creates video reader. More... | |
Ptr< VideoReader > | cv::cudacodec::createVideoReader (const Ptr< RawVideoSource > &source, const bool rawMode=false) |
Ptr< cudacodec::VideoWriter > | cv::cudacodec::createVideoWriter (const String &fileName, Size frameSize, double fps, SurfaceFormat format=SF_BGR) |
Creates video writer. More... | |
Ptr< cudacodec::VideoWriter > | cv::cudacodec::createVideoWriter (const String &fileName, Size frameSize, double fps, const EncoderParams ¶ms, SurfaceFormat format=SF_BGR) |
Ptr< cudacodec::VideoWriter > | cv::cudacodec::createVideoWriter (const Ptr< EncoderCallBack > &encoderCallback, Size frameSize, double fps, SurfaceFormat format=SF_BGR) |
Ptr< cudacodec::VideoWriter > | cv::cudacodec::createVideoWriter (const Ptr< EncoderCallBack > &encoderCallback, Size frameSize, double fps, const EncoderParams ¶ms, SurfaceFormat format=SF_BGR) |
#include <opencv2/cudacodec.hpp>
Chroma formats supported by cudacodec::VideoReader.
Enumerator | |
---|---|
Monochrome | |
YUV420 | |
YUV422 | |
YUV444 | |
NumFormats |
enum cv::cudacodec::Codec |
#include <opencv2/cudacodec.hpp>
Video codecs supported by cudacodec::VideoReader .
#include <opencv2/cudacodec.hpp>
Deinterlacing mode used by decoder.
Weave | Weave both fields (no deinterlacing). For progressive content and for content that doesn't need deinterlacing. Bob Drop one field. |
Adaptive | Adaptive deinterlacing needs more video memory than other deinterlacing modes. |
Enumerator | |
---|---|
Weave | |
Bob | |
Adaptive |
#include <opencv2/cudacodec.hpp>
Enumerator | |
---|---|
SF_UYVY | |
SF_YUY2 | |
SF_YV12 | |
SF_NV12 | |
SF_IYUV | |
SF_BGR | |
SF_GRAY |
|
strong |
#include <opencv2/cudacodec.hpp>
cv::cudacodec::VideoReader generic properties identifier.
Enumerator | |
---|---|
PROP_DECODED_FRAME_IDX | Index for retrieving the decoded frame using retrieve(). |
PROP_EXTRA_DATA_INDEX | Index for retrieving the extra data associated with a video source using retrieve(). |
PROP_RAW_PACKAGES_BASE_INDEX | Base index for retrieving raw encoded data using retrieve(). |
PROP_NUMBER_OF_RAW_PACKAGES_SINCE_LAST_GRAB | Number of raw packages recieved since the last call to grab(). |
PROP_RAW_MODE | Status of raw mode. |
PROP_LRF_HAS_KEY_FRAME | FFmpeg source only - Indicates whether the Last Raw Frame (LRF), output from VideoReader::retrieve() when VideoReader is initialized in raw mode, contains encoded data for a key frame. |
Ptr<VideoReader> cv::cudacodec::createVideoReader | ( | const String & | filename, |
const bool | rawMode = false |
||
) |
#include <opencv2/cudacodec.hpp>
Creates video reader.
filename | Name of the input video file. |
rawMode | Allow 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). |
FFMPEG is used to read videos. User can implement own demultiplexing with cudacodec::RawVideoSource
Ptr<VideoReader> cv::cudacodec::createVideoReader | ( | const Ptr< RawVideoSource > & | source, |
const bool | rawMode = false |
||
) |
#include <opencv2/cudacodec.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
source | RAW video source implemented by user. |
rawMode | Allow 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). |
Ptr<cudacodec::VideoWriter> cv::cudacodec::createVideoWriter | ( | const String & | fileName, |
Size | frameSize, | ||
double | fps, | ||
SurfaceFormat | format = SF_BGR |
||
) |
#include <opencv2/cudacodec.hpp>
Creates video writer.
fileName | Name of the output video file. Only AVI file format is supported. |
frameSize | Size of the input video frames. |
fps | Framerate of the created video stream. |
format | Surface format of input frames ( SF_UYVY , SF_YUY2 , SF_YV12 , SF_NV12 , SF_IYUV , SF_BGR or SF_GRAY). BGR or gray frames will be converted to YV12 format before encoding, frames with other formats will be used as is. |
The constructors initialize video writer. FFMPEG is used to write videos. User can implement own multiplexing with cudacodec::EncoderCallBack .
Ptr<cudacodec::VideoWriter> cv::cudacodec::createVideoWriter | ( | const String & | fileName, |
Size | frameSize, | ||
double | fps, | ||
const EncoderParams & | params, | ||
SurfaceFormat | format = SF_BGR |
||
) |
#include <opencv2/cudacodec.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
fileName | Name of the output video file. Only AVI file format is supported. |
frameSize | Size of the input video frames. |
fps | Framerate of the created video stream. |
params | Encoder parameters. See cudacodec::EncoderParams . |
format | Surface format of input frames ( SF_UYVY , SF_YUY2 , SF_YV12 , SF_NV12 , SF_IYUV , SF_BGR or SF_GRAY). BGR or gray frames will be converted to YV12 format before encoding, frames with other formats will be used as is. |
Ptr<cudacodec::VideoWriter> cv::cudacodec::createVideoWriter | ( | const Ptr< EncoderCallBack > & | encoderCallback, |
Size | frameSize, | ||
double | fps, | ||
SurfaceFormat | format = SF_BGR |
||
) |
#include <opencv2/cudacodec.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
encoderCallback | Callbacks for video encoder. See cudacodec::EncoderCallBack . Use it if you want to work with raw video stream. |
frameSize | Size of the input video frames. |
fps | Framerate of the created video stream. |
format | Surface format of input frames ( SF_UYVY , SF_YUY2 , SF_YV12 , SF_NV12 , SF_IYUV , SF_BGR or SF_GRAY). BGR or gray frames will be converted to YV12 format before encoding, frames with other formats will be used as is. |
Ptr<cudacodec::VideoWriter> cv::cudacodec::createVideoWriter | ( | const Ptr< EncoderCallBack > & | encoderCallback, |
Size | frameSize, | ||
double | fps, | ||
const EncoderParams & | params, | ||
SurfaceFormat | format = SF_BGR |
||
) |
#include <opencv2/cudacodec.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
encoderCallback | Callbacks for video encoder. See cudacodec::EncoderCallBack . Use it if you want to work with raw video stream. |
frameSize | Size of the input video frames. |
fps | Framerate of the created video stream. |
params | Encoder parameters. See cudacodec::EncoderParams. |
format | Surface format of input frames ( SF_UYVY , SF_YUY2 , SF_YV12 , SF_NV12 , SF_IYUV , SF_BGR or SF_GRAY). BGR or gray frames will be converted to YV12 format before encoding, frames with other formats will be used as is. |