How to fix "The camera did not return a frame for this resolution" error when creating second webcam object?
조회 수: 7 (최근 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!