OpenCV VideoCapture doesn't work inside Visual Studio 2017 (Windows 10)

asked 2019-04-04 14:44:51 -0600

I have a very strange problem. VideoCapture do not open nor webcam nor video file when I run the C++ application from Visual Studio and in the case of webcam gives me the following error:

WinRT originate error - 0xC00D36B3 : 'The stream number provided was invalid.'

followed by

Microsoft C++ exception: _com_error at memory location 0x000000D9B66FCBB0. Microsoft C++ exception: _com_error at memory location 0x000000D9B66FCAA0. Microsoft C++ exception: cv::Exception at memory location 0x000000D9B66FEFD0. Microsoft C++ exception: cv::Exception at memory location 0x000000D9B66FEFD0.

But when I run the app from outside VS - everything work. I use OpenCV 4.0.0

edit retag flag offensive close merge delete

Comments

WinRT originate error

the prebuilt libs are not meant to be used with WinRT. try to use an EMPTY project with VisualStudio iinstead.

berak gravatar imageberak ( 2019-04-05 01:37:19 -0600 )edit

What is interesting - I don’t use WinRT. Actually, I created an empty “Console Application” project.

neuromantik gravatar imageneuromantik ( 2019-04-05 04:21:06 -0600 )edit