Image acquisition tool box: Blank Preview and Dropping frames continuously

4 views (last 30 days)
I am trying to capture video using my webcam and the image acquisition toolbox. I have determined my deviceID and name. However, when I try to preview my video object I see a black screen with the status bar saying "Dropped %d frames continuously" where %d is a quickly increasing number. How can I get MATLAB to record?
%Capture the video frames using the video input function
%create video input object
vid = videoinput('winvideo',1 ); %logitech webcam
%set properties
set(vid, 'TriggerRepeat',Inf);
set(vid, 'FramesPerTrigger', Inf);
set(vid, 'ReturnedColorspace', 'rgb');
vid.FrameGrabInterval = 5;
vid_src = getselectedsource(vid);
set(vid_src,'Tag','motion detection setup');
preview(vid)
Then it is just black and says it is dropping frames continuously. When I use the device ID for my laptop's built in webcam, it does the exact same thing where it is black screen and dropping frames continuously.
I have followed MATLAB's image acquisition toolbox support through each step (<http://www.mathworks.com/help/imaq/basic-image-acquisition-procedure.html)>, including checking that my webcam is installed and runs on the manufacturers software. It works fine outside of MATLAB.

Answers (0)

Community Treasure Hunt

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

Start Hunting!