Perfectly Clear SDK Documentation
9.1.1.325
|
Go to the source code of this file.
Data Structures | |
struct | PFCPOINT |
Struct defining a point. More... | |
struct | PFCRECT |
Struct defining a rectangle. More... | |
struct | PFCFBFACEINFO |
Structure defining face area detected from the SFB library. More... | |
struct | PFCFaceRect |
Structure defining face attributes detected by the Face Detection library. More... | |
struct | PFCENGINE |
Struct defining an PFC engine instance. More... | |
struct | PFCIMAGE |
Struct defining an image to be used in PFC library. More... | |
struct | PFCCOREPARAM |
Structure encapsulating the CORE processing parameters. More... | |
struct | PFCFBPARAM |
Structure encapsulating Face Beautification parameters. More... | |
struct | PFCNRPARAM |
Structure encapsulating Noise Removal parameters. More... | |
struct | PFCREPARAM |
Structure encapsulating Red Eye Correction parameters. More... | |
struct | PFC3DLutInfo |
Struct. More... | |
struct | PFCCOREMask |
Struct describing mask for grad filter, all coordinates are relative (Y/height, X/width) in final crop-rotated image */. More... | |
struct | PFCV3PARAM |
Struct describing V3 parameters. More... | |
struct | PFCPARAM |
Struct PFCPARAM the master structure of all processing parameters. More... | |
struct | PFCIMAGEPROFILE |
Struct defining an image profile as calculated from PFC_Calc() function. More... | |
struct | BGMASKPARAM |
Struct defining parameters for building BG mask. More... | |
Functions | |
Main PfC Functions | |
These are the most commonly used functions which will be used in nearly every Perfectly Clear implementation. These are presented in the order they will need to be called in most implemnetations. | |
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 a license key file provided by EyeQ. More... | |
void | PFC_SetParam (PFCPARAM ¶m, PFCPRESETID id=PRESET_IAUTO_21) |
Initialize a PFCPARAM structure. More... | |
int | PFC_ReadPresets (PFCPARAM ¶m, char *filename) |
Load image processing settings from a .preset file. Use this function to load image processing settings from a .preset file. You can export these from Perfectly Clear Workbench or Perfectly Clear Complete. Note: the first preset in the file will be used to load the settings into the param struct - so please export a single preset at a time for this purpose. More... | |
int | PFC_AutoCorrect (PFCIMAGE *pImage, PFCIMAGE *pImageds, PFCPARAM ¶m, int iISO=-1, char *pCameraModel=NULL, BOOL bFastFAE=FALSE, PFC_PROGRESS progfn=NULL) |
Single function to perform Perfectly Clear correction. More... | |
void | PFC_ReleaseProtectionPath () |
Releases resources from PFC_SetProtectionPath function call. | |
Used with separate Calc and Apply functions | |
The separate Calc and Apply functions presented in this group allow for faster subsequent processing when image parameters change - for example in end-user software where photographers experiment with different correction parameers. | |
PFCENGINE * | PFC_CreateEngine () |
Create PFCENGINE instance. More... | |
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_CLIPART) |
Perform initial analysis on images. More... | |
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. More... | |
void | PFC_ReleaseProfile (PFCPROFILE pProfile) |
Release PFCPROFILE instance. More... | |
void | PFC_DestroyEngine (PFCENGINE *p) |
Destroy PFCENGINE instance and release associated resources. More... | |
Helper functions | |
These are less commonly used functions that augment more standard uses of the SDK with advanced features | |
void | PFC_SetAddonPath (const char *utf8AddonPath) |
Set path to directory containing runtime add-ons such as .looks file(s) This enables searching for add-on (such as v3.looks) in specified location instead of current working directory of the calling process. More... | |
void | PFC_ReleaseAddonPath () |
Releases resources from PFC_SetAddonPath function call. | |
bool | PFC_HasFaceBeautification (PFCENGINE *pEngine) |
Check if Face Beautification is available. More... | |
int | PFC_FBFaceCount (PFCPROFILE pImageProfile) |
Return number of faces detected. More... | |
int | PFC_FAEFaceCount (PFCIMAGEPROFILE *pImageProfile) |
Return number of faces detected during Face Aware Exposure analysis. More... | |
bool | PFC_GetFaceInfo (PFCIMAGEPROFILE *pImageProfile, PFCFBFACEINFO *pFace, int index) |
Utility function to query geometry of detected faces. More... | |
LPPFCFACERECT | PFC_EnumFAEFaceRect (PFCIMAGEPROFILE *pImageProfile, LPPFCFACERECT p) |
Utility function to enumerate faces detected during Face Aware Exposure analysis. More... | |
bool | PFC_IsNoiseDetected (PFCIMAGEPROFILE *pImageProfile, int iNoisePreset) |
Query if noise is detected. More... | |
bool | PFC_AbnormalTintDetected (PFCIMAGEPROFILE *pImageProfile, TINTCORRECTION eTintMethod) |
Query if abnormal tint is detected. More... | |
PFCAPPLYSTATUS | PFC_ApplyLocal (PFCIMAGE *pImage, int xOffset, int yOffset, int widthOrig, int heightOrig, PFCENGINE *pEngine, PFCPROFILE pImageProfile, PFCPARAM ¶m, int iOpacity=100) |
Apply correction locally. More... | |
int | PFC_AutoCorrectPreset (PFCIMAGE *pImage, PFCIMAGE *pImageds, PFCPRESETID id=PRESET_IAUTO_21, int iISO=-1, char *pCameraModel=NULL, BOOL bFastFAE=FALSE, PFC_PROGRESS progfn=NULL) |
Single function to perform Perfectly Clear corrections. More... | |
int | PFC_ReadPresetsFromStream (PFCPARAM ¶m, const char *s) |
Load image processing settings from a char buffer. More... | |
void | PFC_SetSingleThreadedEngine (PFCENGINE *p, bool bSingleThreaded) |
Force processing to be single threaded. More... | |
void | PFC_GetVersion (char *buf, int *len, bool bFormatted=false) |
Get info string with version and features. More... | |
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 larger than 32 pixels on the shorter side and smaller than 100,000 pixels on the longer side. More... | |
PFCAPPLYSTATUS | PFC_TransposeExif (PFCIMAGE *pImageSrc, int iEXIFOrientation) |
Transpose image upright from/to EXIF Orientation. More... | |
void | PFC_ApplyStrengthToParam (PFCPARAM ¶m, int strength) |
Apply overall strength to parameters, same as Strength in Perfecly Clear products Reads the correction parameters, then adjusts them all by the desired strength level, using the same method as in Perfectly Clear Complete, QuickDesk, and Workbench. More... | |
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 domain where the app is served. More... | |
void | PFC_TrackSave (const char *clientAPIKey) |
Report image save event from WASM SDK. More... | |
void | PFC_GetRecommendedParam (PFCIMAGEPROFILE *profile, PFCCOREPARAM *dst, PFCCOREPARAM *src) |
Get recommended values of auto params using result of precalc. More... | |
Macros | |
#define | NRRETCODE(x) (x & 0x000000FF) |
Decode return status of Noise Removal from master return code. | |
#define | CORERETCODE(x) ((x >> 8) & 0x000000FF) |
Decode return status of Core correction from master return code. | |
#define | FBRETCODE(x) ((x >> 16) & 0x000000FF) |
Decode return status of Face Beautification from master return code. | |
#define | RERETCODE(x) ((x >> 24) & 0x000000FF) |
Decode return status of Red Eye correction from master return code. | |
#define | PFCINTERNAL void* |
Internal used pointer type. | |
#define | PFCPROFILE PFCIMAGEPROFILE* |
Define. | |
#define | PFCBGPROFILE PFCINTERNAL |
For use in background color synchronization. | |
Typedefs | |
typedef BOOL(* | PFC_PROGRESS) (int iPercent) |
typedef struct PFCFaceRect | PFCFACERECT |
Structure defining face attributes detected by the Face Detection library. More... | |
typedef struct PFCCOREMask | PFCCOREMask |
Struct describing mask for grad filter, all coordinates are relative (Y/height, X/width) in final crop-rotated image */. | |
Enumerations | |
enum | PFCPIXELFORMAT |
defines the format of the image data More... | |
enum | PFCENGINESTATUS |
ENUM for engine initialization status. More... | |
enum | PFCFEATURE |
ENUM controlling types of calculations at the pre-calculation stage. More... | |
enum | PFCPRESETID |
ENUM for presets support by this SDK. More... | |
enum | TINTCORRECTION |
Enumeration defining different abnormal tint analysis mode. More... | |
enum | CONTRASTMODE |
Enumeration defining contrast mode. More... | |
enum | DCFMODE |
Enumeration defining DCF analysis mode. More... | |
enum | AGGRESSIVENESS |
Enumeration defining Auto Exposure calculation modes. More... | |
enum | BIASMODE |
Enumeration defining BIAS analysis mode. More... | |
enum | SKINMODE |
Enumeration defining modes in Perfect Smooth analysis. More... | |
enum | SKINSMOOTHTYPE |
Enumeration defining types of Skin Smoothing correction. More... | |
enum | SKINTONINGTYPE |
Enumeration defining type of Skin Toning correction. More... | |
enum | LIPSHARPENTYPE |
Enumeration defining Lip Sharpening mode. More... | |
enum | PFCNR_STATUS |
Enumeration defining status of Noise Removal pre-calculation. More... | |
enum | PFCCORE_STATUS |
Enumeration defining status of Core pre-calculation. More... | |
enum | PFCFB_STATUS |
Enumeration defining status of Face Beautification pre-calculation. More... | |
enum | PFCRE_STATUS |
Enumeration defining status of Red Eye pre-calculation. More... | |
enum | PFCAPPLYSTATUS |
Enumeration defining return code from the Apply() function. More... | |
enum | PFCREJECTOPTION |
Enumeration defining rejection flags. More... | |
enum | PFCCORE_MASK_TYPE |
Enumeration describing mapping of PFCMask and PFC_MASK_TYPE with 'PFC' -> 'PFCCORE'. More... | |
bool PFC_AbnormalTintDetected | ( | PFCIMAGEPROFILE * | pImageProfile, |
TINTCORRECTION | eTintMethod | ||
) |
Query if abnormal tint is detected.
Utility function to query if abnormal tint is detected at certain detection mode.
pImageProfile | [in] - Profile returned from PFC_Calc() function. |
eTintMethod | [in] - TINTCORRECTION enum to specify tint detection method used. |
PFCAPPLYSTATUS PFC_Apply | ( | PFCIMAGE * | pImage, |
PFCENGINE * | pEngine, | ||
PFCPROFILE | pImageProfile, | ||
PFCPARAM & | param, | ||
PFC_PROGRESS | progfn = NULL , |
||
int | iOpacity = 100 , |
||
void * | pBGProfile = NULL |
||
) |
Correct image with parameters.
Perform correction to image as defined by the PFCIMAGE structure using user parameters as defined in a PFCPARAM structure. Correction requires profile as calculated by the PFC_Calc() function.
pImage | [in, out] - Pointer to a PFCIMAGE structure that defines the image to be processed. |
pEngine | [in] - Pointer returned from PFC_CreateEngine() function. |
pImageProfile | [in] - Pointer to PFCPROFILE structure which is returned from the PFC_Calc() function. |
param | [in] - PFCPARAM structure that carries the process parameters. |
progfn | [in] - Pointer to progress monitoring function. See definition of PFC_PROGRESS. |
iOpacity | [in] - Control opacity of NR and CORE corrections. Range from 0 (non applied) to 100 (fully applied). |
pBGProfile | [in, out] - pointer to PFCBGPROFILE used for PFC_BGSync and BGApply |
PFCAPPLYSTATUS PFC_ApplyLocal | ( | PFCIMAGE * | pImage, |
int | xOffset, | ||
int | yOffset, | ||
int | widthOrig, | ||
int | heightOrig, | ||
PFCENGINE * | pEngine, | ||
PFCPROFILE | pImageProfile, | ||
PFCPARAM & | param, | ||
int | iOpacity = 100 |
||
) |
Apply correction locally.
Perform CORE correction only to partial image as defined by the PFCIMAGE structure using user parameters as defined in a PFCPARAM structure. Correction requires profile as calculated by the PFC_Calc() function.IMPORTANT: Only the core correction is applied.
pImage | [in, out] - Pointer to PFCIMAGE structure that defines the image to be processed. |
xOffset | [in] - Horizontal (x) offset of image segment defined in pImage with respect to the original image. |
yOffset | [in] - Vertical (y) offset of image segment defined in pImage with respect to the original image. |
widthOrig | [in] - Pixel width of the original image. |
heightOrig | [in] - Pixel height of the original image. |
pEngine | [in] - Pointer returned from PFC_CreateEngine() function. |
pImageProfile | [in] - Pointer to PFCPROFILE structure which is returned from the PFC_Calc() function. |
param | [in] - PFCPARAM structure that carries the process parameters. |
iOpacity | [in] - Control opacity of NR and CORE corrections. Range from 0 (non applied) to 100 (fully applied). |
0 | The correction is successful. |
> 0 | PFCCORE_STATUS enum. |
< 0 | PFCAPPLYSTATUS enum. |
void PFC_ApplyStrengthToParam | ( | PFCPARAM & | param, |
int | strength | ||
) |
Apply overall strength to parameters, same as Strength in Perfecly Clear products Reads the correction parameters, then adjusts them all by the desired strength level, using the same method as in Perfectly Clear Complete, QuickDesk, and Workbench.
param | [in, out] - PFCPARAM structure to read and modify |
strength | [in] - Strength of correction to apply. 0 = totally off 100 = default, 200 = Max |
int PFC_AutoCorrect | ( | PFCIMAGE * | pImage, |
PFCIMAGE * | pImageds, | ||
PFCPARAM & | param, | ||
int | iISO = -1 , |
||
char * | pCameraModel = NULL , |
||
BOOL | bFastFAE = FALSE , |
||
PFC_PROGRESS | progfn = NULL |
||
) |
Single function to perform Perfectly Clear correction.
Single function that takes an input picture and enhances it base on user parameters. This function encapsulates all the details such as PFCENGINE, PFCPROFILE etc. and is suitable for use in server type mass processing environment. See sample project "SampleBasic" for usage details.
pImage | [in, out] - Pointer to a PFCIMAGE structure that defines the image to be processed. |
pImageds | [in] - Pointer to a PFCIMAGE structure that defines a supplementary down sampled image to be used in pre-calc analysis. This parameter can be NULL. However the use of such supplementary image is highly recommended. |
param | [in] - PFCPARAM structure that carries the process parameters. |
iISO | [in] - ISO value when the image is taken. Use -1 if not known. |
pCameraModel | [in] - Text string of camera model which the picture is taken with. Set to NULL if not known. |
bFastFAE | [in] - Set to true to run a faster Face Aware Exposure Calculation. Default is false. |
progfn | [in] - Pointer to progress monitoring function. See definition of PFC_PROGRESS. |
0 | The correction is successful. | ||||||||||
> 0 |
| ||||||||||
< 0 | Error: PFCAPPLYSTATUS enum. |
int PFC_AutoCorrectPreset | ( | PFCIMAGE * | pImage, |
PFCIMAGE * | pImageds, | ||
PFCPRESETID | id = PRESET_IAUTO_21 , |
||
int | iISO = -1 , |
||
char * | pCameraModel = NULL , |
||
BOOL | bFastFAE = FALSE , |
||
PFC_PROGRESS | progfn = NULL |
||
) |
Single function to perform Perfectly Clear corrections.
Composite function that takes an input picture and enhances it using preset parameters specified by PFCPRESETID id.
pImage | [in, out] - Pointer to a PFCIMAGE structure that defines the image to be processed. |
pImageds | [in] - Pointer to a PFCIMAGE structure that defines a supplementary down sampled image to be used in pre-calc analysis. This parameter can be NULL. However the use of such supplementary image is highly recommended. |
id | [in] - PFCPRESETID to specify a preset to use. |
iISO | [in] - ISO value when the image is taken. Use -1 if not known. |
pCameraModel | [in] - Text string of camera model which the picture is taken with. Set to NULL if not known. |
bFastFAE | [in] - Set to true to run a faster Face Aware Exposure Calculation. Default is false. |
progfn | [in] - Pointer to progress monitoring function. See definition of PFC_PROGRESS. |
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_CLIPART |
||
) |
Perform initial analysis on images.
Performs initial analysis and calculation of image specific profile parameters. Profile calculation can be done incrementally. For example if calculation is done initially on Perfectly Clear Core. Calculation of other feature, say Face Beautification, can be done in subsequent calls to PFC_Calc().
pImage | [in] - Pointer to a PFCIMAGE structure that defines the image to be processed. | ||||||||||||||||
pImageds | [in] - Pointer to a PFCIMAGE structure that defines a supplementary down sampled image (approx. 1024 longest dimension) to aid in red eye detection. Set this parameter to NULL if you don't supply this image. | ||||||||||||||||
pEngine | [in] - Pointer returned from the PFC_CreateEngine() function. | ||||||||||||||||
feature | [in] - Specify the type of calculations. Possible values are:
| ||||||||||||||||
iISO | [in] - ISO value when the image is taken. Use -1 if not known. | ||||||||||||||||
pCameraModel | [in] - Text string of camera model which the picture is taken with. Set to NULL if not known. | ||||||||||||||||
pImageProfile | [in] - Pointer to PFCPROFILE. Leave as NULL if this is first time calling the PFC_Calc function. | ||||||||||||||||
progfn | [in] - Pointer to progress monitoring function. See definition of PFC_PROGRESS. | ||||||||||||||||
iRejectOption | [in] - Set to a value from PFCREJECTOPTION. By default, this is set to PFC_REJECT_CLIPART |
PFCENGINE* PFC_CreateEngine | ( | ) |
Create PFCENGINE instance.
Create core engine for use in Perfectly Clear image processing pipeline. The PFCENGINE module created by this function can be used in the entire session before PFC_DestroyEngine() is called.
void PFC_DestroyEngine | ( | PFCENGINE * | p | ) |
Destroy PFCENGINE instance and release associated resources.
Release PFCENGINE module created by function PFC_CreateEngine() and release all resouces used by the PFCENGINE.
p | [in] - pointer to PFCENGINE instance to be released. |
LPPFCFACERECT PFC_EnumFAEFaceRect | ( | PFCIMAGEPROFILE * | pImageProfile, |
LPPFCFACERECT | p | ||
) |
Utility function to enumerate faces detected during Face Aware Exposure analysis.
Pointer to the next face info as described in PFCFACERECT.
Example:
pImageProfile | [in] - Pointer to PFCPROFILE structure which is returned from the PFC_Calc() function. |
p | [in] - LPPFCFACERECT type. Last face rect returned from this function. |
int PFC_FAEFaceCount | ( | PFCIMAGEPROFILE * | pImageProfile | ) |
Return number of faces detected during Face Aware Exposure analysis.
Get number of faces detected during Face Aware Exposure analysis.
pImageProfile | [in] - Pointer to PFCPROFILE structure which is returned from the PFC_Calc() function. |
int PFC_FBFaceCount | ( | PFCPROFILE | pImageProfile | ) |
Return number of faces detected.
Get number of faces detected in the Face Beautification processing.
pImageProfile | [in] - Profile instance returned from PFC_Calc function. |
bool PFC_GetFaceInfo | ( | PFCIMAGEPROFILE * | pImageProfile, |
PFCFBFACEINFO * | pFace, | ||
int | index | ||
) |
Utility function to query geometry of detected faces.
Return True if face information is retrieved successfully. False if face is not detected or index is out of bound.
Example:
pImageProfile | [in] - Profile returned from PFC_Calc() function. |
pFace | [in] - Pointer to PFCFBFACEINFO structure that carries face and eye details upon successful retrieval. |
index | [in] - Index navigating the list. Must be >=0 and < number of faces. |
void PFC_GetRecommendedParam | ( | PFCIMAGEPROFILE * | profile, |
PFCCOREPARAM * | dst, | ||
PFCCOREPARAM * | src | ||
) |
Get recommended values of auto params using result of precalc.
profile | [in] - obtained from PFC_Calc |
dst | [in, out] - destination PFCCOREPARAM |
src | [in] - source PFCCOREPARAM |
void PFC_GetVersion | ( | char * | buf, |
int * | len, | ||
bool | bFormatted = false |
||
) |
Get info string with version and features.
buf | [in, out] - receives zero terminate string of no more than len lenght, if NULL len will receive length to be allocated |
len | [in, out] - call with NULL first param to get necessary len to allocate, then pass it on next call |
bFormatted | - output key=value formatted ("version=x.x.x;commit=xxxx;avx=1;..."), or ("x.x.x xxx avx ...") |
bool PFC_HasFaceBeautification | ( | PFCENGINE * | pEngine | ) |
Check if Face Beautification is available.
pEngine | [in] - Pointer returned from PFC_CreateEngine() function |
bool PFC_IsNoiseDetected | ( | PFCIMAGEPROFILE * | pImageProfile, |
int | iNoisePreset | ||
) |
Query if noise is detected.
True if noise is detected when noise preset is iPreset. False otherwise. If Noise calculation is not enabled during PFC_Calc(), this query returns False.
pImageProfile | [in] - Profile returned from PFC_Calc() function. |
iNoisePreset | [in] - Noise preset to be checked. |
int PFC_ReadPresets | ( | PFCPARAM & | param, |
char * | filename | ||
) |
Load image processing settings from a .preset file. Use this function to load image processing settings from a .preset file. You can export these from Perfectly Clear Workbench or Perfectly Clear Complete. Note: the first preset in the file will be used to load the settings into the param struct - so please export a single preset at a time for this purpose.
param | [in, out] - PFCPARAM structure to fill with the process parameters. |
filename | [in] - Path and filename for the .preset file to read and load. |
return code | meaning |
---|---|
0 | OK |
-1 | Attribute errors |
-2 | Unable to open file |
-3 | File read error |
-4 | Parse error |
-5 | Cannot convert text |
-6 | No text node |
-7 | Element depth exceeded |
-8 | Invalid preset file |
int PFC_ReadPresetsFromStream | ( | PFCPARAM & | param, |
const char * | s | ||
) |
Load image processing settings from a char buffer.
Use this function to load image processing settings from a char buffer (stream). You can export these from Perfectly Clear Workbench or Perfectly Clear Complete. Note: the first preset in the file will be used to load the settings into the param struct - so please export a single preset at a time for this purpose. This function is very similar to PFC_ReadPresets, but accepts the preset data from a file stream instead of from a file on disk.
param | [in, out] - PFCPARAM structure to fill with the process parameters. |
s | [in] - const char buffer to read and load presets from. |
return code | meaning |
---|---|
0 | OK |
-1 | Attribute errors |
-2 | Unable to open file |
-3 | File read error |
-4 | Parse error |
-5 | Cannot convert text |
-6 | No text node |
-7 | Element depth exceeded |
-8 | Invalid preset file |
void PFC_ReleaseProfile | ( | PFCPROFILE | pProfile | ) |
Release PFCPROFILE instance.
Release PFCPROFILE instance and its associated resources.
pProfile | [in] - pointer to PFCPROFILE instance returned from PFC_Calc funciton. |
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 larger than 32 pixels on the shorter side and smaller than 100,000 pixels on the longer side.
pImageSrc | [in] - Input image |
pImageDst | [out] - output image |
void PFC_SetAddonPath | ( | const char * | utf8AddonPath | ) |
Set path to directory containing runtime add-ons such as .looks file(s) This enables searching for add-on (such as v3.looks) in specified location instead of current working directory of the calling process.
utf8AddonPath | [in] - UTF8 encoded path to the folder that contains .looks file(s) |
void PFC_SetParam | ( | PFCPARAM & | param, |
PFCPRESETID | id = PRESET_IAUTO_21 |
||
) |
Initialize a PFCPARAM structure.
SetParam initializes a PFCPARAM structure with parameters pertaining to Athentech preset as identified by the PFCPRESETID. If preset id is not provided, the default preset values will be used.
param | [in, out] - PFCPARAM structure to be set. |
id | [in] - enum PFCPRESETID (default to PRESET_IAUTO_21). |
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 a license key file provided by EyeQ.
utf8FolderPath | [in] - UTF8 encoded path to the folder that contains the SDK license files |
liceseCode | [in] - optional 18-digits license code to be used instead of license.key in utf8FolderPath |
return code | meaning |
---|---|
0 | OK |
101 | Undetermined errors |
102 | Success: Active license |
103 | Success: Active trial |
104 | License expired |
105 | System time tampered |
106 | Product not authorized |
107 | Product not found |
108 | Invalid license |
109 | License returned |
110 | Product inactive |
111 | Invalid trial period |
112 | Too many activation |
113 | Trial expired |
114 | License number inactive |
115 | Exceed allowed activation |
116 | Subscription expired |
117 | Invalid system date |
118 | Product in invalid state |
119 | No available licenses |
120 | Duplicate device ID |
121 | High missing heartbeat |
void PFC_SetSingleThreadedEngine | ( | PFCENGINE * | p, |
bool | bSingleThreaded | ||
) |
Force processing to be single threaded.
Set bSingleThreaded to TRUE to force processing in single thread mode.
p | [in, out] - pointer to PFCENGINE instance as returned from PFC_CreateEngine(). |
bSingleThreaded | [in] - set to TRUE to enable single thread processing. |
void PFC_TrackSave | ( | const char * | clientAPIKey | ) |
Report image save event from WASM SDK.
clientAPIKey | [in] - WASM API Key issued by EyeQ |
PFCAPPLYSTATUS PFC_TransposeExif | ( | PFCIMAGE * | pImageSrc, |
int | iEXIFOrientation | ||
) |
Transpose image upright from/to EXIF Orientation.
pImageSrc | [in, out] - image to transpose |
iEXIFOrientation | [in] - EXIF orientation tag value. Use negative to do reverse (upright to orientation) |
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 domain where the app is served.
pEngine | [in] - PFCENGINE instance |
clientAPIKey | [in] - WASM API Key issued by EyeQ |
certificate | [in] - certificate obtained for API Key and domain from EyeQ |
typedef BOOL(* PFC_PROGRESS) (int iPercent) |
defines the call format of a progress function. return TRUE to cancel processing. FALSE to continue.
Definition at line 32 of file PerfectlyClearPro.h.
typedef struct PFCFaceRect PFCFACERECT |
Structure defining face attributes detected by the Face Detection library.
Detection levels:*
enum AGGRESSIVENESS |
Enumeration defining Auto Exposure calculation modes.
Definition at line 278 of file PerfectlyClearPro.h.
enum BIASMODE |
Enumeration defining BIAS analysis mode.
Definition at line 286 of file PerfectlyClearPro.h.
enum CONTRASTMODE |
Enumeration defining contrast mode.
Definition at line 264 of file PerfectlyClearPro.h.
enum DCFMODE |
Enumeration defining DCF analysis mode.
Enumerator | |
---|---|
DCF_STANDARD | For normal photo. |
DCF_VIVID | For more color vibrancy. |
Definition at line 271 of file PerfectlyClearPro.h.
enum LIPSHARPENTYPE |
Enumeration defining Lip Sharpening mode.
Enumerator | |
---|---|
LIPSHARPENTYPE_FINE | Fine touch of sharpening. |
LIPSHARPENTYPE_MEDIUM | Stronger sharpening. Details are more pronounced. |
LIPSHARPENTYPE_COARSE | Lip details are coarsely pronounced. |
Definition at line 322 of file PerfectlyClearPro.h.
enum PFCAPPLYSTATUS |
Enumeration defining return code from the Apply() function.
Definition at line 382 of file PerfectlyClearPro.h.
enum PFCCORE_MASK_TYPE |
Enumeration describing mapping of PFCMask and PFC_MASK_TYPE with 'PFC' -> 'PFCCORE'.
Definition at line 509 of file PerfectlyClearPro.h.
enum PFCCORE_STATUS |
Enumeration defining status of Core pre-calculation.
Definition at line 342 of file PerfectlyClearPro.h.
enum PFCENGINESTATUS |
ENUM for engine initialization status.
Definition at line 151 of file PerfectlyClearPro.h.
enum PFCFB_STATUS |
Enumeration defining status of Face Beautification pre-calculation.
Definition at line 354 of file PerfectlyClearPro.h.
enum PFCFEATURE |
ENUM controlling types of calculations at the pre-calculation stage.
Definition at line 158 of file PerfectlyClearPro.h.
enum PFCNR_STATUS |
Enumeration defining status of Noise Removal pre-calculation.
Definition at line 330 of file PerfectlyClearPro.h.
enum PFCPIXELFORMAT |
defines the format of the image data
Definition at line 35 of file PerfectlyClearPro.h.
enum PFCPRESETID |
ENUM for presets support by this SDK.
Enumerator | |
---|---|
PRESET_BEAUTIFY | Beautify - provides a good default set of corrections for portratis and other photos of people. This is in the 'Perfectly Clear Essentials' group in EyeQ products. |
PRESET_BEAUTIFYPLUS | Beautify Plus provides stronger beautification corrections. This is in the 'Perfectly Clear Essentials' group in EyeQ products. |
PRESET_DETAILS | iAuto Details - legacy preset for backwards compability. This is in the 'Athentech Legacy' group in EyeQ products. |
PRESET_VIVID | Vivid - good for landscapes and other general photography. This is in the 'Perfectly Clear Essentials' group in EyeQ products. |
PRESET_INTELLIGENTAUTO | Intelligent Auto - this has been superceded by iAuto 2019 and is here for backwards compatability. The corrections it provides are still very good! |
PRESET_IAUTO_2019 | iAuto for even better image corrections |
PRESET_IAUTO_2019_RE | iAuto 2019 with Red Eye correciton enabled |
PRESET_IAUTO_21 | The iAuto you love plus newly tuned settings for sharper images, accurate skin correction, and more depth. Read more here: https://eyeq.photos/business/iauto-2021. |
PRESET_IAUTO_21_ASIA | Based on iAuto 21, but with brighter Skin & Depth Bias for truer skin tone. |
Definition at line 172 of file PerfectlyClearPro.h.
enum PFCRE_STATUS |
Enumeration defining status of Red Eye pre-calculation.
Enumerator | |
---|---|
PFC_RE_SUCCESS | 0 Success |
PFC_RE_NOTENABLED | 1 Feature not enabled |
PFC_RE_FULLRES_REQUIRED | 2 Source image (pImage) is missing |
PFC_RE_NOT_FOUND | 3 Red eye not found |
PFC_RE_GEN_ERROR | 4 General error |
PFC_RE_INVALID_PARAMETER | 5 Invalid parameter |
PFC_RE_NO_MEMORY | 6 Insufficient memory |
PFC_RE_CANCELLED | 7 Process cancelled |
PFC_RE_NOT_SUPPORTED | 8 Not supported |
Definition at line 369 of file PerfectlyClearPro.h.
enum PFCREJECTOPTION |
Enumeration defining rejection flags.
Enumerator | |
---|---|
PFC_REJECT_NONE | Disable image rejection. |
PFC_REJECT_MONOLITH | Reject simple images that don't benefit from correction, like solid colors. This was the default before version 8.5. |
PFC_REJECT_CLIPART | Reject images classified as clipart, used by default. |
Definition at line 399 of file PerfectlyClearPro.h.
enum SKINMODE |
Enumeration defining modes in Perfect Smooth analysis.
Enumerator | |
---|---|
SKINMODE_FACE | Apply correction ONLY on skin regions included in faces. |
SKINMODE_BODY | Apply correction on most skin regions regardless they are linked with a face or not. |
Definition at line 297 of file PerfectlyClearPro.h.
enum SKINSMOOTHTYPE |
Enumeration defining types of Skin Smoothing correction.
Enumerator | |
---|---|
SKINSMOOTHTYPE_SUBTLE | The subtle correction removes the wrinkles and spots alone while it keeps the texture of the face unchanged. |
SKINSMOOTHTYPE_DEFAULT | This type of correction provides a more uniform appearance to the complexion. It combines the natural look of the SUBTLE mode with the improved efficiency of SUPERSMOOTH. |
SKINSMOOTHTYPE_SUPERSMOOTH | This is a more aggressive and effective correction where the appearance of the entire skin (including wrinkles, spots, hot spots) is changed (softened). |
Definition at line 304 of file PerfectlyClearPro.h.
enum SKINTONINGTYPE |
Enumeration defining type of Skin Toning correction.
Enumerator | |
---|---|
SKINTONINGTYPE_WHITE | Whitens (bleaches) face. Recommended mainly for darker skin. |
SKINTONINGTYPE_PALE | Makes skin look lighter and more pale. |
SKINTONINGTYPE_WARM | Warms skin tone. |
SKINTONINGTYPE_TAN | Darkens skin, makes it look naturally tanned. |
SKINTONINGTYPE_FOUNDATION | Adjust skin to user defined foundation color. |
Definition at line 312 of file PerfectlyClearPro.h.
enum TINTCORRECTION |
Enumeration defining different abnormal tint analysis mode.
Enumerator | |
---|---|
TINTCORRECT_AGGRESSIVE | Aggressive detection of tint. |
TINTCORRECT_DEFAULT | Moderate level of tint detection. |
TINTCORRECT_CONSERVATIVE | Priority on minimum false positive detection. |
TINTCORRECT_STRONGEST | Highest sensitivity level of tint detection. |
Definition at line 255 of file PerfectlyClearPro.h.