Image Acquisition Toolbox

Can someone, please, help me to anderstand why Matlab give me this error message?
Thid is the programme from Matlab Help.

[u]This is the programme[/u]

vid = videoinput('winvideo')
% Set video input object properties for this application.
% Note that example uses both SET method and dot notation method.
vid.FrameGrabInterval = 5;
% Set value of a video source object property.
vid_src = getselectedsource(vid);
set(vid_src,'Tag','motion detection setup');
% Create a figure window.
% Start acquiring frames.
% Calculate difference image and display it.
while(vid.FramesAcquired<=10) % Stop after 10 frames
data = getdata(vid,1);
diff_im = imabsdiff(data(:,:,:,1),data(:,:,:,2));

Summary of Video Input Object Using 'USB Video Device'.

Acquisition Source(s): input1 is available.

Acquisition Parameters: 'input1' is the current selected source.
10 frames per trigger using the selected source.
'YUY2_160x120' video data to be logged upon START.
Grabbing first of every 1 frame(s).
Log data to 'memory' on trigger.

Trigger Parameters: 1 'immediate' trigger(s) on START.

Status: Waiting for START.
0 frames acquired since starting.
0 frames available for GETDATA.

[u]And this is the error message[/u]

??? Index exceeds matrix dimensions.

Thanks a lot. Edward
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!