-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
Description
System Information
OpenCV v4.12.0
VisualStudio 17.14.11
Windows 11
Detailed description
Using OpenCV sample code "videocapture_camera.cpp" unchanged, each frame capture / imshow function produces multiple exceptions (in VS debugger) of the type:
Exception thrown at 0x00007FFBD37A7F9A in VidCap.exe: Microsoft C++ exception: _com_error at memory location 0x0000005D01EFE990
Apart from this, the sample app appears to work correctly. Exceptions disappear when using CAP_DSHOW apiPreference.
I understand (from comments in https://forum.opencv.org/t/repeated-com-error-with-vidcap-in-vs17/23646) that "the code connecting OpenCV to MSMF (media foundation) is not as “trodden” as the DSHOW backend".
Steps to reproduce
Using OpenCV sample code "videocapture_camera.cpp" unchanged:
opencv/samples/cpp/videocapture_camera.cpp at master · opencv/opencv · GitHub
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)