Thanks a lot, that fixed the problem with the cv::VideoCapture(). I can now open the Camera like this:
cv::VideoCapture cam("video=Microsoft® LifeCam HD-3000", cv::CAP_FFMPEG);
// cam.set(cv::CAP_PROP_FORMAT, -1); // If activated camera Window is about 1 px high and as wide as my screen
I tested also with cv::cudacodec::VideoReader() and there I get:
OpenCV(4.6.0) C:\...\private.cuda.hpp:112: error: (-213:The function/feature is not implemented) The called functionality is disabled for current build or platform in function 'throw_no_cuda'
I also looked up the post from @alex to this problem:
I did that, but it still gives me the error message.
Should I open up a new thread for this problem or could this be related?
That error implies that VideoCapture inside of VideoReader failed to open the stream, however I can’t think of a reason why because the below worked for you
Is there any additional error messages?
Have you tried stepping through the code to see what is happening?
Do you get any additional info if you set the following environmental variables?
OPENCV_LOG_LEVEL=DEBUG
OPENCV_VIDEOIO_DEBUG=1
That’s strange, if you reach that warning VideoCapture has opened the web cam and you should not have fallen through to try CuvidVideoSource and see the previous error.
If I were you I would step through the code and see what is throwing an exception inside