Use the snapshot function
to acquire one image frame from a Matrox frame grabber. You then
show it using a display function such as imshow or image.
Use the matroxlist function to ensure
that MATLAB® is discovering your frame grabber.
ans =
Solios XCL (digitizer 0)
Solios XCL (digitizer 1)
VIO (digitizer 0)
Use the matroxcam function to create
the object and connect it to the frame grabber. If you want to use
the second frame grabber in the list, the Solios XCL at digitizer
1, use a 2 as the index number, since it is the
second board on the list. The second argument must be the name and
path of your DCF file, entered as a character vector.
m =
Display Summary for matroxcam:
DeviceName: 'Solios XCL (digitizer 1)'
DCFName: 'C:\Drivers\Solios\dcf\XCL\Basler\A404K\mycam.dcf'
FrameResolution: '1300 x 1080'
Timeout: 10 The DCF file is specified so that the acquisition can use the
properties you have set in your DCF file.
Preview the image from the frame grabber.
You can leave the Preview window
open, or close it any time. To close the preview:
Acquire a single image from the frame grabber using the snapshot function,
and assign it to the variable img.
Display the acquired image.
Clean up by clearing the object.
Note about Hardware Triggering: If
your DCF file is configured for hardware triggering, then you must
provide the trigger to acquire images. To do that, call the snapshot function
as you normally would, as shown in this example, and then perform
the hardware trigger to acquire the frame. When you call the snapshot function
with hardware triggering set, it will not timeout as it normally would.
Therefore, the MATLAB command-line will be blocked until you
perform the hardware trigger.