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
Merge pull request #3198 from cudawarped:cudacodec_add_frame_colour_format_request
cudacodec::VideoReader add colour format selection functionality
* Add capacity to select different colour formats for each decoded frame produced by cudacodec::VideoReader.
Updated accompanying test.
* Address warning
Copy file name to clipboardExpand all lines: modules/cudacodec/include/opencv2/cudacodec.hpp
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -320,6 +320,18 @@ enum class VideoReaderProps {
320
320
PROP_NUMBER_OF_RAW_PACKAGES_SINCE_LAST_GRAB = 3, //!< Number of raw packages recieved since the last call to grab().
321
321
PROP_RAW_MODE = 4, //!< Status of raw mode.
322
322
PROP_LRF_HAS_KEY_FRAME = 5, //!< 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.
323
+
PROP_COLOR_FORMAT = 6, //!< Set the ColorFormat of the decoded frame. This can be changed before every call to nextFrame() and retrieve().
324
+
#ifndef CV_DOXYGEN
325
+
PROP_NOT_SUPPORTED
326
+
#endif
327
+
};
328
+
329
+
/** @brief ColorFormat for the frame returned by the decoder.
330
+
*/
331
+
enumclassColorFormat {
332
+
BGRA = 1,
333
+
BGR = 2,
334
+
GRAY = 3,
323
335
#ifndef CV_DOXYGEN
324
336
PROP_NOT_SUPPORTED
325
337
#endif
@@ -382,6 +394,8 @@ class CV_EXPORTS_W VideoReader
0 commit comments