Getting a Frame Grabber Reference
Before your application can acquire images, it needs to know what kind of hardware you are using. CVL uses the term frame grabber for any hardware that can be used to digitize images. CVL defines a class for each frame grabber it supports and automatically creates an instance of these frame grabber classes for each frame grabber it detects in the system. You obtain a frame grabber object to work with by calling get().
You can first call the static count() function for the frame grabber you wish to use to make sure one is installed in your system. For example,
c_Int32 num8100m = cc8100m::count();
If num8100m = 0, no MVS-8100M frame grabbers are installed in your system. If there are one or more, reference them by index number starting with 0. The following code obtains a frame grabber object for the first (index = 0) MVS-8100M frame grabber in your system.
cc8100m& fg = cc8100m::get(0);
You can then use this frame grabber reference in conjunction with a video format to create an acquisition FIFO, as shown in the following section and in the example program The following example is designed to illustrate several techniques in a small amount of space. In an actual vision application, use only those techniques that are appropriate for your application. See General Recommendations..
Generally frame grabber boards are assigned index numbers according to the motherboard slot in which they are installed. Index 0 is assigned the lowest numbered slot, index 1 to the next higher numbered slot, and so on. However, the numbering of PCI slots varies with motherboard manufacturers and can be BIOS dependent. Consult your system hardware documentation to verify the correct frame grabber index numbers to use when more than one frame grabber is installed in your system. If you have only one frame grabber, it will always be index 0.
For another technique for getting a frame grabber reference, see Testing for a Frame Grabber.