Acquire 16-bit image from usb webcam using support package
이전 댓글 표시
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
Les Beckham
2025년 3월 11일
Do you have a question?
William
2025년 3월 11일
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개)
카테고리
도움말 센터 및 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!