120 Frame per second USB camera

2 件のコメント
採用された回答
0 件のコメント
その他の回答 (1 件)
Hi @Tala,
After reviewing your comments and going through documentation provided at the link below
https://www.mathworks.com/help/matlab/supportpkg/set-properties-for-webcam-acquisition.html
You can resolve the issue of capturing video at 120 fps with your webcam in MATLAB by considering a few important points regarding camera capabilities and MATLAB's handling of webcam properties.
1. Webcam Capabilities: Not all webcams can support high frame rates at high resolutions. In your case, while your camera can record at 1920x1080 resolution, it appears that it only supports a maximum frame rate of 30 fps at this resolution. This limitation is common among many webcams, especially consumer-grade models. The ability to record at 120 fps often requires lower resolutions, such as 800x600 or 640x480.
2. MATLAB's Webcam Object: The error message you received (`'FrameRate' value must be {30.0000}`) indicates that MATLAB has detected that the maximum supported frame rate for your camera at the selected resolution is indeed 30 fps. The `FrameRate` property in MATLAB is read-only for certain cameras, meaning it reflects what the camera can actually provide.
3. Changing Resolution for Higher Frame Rate: To achieve 120 fps, you will need to switch to a lower resolution. Based on your willingness to go down to 800x600, you can try setting the resolution accordingly and then see if you can set the frame rate.
Here’s how you might adjust your code:
% Create webcam object cam = webcam('HD USB Camera');
% Set resolution to a lower value cam.Resolution = '800x600';
% Check available resolutions availableResolutions = cam.AvailableResolutions; disp('Available Resolutions:'); disp(availableResolutions);
% Try setting frame rate % Note: FrameRate may not be settable directly depending on your camera set(cam, 'FrameRate', '120'); % This may still return an error if unsupported
4. Check Available Properties: After adjusting the resolution, check if you can access a higher frame rate by listing out available properties:
% Display properties of the camera disp(cam);
Hope this helps.
1 件のコメント
Hi @Tala,
You flagged my comments without reading them. Try to understand what I mentioned, @Cris LaPierre said the same thing, this was mentioned in the documentation in the link provided in my comments above.
2. MATLAB's Webcam Object: The error message you received (`'FrameRate' value must be {30.0000}`) indicates that MATLAB has detected that the maximum supported frame rate for your camera at the selected resolution is indeed 30 fps. The `FrameRate` property in MATLAB is read-only for certain cameras, meaning it reflects what the camera can actually provide.
参考
カテゴリ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!