Structs
Parameter structures for configuring Perfectly Clear corrections.
This page documents the parameter structures used to configure Perfectly Clear corrections.
Core runtime structures
These foundational data structures are used throughout the SDK for image buffers, engine instances, and analysis profiles.
PFCIMAGE
Defines an image buffer including dimensions, pixel format, and data pointer for SDK processing.
typedef struct {
int width;
int height;
int stride;
PFCPIXELFORMAT format;
unsigned char *data;
} PFCIMAGE;| Field | Type | Description |
|---|---|---|
| width | int | Pixel width of image |
| height | int | Pixel height of image |
| stride | int | Byte width of each scanline or row |
| format | PFCPIXELFORMAT | Pixel format defining byte order |
| data | unsigned char* | Pointer to first byte of image data buffer |
Notes:
The stride may be larger than width times bytes per pixel if rows are padded for alignment. The SDK modifies image data in place during processing.
PFCENGINE
Contains the internal engine pointer and initialization status for a processing engine instance.
typedef struct {
PFCINTERNAL pEngine;
PFCENGINESTATUS status;
} PFCENGINE;| Field | Type | Description |
|---|---|---|
| pEngine | PFCINTERNAL | Internal pointer to engine implementation |
| status | PFCENGINESTATUS | Engine initialization status |
PFCIMAGEPROFILE
Contains pre-calculated analysis data and feature status codes returned by PFC_Calc.
typedef struct {
PFCINTERNAL pPfcParam;
PFCINTERNAL pNoiseParam;
PFCINTERNAL pRedEyeParam;
PFCINTERNAL pSFBParam;
PFCINTERNAL pInternal;
PFCCORE_STATUS CORE_Status;
PFCNR_STATUS NR_Status;
PFCFB_STATUS FB_Status;
PFCRE_STATUS RE_Status;
int Status;
} PFCIMAGEPROFILE;| Field | Type | Description |
|---|---|---|
| CORE_Status | PFCCORE STATUS | Core pre-calc status |
| NR_Status | PFCNR STATUS | Noise Removal pre-calc status |
| FB_Status | PFCFB STATUS | Face Beautification pre-calc status |
| RE_Status | PFCRE STATUS | Red Eye pre-calc status |
| Status | int | Summary status bits |
Note: The PFCPROFILE type is a pointer to PFCIMAGEPROFILE:
#define PFCPROFILE PFCIMAGEPROFILE*For background synchronization workflows, PFCBGPROFILE is defined as an internal profile handle:
#define PFCBGPROFILE PFCINTERNALGeometry structures
PFCPOINT
Represents a two-dimensional point with integer x and y coordinates.
typedef struct {
int x;
int y;
} PFCPOINT;PFCRECT
Represents a rectangular region with position and dimensions.
typedef struct {
int left;
int top;
int width;
int height;
} PFCRECT;Face detection structures
PFCFBFACEINFO
Contains simplified face geometry including eye positions and face bounds from Face Beautification detection.
typedef struct {
PFCPOINT leftEye;
PFCPOINT rightEye;
PFCRECT face;
} PFCFBFACEINFO;| Field | Type | Description |
|---|---|---|
| leftEye | PFCPOINT | Left eye position |
| rightEye | PFCPOINT | Right eye position |
| face | PFCRECT | Face bounding rectangle |
PFCFACERECT
Contains comprehensive face detection data including landmarks, angles, and confidence scores from Face Aware Exposure analysis.
typedef struct PFCFaceRect {
PFCRECT rect;
PFCRECT rcEyeL;
PFCRECT rcEyeR;
PFCRECT rcMouth;
PFCPOINT ptEyeL;
PFCPOINT ptEyeR;
int angle;
int blinkLevel;
int blinkLevelL;
int blinkLevelR;
int confidence;
int smileLevel;
int yawAngle;
int FAE[3];
int widthImage;
int heightImage;
struct PFCFaceRect *pNext;
} PFCFACERECT;| Field | Type | Description |
|---|---|---|
| rect | PFCRECT | Face bounding rectangle |
| rcEyeL | PFCRECT | Left eye rectangle |
| rcEyeR | PFCRECT | Right eye rectangle |
| rcMouth | PFCRECT | Mouth rectangle |
| ptEyeL | PFCPOINT | Left eye coordinates with 10-bit fixed-point |
| ptEyeR | PFCPOINT | Right eye coordinates with 10-bit fixed-point |
| angle | int | Roll angle from -179 to 180 degrees |
| confidence | int | Detection confidence |
| smileLevel | int | Smile detection level |
| yawAngle | int | Yaw angle from -90 to 90 degrees |
| widthImage | int | Source image width |
| heightImage | int | Source image height |
| pNext | PFCFACERECT* | Next face in linked list |
PDF image utility classes
These C++ helper classes support iterating and replacing PFC-compatible images embedded in PDF files.
PFCPDFImage
Represents a single image extracted from a PDF document and exposes both expanded and compressed image representations.
| Member | Type | Description |
|---|---|---|
| imageFile | PFCImageFile* | Expanded image for processing; owned by PFCPDFImage |
| pdfObjectNumber | uint32_t | Object number in the PDF document |
| compressedBuffer | void* | Raw compressed bytes |
| compressedBufferSize | int | Compressed byte size |
PFCPDFImageIterator
Iterates over PFC-supported images in a PDF and automatically embeds modified images back into the document.
| Method | Description |
|---|---|
load(const char* path) | Opens a PDF from disk and reports LoadStatus |
nextImage() | Returns next PFCPDFImage*, or nullptr when exhausted |
save(const char* path) | Writes updated PDF and reports SaveStatus |
setExpandImageData(bool expand) | Controls whether image bytes are expanded into PFCImageFile |
document() / takeDocument() | Accesses or transfers ownership of underlying PdfMemDocument |
Master parameter structure
This section covers the top-level structure that contains all correction parameters.
PFCPARAM
The master structure that aggregates all correction parameter groups into a single configuration object.
typedef struct {
PFCCOREPARAM core;
PFCFBPARAM fb;
PFCNRPARAM nr;
PFCREPARAM re;
PFCV3PARAM v3;
PFCV3PARAM layer[3];
PFCCOREMask mask[3];
DP2PARAM dp2;
} PFCPARAM;| Field | Type | Description |
|---|---|---|
| core | PFCCOREPARAM | Core correction parameters |
| fb | PFCFBPARAM | Face Beautification parameters |
| nr | PFCNRPARAM | Noise Reduction parameters |
| re | PFCREPARAM | Red Eye Removal parameters |
| v3 | PFCV3PARAM | V3 corrections including LUTs and finishing |
| layer | PFCV3PARAM array | Layer parameters |
| mask | PFCCOREMask array | Masks for gradient filters |
| dp2 | DP2PARAM | AI White Balance parameters |
Core parameters
These parameters control the fundamental image corrections including exposure, contrast, color, and sharpening.
PFCCOREPARAM
Contains all settings for core image corrections such as exposure adjustment, contrast enhancement, color restoration, and sharpening.
| Field | Type | Range | Description |
|---|---|---|---|
| bEnabled | BOOL | Enable Core correction | |
| bAbnormalTintRemoval | BOOL | Enable Tint Removal | |
| eTintMode | TINTCORRECTION | Tint detection mode | |
| fTintScale | float | 0.0 to 1.0 | Tint correction amount |
| iBlackEnhancement | int | 0 to 25 | Noise Management threshold |
| bVibrancy | BOOL | Enable Color Restore | |
| iVibrancy | int | 0 to 200 | Color Restore strength |
| iStrength | int | 0 to 150 | Exposure strength |
| bContrast | BOOL | Enable Depth | |
| eContrastMode | CONTRASTMODE | Depth mode | |
| iContrast | int | 0 to 100 | Depth strength |
| eBiasMode | BIASMODE | Skin and Depth Bias | |
| fBiasScale | float | 0.0 to 1.0 | Bias scale |
| bHighlightPreservation | BOOL | Enable Highlight Preservation | |
| iHighlightPreservation | int | 0 to 100 | Highlight Preservation amount |
| bSharpen | BOOL | Enable Sharpening | |
| fSharpenScale | float | 0.0 to 2.0 | Sharpening strength |
| bUseAutomaticStrengthSelection | BOOL | Auto Strength Selection | |
| bUseFAE | BOOL | Face Aware Exposure | |
| eAggressiveness | AGGRESSIVENESS | Exposure aggressiveness | |
| iMaxStrength | int | 0 to 150 | Maximum exposure |
| iMinStrength | int | 0 to 150 | Minimum exposure |
| bInfrared | BOOL | Enable Infrared Removal | |
| fInfrared | float | 0.0 to 1.0 | Infrared Removal strength |
| bLightDiffusion | BOOL | Enable Light Diffusion | |
| fLightDiffusion | float | 0.0 to 1.0 | Light Diffusion strength |
| bDynamicRange | BOOL | Enable dynamic range | |
| bDCF | BOOL | Enable Fidelity | |
| eDCFMode | DCFMODE | Fidelity mode | |
| fDCF | float | 0.0 to 1.0 | Fidelity strength |
| bLocalContrast | BOOL | Enable Super Contrast | |
| iLocalContrast | int | 0 to 100 | Super Contrast strength |
| bSkintoneAuto | BOOL | Auto skin tone detection | |
| iSkintoneAutoStrength | int | 0 to 100 | AI Skin Tone strength |
| bSelectiveColor | BOOL | Enable Selective Color | |
| selectiveColor | SELECTIVECOLOR array | Selective Color definitions |
Face beautification parameters
These parameters control portrait enhancement features including skin smoothing, eye enhancement, and facial contouring.
PFCFBPARAM
Contains all settings for Face Beautification corrections including skin smoothing, eye enhancement, teeth whitening, and facial contouring.
| Field | Type | Range | Description |
|---|---|---|---|
| bEnabled | BOOL | Enable Face Beautification | |
| bSmooth | BOOL | Enable Perfectly Smooth | |
| iSmoothLevel | int | 0 to 100 | Smooth strength |
| eSmoothMode | SKINMODE | Face or body | |
| eSmoothType | SKINSMOOTHTYPE | Smooth type | |
| bEnlarge | BOOL | Enable Eye Enlarge | |
| iEnlargeLevel | int | 0 to 100 | Eye Enlarge strength |
| bEnhance | BOOL | Enable Eye Enhance | |
| iEnhanceLevel | int | 0 to 100 | Eye Enhance strength |
| bEyeCirc | BOOL | Enable Dark Circle Removal | |
| iEyeCirc | int | 0 to 100 | Dark Circle strength |
| bTeeth | BOOL | Enable Teeth Whitening | |
| iTeethLevel | int | 0 to 100 | Teeth Whitening strength |
| bBlemish | BOOL | Enable Blemish Removal | |
| iBlemish | int | 0 to 100 | Blemish Removal strength |
| bSlim | BOOL | Enable Face Contouring | |
| iSlim | int | 0 to 100 | Face Contouring strength |
| bDeFlash | BOOL | Enable Shine Removal | |
| iDeFlash | int | 0 to 100 | Shine Removal strength |
| bCatchLight | BOOL | Enable Catchlights | |
| iCatchLight | int | 0 to 100 | Catchlight level |
| iCatchLightMode | int | 1 to 5 | 1 is Umbrella, 2 is Ringlight, 3 is Softbox, 4 is Beauty Dish, 5 is Outdoors |
| bSkinToning | BOOL | Enable Skin Toning | |
| iSkinToning | int | 0 to 100 | Skin Toning strength |
| eSkinToningMode | SKINMODE | Face or body | |
| eSkinToningType | SKINTONINGTYPE | Toning type | |
| colorSkinToning | unsigned int | AARRGGBB | Skin color, default 0xFFF5BCA9 |
| bBlush | BOOL | Enable Blush | |
| iBlush | int | 0 to 100 | Blush level |
| colorBlush | unsigned int | AARRGGBB | Blush color, default 0xFFFD7171 |
Noise removal parameters
These parameters control the noise reduction algorithm behavior and strength.
PFCNRPARAM
Contains settings for intelligent noise detection and removal with preset-based configurations.
| Field | Type | Range | Description |
|---|---|---|---|
| bEnabled | BOOL | Enable Noise Removal | |
| iPreset | int | 0 to 4 | 0 is Default, 1 is Portrait, 2 is Night, 3 is Camera phone, 4 is Force |
| iStrengthOffset | int | -5 to 5 | Strength offset |
| iDetailOffset | int | -30 to 30 | Detail preservation offset |
Red eye parameters
These parameters control automatic red eye detection and correction.
PFCREPARAM
Contains settings for automatic red eye detection and removal in flash photography.
| Field | Type | Description |
|---|---|---|
| bEnabled | BOOL | Enable Red Eye Removal |
V3 parameters
These parameters control advanced finishing effects including LUTs, color grading, and final adjustments.
PFCV3PARAM
Contains settings for V3 finishing corrections including LUT application, Image Ambulance, and final color adjustments.
| Field | Type | Description |
|---|---|---|
| bPreprocessEV | bool | Enable EV correction for Image Ambulance |
| iPreprocessEV | int | EV correction amount |
| iNeutralDensity | int | Neutral density filter |
| lutInputCorrective | PFC3DLutInfo | Corrective Filter LUT |
| lutInputSky | PFC3DLutInfo | Sky Enhance LUT |
| lutInputFoliageGreen | PFC3DLutInfo | Foliage Green LUT |
| lutInputFoliageBrown | PFC3DLutInfo | Foliage Brown LUT |
| lutOutput | PFC3DLutInfo | Creative LOOKs Filter or LOOKs |
| iFinishTemp | int | Temperature |
| iFinishTint | int | Tint |
| iFinishExposure | int | Exposure |
| iFinishBlacks | int | Blacks |
| iFinishShadows | int | Shadows |
| iFinishHighlights | int | Highlights |
| iFinishWhites | int | Whites |
| iFinishSaturation | int | Saturation |
| iFinishVibrancy | int | Vibrancy |
| iFinishContrast | int | Contrast |
| bDynamic | BOOL | Enable AI Color |
| iDynamic | int | AI Color strength from 0 to 100 |
| iDynamicWB | int | Dynamic WB strength from 0 to 100 |
Supporting structures
These structures provide additional data types used within the main parameter structures.
PFC3DLutInfo
References a 3D LUT file for color grading and creative effects.
| Field | Type | Description |
|---|---|---|
| guid | char array | 32-character GUID |
| strength | unsigned char | Strength from 0 to 100 |
SELECTIVECOLOR
Defines a selective color correction that targets a specific hue range for adjustment.
| Field | Type | Range | Description |
|---|---|---|---|
| r | int | Hue ramp start | |
| a | int | Flat range start | |
| m | int | Flat range end | |
| p | int | Hue ramp end | |
| H | int | -180 to 180 | Hue shift |
| S | int | -100 to 100 | Saturation shift |
| L | int | -100 to 100 | Luminance shift |
PFCCOREMask
Defines a gradient mask for applying selective corrections to specific image regions.
| Field | Type | Description |
|---|---|---|
| type | PFCCORE MASK TYPE | Mask type |
| centerX | float | Center X as relative value |
| centerY | float | Center Y as relative value |
| width | float | Width as relative value |
| height | float | Height as relative value |
| radius | float | Corner radius for ROUNDRECT only |
| feather | float | Gradient length |
| angle | float | Rotation clockwise |
| transparency | float | Overall transparency |
| invert | bool | Invert mask |
Notes:
- Coordinates are relative to the final crop-rotated image (
Y/height,X/width). heightfor linear masks defines distance fromcenterYwhere gradient reaches 1.0.radiusis used only forMASK_ROUNDRECT.
DP2PARAM
Contains settings for AI-powered white balance and color density corrections.
| Field | Type | Range | Description |
|---|---|---|---|
| iDensity | int | -100 to 100 | Density |
| iDeltaR | int | -100 to 100 | Red delta |
| iDeltaG | int | -100 to 100 | Green delta |
| iDeltaB | int | -100 to 100 | Blue delta |
| fGamma | float | 0.3 to 4.0 | Gamma |
| iContrast | int | -100 to 100 | Contrast |
| iSaturation | int | -100 to 100 | Saturation |
| bAuto | BOOL | Use AI-detected params | |
| bEnable | BOOL | Enable correction |
PFCSCENEDESCRIPTION
Contains metadata about a detected scene returned from PFC_GetSceneDescription.
| Field | Type | Description |
|---|---|---|
| name | char array | UTF-8 scene name |
| profileUUID | int | Profile UUID |
BGMASKPARAM
Defines parameters for background mask generation used with background synchronization workflows.
| Field | Type | Description |
|---|---|---|
| iRawMaskMode | int | Raw mask mode selector |
| iBG | int | Background level, 0 to 100 |
| iFG | int | Foreground level, 0 to 100 |
| iTolerance | int | Allowed target intensity variation |
| iSobel | int | Sobel binarization threshold |
| iBlur | int | Blur amount |
| bImfill | bool | Fill black holes |
| bAreaopen | bool | Remove white noise in black subject |
| iAreaopen | int | Area-open parameter relative to image size |
| bAreaopenBG | bool | Remove small black regions in white background |
| iAreaopenBG | int | Background area-open parameter |
| iConnectivity | int | Connectivity mode (4 or 8) |
| bGrad | bool | Enable gradient filtering |
| bGradAuto | bool | Auto gradient placement based on detected face bottom |
| iGradBottom | int | Relative gradient bottom |
| iGradHeight | int | Relative gradient spread |
| avR | float | Calculated average background red |
| avG | float | Calculated average background green |
| avB | float | Calculated average background blue |
PFC-SDK Version 10.7.3.1317 built from df9dbc8727c92fb9b1d2c68b21e60ea9c7229e1a on 03-23-2026.
Copyright © 2026 EyeQ Imaging Inc. All rights reserved.