MATLAB: How to fix “The camera did not return a frame for this resolution” error when creating second webcam object

camera calibration appcomputer visionComputer Vision Toolboximage acquisitionImage Acquisition Toolboximage processingImage Processing Toolboxlifecam cinemastereoscopic camerausb camerawebcamwebcam objectwebcamlist

Background: I am using a Surface Pro 3 with an i3 and 4GB of RAM running WINDOWS 10. It has one USB port which I used to connect a USB 3.0 hub to it with 4 ports. I connect two (MicroSoft) LifeCam Cinema webcam devices to the USB hub. I am running Matlab 2016B with Image Acquisition, Image Processing, and webcam support package and many more toolboxes that I can list at request.
Code (which produces the error):
>> webcamlist
ans =
2×1 cell array
'Microsoft® LifeCam Cinema(TM)'
'Microsoft® LifeCam Cinema(TM)'
>> cam1=webcam(1)
cam1 =
webcam with properties:
Name: 'Microsoft® LifeCam Cine…'
Resolution: '640x480'
AvailableResolutions: {1×12 cell}
WhiteBalance: 4500
Saturation: 83
ExposureMode: 'auto'
Contrast: 5
Zoom: 0
Pan: 0
Brightness: 143
WhiteBalanceMode: 'auto'
FocusMode: 'manual'
Sharpness: 25
Focus: 14
Tilt: 0
Exposure: -6
BacklightCompensation: 0
>> cam2=webcam(2)
cam2 =
webcam with properties:
Name: 'Microsoft® LifeCam Cine…'
Resolution: '640x480'
AvailableResolutions: {1×12 cell}
WhiteBalance: 4500
Saturation: 83
ExposureMode: 'auto'
Contrast: 5
Zoom: 0
Pan: 0
Brightness: 143
WhiteBalanceMode: 'auto'
FocusMode: 'manual'
Sharpness: 25
Focus: 14
Tilt: 0
Exposure: -6
BacklightCompensation: 0
The camera did not return a frame for this
resolution.
What I've Tried/More Info: -Uninstalling the driversand reinstalling
-Connecting the cameras in a different order (I found out both work, it is always the second webcam object which doesnt work)
-Restarting my computer and matlab
-Downloading the Image Acquisition toolbox and adapters for that toolbox
-This works on my computer at school (don't know every detail about that computer; also it is in another country at the moment)
-Previewed the camera that gets the error and it is always black (no image) whereas the webcam that didn't get the error (always the first cam object) is previewable (displays video in real time).
-Not sure if Windows 10 is the problem since it partially works? I just realized the mathworks page says Windows 7 is the only Windows that is compatible with the USB Webcam Support Package….
Any help would be greatly appreciated! Thank you in advance! And sorry if I have broken any forum rules or haven't provided enough info; this is the first time I'm ever resorting to a forum haha.
Thanks!

Best Answer

Answering my own question: Windows 10 was the problem. Apparently Windows 7 is the latest Windows OS that is supported by Webcam Support Package. That was a tricky answer to find since it installed without a problem and even partially worked since I could use the Webcam Support Package functions like webcamlist and even use it for one webcam, but not multiple (two) webcams... Hope this helps hundreds of other people not waste hours trying to fix this problem like I did.
Related Question