<< Click to Display Table of Contents >> Navigation: Image Manager > CVB Technology > Acquisition device drivers and CVB Programming Interfaces > IGrab2/IGrabber Interface |
The IGrab2 interface was designed to do a continuous image acquisition into a image ring buffer and to be able to protect certain image buffers against overwriting.
It provides functions for starting and stopping the acquisition, wait for an image, etc. and belongs to the CVB Driver Library.
All functions of this IGrab2 interface are also used by the CV Image Control if you start an acquisition by setting it's Grab property to TRUE.
•G2Grab starts acquisition into a ringbuffer.
•The frame transfer will increase the acquisition index and lock the acquired buffer.
•G2Wait waits until an image has been acquired and increase the processing index.
•The frame transfer will increase the acquisition index and lock the acquired buffer.
•G2Wait will unlock the previous processing buffer and increase the processing index.
•G2Wait waits until an image has been acquired, but not forever.
The function G2GetGrabStatus with its options offers information about the image acquisition which can be used for monitoring and analysis.
Option examples:
G2INFO_NumPacketsReceived
This is related to GigE and indicates the number of data packets received on the GigE Vision streaming channel.
G2INFO_NumResends
This is related to GigE and indicates the number of resend requests issued by the host.
If this number increases, it indicates that something is wrong with the data transmission.
Possible reasons may be: Settings of the network card, CPU-load on the host, cable/switch problems, bandwidth problems on the Link.
and much more.
A platform independent C++ code example is the MultiOSConsole example (Camera.cpp) of the Image Manager
Windows: %CVB%Tutorial\Image Manager\VC\VCMultiOSConsole
Linux : /opt/cvb/tutorial/ImageManager/ComplexMultiOSConsoleExample
The IGrabber interface is used for single image acquisition functions (snap).
•Snap function waits until an image has been acquired
•The availability of only one image buffer will likely lead to frame drops.
•There are driver dependant GRAB_INFO_CMD values which are declared in the driver specific iCVCDriver.h header file.
Option examples:
▪GRAB_INFO_NUMBER_IMAGES_AQCUIRED
▪GRAB_INFO_NUMBER_IMAGES_LOST
▪GRAB_INFO_NUMBER_IMAGES_LOST_LOCKED
▪GRAB_INFO_NUMBER_IMAGES_LOCKED
▪GRAB_INFO_NUMBER_IMAGES_PENDIG
▪GRAB_INFO_GRAB_ACTIVE
▪GRAB_INFO_TIMESTAMP