![]() |
PVCAM
3.9.x
Programmable Virtual Camera Access Method library
|
This sample demonstrates usage of post-processing features and parameters. It shows how to access the post-processing features of a camera without hard-coding values, independently of which camera is detected and used.
Every camera may support different set of post-processing 'features'. Features are groups which group one or more 'parameters'. These 'parameters' are similar to regular PVCAM parameters, but they need to be discovered by the application at run-time. The 'parameters' are currently limited to uns32
data type.
The application will usually build a tree similar to the following one:
Because the indexes and their order may be different for every camera, the PVCAM also provides a PARAM_PP_FEAT_ID and PARAM_PP_PARAM_ID parameters. These IDs are uniquely defined in pvcam.h and they are assigned to a particular feature/parameter.
If the application needs to programmatically control a particular PP parameter, it should use the ID to find to corresponding indexes first and then set the indexes to PVCAM and control the parameter state via PARAM_PP_PARAM parameter.
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.
Check if the camera supports post-processing parameters:
Detect all available post-processing features using the DiscoverCameraPostProcessing helper function and display them in a tree structure:
Build a selection list for the post-processing features and display it in the console as an interactive menu.
Allow the user to interact with the PP features' parameters as long as valid input is entered.
Once the PP feature and PP parameter indexes are retrieved from the user, ask the user to enter a new value for this particular PP parameter. Once obtained, set the new value with the SetPpParamValue helper function and verify it by reading back the value with the GetPpParamValue function.
Clean up before exiting the application. For more details, please, refer to the Closing Camera and Uninitializing PVCAM section.