![]() |
PVCAM
3.9.x
Programmable Virtual Camera Access Method library
|
This page explains difference between callbacks and polling.
Polling is a periodic call reading the camera status.
If polling is used, PVCAM translates the BOF and EOF events as follows:
Callback is an executable function registered by the application. Once a specified event occurs in PVCAM, it calls the handler function directly to handle the event.
Callbacks are the preferred approach because with modern cameras the change between READOUT_COMPLETE and EXPOSURE_IN_PROGRESS states may happen too fast to be reliably captured using the polling method.
Due to on-camera frame buffering, the EXPOSURE_IN_PROGRESS and READOUT_IN_PROGRESS states do not always match the camera state. It can be interpreted as the n-th frame transfer has completed, but additional frames could have been read out and buffered in the meantime with another frame being currently exposed.
For these reasons the use of EOF callbacks for new frame notifications and camera hardware signals for the synchronization with other devices are recommended.
Polling method may be considered an option when using CCD cameras or when acquiring at low frame rates.
Callbacks approach is more robust and handles high-speed imaging with better reliability.