PVCAM  3.9.x
Programmable Virtual Camera Access Method library
Post-Processing

Most PVCAM-compatible cameras offer on-board post-processing (PP) capabilities. PVCAM provides a mechanism for discovering the available post-processing features and their parameters.

Available Parameters

All the post-processing features and parameters are controlled via a set of PVCAM parameters (see Parameter Access Functions chapter for details) which can be viewed as a tree where each PP feature has a different number of PP parameters. Typically, PP features and their parameters are discovered in the following order:

  • PARAM_PP_INDEX - the index corresponding to the post-processing feature. This parameter should be used for discovering any available PP features and for switching between them.
  • PARAM_PP_FEAT_ID - a unique identifier for the currently selected PP feature. Even though the same features may not appear at the same index across various camera models, this ID will always identify a particular post-processing feature.
  • PARAM_PP_FEAT_NAME - the name of the currently selected PP feature.
  • PARAM_PP_PARAM_INDEX - the index corresponding to post-processing parameter under the currently selected PP feature. It is also used for switching between all the feature parameters.
  • PARAM_PP_PARAM_ID - a unique identifier for the currently selected PP parameter. Even though parameters may not appear at the same index due to differences in features and parameters supported by a particular camera, this ID will always identify a particular post-processing parameter.
  • PARAM_PP_PARAM_NAME - the name of the currently selected PP parameter for the currently selected PP feature.
  • PARAM_PP_PARAM - the value of the currently selected PP parameter for the currently selected PP feature.

PVCAM API contains a single post-processing control function:

  • pl_pp_reset - resets all the PP parameters of all the PP features to their factory defaults, i.e. the camera power-up state.

Available Post-Processing Features

All the existing post-processing features are listed in PP_FEATURE_IDS enum in pvcam.h header file.

Please note that the feature names in this list and actual advertised names may differ. For example, the feature advertised as PrimeEnhance is named Denoising (PP_FEATURE_DENOISING) in the PVCAM SDK.
Refer to your camera documentation for more details.

Most cameras only support a subset of the exisiting post-processing features, thus dynamic feature discovery is always required.

Initial Discovery

To identify and cache available post-processing features and parameters, the application code should traverse the post-processing tree:

Using Unique IDs

Traversing the tree of all PP features and parameters whenever a value has to be changed (e.g. to enable or disable Denoising feature) is not required. After caching all indexes and IDs during the initial discovery, any value can be changed following the steps in the example pseudo-code below:

// TODO: Handle errors
// Switch to the Denoising feature
int16 featIdx = GetPpFeatureIndexForId(hcam, PP_FEATURE_DENOISING);
pl_set_param(hcam, PARAM_PP_INDEX, &featIdx);
// Switch to the enabled parameter
int16 paramIdx = GetPpParameterIndexForId(hcam, PP_FEATURE_DENOISING_ENABLED);
// Set new value
uns32 value = 1;
Note
Please, refer to the Post-Processing Parameters and Post-Processing Programmatically code samples for more details.