From a2e04718ecd0ec0911520ecd0b1acd64c34a5751 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 17 Mar 2023 13:36:47 +0100 Subject: [PATCH 1/2] te for MSMF in doc --- modules/videoio/include/opencv2/videoio.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/videoio/include/opencv2/videoio.hpp b/modules/videoio/include/opencv2/videoio.hpp index c22fb369ca..3c0f8cda8a 100644 --- a/modules/videoio/include/opencv2/videoio.hpp +++ b/modules/videoio/include/opencv2/videoio.hpp @@ -84,8 +84,10 @@ namespace cv Select preferred API for a capture object. To be used in the VideoCapture::VideoCapture() constructor or VideoCapture::open() -@note Backends are available only if they have been built with your OpenCV binaries. +@note +- Backends are available only if they have been built with your OpenCV binaries. See @ref videoio_overview for more information. +- For CAP_MSMF setting environment flag "OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS" to 0 may improve speed initialization */ enum VideoCaptureAPIs { CAP_ANY = 0, //!< Auto detect == 0 @@ -107,7 +109,7 @@ enum VideoCaptureAPIs { CAP_XIAPI = 1100, //!< XIMEA Camera API CAP_AVFOUNDATION = 1200, //!< AVFoundation framework for iOS (OS X Lion will have the same API) CAP_GIGANETIX = 1300, //!< Smartek Giganetix GigEVisionSDK - CAP_MSMF = 1400, //!< Microsoft Media Foundation (via videoInput) + CAP_MSMF = 1400, //!< Microsoft Media Foundation (via videoInput) read note above CAP_WINRT = 1410, //!< Microsoft Windows Runtime using Media Foundation CAP_INTELPERC = 1500, //!< RealSense (former Intel Perceptual Computing SDK) CAP_REALSENSE = 1500, //!< Synonym for CAP_INTELPERC @@ -126,6 +128,7 @@ enum VideoCaptureAPIs { CAP_OBSENSOR = 2600, //!< For Orbbec 3D-Sensor device/module (Astra+, Femto) }; + /** @brief cv::VideoCapture generic properties identifier. Reading / writing properties involves many layers. Some unexpected result might happens along this chain. From d3cc507380d24e57148e4457bc59c2d267eae67e Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 23 Mar 2023 16:58:22 +0300 Subject: [PATCH 2/2] Added reference to Media Foundation. --- modules/videoio/include/opencv2/videoio.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/videoio/include/opencv2/videoio.hpp b/modules/videoio/include/opencv2/videoio.hpp index 3c0f8cda8a..1c3f0f5eb0 100644 --- a/modules/videoio/include/opencv2/videoio.hpp +++ b/modules/videoio/include/opencv2/videoio.hpp @@ -87,7 +87,10 @@ To be used in the VideoCapture::VideoCapture() constructor or VideoCapture::open @note - Backends are available only if they have been built with your OpenCV binaries. See @ref videoio_overview for more information. -- For CAP_MSMF setting environment flag "OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS" to 0 may improve speed initialization +- Microsoft Media Foundation backend tries to use hardware accelerated transformations +if possible. Environment flag "OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS" set to 0 +disables it and may improve initialization time. More details: +https://learn.microsoft.com/en-us/windows/win32/medfound/mf-readwrite-enable-hardware-transforms */ enum VideoCaptureAPIs { CAP_ANY = 0, //!< Auto detect == 0 @@ -109,7 +112,7 @@ enum VideoCaptureAPIs { CAP_XIAPI = 1100, //!< XIMEA Camera API CAP_AVFOUNDATION = 1200, //!< AVFoundation framework for iOS (OS X Lion will have the same API) CAP_GIGANETIX = 1300, //!< Smartek Giganetix GigEVisionSDK - CAP_MSMF = 1400, //!< Microsoft Media Foundation (via videoInput) read note above + CAP_MSMF = 1400, //!< Microsoft Media Foundation (via videoInput). See platform specific notes above. CAP_WINRT = 1410, //!< Microsoft Windows Runtime using Media Foundation CAP_INTELPERC = 1500, //!< RealSense (former Intel Perceptual Computing SDK) CAP_REALSENSE = 1500, //!< Synonym for CAP_INTELPERC