Saving Image Acquisition Objects
Using the save Command
You can save a video input object to a MAT-file just as you
would any workspace variable by using the
This example saves the video input object
save myvid vid
When you save a video input object, all the video source objects associated with the video input object are also saved.
To load an image acquisition object that was saved to a MAT-file
into the MATLAB® workspace,
load command. For example,
vid from MAT-file
The values of read-only properties are not saved. When you load
an image acquisition object into the MATLAB workspace,
read-only properties revert to their default values. To determine
if a property is read only, use the
or read the property reference page.
Using the obj2mfile Command
Another way to save a video input object is to create an M-file
that contains the set of commands used to create the video input object
and configure its properties. You can use the
to create such an M-file. When you execute the M-file, it can create
a new video input object or reuses an existing video input object,
if one exists that has the same video format and adaptor.