Main Content

VideoFormat

Specify video format or name of device configuration file

Description

The VideoFormat property specifies the video format used by the image acquisition device or the name of a device configuration file, depending on which you specified when you created the object using the videoinput function.

Image acquisition devices typically support multiple video formats. When you create a video input object, you can specify the video format that you want the device to use. If you do not specify the video format as an argument, the videoinput function uses the default format. Use the imaqhwinfo function to determine which video formats a particular device supports and find out which format is the default.

As an alternative, you can specify the name of a device configuration file, also known as a camera file or digitizer configuration format (DCF) file. Some image acquisition devices use these files to store device configuration information. The videoinput function can use this file to determine the video format and other configuration information.

Use the imaqhwinfo function to determine if your device supports device configuration files.

Characteristics

Access

Read only

Data type

Character vector

Values

Device-specific. The example describes how to get a list of all the formats supported by a particular image acquisition device.

Examples

To determine the video formats supported by a device, check the SupportedFormats field in the device information structure returned by imaqhwinfo.

info = imaqhwinfo('winvideo')

info = 

       AdaptorDllName: [1x73 char]
    AdaptorDllVersion: '2.1 (R2007a)'
          AdaptorName: 'winvideo'
            DeviceIDs: {[1]}
           DeviceInfo: [1x1 struct]

info.DeviceInfo

ans = 

          DefaultFormat: 'RGB555_128x96'
    DeviceFileSupported: 0
             DeviceName: 'IBM PC Camera'
               DeviceID: 1
  VideoInputConstructor: 'videoinput('winvideo', 1)'
 VideoDeviceConstructor: 'imaq.VideoDevice('winvideo', 1)'       
       SupportedFormats: {1x34 cell}

See Also