How to set the bit depth of the usb camera?

5 次查看(过去 30 天)
I have a usb 3.0 monochromatic camera which supports the 8bit and 10bit pixel depth. I can acquire 10 bit image by the third-part software. But I cannot acquire 10 bit image by matlab, because only the rgb8 format is available in the image acquisition tool. The installed adaptor is OS Generic Video Interface. How to acuire 10 bit image for a usb camera?

回答(1 个)

Abhishek
Abhishek 2025-4-24
Hi Conway,
I understand that you want to acquire 10-bit images from a USB camera.
When using the MATLAB "videoinput" function, the "PreviewFullBitDepth" property can be set to "on" to preview the image data at its full depth. Note that this property can be set to "on" only when the value of the "ReturnedColorspace" property is set to "grayscale" and for video formats higher than 8-bit depth. For more information, please refer to the "videoinput" function documentation: https://www.mathworks.com/help/releases/r2024b/imaq/videoinput.html
To capture a single image frame from the video input object, "getsnapshot" function can be used, the documentation of which could be found at: https://www.mathworks.com/help/releases/r2024b/imaq/imaqdevice.getsnapshot.html

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by