How to fix "The camera did not return a frame for this resolution" error when creating second webcam object?
5 次查看(过去 30 天)
显示 更早的评论
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!
3 个评论
Hassan Mehmood Khan
2017-4-10
I found the same issue. I am using matlab R2016a. I am using two Logitech Cameras. and one of them was showing: " The camera did not return a frame for this resolution." . It was solved once i exit the default software of webcam, and exit all my applications which might be using Webcam like Skype OR Viber. Then i restart the Matlab.
Then the issue was solved. Both webcam can be read by Matlab for Image Processing.
采纳的回答
Shawn Saini
2017-2-25
1 个评论
Nisa tankutay
2021-6-5
sorry but ı dont understand, how can ı fix this problem? How can use 2 cameras on matlab?
更多回答(2 个)
Islam Gaied
2019-11-17
This is happened to me a 100 times , 1 cam will work and the other no cause you have a logiciel on ur pc connect to one of the cameras , the solution is simple just block acess to ur cams for all ur programs except matlab ( like skype , google chrome safari ...)
For all ur navigators like chrome you need to delete all data on ur browser ( cache , history ....) then block the camera
0 个评论
Madhura Suresh
2017-4-18
Can you switch the resolution to a different one, using:
w.Resolution = '<insert value here>';
2 个评论
machhindra bhamare
2018-7-6
i have same problem ,i connect three microsoft cameras ,to usb 3.0 hub ,at the time of processing its loses resolution,this is the hardware issue ,i remove the usb 3.0 hub then is ok
Aldo G. Orozco-Lugo
2021-2-22
Nice, leaving one camera on the hub and the other in another usb port solves the problem in windows 10
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Support Package for IP Cameras 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!