getsnapshot function is leaving blank (all black) photos
Afficher commentaires plus anciens
Using Image Acquisition Toolbox, "getsnapshot" function is ending up with blank (all black) photos.
Yet, when I use preview(TopCam), the camera initializes and shows video properly.
My understanding is that, getsnapshot will turn on the camera, wait for video stream to begin, take a frame from this stream, and save it to memory, then terminate stream.
I am unsure where the black or blank photo data is coming from.
Below is my code and output:
TopCam = videoinput('winvideo', 2, 'MJPG_4096x2160');
TopImg = getsnapshot(TopCam);
image(TopImg);

2 commentaires
Siddharth Bhutiya
le 20 Nov 2018
What camera are you using?
Could you try doing getsnapshot 5-6 times in a row and see if that gives you the image. Some cameras have a warm up period that it takes, before returning proper images.
Anthony Zand
le 21 Nov 2018
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) 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!