How to snapshot the image using imaq.VideoDevice?

Can I ask some question? I would like to know how to snapshot the image. I cannot use function getsnapshot with imaq.VideoDevice. Thank u.
Error is show that "Too many output argument" How to fixed it?
Thank you :)

댓글 수: 4

Ara - what is the line (or lines) of code that you are using to get a snapshot of the image? The error too many output arguments implies that the code is expecting more outputs than what the function provides.
From getsnapshot, there are two output "signatures"
frame = getsnapshot(obj)
[frame, metadata] = getsnapshot(obj)
Is your code similar, or is it expecting more outputs?
Ara
Ara 2014년 7월 22일
편집: Ara 2014년 7월 22일
It's about like this
Thank you very much :)
vidDevice = imaq.VideoDevice('winvideo', 1, 'YUY2_640x480');
imag=getsnapshot(vidDevice);
imwrite(imag,'camera.jpg');
pre=imread('camera.jpg');
imshow(pre);
And the error occurs at which line?
Have you checked out imaq.videodevice? In the example, the code uses
frame = step(vidobj);
to acquire a single frame. What happens when you try to use this function?
Ara
Ara 2014년 7월 22일
Thank you, I got it :)

댓글을 달려면 로그인하십시오.

답변 (0개)

질문:

Ara
2014년 7월 21일

댓글:

Ara
2014년 7월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by