Class cv::cudacodec::NVSurfaceToColorConverter#
Class for converting the raw YUV Surface output from VideoReader if output color format is set to ColorFormat::NV_YUV_SURFACE_FORMAT (VideoReader::set(ColorFormat::NV_YUV_SURFACE_FORMAT)) to the requested ColorFormat.
#include <opencv2/cudacodec.hpp>Collaboration diagram for cv::cudacodec::NVSurfaceToColorConverter:
Detailed Description#
Class for converting the raw YUV Surface output from VideoReader if output color format is set to ColorFormat::NV_YUV_SURFACE_FORMAT (VideoReader::set(ColorFormat::NV_YUV_SURFACE_FORMAT)) to the requested ColorFormat.
Constructor & Destructor Documentation#
~NVSurfaceToColorConverter()#
cv::cudacodec::NVSurfaceToColorConverter::~NVSurfaceToColorConverter()
Member Function Documentation#
convert()#
bool cv::cudacodec::NVSurfaceToColorConverter::convert(
InputArray yuv,
OutputArray color,
const SurfaceFormat surfaceFormat,
const ColorFormat outputFormat,
const BitDepth bitDepth = BitDepth::UNCHANGED,
const bool planar = false,
cuda::Stream & stream = cuda::Stream::Null() )
Performs the conversion from the raw YUV Surface output from VideoReader to the requested color format. Use this function when you want to convert the raw YUV Surface output from VideoReader to more than one color format or you want both the raw Surface output in addition to a color frame.
Parameters
yuv— The raw YUV Surface output from VideoReader see SurfaceFormat.color— The converted frame.surfaceFormat— The surface format of the input YUV data.outputFormat— The requested output color format.bitDepth— The requested bit depth of the output frame.planar— Request seperate planes for each color plane.stream— Stream for the asynchronous version.
Source file#
The documentation for this class was generated from the following file:
opencv2/cudacodec.hpp