User`s guide
6 Defining Device-Specific Properties
6-2
Defining Device-Specific Properties
You define which properties of your image acquisition device you want to expose to
toolbox users. You make this determination by reading the device SDK documentation,
determining its capabilities, and deciding which capabilities toolbox users will expect to
configure. Once you decide to expose a property, define the following characteristics of
the property:
• Name
• Data type
• Range of valid values (optional)
Adaptor writers typically wait to define properties until after they are able to acquire
data from the device. To see the effect of some properties, you need to be able to acquire
data.
User Scenario
The properties that you define for your device appear to users as properties of the video
source object associated with the video input object. The toolbox defines the properties of
the video input object, which represent general properties that are common to all image
acquisition devices.
To view the device-specific properties you define, get a handle to the video source object
and use the get function. To set the value of device-specific properties you define, get
a handle to the video source object and use the set function. For example, this code
creates a video input object and uses the getselectedsource function to get a handle
to the currently selected video source object. With this handle, you can then use the get
command to view the properties of the video source object.
vid = videoinput('winvideo',1)
src = getselectedsource(vid);
get(src)
General Settings:
Parent = [1x1 videoinput]
Selected = on
SourceName = input1
Tag =
Type = videosource