MATLAB Answers

Why I can find only one available resolution for my webcam?

3 views (last 30 days)
Hi there,
To briefly explain my problem, I was using webcam to acquire images on Windows and everything worked fine (MATLAB can find all available resolutions of my webcam). Then I used exactly the same code on my Ubuntu machine and expected the same outputs but it turns out this time MATLAB can only detect one available resolution. I tried with my inbuilt camera and it was the same - only one resolution is available. Can anyone suggest any solutions to this problem? Cheers!
Error message:
Error using webcam/set.Resolution (line 163)
Expected Resolution to match one of these values:
'1920x1080'
The input, '640x480', did not match any of the valid values.
Error in camSimple (line 6)
cam.Resolution = '640x480';
Actual available resolutions of my webcam:
[video4linux2,v4l2 @ 0x5623c76c28c0] Compressed: mjpeg : Motion-JPEG : 1920x1080 1280x960 1280x720 800x600 640x480 640x360
[video4linux2,v4l2 @ 0x5623c76c28c0] Raw : yuyv422 : YUYV 4:2:2 : 1920x1080 1280x960 1280x720 800x600 640x480 640x360
[video4linux2,v4l2 @ 0x5623c76c28c0] Compressed: h264 : H.264 : 1920x1080 1280x960 1280x720 800x600 640x480 640x360

  0 Comments

Sign in to comment.

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by