User`s guide

Working with Image Data in MATLAB Workspace
7-13
Video Format and Image Dimensions
The following example illustrates how video format affects the size of the image frames
returned.
1
Select a video format — Use the imaqhwinfo function to view the list of video
formats supported by your image acquisition device. This example shows the video
formats supported by a Matrox Orion frame grabber. The formats are industry
standard, such as RS170, NTSC, and PAL. These standards define the image
resolution.
info = imaqhwinfo('matrox');
info.DeviceInfo.SupportedFormats
ans =
Columns 1 through 4
'M_RS170' 'M_RS170_VIA_RGB' 'M_CCIR' 'M_CCIR_VIA_RGB'
Columns 5 through 8
'M_NTSC' 'M_NTSC_RGB' 'M_NTSC_YC' 'M_PAL'
Columns 9 through 10
'M_PAL_RGB' 'M_PAL_YC'
2
Create an image acquisition object — This example creates a video input object
for a Matrox image acquisition device using the default video format, RS170. 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 for the
following code.
vid = videoinput('matrox',1);
3
View the video format and video resolution properties — The toolbox creates
the object with the default video format. This format defines the video resolution.
vid.VideoFormat
ans =
M_RS170