![]() |
PVCAM
3.9.x
Programmable Virtual Camera Access Method library
|
This example code demonstrates acquisition of a single frame with callback notification and selected binning factors. This is repeated in a loop until user enters an empty or invalid input. Each acquisition is started by the host with an 'emulated' software trigger (pl_exp_start_seq).
Please note that the extended binning factors are fully supported on new cameras only. The extended binning factors are reported by a pair of parameters: PARAM_BINNING_SER and PARAM_BINNING_PAR. The acquisition is then configured using the setup function as usually. Please see Binning Factors Discovery chapter for details.
The code snippet below initializes PVCAM and opens the first available camera. Please refer to the actual code sample in the SDK installation directory for more details about the common helper functions used in this documentation.
This code example uses the recommended callbacks acquisition (see Polling versus Callbacks). A part of the code omitted here defines a static callback function and registers the function with PVCAM. This approach is used in other code samples as well. The relevant code part is described in Frame Callback Handler section.
The next code block fills the NVP containers with serial and parallel binning factors.
Let the user select binning factors and repeat the acquisition until invalid or no value is entered.
Print the binning values and names returned from PVCAM. The string description for each enum value already combines the serial and parallel binning value. For example, if the serial binning is 4 and parallel binning is 2, the string value is reported as '4x2'.
Find the index of the matching binning factors and break the loop if no or invalid value is entered. Update the binning factors in the region variable.
Rest of the code sample is similar to Single Image Callbacks :