Acquire 16-bit image from usb webcam using support package
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Cris LaPierre
2025 年 3 月 11 日
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
2025 年 3 月 11 日
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.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!