Trouble Streaming From Microsoft Lifecam HD 3000

We are using python and opencv for vision processing this year. Last year we used the axis camera and by passing in url = ‘http://10.5.1.11/axis-cgi/mjpg/video.cgi?resolution=640x480’ into cv2.VideoCapture(url) we were able to get frames of what the camera was seeing in order to process them.

This year however, we are trying to use the Microsoft Lifecam HD 3000 and have had no success streaming images. We tried using the url that works fine in the browser, but have had no success.

Does anyone have any suggestions?

Thanks in advance!

Most likely you are using a version of OpenCV that does not have ffmpeg/libav compiled in (or if you’re on Windows, it’s not in the right place)

Is this on a PI/other coprocessor or on the driver station? I’d recommend using robotpy-cscore to read from the stream, the ffmpeg jpg stream stuff is pretty terrible and has a lot of latency. Unfortunately, the docs aren’t quite there yet… but check out this example of reading from a HTTP stream, it’s pretty simple and very high performance: robotpy-cscore/examples/httpcvstream.py at main · robotpy/robotpy-cscore · GitHub

We’re running it on the driver station. Thank you so much for this helpful example! We will try it tonight when we meet =)