Main Content

flushdata

Remove data from memory buffer used to store acquired image frames

Description

flushdata(obj) removes the data from the memory buffer associated with obj used to store acquired image frames

example

flushdata(obj,mode) removes the data specified by mode.

Examples

collapse all

Construct a video input object.

obj = videoinput("gentl",1);

Initiate an acquisition.

start(obj);

Check how many frames of data are available.

obj.FramesAvailable
ans =
     10

Remove the data from the memory buffer.

flushdata(obj)

Check how many frames of data are available.

obj.FramesAvailable
ans =
     0

Remove the video input object from memory.

delete(obj)

Input Arguments

collapse all

Video input object, specified as the output of the videoinput function. obj can be a single video input object or an array of video input objects.

Example: videoinput("matrox")

Select which data to remove, specified as one of the following.

  • "all" — Remove all buffer data associated with obj.

  • "triggers" — Remove the data that was acquired during the oldest trigger executed. TriggerRepeat must be greater than 0 and FramesPerTrigger must not be set to Inf. See videoinput Trigger Properties.

Example: "triggers"

Data Types: char | string

Version History

Introduced before R2006a