 |
Perfectly Clear SDK Documentation
10.7.2.1269
|
Go to the documentation of this file.
7 #ifndef __PERFECTLYCLEARPRO_H__
8 #define __PERFECTLYCLEARPRO_H__
15 #define ULONG unsigned long
16 #define UINT unsigned int
23 #define NRRETCODE(x) (x & 0x000000FF)
24 #define CORERETCODE(x) ((x >> 8) & 0x000000FF)
26 #define FBRETCODE(x) ((x >> 16) & 0x000000FF)
28 #define RERETCODE(x) ((x >> 24) & 0x000000FF)
30 #define PFCINTERNAL void*
486 BOOL bSelectiveColor2;
555 #define PFC3DLutGuidLength 32
558 char guid[PFC3DLutGuidLength + 1];
679 #define PFCPROFILE PFCIMAGEPROFILE*
682 #define PFCBGPROFILE PFCINTERNAL
929 int PFC_GetLooks3DLut(
PFCENGINE *pEngine,
const char* lookGuids,
int *iLookStrengths,
int *iLookContrasts,
int *iLookSaturations,
int iLooksCount,
float* final3Dlut);
1159 int PFC_LoadAIEngineNative(
PFCENGINE* pEngineAI,
unsigned int aifeatures,
const char *modelDynamic,
int lenDynamic,
const char *modelSD,
int lenSD,
const char *modelSkintone,
int lenSkintone,
const char *modelAicolor,
int lenAicolor,
const char *modelFDFront,
int lenFDFront,
const char *modelFDBack,
int lenFDBack,
const char *modelFaceMesh,
int lenFaceMesh,
const char *modelBlendShape,
int lenBlendShape,
int bUseAngroidGPU,
const char *apikey,
const char *certificate,
int *statusCertificate);
1292 #include "../Header-internal/PerfectlyClearPro-internal.h"
1298 #endif //__PERFECTLYCLEARPRO_H__
int PFC_WasmSetCertificate(PFCENGINE *pEngine, const char *clientAPIKey, const char *certificate)
Pass certificate to authorize WASM SDK usage Certificate (2048 string) should match clientAPIKey and ...
int childLevel
We don't implement this.
int iFinishSaturation
Saturation correction amount.
@ TINTCORRECT_STRONGEST
Highest sensitivity level of tint detection.
int iSkintoneStrengthExposure
AI Skin tone correction level, set automatically.
PFCCORE_STATUS CORE_Status
Status code for CORE pre-calc analysis.
@ APPLY_ERROR_PROFILE_MISSING
-1 Pointer pProfile is NULL
BOOL bSlim
Face Countouring.
BOOL bLightDiffusion
Light Diffusion.
void PFC_GetVersion(char *buf, int *len, bool bFormatted=false)
Get info string with version and features.
bool PFC_HasFaceBeautification(PFCENGINE *pEngine)
Check if Face Beautification is available.
@ PFC_CORE_MONOLITHIMAGE
5 Image skipped due to legacy clipart detection method
@ PFC_RE_FULLRES_REQUIRED
2 Source image (pImage) is missing
bool bPreprocessEV
Not visible in Workbench. Enable EV correction (Image Ambulance)
bool PFC_GetSceneDetectionEngineInfo(PFCENGINE *pEngine, int *groupUUID, int *arrProfileUUID, int *arrProfileUUIDLen)
Get loaded (with PFC_LoadAIEngine) categorization model info Call first with arrProfileUUID=NULL to g...
Struct describing V3 parameters.
@ PFC_RE_CANCELLED
7 Process cancelled
Struct describing mask for grad filter, all coordinates are relative (Y/height, X/width) in final cro...
int iFinishTemp
Temp correction amount.
PFCAIFEATURE
Flags defining type of model(s) to load with PFC_LoadAIEngine().
@ TINTCORRECT_AGGRESSIVE
Aggressive detection of tint.
int iBlush
Blush level. Range 0 to 100.
int PFC_LoadAIEngineNative(PFCENGINE *pEngineAI, unsigned int aifeatures, const char *modelDynamic, int lenDynamic, const char *modelSD, int lenSD, const char *modelSkintone, int lenSkintone, const char *modelAicolor, int lenAicolor, const char *modelFDFront, int lenFDFront, const char *modelFDBack, int lenFDBack, const char *modelFaceMesh, int lenFaceMesh, const char *modelBlendShape, int lenBlendShape, int bUseAngroidGPU, const char *apikey, const char *certificate, int *statusCertificate)
Loads/reloads platform-native (CoreML or TFLite) version of AI models into engine....
@ ENGINESTATUS_FB_LIBRARY_LOAD_FAIL
If set, the library is unable to load the SFB library.
int profileUUID
utf8-encoded name
@ CALC_FB
Calculates for Face Beautification.
int PFC_GetScene(PFCPROFILE precalc, int *version)
Get scene detection label from profile obtained with PFC_Calc For this to work you need to pass AI_SC...
@ HIGH_CONTRAST
Optimized to bring higher contrast to the image.
@ CALC_SKINTONE
Calculate Skintone Detection.
int iSaturation
-100 .. 100
@ PRESET_INTELLIGENTAUTO
Intelligent Auto - this has been superceded by iAuto 2019 and is here for backwards compatability....
int PFC_SetProtectionPath(const char *utf8FolderPath, const char *liceseCode=NULL)
Set path to location of SDK License files This enables license protection and allows activation using...
int iSlim
Face Countouring strength. Range 0 to 100.
@ CALC_NOFAE
Skip Face Aware Exposure pre-calculations during Core pre-calculations.
@ PFC_NR_ERRSETTINGS
5 Invalid parameter
@ PFC_PixelFormat64bppABGR
float fSharpenScale
Sharpening strength. Range 0.0 to 2.0 (Workbench displays 100x this value).
int iTeethLevel
Teeth whitening strength. Range 0 to 100.
@ AGGRESSIVENESS_AGGRESSIVE
More aggressive in exposure correction.
int height
height of this rect.
@ PFC_CORE_NOTENABLED
1 Feature not enabled
bool PFC_GetFaceInfo(PFCIMAGEPROFILE *pImageProfile, PFCFBFACEINFO *pFace, int index)
Utility function to query geometry of detected faces.
int iSplitColorCold
Spilt Color Warmth - Cool slider.
@ APPLY_SUCCESS
0 Success.
void PFC_ReleaseAddonPath()
Releases resources from PFC_SetAddonPath function call.
PFCINTERNAL pRedEyeParam
Internal use only.
int iContrast
Depth strength. Range 0 to 100.
int iOutLUTcontrast
Not visible in Workbench. Creative Filter or LOOKs contrast -100 .. 100.
@ PFC_FB_SUCCESS
0 Success
const char * PFC_GetAutoSkintoneParameters(int skintoneType, int *strengthLut, int *strengthExposure)
Returns auto parameters (lut GUID, core.iSkintoneStrengthLut and core.iSkintoneStrengthExposure) for ...
SKINSMOOTHTYPE eSmoothType
Perfectly Smooth Type: Subtle, Default, or Super Smooth.
@ APPLY_BADFORMAT
-5 Pixel format not supported
float transparency
overall transparency applied to the whole mask (strength 100 means transparency 0....
BOOL bSelectiveColor
Apply Selective Color HSL correction.
BOOL bEnabled
Set to TRUE to enable red eye removal.
@ LIPSHARPENTYPE_FINE
Fine touch of sharpening.
BOOL bUseFAE
Face Aware Exposure. Recommended exposure will be calculated in favor of any human face detected from...
int PFC_FAEFaceCount(PFCIMAGEPROFILE *pImageProfile)
Return number of faces detected during Face Aware Exposure analysis.
void PFC_TrackSave(const char *clientAPIKey)
Report image save event from WASM SDK.
PFCINTERNAL pEngine
Pointer to binary definition of the processing engine.
PFCPOINT ptEyeL
Specifies the x,y coordinates of the left eye, in fixed-point arithmetics (10 bit precision).
int iEyeCirc
Dark Circle Removal strength. Range 0 to 100.
BOOL bEnlarge
Eye Enlarge.
PFCRE_STATUS
Enumeration defining status of Red Eye pre-calculation.
@ PFC_CORE_CANCELLED
2 Process cancelled
@ PRESET_BEAUTIFYPLUS
Beautify Plus provides stronger beautification corrections. This is in the 'Perfectly Clear Essential...
int r
start of Hue range ramp, no correction is applied below this hue value
@ PRESET_DETAILS
iAuto Details - legacy preset for backwards compability. This is in the 'Athentech Legacy' group in E...
@ PFC_FB_NOT_AVAILABLE
10 Face beautification feature not available
int PFC_LoadAIEngine(PFCENGINE *pEngineAI, unsigned int aifeatures, const char *binPath)
Load AI models into engine. Takes time and memory. Use single PFCENGINE with loaded modules,...
PFCPOINT rightEye
Point of right eye in detected face.
@ PFC_COMPOSITE_FAILED
detection failed or not available, do not perform composite segmentation
@ APPLY_WASM_INVALID_CERTIFICATE
-9 WASM certificate invalid or not matching APIKEY and domain
unsigned char strength
LUT strength, 0 .. 100.
@ SKINSMOOTHTYPE_SUBTLE
The subtle correction removes the wrinkles and spots alone while it keeps the texture of the face unc...
int iFinishPositiveContrast
Not visible in Workbench. Positive Contrast correction amount.
PFCFB_STATUS FB_Status
Status code for Face Beautification pre-calc analysis.
struct PFCFaceRect PFCFACERECT
Structure defining face attributes detected by the Face Detection library.
@ PFC_CORE_INSUFFICIENTMEMORY
4 Process aborted because of insufficient memory
@ PFC_COMPOSITE_TYPE_1
is composite, do segmentation of type 1
@ APPLY_WASM_INVALID_APIKEY
-8 Wrong APIKEY for WASM certificate
@ ENGINESTATUS_FB_FUNCTION_NOT_FOUND
If set, the library is unable to locate SFB functions from the loaded library.
PFCRECT rcMouth
Specifies the bounding rectangle of the mouth.
@ SKINTONINGTYPE_WHITE
Whitens (bleaches) face. Recommended mainly for darker skin.
Structure encapsulating Red Eye Correction parameters.
@ SKINSMOOTHTYPE_DEFAULT
This type of correction provides a more uniform appearance to the complexion. It combines the natural...
@ PFC_PixelFormat32bppARGB
@ PFC_FB_NO_CORRECTION
8 No correction occur during process
Structure encapsulating the CORE processing parameters.
int widthImage
image width
PFCNRPARAM nr
Noise reduction corrections.
#define PFCINTERNAL
Internal used pointer type.
PFCPOINT ptEyeR
Specifies the x,y coordinates of the right eye, in fixed-point arithmetics (10 bit precision).
int iSkintoneStrengthLut
AI Skin tone correction level, set automatically.
float fLightDiffusion
Light Diffusion strength. Range 0.0 to 1.0. (Workbench displays 100x this value)
BOOL(* PFC_PROGRESS)(int iPercent)
int width
width of this rect.
Structure encapsulating Face Beautification parameters.
Struct PFCPARAM the master structure of all processing parameters.
@ PFC_RE_INVALID_PARAMETER
5 Invalid parameter
void PFC_SetSingleThreadedEngine(PFCENGINE *p, bool bSingleThreaded)
Force processing to be single threaded.
PFCFBPARAM fb
Face Beautification corrections.
@ PFC_RE_NOT_FOUND
3 Red eye not found
PFCREPARAM re
Red Eye Removal.
int top
y in point corrdinate of this rect.
@ AI_CORRECTIONS
Loads AI-based corrections model, requiring the file dynamic.pnn
@ CALC_AICOLOR
Calculate Auto WB params.
PFCRECT face
Bounding rectangle of detected face.
BOOL bEnabled
Set to TRUE to enable noise removal.
@ PFC_COMPOSITE_PHOTO
is photo, do not perform composite segmentation
PFCCORE_STATUS
Enumeration defining status of Core pre-calculation.
@ MASK_ROUNDRECT
rounded rect
SKINSMOOTHTYPE
Enumeration defining types of Skin Smoothing correction.
BIASMODE
Enumeration defining BIAS analysis mode.
int height
Pixel height of image.
float fDCF
Fidelity strength. Range 0.0 to 1.0. (Workbench displays 100x this value)
@ PRESET_IAUTO_21_ASIA
Based on iAuto 21, but with brighter Skin & Depth Bias for truer skin tone.
float centerX
X of center.
@ SKINMODE_BODY
Apply correction on most skin regions regardless they are linked with a face or not.
@ CALC_ALL
Calculates for all classic features, all of the above.
int iColorVibrancy
Not visible in Workbench. Color Vibrancy amount.
@ PRESET_IAUTO_PEOPLE
New default preset for 2023 - same corrections as iAuto People from the Universal AI Preset Selection...
BOOL bDynamic
AI Color correction.
PFCPOINT leftEye
Point of left eye in detected face.
float centerY
Y of center.
void PFC_SetAddonPath(const char *utf8AddonPath)
Set path to directory containing runtime add-ons such as .looks file(s) This enables searching for ad...
int a
start of flat part of Hue range, 100% correction is applied between a and m
PFCINTERNAL pPfcParam
Internal use only.
PFCPRESETID
ENUM for presets support by this SDK.
int iFinishHighlights
Highlights correction amount.
Structure holding selective color correction params.
int PFC_AutoCorrectPreset(PFCIMAGE *pImage, PFCIMAGE *pImageds, PFCPRESETID id=PRESET_IAUTO_PEOPLE, int iISO=-1, char *pCameraModel=NULL, BOOL bFastFAE=FALSE, PFC_PROGRESS progfn=NULL, PFCENGINE *pEngineAI=NULL)
Single function to perform Perfectly Clear corrections.
PFC3DLutInfo lutOutput
Creative Filter or LOOKs to apply.
TINTCORRECTION eTintMode
Not visible in Workbench. Sets the aggressiveness of Abnormal Tint Removal.
@ CALC_RE
Calculates for Red Eye Removal.
@ APPLY_WASM_CERTIFICATE_WRONG_VERSION
-11 Wrong format version of WASM certificate
@ PFC_NR_CANCELLED
3 Process cancelled
int stride
Byte width of each scanline.
int iDeltaB
Delta B correction amount.
@ MASK_BOTTOM
linear from 1.0 on bottom
PFCV3PARAM v3
V3 Corrections.
int iFinishTint
Tint correction amount.
PFCCOREPARAM core
Core corrections to apply.
BOOL bLipSharpen
Not visible in Workbench. Set to TRUE to enable lip sharpening.
int iFinishContrast
Contrast correction amount.
@ PFC_NR_FULLRES_REQUIRED
2 Source image (pImage) is missing
int iVibrancy
Color Restore strength. 0 still applies a correction. Very large values can produce extreme adjustmen...
PFCAPPLYSTATUS
Enumeration defining return code from the Apply() function.
float width
radial/rounded: w of bounding rect, linear: ignored
int blinkLevelR
Right eye Blink level.
PFCCORE_MASK_TYPE
Enumeration describing mapping of PFCMask and PFC_MASK_TYPE with 'PFC' -> 'PFCCORE'.
@ PFC_CORE_NOSOURCEIMAGE
3 Source image (pImage) is missing
Struct defining an image profile as calculated from PFC_Calc() function.
int angle
Roll angle of the face, from -179 to 180 degrees. 0 degrees means the face it oriented "normally",...
float feather
relative length of gradient, from where it starts (1.0) to where it is 0.0,
@ PFC_RE_NOTENABLED
1 Feature not enabled
Struct defining a rectangle.
@ PFC_NR_SUCCESS
0 Success
int blinkLevel
Indicates the presence of a blink.
int iPreset
Preset number to use for noise removal. See details below.
@ PFC_REJECT_MONOLITH
Reject simple images that don't benefit from correction, like solid colors. This was the default befo...
PFC3DLutInfo lutInputFoliageGreen
Foliage Green LUT.
int H
Color edit to apply: shift of Hue, -180 .. 180.
@ PFC_PixelFormat24bppRGB
@ PRESET_IAUTO_2019
iAuto for even better image corrections
BOOL bSkintoneAuto
if TRUE iSkintoneType is detected, StrengthLut|StrengthExposure are obtained from PFC_GetAutoSkintone...
@ APPLY_CANCELLED
-3 Operation cancelled
PFCINTERNAL pSFBParam
Internal use only.
@ LIPSHARPENTYPE_COARSE
Lip details are coarsely pronounced.
int iBlemish
Blemish Removal strength. Range 0 to 100.
@ CALC_COMPOSITE
Calculate Composite Detection.
BOOL bBlemish
Blemish Removal.
int iDeFlash
Shine Removal strength. Range 0 to 100.
#define PFCPROFILE
Define.
int PFC_LoadScenePresetsFromStream(PFCENGINE *pEngine, const char *buf, int lenBuf, int modelUuid=0, int *presetUuid=NULL, int arrProfileUUIDLen=0)
Loads AI Scene Detection group presets from buffer, and optionally re-loading different Scene Detecti...
LIPSHARPENTYPE
Enumeration defining Lip Sharpening mode.
BOOL bDynamicRange
Not visible in Workbench. Set to TRUE to enable dynamic range correction. Workbench sets to true if E...
int width
Pixel width of image.
LPPFCFACERECT PFC_EnumFAEFaceRect(PFCIMAGEPROFILE *pImageProfile, LPPFCFACERECT p)
Utility function to enumerate faces detected during Face Aware Exposure analysis.
@ PFC_CORE_SUCCESS
0 Success
@ PFC_NR_NOTFOUND
7 Noise not found
struct PFCCOREMask PFCCOREMask
Struct describing mask for grad filter, all coordinates are relative (Y/height, X/width) in final cro...
PFCRECT rcEyeR
Specifies the bounding rectangle of the right eye.
unsigned char * data
Pointer pointing to the first byte of image data buffer.
int left
x in point coordinate of this rect.
BOOL bUseAutomaticStrengthSelection
Exposure. Set to TRUE (recommended default) to enable Automatic Strength Selection....
@ PFC_COMPOSITE_V2_2
v2 label 2. If all segmented rects are 2, process full page as photo, if mix of 2 and non-2 labels,...
Structure encapsulating Noise Removal parameters.
int m
end of flat part of Hue range
int blinkLevelL
Left eye Blink level.
int iLocalContrast
Super Contrast strength. Range 0 to 100.
SKINTONINGTYPE
Enumeration defining type of Skin Toning correction.
SKINTONINGTYPE eSkinToningType
Foundation Color to apply.
int PFC_FBFaceCount(PFCPROFILE pImageProfile)
Return number of faces detected.
int yawAngle
The Yaw or profile angle, from -90 (left profile) to 90 (right profile)
PFCAPPLYSTATUS PFC_FillAiAutoValues(PFCPARAM ¶m, PFCIMAGEPROFILE *profile)
Fills PFCPARAM with final values depending on detection results contained in PFCIMAGEPROFILE,...
@ PFC_PixelFormat24bppBGR
int iDeltaR
Delta R correction amount.
@ AI_SKINTONE
Loads skintone detection model. This is enabled automatically when using AI_SCENE_DETECTION.
Struct defining an image to be used in PFC library.
int iSkinToning
Skin Tone strength. Range 0 to 100.
float radius
only for MASK_ROUNDRECT - corner radius, relative to image w.
int iBlackEnhancement
Not visible in Workbench. Set luminance threshold for Noise Management. Range 0 to 25.
@ BIAS_BRIGHTER_PREFERENCE
Average usage with brighter tone, corresponds to "Bright" in PfC Products.
int iFinishBlacks
Blacks correction amount.
PFCRE_STATUS RE_Status
Status code for Red Eye pre-calc analysis.
BOOL bVibrancy
Color Restore enabled.
@ PFC_NR_ERRBITMAP
4 Error reading image data
int iEnhanceLevel
Eye Enhance strength Range 0 to 100.
@ ENGINESTATUS_OK
Engine created successfully.
float fTintScale
Not visible in Workbench. Scalar value of how much tint correction should be applied....
void PFC_SetParam(PFCPARAM ¶m, PFCPRESETID id=PRESET_IAUTO_PEOPLE)
Initialize a PFCPARAM structure.
PFC3DLutInfo lutInputFoliageBrown
Foliage Brown LUT.
Struct defining an PFC engine instance.
@ PFC_COMPOSITE_V2_1
v2 label 1. Process this rect
int confidence
A numerical parameter describing the confidence attributed by the detection algorithm to each face.
PFCRECT rect
Specifies the bounding rectangle of a face.
BIASMODE eBiasMode
Skin and Depth Bias. Recommended value is BIAS_AVERAGE_PREFERENCE, unless you are printing to an indi...
int PFC_LoadScenePresets(PFCENGINE *pEngine, const char *filePath, int modelUuid=0, int *presetUuid=NULL, int arrProfileUUIDLen=0)
Loads AI Scene Detection group presets from presets file, and optionally re-loading different Scene D...
void PFC_DestroyEngine(PFCENGINE *p)
Destroy PFCENGINE instance and release associated resources.
@ SKINMODE_FACE
Apply correction ONLY on skin regions included in faces.
int PFC_ReadScenePreset(PFCPARAM ¶m, PFCENGINE *pEngineAI, int scene)
Fill param for the scene from the engine with previously loaded scene presets with PFC_LoadScenePrese...
int iHighlightPreservation
Not visible in Workbench. Amount of Highlight Preservation to apply. Range 0 to 100.
int iNeutralDensity
Neutral density filter amout.
int PFC_AutoCorrect(PFCIMAGE *pImage, PFCIMAGE *pImageds, PFCPARAM ¶m, int iISO=-1, char *pCameraModel=NULL, BOOL bFastFAE=FALSE, PFC_PROGRESS progfn=NULL, PFCENGINE *pEngineAI=NULL, BOOL bUseAutoSDPreset=FALSE)
Single function to perform Perfectly Clear correction.
@ BIAS_NONE
Turn off bias correction.
BOOL bLocalContrast
Super Contrast.
@ TINTCORRECT_DEFAULT
Moderate level of tint detection.
BOOL bHighlightPreservation
Not visible in Workbench. Set to true to enable Highlight Preservation.
@ PFC_COMPOSITE_SKIP
is unsupported composite, skip processing
@ DCF_STANDARD
For normal photo.
int iDynamicWB
Strength of color component of Dynamic correction 0 .. 100.
@ SKINSMOOTHTYPE_SUPERSMOOTH
This is a more aggressive and effective correction where the appearance of the entire skin (including...
void PFC_ReleaseProfile(PFCPROFILE pProfile)
Release PFCPROFILE instance.
@ PFC_FB_FULLRES_REQUIRED
3 Source image (pImage) is missing
@ PFC_REJECT_CLIPART
Reject images classified as clipart, used by default.
AGGRESSIVENESS
Enumeration defining Auto Exposure calculation modes.
@ AGGRESSIVENESS_MODERATE
Moderate level of exposure correction.
BOOL bAbnormalTintRemoval
Not visible in Workbench. Enables Abnormal Tint Removal. Recommended default is FALSE.
BOOL bEyeCirc
Dark Circle Removal.
PFCAPPLYSTATUS PFC_Apply(PFCIMAGE *pImage, PFCENGINE *pEngine, PFCPROFILE pImageProfile, PFCPARAM ¶m, PFC_PROGRESS progfn=NULL, int iOpacity=100, void *pBGProfile=NULL)
Correct image with parameters.
int S
Color edit to apply: shift of Sat, -100 .. 100.
@ AI_SCENE_DETECTION
Loads scene detection model, requiring one or two pnn files with filenames like pro_and_universal_202...
@ PFC_PixelFormat48bppRGB
@ CALC_CORE
Calculates for Perfectly Clear Core correction.
int iDeltaG
Delta G correction amount.
@ PFC_PixelFormat48bppBGR
@ APPLY_ERROR_AI_CORRECTION_MISSING
-13 Tried to apply AI-based correction but is not available
int x
x coordinate of this point.
int PFC_GetLooks3DLut(PFCENGINE *pEngine, const char *lookGuids, int *iLookStrengths, int *iLookContrasts, int *iLookSaturations, int iLooksCount, float *final3Dlut)
Get final 3D 16x16x16 lut for external application of looks Allows to use custom GPU processing to ap...
bool PFC_GetSceneDescription(PFCENGINE *pEngine, int index, PFCSCENEDESCRIPTION *sceneDescription)
Get the scene description for the given index number.
int FAE[3]
Internal data for Face Aware Exposure.
TINTCORRECTION
Enumeration defining different abnormal tint analysis mode.
int PFC_DetectCompositeImage(PFCIMAGE *pImage, PFCENGINE *pEngine)
Run detection of composite image.
PFCENGINE * PFC_CreateEngine()
Create PFCENGINE instance.
@ SKINTONINGTYPE_FOUNDATION
Adjust skin to user defined foundation color.
@ SKINTONINGTYPE_TAN
Darkens skin, makes it look naturally tanned.
@ SKINTONINGTYPE_WARM
Warms skin tone.
@ CALC_FAEHISPEED
Use Fast mode of Face Aware Exposure pre-calculations.
@ HIGH_DEFINITION
Optimized to bring out more details in the shadows, more details in the highlights,...
void PFC_LoadAddonLooks(PFCENGINE *pEngine, const char *addonLooksBuf, int buflen)
Load addon looks from contents of .looks file(s) Allows to use addon looks when filesystem is not ava...
PFCPIXELFORMAT format
Defines byte order of input buffer.
@ PFC_PixelFormat64bppARGB
bool PFC_AbnormalTintDetected(PFCIMAGEPROFILE *pImageProfile, TINTCORRECTION eTintMethod)
Query if abnormal tint is detected.
void PFC_GetLastSceneProperties(PFCENGINE *pEngine, int *lastSceneLabel, int *lastSceneConfidence=NULL)
Get last detected scene properties.
int iFinishWhites
Whites correction amount.
PFC3DLutInfo lutInputCorrective
Corrective Filter LUT.
@ MASK_TOP
linear from 1.0 on top
@ AGGRESSIVENESS_CONSERVATIVE
Less aggressive in exposure correction.
BOOL bEnabled
Enable the entire Core correction.
@ PFC_FB_NOTENABLED
1 Feature not enabled
unsigned int colorBlush
Blush color AARRGGBB default 0xFFFD7171 ({253, 113, 113})
@ SKINTONINGTYPE_PALE
Makes skin look lighter and more pale.
int iCatchLight
Catchlight level. Range 0 to 100.
SKINMODE
Enumeration defining modes in Perfect Smooth analysis.
float fBiasScale
Skin and Depth Bias. Range 0.0 to 1.0. (Workbench displays 100x this value)
@ BIAS_AVERAGE_PREFERENCE
For average usage, corresponds to "Normal" in PfC Products.
PFCAPPLYSTATUS PFC_Resize(PFCIMAGE *pImageSrc, PFCIMAGE *pImageDst)
Resizes the input image to the dimensions specificed in by the output image. The output image must be...
PFCFEATURE
ENUM controlling types of calculations at the pre-calculation stage.
float height
radial/rounded: h of bounding rect, linear: dist from centerY where grad becomes 1....
BOOL bEnhance
Eye Enhance.
@ PFC_COMPOSITE_V2_0
v2 label 0. Skip processing this segmented rect
int iFinishExposure
Exposure correction amount.
@ PFC_NR_MISC_ERROR
6 General error
int smileLevel
Indicates the presence of a smile.
@ APPLY_INVALIDLICENSE
-6 Invalid License or validation failed
@ PRESET_IAUTO_21
The iAuto you love plus newly (2021) tuned settings for sharper images, accurate skin correction,...
PFCNR_STATUS NR_Status
Status code for Noise Removal pre-calc analysis.
int iSmoothLevel
Perfectly Smooth strength. Range 0 to 100.
int PFC_ReadPresetsFromStream(PFCPARAM ¶m, const char *s)
Load image processing settings from a char buffer.
PFCENGINESTATUS
ENUM for engine initialization status.
PFCNR_STATUS
Enumeration defining status of Noise Removal pre-calculation.
@ PRESET_IAUTO_2019_RE
iAuto 2019 with Red Eye correciton enabled
@ MASK_ALL
1.0 everywhere (background)
Struct defining parameters for building BG mask.
int iPreprocessEV
Not visible in Workbench. EV correction amount (Image Ambulance)
BOOL bEnabled
Enable entire face beautification.
BOOL bEnable
enables overall correction
@ PFC_FB_NOT_EXECUTED
9 Not executed
PFCCOMPOSITE
Enumeration defining results of PFC_DetectCompositeImage.
@ PFC_RE_GEN_ERROR
4 General error
@ APPLY_WASM_INVALID_DOMAIN
-7 Wrong domain for WASM certificate
bool invert
invert mask (x = 1.0 - x). NOTE: UI meaning of invert is: if one mask layer set invert = true
DCFMODE eDCFMode
Fidelity Modes (Standard or Vivid).
@ PFC_COMPOSITE_TYPE_0
is composite, do segmentation of type 0
SKINMODE eSkinToningMode
Skin Tone mode: Face or all detected skin.
CONTRASTMODE
Enumeration defining contrast mode.
@ CALC_SCENE_DETECTION
Calculate Scene Detection.
int heightImage
image height
PFCINTERNAL pInternal
Internal use only.
BOOL bAuto
if true use ai-detected params instead
int L
Color edit to apply: shift of Lum, -100 .. 100.
PFCRECT rcEyeL
Specifies the bounding rectangle of the left eye.
void PFC_ReleaseProtectionPath()
Releases resources from PFC_SetProtectionPath function call.
int iOutLUTsaturation
Not visible in Workbench. Creative Filter or LOOKs saturation -100 .. 100.
PFCREJECTOPTION
Enumeration defining rejection flags.
DCFMODE
Enumeration defining DCF analysis mode.
Structure defining face attributes detected by the Face Detection library.
bool PFC_IsNoiseDetected(PFCIMAGEPROFILE *pImageProfile, int iNoisePreset)
Query if noise is detected.
@ LIPSHARPENTYPE_MEDIUM
Stronger sharpening. Details are more pronounced.
@ CALC_NR
Calculates for Perfectly Clear Noise Removal.
@ PFC_CORE_CLIPARTIMAGE
7 Image skipped due AI Clipart detection
@ PFC_FB_CANCELLED
4 Process cancelled
@ BIAS_AUTO
Apply auto calculated bias mode and strength.
PFCENGINESTATUS status
Status of engine defined in PFCENGINESTATUS. For NO-SFB version the status will always be ENGINESTATU...
int iDensity
-100 .. 100 // Same meaning as DP2 Adjust params
@ APPLY_LOOKS_MISSING
-12 tried to apply a LUT but the LUTs file was not found
@ DCF_VIVID
For more color vibrancy.
@ PRESET_BEAUTIFY
Beautify - provides a good default set of corrections for portratis and other photos of people....
Struct describing parameters used via AI White Balance - not intended for direct use.
int iMinStrength
Exposure Min recommendation.
PFC3DLutInfo lutInputSky
Sky Enhance LUT.
AGGRESSIVENESS eAggressiveness
Exposure Recommendation agressiveness. The desired level of lighting for Automatic Strength Selection...
@ BIAS_DONT_BOTHER
Reserved, never use.
PFCPIXELFORMAT
defines the format of the image data
int iDynamic
AI Color correction strength 0 .. 100.
@ PFC_FB_WARNING
2 Warning: face not detected
BOOL bContrast
Depth enabled.
@ PFC_RE_SUCCESS
0 Success
@ PFC_PixelFormat32bppABGR
int y
y coordinate of this point.
int iSplitColorWarm
Spilt Color Warmth - Warm slider.
BOOL bCatchLight
Catchlights.
int p
end of Hue range ramp, no correction is applied above this hue value
BOOL bTeeth
Teeth whitening.
BOOL bSmooth
Perfectly Smooth enabled.
@ PFC_NR_NOTENABLED
1 Feature not enabled
int iFinishShadows
Shadows correction amount.
@ PRESET_VIVID
Vivid - good for landscapes and other general photography. This is in the 'Perfectly Clear Essentials...
BOOL bDeFlash
Shine Removal.
int iMaxStrength
Exposure Max recommnedation. Use this value to limit the maximum Exposure to be applied on the Automa...
PFCFB_STATUS
Enumeration defining status of Face Beautification pre-calculation.
@ MASK_NONE
0.0 everywhere, don't apply
int iSkintoneAutoStrength
AI Skin Tone correction strength Range 0 to 100.
int iEnlargeLevel
Eye Enlarge strength Range 0 to 100.
PFCINTERNAL pNoiseParam
Internal use only.
@ PFC_FB_ANALYSIS_FAILED
7 The face analysis did not complete successfully
int iDarkSkin
Dark Skin output LUT amount - for use only with 2-level Skin Tone detetion.
@ APPLY_WASM_EXPIRED_CERTIFICATE
-10 WASM certificate has expired
float fInfrared
Infrared Removal strength. Range 0.0 to 1.0. (Workbench displays 100x this value).
@ PFC_REJECT_NONE
Disable image rejection.
void PFC_ApplyStrengthToParam(PFCPARAM ¶m, int strength)
Apply overall strength to parameters, same as Strength in Perfecly Clear products Reads the correctio...
int PFC_ReadPresets(PFCPARAM ¶m, char *filename)
Load image processing settings from a .preset file. Use this function to load image processing settin...
@ PFC_FB_CREATE_ENGINE_FAILED
6 Unable to create SFB Engine object for processing
void PFC_GetRecommendedParam(PFCIMAGEPROFILE *profile, PFCCOREPARAM *dst, PFCCOREPARAM *src)
Get recommended values of auto params using result of precalc.
@ PFC_RE_NO_MEMORY
6 Insufficient memory
SKINMODE eSmoothMode
Perfectly Smooth mode: Face only.
int iFinishVibrancy
Vibrancy correction amount.
int iSkintoneType
AI Skin Tone level detected, pale to dark, 1 .. 10 defines type of input skintone correction.
@ APPLY_NOSOURCE
-4 Pointer pImage is NULL, source image missing
@ AI_COMPOSITE
Loads composite detection model, requiring the file composite.pnn
int iStrength
Exposure strength. If Automatic Strength Selection (bUseAutomaticStrengthSelection) is enabled,...
int iDetailOffset
Offset to recommended level of preservation of details. Range -30 to 30.
Structure defining face area detected from the SFB library.
LIPSHARPENTYPE eLipSharpenType
Not visible in Workbench. See definition of LIPSHARPENTYPE.
@ TINTCORRECT_CONSERVATIVE
Priority on minimum false positive detection.
@ BIAS_ASIAN_PREFERENCE
Fine tuned for Asian skin tone.
PFCPROFILE PFC_Calc(PFCIMAGE *pImage, PFCIMAGE *pImageds, PFCENGINE *pEngine, unsigned int feature=CALC_ALL, int iISO=-1, char *pCameraModel=NULL, PFCPROFILE pImageProfile=NULL, PFC_PROGRESS progfn=NULL, int iRejectOption=PFC_REJECT_MONOLITH, PFCENGINE *pEngineAI=NULL)
Perform initial analysis on images.
@ CALC_CARTOON_DETECTOR
Calculate legacy cartoon detector.
BOOL bInfrared
Infrared Removal.
CONTRASTMODE eContrastMode
Select Depth mode, High Contrast or High Definition.
@ AI_COLOR
Loads AI White Balance color corrections model, requiring the file aicolor.pnn
PFCAPPLYSTATUS PFC_TransposeExif(PFCIMAGE *pImageSrc, int iEXIFOrientation)
Transpose image upright from/to EXIF Orientation.
@ APPLY_ERROR_ENGINE_MISSING
-2 Pointer pEngine is NULL
@ PFC_FB_FUNCTION_ERROR
5 Unable to locate function in the SFBEngine library
@ CALC_NOTINTCALC
Skip pre-calculations on Abnormal Tint Correction during Core pre-calculations.
@ PFC_CORE_BELOWMINSIZE
6 Image skipped, too small ( < 32 pixels )
@ PFC_RE_NOT_SUPPORTED
8 Not supported
int iLipSharpen
Not visible in Workbench. Lip sharpening level. Range 0 to 100.
unsigned int colorSkinToning
Skin Toning color AARRGGBB default 0xFFF5BCA9 ({245, 188, 169})