Main Content

imaqfind

Find image acquisition objects

    Description

    imaqfind returns an array that contains all the video input objects that exist in memory. If only a single video input object exists in the memory, the imaqfind function displays a detailed summary of that object.

    example

    out = imaqfind(S) returns a cell array, out, that contains the image acquisition objects whose property values match those defined in the structure S.

    example

    out = imaqfind(Name,Value) returns a cell array that contains image acquisition objects matching the specified name-value arguments.

    example

    out = imaqfind(obj,Name,Value) returns a cell array that contains image acquisition objects whose name-value arguments values match those of the image acquisition objects listed in obj.

    example

    Examples

    collapse all

    This example creates several video input objects for a single image acquisition device and specifies several different video formats. To run this example on your system, use the imaqhwinfo function to get the object constructor for your image acquisition device, and substitute that syntax in the following code.

    Create video input objects.

    vidobj1 = videoinput('demo', 1, 'RGB_NTSC');
    vidobj2 = videoinput('demo', 1, 'S-Video');
    vidobj3 = videoinput('demo', 2, 'CCIR');
    imaqfind;
       
    Video Input Object Array:
    
       Index:   Type:          Name:
       1        videoinput     RGB_NTSC-demo-1
       2        videoinput     S-Video-demo-1
       3        videoinput     CCIR-demo-2

    Find the image acquisition objects whose property names and property values match the specified arguments.

    out2 = imaqfind(FramesPerTrigger = 10, FramesAcquired = 0);
    out =
    
      3×1 cell array
    
        {1×1 videoinput}
        {1×1 videoinput}
        {1×1 videoinput}

    Search for the image acquisition objects in vidobj1 that match the specified name-value arguments.

    out1 = imaqfind(vidobj1,{'FramesPerTrigger', 'FramesAcquired'}, {10, 0});
    out1 =
    
      1×1 cell array
    
        {1×1 videoinput}

    Input Arguments

    collapse all

    Image acquisition property name value arguments, specified as a structure. The field names of S are image acquisition object property names and the field values are the requested property values. Use the get function to determine the list of properties supported by an image acquisition object.

    Data Types: struct

    Image acquisition objects to find, specified as cell array of the required image acquisition objects to find.

    Data Types: cell

    Name-Value Arguments

    collapse all

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: out = imaqfind(FramesPerTrigger = 10, FramesAcquired = 0) returns a cell array for the image acquisition objects whose name-value arguments match the specified values.

    Use the get function to determine the list of properties supported by an image acquisition object. You can specify these property name-value arguments in a cell array.

    The properties listed here are a subset of image acquisition object properties. For a complete list of these properties, see the properties section of videoinput.

    This property is read-only.

    Device ID for the specified adaptor, specified as a nonnegative integer. This property identifies the device represented by the video input object.

    A device ID is a number, assigned by an adaptor, that uniquely identifies an image acquisition device. The adaptor assigns the first device it detects the identifier 1, the second device it detects the identifier 2, and so on.

    You can specify the device ID as an input for the videoinput function when you create a video input object. The object stores the value in the DeviceID property and also uses the value when constructing the default value of the Name property.

    To get a list of the IDs of the devices connected to your system, use the imaqhwinfo function and specify the name of an adaptor.

    Data Types: double

    Number of frames to acquire each time the video input object executes a trigger using the selected video source, specified as a positive integer.

    Data Types: double

    This property is read-only.

    Total number of frames that the object has acquired, regardless of how many frames have been extracted from the memory buffer, specified as a nonnegative integer. The video input object continuously updates the value of the FramesAcquired property as it acquires frames.

    To find out how many frames are available in the memory buffer, use the FramesAvailable property.

    Data Types: double

    This property is read-only.

    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 has 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. The name of a video source object is in its SourceName property. If the SourceName of a video source object is same as the SelectedSourceName of that video source object 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 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.

    Output Arguments

    collapse all

    Summary of image acquisition objects, returned as a cell array of image acquisition objects or video input objects.

    Data Types: cell

    Version History

    Introduced in R2006a