Capture image from webcam on mouse click.
Afficher commentaires plus anciens
Hi,
I am trying to capture image from a webcam. The image snapshot has to be taken after a mouse click. I want to have a click button on preview screen. Can anyone help me do this? Below part is my code to capture image from webcam.
% webcam capture
cam1 = webcam('FaceTime');
preview(cam1);
pause(5);
img = snapshot(cam1);
closePreview(cam1);
imshow(img);
clear('cam1');
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Acquisition Using Image Acquisition Explorer dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!