![]() |
Perfectly Clear SDK Documentation
10.0.0.495
|
Applying the Perfectly Clear corrections will require the following steps:
We have samples of all of these in the sections below.
The AI Preset Detection model and Perfectly Clear AI corrections are distributed in a proprietaty AI model format as .pnn files (Perfectly Clear Neural Network). These models need to be loaded at before use, but can then be quickly re-used on all images you are correcting.
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(). See the sample code for examples of both of these use-cases.
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.
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.