User`s guide
4 Connecting to Hardware
Saving Image Acquisition Objects
In this section.. .
“UsingthesaveCommand”onpage4-30
“Using the obj2mfile Command” on page 4 -30
Using the save Command
You can save a video input object to a MAT-file just as you would any
workspace variable by u sing the
save command. This example saves the
video input object
vid to the MAT-file myvid.mat.
save myvid vid
When you save a video input object, all the video s ource objects a ssociated
with the video inpu t object are also saved.
To load an image acquisition object that was saved to a MAT-file into the
MATLAB workspace, use the
load comm and. For example, to load vid from
MAT-file
myvid.mat,use
load myvid
Note The values of re ad-on ly 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 o nly, use the
propinfo function or read the property reference page.
Using the obj2mfile Command
Another way to save a video input objectistocreateanM-filethatcontains
the set of comm ands us ed to create the video input object and configure its
properties. You can use the
obj2mfile function 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.
4-30