Acquire 16-bit image from usb webcam using support package
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a USB camera that supports 16-bit image acquisition. The code below creates a 512x640x3 uint8 where all of the layers are identical (as I expect for a gray scale image)
clear
close
webcamlist
cam = webcam(2)
img = snapshot(cam);
figure
imshow(img)
4 commentaires
Cris LaPierre
le 11 Mar 2025
To acquire other data types, you likely need to use the Image Acquistion Toolbox. I also had to install the Image Acquisition Toolbox Support Package for OS Generic Video Interface in order capture images. Unfortunatly, my camera does not provide the data at uint16, so I can't test that.
Here's the code I used.
% determine what type of video input I have
obj = imaqhwinfo
% Capture a single frame.
vidobj = videoinput('winvideo',2)
frame = getsnapshot(vidobj);
DGM
le 11 Mar 2025
I had been looking for things earlier, and I did see this:
I don't have IAT or a webcam, so I'm gonna have to tap out.
Er, well now you've got me wondering if I can access my analog capture card in anything other than uint8. I'm just going to assume the answer is no.
Réponses (0)
Voir également
Catégories
En savoir plus sur Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!