User`s guide

14 Using the VideoDevice System Object
14-12
Property Description
BayerSensorAlignment String indicating the 2x2 sensor alignment. Specifies
Bayer patterns returned by hardware. Specify
the sensor alignment for Bayer demosaicing. The
default value of this property is 'grbg'. Possible
values are {grbg|gbrg|rggb|bggr}. Visible only if
ReturnedColorSpace is set to 'bayer'.
obj.BayerSensorAlignment
shows the list of available sensor alignments.
ReturnedDataType The returned data type of the acquired frame. The default
ReturnedDataType is single.
obj.ReturnedDataType
shows the list of available data types.
Note: The setting of properties for the System object supports tab completion for
enumerated properties while coding in MATLAB. Using the tab completion is an easy
way to see available property values. After you type the property name, type a comma,
then a space, then the first quote mark for the value, then hit tab to see the possible
values.
Once you have created a VideoDevice System object, you can set either object-level
properties or device-specific properties on it.
To set an object-level property, use this syntax:
vidobj.ReturnedColorSpace = 'grayscale';
You can see that the syntax for setting an object-level property is to use
<object_name>.<property_name> = <property_value>, where the value may be a
string or a numeric.
Another example of an object-level property is setting the region-of-interest, or ROI, to
change the dimensions of the acquired image. The ROI format is specified in pixels in a 1-
by-4 element vector [x y width height].
vidobj.ROI = [1 1 200 200];