EyeQ Docs

Data Structures

Core data types for images, engine instances, and analysis results.

This page documents the foundational data structures used throughout the Perfectly Clear SDK.

Image structure

This structure represents image data passed to the SDK for processing.

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;
FieldTypeDescription
widthintPixel width of image
heightintPixel height of image
strideintByte width of each scanline or row
formatPFCPIXELFORMATPixel format defining byte order
dataunsigned 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.

Example:

PFCIMAGE image;
image.width = 1920;
image.height = 1080;
image.stride = 1920 * 3;  // 3 bytes per pixel, no padding
image.format = PFC_PixelFormat24bppBGR;
image.data = myImageBuffer;

int result = PFC_AutoCorrect(&image, NULL, param);

Engine structure

This structure manages the processing engine used for image correction operations.

PFCENGINE

Contains the internal engine pointer and initialization status for a processing engine instance.

typedef struct {
    PFCINTERNAL pEngine;
    PFCENGINESTATUS status;
} PFCENGINE;
FieldTypeDescription
pEnginePFCINTERNALInternal pointer to engine implementation
statusPFCENGINESTATUSEngine initialization status

Usage:

PFCENGINE* pEngine = PFC_CreateEngine();

if (pEngine->status != ENGINESTATUS_OK) {
    printf("Engine status: %d\n", pEngine->status);
}

// Use engine for processing...

PFC_DestroyEngine(pEngine);

Profile structure

This structure stores image analysis results that enable efficient parameter adjustments without recalculation.

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;
FieldTypeDescription
CORE_StatusPFCCORE STATUSCore pre-calc status
NR_StatusPFCNR STATUSNoise Removal pre-calc status
FB_StatusPFCFB STATUSFace Beautification pre-calc status
RE_StatusPFCRE STATUSRed Eye pre-calc status
StatusintSummary status bits

Note: The PFCPROFILE type is a pointer to PFCIMAGEPROFILE:

#define PFCPROFILE PFCIMAGEPROFILE*

Geometry structures

These structures define basic geometric primitives used for coordinates and regions.

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

These structures contain face detection results including facial landmarks and attributes.

PFCFBFACEINFO

Contains simplified face geometry including eye positions and face bounds from Face Beautification detection.

typedef struct {
    PFCPOINT leftEye;
    PFCPOINT rightEye;
    PFCRECT face;
} PFCFBFACEINFO;
FieldTypeDescription
leftEyePFCPOINTLeft eye position
rightEyePFCPOINTRight eye position
facePFCRECTFace bounding rectangle

Example:

PFCFBFACEINFO face;
int numFaces = PFC_FBFaceCount(profile);

for (int i = 0; i < numFaces; i++) {
    if (PFC_GetFaceInfo(profile, &face, i)) {
        printf("Face %d: eyes at (%d,%d) and (%d,%d)\n", i,
               face.leftEye.x, face.leftEye.y,
               face.rightEye.x, face.rightEye.y);
    }
}

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;
FieldTypeDescription
rectPFCRECTFace bounding rectangle
rcEyeLPFCRECTLeft eye rectangle
rcEyeRPFCRECTRight eye rectangle
rcMouthPFCRECTMouth rectangle
ptEyeLPFCPOINTLeft eye coordinates with 10-bit fixed-point
ptEyeRPFCPOINTRight eye coordinates with 10-bit fixed-point
angleintRoll angle from -179 to 180 degrees
confidenceintDetection confidence
smileLevelintSmile detection level
yawAngleintYaw angle from -90 to 90 degrees
widthImageintSource image width
heightImageintSource image height
pNextPFCFACERECT*Next face in linked list

Example:

PFCFACERECT* face = NULL;
while ((face = PFC_EnumFAEFaceRect(profile, face))) {
    printf("Face at (%d,%d), confidence: %d\n",
           face->rect.left, face->rect.top, face->confidence);
}

PFC-SDK Version 10.7.2.1269 built from 4fa849d8101945eea725a08dd0dae5101f090fa0 on 11-10-2025.

Copyright © 2026 EyeQ Imaging Inc. All rights reserved.

On this page