You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CV_PROP_RW cv::Rect srcRoi;//!< Region of interest decoded from video source.
332
340
CV_PROP_RW cv::Rect targetRoi;//!< Region of interest in the output frame containing the decoded frame.
333
341
CV_PROP_RW bool videoFullRangeFlag;//!< Output value indicating if the black level, luma and chroma of the source are represented using the full or limited range (AKA TV or "analogue" range) of values as defined in Annex E of the ITU-T Specification. Internally the conversion from NV12 to BGR obeys ITU 709.
342
+
CV_PROP_RW bool enableHistogram;//!< Flag requesting histogram output if supported. Exception will be thrown when requested but not supported.
343
+
CV_PROP_RW int nCounterBitDepth;//!< Bit depth of histogram bins if histogram output is requested and supported.
344
+
CV_PROP_RW int nMaxHistogramBins;//!< Max number of histogram bins if histogram output is requested and supported.
/** @brief Grabs, decodes and returns the next video frame and frame luma histogram.
391
+
392
+
@param [out] frame The video frame.
393
+
@param [out] histogram Histogram of the luma component of the encoded frame, see note.
394
+
@param stream Stream for the asynchronous version.
395
+
@return `false` if no frames have been grabbed.
396
+
397
+
If no frames have been grabbed (there are no more frames in video file), the methods return false.
398
+
The method throws an Exception if error occurs.
399
+
400
+
@note Histogram data is collected by NVDEC during the decoding process resulting in zero performance penalty. NVDEC computes the histogram data for only the luma component of decoded output, not on post-processed frame(i.e. when scaling, cropping, etc. applied). If the source is encoded using a limited range of luma values (FormatInfo::videoFullRangeFlag == false) then the histogram bin values will correspond to to this limited range of values and will need to be mapped to contain the same output as cuda::calcHist(). The MapHist() utility function can be used to perform this mapping on the host if required.
/** @brief Returns information about video file format.
380
405
*/
@@ -391,7 +416,7 @@ class CV_EXPORTS_W VideoReader
391
416
The primary use of the function is for reading both the encoded and decoded video data when rawMode is enabled. With rawMode enabled
392
417
retrieve() can be called following grab() to retrieve all the data associated with the current video source since the last call to grab() or the creation of the VideoReader.
@@ -535,16 +560,18 @@ but it cannot go below the number determined by NVDEC.
535
560
@param srcRoi Region of interest (x/width should be multiples of 4 and y/height multiples of 2) decoded from video source, defaults to the full frame.
536
561
@param targetRoi Region 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,
537
562
defaults to the full frame.
563
+
@param enableHistogram Request output of decoded luma histogram \a hist from VideoReader::nextFrame(GpuMat& frame, GpuMat& hist, Stream& stream), if hardware supported.
0 commit comments