How to set the bit depth of the usb camera?

4 visualizzazioni (ultimi 30 giorni)
Conway Wong
Conway Wong il 14 Lug 2022
Risposto: Abhishek il 24 Apr 2025
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?

Risposte (1)

Abhishek
Abhishek il 24 Apr 2025
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

Prodotti


Release

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by