![]() |
Perfectly Clear SDK Documentation
9.1.1.325
|
There are two main ways in which the Perfectly Clear SDK is typically used. First is the simplest: process images with an unchanging set of parameters. For this, the PFC_AutoCorrect function is perfect; all you need to do it setup the correction parameters, load the image data, then call PFC_AutoCorrect(). Scenario #1 (Linux Sample Code, Windows Sample Code, C# Sample Code) shows this operation.
For interactive applications where a user might be changing correction parameters, it's more efficient to use our separate PFC_Calc() and PFC_Apply() functions. The Calc phase must be run once per image - and does not change based on image correction parameters, allowing you to speed up the correction results for use in interactive applications where users can alter the correction parameters and getting a preview image back to the customer is the primary goal. This method also requires creating a PFCENGINE and PFCIMAGEPROFILE, and requires releasing the engine and profile once complete. So, there are a few more steps involved, but this method provides substantial performance benefits when repeated Apply calls are performed. Scenario #2 (Linux Sample Code, Windows Sample Code, C# Sample Code) shows this operation.
All the corrections in the SDK are controlled through individual parameters (see the PFCPARAM and following sections). Presets are collections of these individual parameters. The easiest way to do create presets is using our Perfectly Clear Workbench application - and its "Export to API" or "Export Preset" capabilities. Details are here. In addition to settings all parameters by loading these from a Preset, you can adjust individual parameters programmatically. The sample applications and (Correction Parameters) section will show this in action.
We introduced many new image correction and image adjustment tools in 'Version 3' of our Perfectly Clear desktop software (including Perfectly Clear Complete and Workbench). These tools are available now through PFCV3PARAM structure. These tools are available only on the desktop versions of our SDK (Linux, Windows, Mac OS) and WebAssembly SDK, but are not at this time available for Android or iOS. Many of these tools use "LOOKs" that are loaded via an external, runtime processed file called v3.looks. This file must be packaged and deployed along with the application you build with this SDK. Support for these corrections is provided through an optional module and is not included by default.
The image corrections controlled by the PFCFBPARAM parameters are referred to as the "Beautify" corrections. These correspond to the corrections provided in the Eyes, Face, Skin, and Makeup panels in Perfectly Clear products. Support for these corrections is provided through an optional module and is not included by default.
This SDK provides robust face detection processing and provides you with details about the faces it finds. This includes blink and smile detection, face rotation and yaw angles, face and eye position and size, and confidence values about these detection parameters. You can find the data provided in the PFCFaceRect structure.