Main Content

Source

Indicate video source objects associated with video input object

Description

The Source property is a vector of video source objects that represent the physical data sources connected to a device. When a video input object is created, the toolbox creates a vector of video source objects associated with the video input object.

Each video source object created is provided a unique source name. You can use the source name to select the desired acquisition source by configuring the SelectedSourceName property of the video input object.

A video source object's name is stored in its SourceName property. If a video source object's SourceName is equivalent to the video input object's SelectedSourceName, the video source object's Selected property has a value of 'on'.

The video source object supports a set of common properties, such as SourceName. Each video source object can also support device-specific properties that control characteristics of the physical device such as brightness, hue, and saturation. Different image acquisition devices expose different sets of properties.

A video source is defined to be a collection of one or more physical data sources that are treated as a single entity. For example, hardware supporting multiple RGB sources, each of which is made up of three physical connections (red-green-blue), is treated as a single video source object.

The Source property encapsulates one or more video sources. To reference a video source, you use a numerical integer to index into the vector of video source objects.

Characteristics

Access

Read only

Data type

Vector of video source objects

Values

Defined at object creation time

Examples

Create an image acquisition object.

vid = videoinput('matrox');

To access all the video source objects associated with a video input object, use the Source property of the video input object. (To view only the currently selected video source object, use the getselectedsource function.)

sources = vid.Source;
src = sources(1);

To view the properties of the video source object src, use the get function.

get(src)
  General Settings:
    Parent = [1x1 videoinput]
    Selected = on
    SourceName = CH1
    Tag = 
    Type = videosource

  Device Specific Properties:
    InputFilter = lowpass
    UserOutputBit3 = off
    UserOutputBit4 = off
    XScaleFactor = 1
    YScaleFactor = 1