Perfectly Clear SDK Documentation  10.7.1.1191
PerfectlyClear Class Reference
Inheritance diagram for PerfectlyClear:

Data Structures

struct  PerfectlyClearImageTransfer
 Struct defining an image. More...
 
struct  PFCENGINE
 Struct defining an PFC engine instance. More...
 
struct  PFCIMAGE
 Struct defining an image to be used in PFC library. More...
 
struct  PFCIMAGEPROFILE
 Struct defining an image profile as calculated from PFC_Calc() function. More...
 

Public Member Functions

 PerfectlyClear ()
 Special class constructor for multithreading. More...
 
 PerfectlyClear (string path, string licenseCode="")
 Class constructor. More...
 
unsafe ADPTRRETURNCODE Calc (ref Bitmap bm)
 Performs precalc analysis. More...
 
unsafe ADPTRRETURNCODE Calc (ref PFCImageFile imgfile)
 Overload method for precalc analysis. More...
 
unsafe ADPTRRETURNCODE Calc (ref Bitmap bm, ref Bitmap bmds)
 Overload method for precalc analysis. More...
 
unsafe ADPTRRETURNCODE Calc (ref PFCImageFile imgfile, PFCFEATURE feature)
 Overload method for precalc analysis. More...
 
unsafe ADPTRRETURNCODE Calc (ref Bitmap bm, PFCFEATURE feature)
 Overload method for precalc analysis. More...
 
unsafe ADPTRRETURNCODE Calc (ref Bitmap bm, ref Bitmap bmds, PFCFEATURE feature)
 Overload method for precalc analysis. More...
 
unsafe ADPTRRETURNCODE Calc (ref Bitmap bm, PFCFEATURE feature, int ISO, string CameraModel, PFCREJECTOPTION rejectOption=PFCREJECTOPTION.PFC_REJECT_CLIPART)
 Overload method for precalc analysis. More...
 
unsafe ADPTRRETURNCODE Calc (ref PFCImageFile imgfile, PFCFEATURE feature, int ISO, string CameraModel, PFCREJECTOPTION rejectOption=PFCREJECTOPTION.PFC_REJECT_CLIPART)
 Overload method for precalc analysis. More...
 
unsafe ADPTRRETURNCODE Calc (ref Bitmap bm, ref Bitmap bmds, PFCFEATURE feature, int ISO, string CameraModel)
 Overload method for precalc analysis. More...
 
unsafe PFCAPPLYSTATUS Apply (ref Bitmap bm)
 Apply correction. More...
 
unsafe PFCAPPLYSTATUS Apply (ref PFCImageFile imgfile)
 Apply correction. More...
 
unsafe PFCAPPLYSTATUS Apply (ref Bitmap bm, int iOpacity)
 Apply correction. More...
 
unsafe PFCAPPLYSTATUS Apply (ref PFCImageFile imgfile, int iOpacity)
 Apply correction. More...
 
int AutoCorrect (ref Bitmap bm)
 Overload method for auto correction. More...
 
int AutoCorrect (ref PFCImageFile imgfile)
 Overload method for auto correction. More...
 
int AutoCorrect (ref Bitmap bm, ref Bitmap bmds)
 Overload method for auto correction. More...
 
int AutoCorrect (ref Bitmap bm, int ISO, string CameraModel, bool bFastFAE)
 Performs auto correction. More...
 
int AutoCorrect (ref PFCImageFile imgfile, int ISO, string CameraModel, bool bFastFAE)
 Performs auto correction. More...
 
int AutoCorrect (ref Bitmap bm, ref Bitmap bmds, int ISO, string CameraModel, bool bFastFAE)
 Overload method for auto correction. More...
 
int AutoCorrect (ref Bitmap bm, string pathPreset)
 Overload method for auto correction. More...
 
int AutoCorrect (ref PFCImageFile imgfile, string pathPreset)
 Overload method for auto correction. More...
 
int AutoCorrect (ref Bitmap bm, ref Bitmap bmds, string pathPreset)
 Overload method for auto correction. More...
 
int AutoCorrect (ref Bitmap bm, string pathPreset, int ISO, string CameraModel, bool bFastFAE)
 Overload method for auto correction. More...
 
int AutoCorrect (ref PFCImageFile imgfile, string pathPreset, int ISO, string CameraModel, bool bFastFAE)
 Overload method for auto correction. More...
 
int AutoCorrect (ref Bitmap bm, ref Bitmap bmds, string pathPreset, int ISO, string CameraModel, bool bFastFAE)
 Overload method for auto correction. More...
 
void SetParam (PFCPRESETID id)
 Set process parameters in current instance. More...
 
int ReadPresets (string path)
 Read a preset from .preset file. More...
 
int ReadPresetsFromStream (FileStream fs)
 Read a preset from a file stream. More...
 
int LoadScenePresetsFromStream (FileStream fs, int groupUUID=0, int *arrProfileUUID=null, int arrProfileUUIDLen=0)
 Read a Scene preset from a file stream. More...
 
bool HasFaceBeautification ()
 Query if Face Beautification feature is available. More...
 
int FBFaceCount ()
 Get number of faces. More...
 
bool GetFaceInfo (ref PFCFBFACEINFO info, int index)
 Get face information. More...
 
bool AbnormalTintDetected (TINTCORRECTION eTintMethod)
 Query if Abnormal Tint detected. More...
 
void ApplyStrengthToParam (int strength)
 Apply overall strength to parameters, same as Strength in Perfecly Clear products Adjusts the parameters in the adapter by the desired strength level, using the same method as in Perfectly Clear Complete, QuickDesk, and Workbench. More...
 
Bitmap ReadImage (string filename)
 Utility function for reading image file into Bitmap. More...
 
unsafe bool EnumFAEFaceRect (ref PFCFACERECT rect)
 Allows the user to iterate over the known faces to FAE. More...
 
int FAEFaceCount ()
 Returns the count of the faces recogniced by FAE. More...
 
int LoadAiEngine (PFCAIFEATURE aifeatures, string binPath)
 Load AI models into engine. Takes time and memory. More...
 
unsafe int LoadScenePresets (string filePath, int groupUUID=0, int *arrProfileUUID=null, int arrProfileUUIDLen=0)
 Loads scene optimized presets from presets file. Engine may be AI-enabled with PFC_LoadAIEngine(). Presets are checked for compatibility with loaded scene detection AI. If Engine does not have its own AI engine, pass groupUUID and optionally arrProfileUUID and arrProfileUUIDLen reported by AI-enabled Engine. More...
 
int ReadScenePreset (ref PFCPARAM param, int scene)
 Fill param for the scene from the engine with previously loaded scene presets with LoadScenePresets. More...
 
int GetScene (int *version)
 Get scene detection label from profile obtained with Pfc.Calc For this to work you need to pass AI_SCENE_DETECTION enabled engine as a last param of Pfc.Calc. More...
 
bool GetCategorizationEngineInfo (int *groupUUID, int *arrProfileUUID, int *arrProfileUUIDLen)
 Get loaded (with PFC_LoadAIEngine) categorization model info Call first with arrProfileUUID to get arrProfileUUIDLen to preallocate. More...
 
bool GetSceneDescription (int index, ref PFCSCENEDESCRIPTION sceneDescription)
 Get the scene description for the given index number Requires an initialized ai engine. More...
 

Static Public Member Functions

static int SetProtectionPath (string path, string licenseCode)
 Set path to location of SDK License files This enables license protection and allows activation using a license key file provided by EyeQ. Use either this function along with PerfectlyClear constuctor with no arguments, Or do not call this function, but use the PerfectlyClear constuctor with path and optional license key arguments. More...
 
static void ReleaseProtectionPath ()
 Releases resources from SetProtectionPath. More...
 
static void SetAddonPath (string dirPath)
 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...
 

Detailed Description

Name: PerfectlyClear Scope: public

C# wrapper class for PerfectlyClearPro dll.

Definition at line 700 of file PerfectlyClearAdapter.cs.

Member Function Documentation

◆ AbnormalTintDetected()

bool AbnormalTintDetected ( TINTCORRECTION  eTintMethod)
inline

Query if Abnormal Tint detected.

Parameters
eTintMethod[in] The tint detection method to be queried.
Returns
True is tint was detected for the given eTintMethod

Definition at line 1905 of file PerfectlyClearAdapter.cs.

◆ Apply() [1/4]

unsafe PFCAPPLYSTATUS Apply ( ref Bitmap  bm)
inline

Apply correction.

Parameters
bm[in] Bitmap instance to be corrected.
Returns
Apply Status

Definition at line 1206 of file PerfectlyClearAdapter.cs.

◆ Apply() [2/4]

unsafe PFCAPPLYSTATUS Apply ( ref Bitmap  bm,
int  iOpacity 
)
inline

Apply correction.

Parameters
bm[in] Bitmap instance to be corrected.
iOpacity[in] Define opacity of the correction. Range from 0 to 100. 0 - No correction. 100 - Full correction.
Returns
Apply Status

Definition at line 1227 of file PerfectlyClearAdapter.cs.

◆ Apply() [3/4]

unsafe PFCAPPLYSTATUS Apply ( ref PFCImageFile  imgfile)
inline

Apply correction.

Parameters
imgfile[in] Bitmap instance to be corrected.
Returns
Apply Status

Definition at line 1216 of file PerfectlyClearAdapter.cs.

◆ Apply() [4/4]

unsafe PFCAPPLYSTATUS Apply ( ref PFCImageFile  imgfile,
int  iOpacity 
)
inline

Apply correction.

Parameters
imgfile[in] PFCImageFile instance to be corrected.
iOpacity[in] Define opacity of the correction. Range from 0 to 100. 0 - No correction. 100 - Full correction.
Returns
Apply Status

Definition at line 1284 of file PerfectlyClearAdapter.cs.

◆ ApplyStrengthToParam()

void ApplyStrengthToParam ( int  strength)
inline

Apply overall strength to parameters, same as Strength in Perfecly Clear products Adjusts the parameters in the adapter by the desired strength level, using the same method as in Perfectly Clear Complete, QuickDesk, and Workbench.

Parameters
strength[in] - Strength of correction to apply. 0 = totally off 100 = default, 200 = Max

Definition at line 1915 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [1/12]

int AutoCorrect ( ref Bitmap  bm)
inline

Overload method for auto correction.

Parameters
bm[in,out] Image to be corrected.
Returns
int showing correction status
Return value
0The correction is successful.
> 0
Use macros to map out return code for each feature:
NRRETCODEReturns PFCNR_STATUS Noise Removal correction status.
CORERETCODEReturns PFCCORE_STATUS Core correction status.
FBRETCODEReturns PFCFB_STATUS Face Beautification correction status.
RERETCODEReturns PFCRE_STATUS Red Eye correction status.
< 0returns a PFCAPPLYSTATUS enum
< -1000
Additional return codes for AutoCorrect with preset file support
-1001Attribute errors.
-1002Unable to open file.
-1003File read error.
-1004Parse error.
-1005Cannot convert text.
-1006No text node.
-1007Element depth exceeded.
-1008Exception occurred while reading preset file.
-1009Preset file contains an unexpected group.

Definition at line 1345 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [2/12]

int AutoCorrect ( ref Bitmap  bm,
int  ISO,
string  CameraModel,
bool  bFastFAE 
)
inline

Performs auto correction.

Parameters
bm[in,out] Image to be corrected.
ISO[in] ISO number of image.
CameraModel[in] Camera model found in EXIF info block.
bFastFAE[in] Set to TRUE to enable fast FAE calculation.
Returns
int showing correction status defined here PFC_Apply_Return_Values

Definition at line 1380 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [3/12]

int AutoCorrect ( ref Bitmap  bm,
ref Bitmap  bmds 
)
inline

Overload method for auto correction.

Parameters
bm[in,out] Image to be corrected.
bmds[in] Down sampled image to assist in precalc analysis.
Returns
int showing correction status defined here PFC_Apply_Return_Values

Definition at line 1367 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [4/12]

int AutoCorrect ( ref Bitmap  bm,
ref Bitmap  bmds,
int  ISO,
string  CameraModel,
bool  bFastFAE 
)
inline

Overload method for auto correction.

Parameters
bm[in,out] Image to be corrected.
bmds[in] Down sampled image to assist in precalc analysis.
ISO[in] ISO number of image.
CameraModel[in] Camera model found in EXIF info block.
bFastFAE[in] Set to TRUE to enable fast FAE calculation.
Returns
int showing correction status defined here PFC_Apply_Return_Values

Definition at line 1549 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [5/12]

int AutoCorrect ( ref Bitmap  bm,
ref Bitmap  bmds,
string  pathPreset 
)
inline

Overload method for auto correction.

Parameters
bm[in,out] Image to be corrected.
bmds[in] Down sampled image to assist in precalc analysis.
pathPreset[in] Path to .preset file exported from one of Athentech's desktop products.
Returns
int showing correction status defined here PFC_Apply_Return_Values

Definition at line 1664 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [6/12]

int AutoCorrect ( ref Bitmap  bm,
ref Bitmap  bmds,
string  pathPreset,
int  ISO,
string  CameraModel,
bool  bFastFAE 
)
inline

Overload method for auto correction.

Parameters
bm[in,out] Image to be corrected.
bmds[in] Down sampled image to assist in precalc analysis.
pathPreset[in] Path to .preset file exported from one of Athentech's desktop products.
ISO[in] ISO number of image.
CameraModel[in] Camera model found in EXIF info block.
bFastFAE[in] Set to TRUE to enable fast FAE calculation.
Returns
int showing correction status defined here PFC_Apply_Return_Values

Definition at line 1722 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [7/12]

int AutoCorrect ( ref Bitmap  bm,
string  pathPreset 
)
inline

Overload method for auto correction.

Parameters
bm[in,out] Image to be corrected.
pathPreset[in] Path to .preset file exported from one of Athentech's desktop products.
Returns
int showing correction status defined here PFC_Apply_Return_Values

Definition at line 1631 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [8/12]

int AutoCorrect ( ref Bitmap  bm,
string  pathPreset,
int  ISO,
string  CameraModel,
bool  bFastFAE 
)
inline

Overload method for auto correction.

Parameters
bm[in,out] Image to be corrected.
pathPreset[in] Path to .preset file exported from one of Athentech's desktop products.
ISO[in] ISO number of image.
CameraModel[in] Camera model found in EXIF info block.
bFastFAE[in] Set to TRUE to enable fast FAE calculation.
Returns
int showing correction status defined here PFC_Apply_Return_Values

Definition at line 1683 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [9/12]

int AutoCorrect ( ref PFCImageFile  imgfile)
inline

Overload method for auto correction.

Parameters
imgfile[in,out] Image to be corrected.
Returns
int showing correction status defined here PFC_Apply_Return_Values

Definition at line 1355 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [10/12]

int AutoCorrect ( ref PFCImageFile  imgfile,
int  ISO,
string  CameraModel,
bool  bFastFAE 
)
inline

Performs auto correction.

Parameters
imgfile[in,out] Image to be corrected.
ISO[in] ISO number of image.
CameraModel[in] Camera model found in EXIF info block.
bFastFAE[in] Set to TRUE to enable fast FAE calculation.
Returns
int showing correction status defined here PFC_Apply_Return_Values

Definition at line 1464 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [11/12]

int AutoCorrect ( ref PFCImageFile  imgfile,
string  pathPreset 
)
inline

Overload method for auto correction.

Parameters
imgfile[in,out] Image to be corrected.
pathPreset[in] Path to .preset file exported from one of Athentech's desktop products.
Returns
int showing correction status defined here PFC_Apply_Return_Values

Definition at line 1647 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [12/12]

int AutoCorrect ( ref PFCImageFile  imgfile,
string  pathPreset,
int  ISO,
string  CameraModel,
bool  bFastFAE 
)
inline

Overload method for auto correction.

Parameters
imgfile[in,out] Image to be corrected.
pathPreset[in] Path to .preset file exported from one of Athentech's desktop products.
ISO[in] ISO number of image.
CameraModel[in] Camera model found in EXIF info block.
bFastFAE[in] Set to TRUE to enable fast FAE calculation.
Returns
int showing correction status defined here PFC_Apply_Return_Values

Definition at line 1702 of file PerfectlyClearAdapter.cs.

◆ Calc() [1/9]

unsafe ADPTRRETURNCODE Calc ( ref Bitmap  bm)
inline

Performs precalc analysis.

Parameters
bm[in] Source image for precalc analysis.
Returns
ADPTRRETURNCODE showing status

Definition at line 952 of file PerfectlyClearAdapter.cs.

◆ Calc() [2/9]

unsafe ADPTRRETURNCODE Calc ( ref Bitmap  bm,
PFCFEATURE  feature 
)
inline

Overload method for precalc analysis.

Parameters
bm[in] Source image for precalc analysis.
feature[in] PFCFEATURE that defines features for analysis.
Returns
ADPTRRETURNCODE showing status

Definition at line 995 of file PerfectlyClearAdapter.cs.

◆ Calc() [3/9]

unsafe ADPTRRETURNCODE Calc ( ref Bitmap  bm,
PFCFEATURE  feature,
int  ISO,
string  CameraModel,
PFCREJECTOPTION  rejectOption = PFCREJECTOPTION.PFC_REJECT_CLIPART 
)
inline

Overload method for precalc analysis.

Parameters
bm[in] Source image for precalc analysis.
feature[in] PFCFEATURE that defines features for analysis.
ISO[in] ISO number of image.
CameraModel[in] Camera model found in EXIF info block.
rejectOption[in] Set the photo detection rejection mode, defaults to PFC_REJECT_CLIPART
Returns
ADPTRRETURNCODE showing status

Definition at line 1021 of file PerfectlyClearAdapter.cs.

◆ Calc() [4/9]

unsafe ADPTRRETURNCODE Calc ( ref Bitmap  bm,
ref Bitmap  bmds 
)
inline

Overload method for precalc analysis.

Parameters
bm[in] Source image for precalc analysis.
bmds[in] Down sampled version of source image to assist in analysis.
Returns
ADPTRRETURNCODE showing status

Definition at line 973 of file PerfectlyClearAdapter.cs.

◆ Calc() [5/9]

unsafe ADPTRRETURNCODE Calc ( ref Bitmap  bm,
ref Bitmap  bmds,
PFCFEATURE  feature 
)
inline

Overload method for precalc analysis.

Parameters
bm[in] Source image for precalc analysis.
bmds[in] Down sampled version of source image to assist in analysis.
feature[in] PFCFEATURE that defines features for analysis.
Returns
ADPTRRETURNCODE showing status

Definition at line 1007 of file PerfectlyClearAdapter.cs.

◆ Calc() [6/9]

unsafe ADPTRRETURNCODE Calc ( ref Bitmap  bm,
ref Bitmap  bmds,
PFCFEATURE  feature,
int  ISO,
string  CameraModel 
)
inline

Overload method for precalc analysis.

Parameters
bm[in] Source image for precalc analysis.
bmds[in] Down sampled version of source image to assist in analysis.
feature[in] PFCFEATURE that defines features for analysis.
ISO[in] ISO number of image.
CameraModel[in] Camera model found in EXIF info block.
Returns
ADPTRRETURNCODE showing status

Definition at line 1121 of file PerfectlyClearAdapter.cs.

◆ Calc() [7/9]

unsafe ADPTRRETURNCODE Calc ( ref PFCImageFile  imgfile)
inline

Overload method for precalc analysis.

Parameters
imgfile[in] Source image for precalc analysis.
Returns
ADPTRRETURNCODE showing status

Definition at line 962 of file PerfectlyClearAdapter.cs.

◆ Calc() [8/9]

unsafe ADPTRRETURNCODE Calc ( ref PFCImageFile  imgfile,
PFCFEATURE  feature 
)
inline

Overload method for precalc analysis.

Parameters
imgfile[in] Source image for precalc analysis.
feature[in] PFCFEATURE that defines features for analysis.
Returns
ADPTRRETURNCODE showing status

Definition at line 984 of file PerfectlyClearAdapter.cs.

◆ Calc() [9/9]

unsafe ADPTRRETURNCODE Calc ( ref PFCImageFile  imgfile,
PFCFEATURE  feature,
int  ISO,
string  CameraModel,
PFCREJECTOPTION  rejectOption = PFCREJECTOPTION.PFC_REJECT_CLIPART 
)
inline

Overload method for precalc analysis.

Parameters
imgfile[in] Source image for precalc analysis.
feature[in] PFCFEATURE that defines features for analysis.
ISO[in] ISO number of image.
CameraModel[in] Camera model found in EXIF info block.
rejectOption[in] Set the photo detection rejection mode, defaults to PFC_REJECT_CLIPART
Returns
ADPTRRETURNCODE showing status

Definition at line 1082 of file PerfectlyClearAdapter.cs.

◆ EnumFAEFaceRect()

unsafe bool EnumFAEFaceRect ( ref PFCFACERECT  rect)
inline

Allows the user to iterate over the known faces to FAE.

This function wraps a c-style iteration over the known faces in the photo. It's intended calling pattern is:

PFCFACERECT faceRect;
while(pfc.EnumFAEFaceRect(ref faceRect)) {
// rect is in resized pre-Calc size
// to get it to original image size space adjust it accordingly
float resizeRatio = im.width / faceFD->widthImage;
// use rect as needed
int faceWidth = faceRect.rect.width * resizeRatio;
int faceHeight = faceRect.rect.height * resizeRatio;
}
Parameters
rect[out] current faceRect
Returns
bool if there are more faces to iterate over

Definition at line 2118 of file PerfectlyClearAdapter.cs.

◆ FAEFaceCount()

int FAEFaceCount ( )
inline

Returns the count of the faces recogniced by FAE.

Returns
Count of faces

Definition at line 2138 of file PerfectlyClearAdapter.cs.

◆ FBFaceCount()

int FBFaceCount ( )
inline

Get number of faces.

Get number of faces found by the Face Beautification library.

Returns
number of faces found

Definition at line 1872 of file PerfectlyClearAdapter.cs.

◆ GetCategorizationEngineInfo()

bool GetCategorizationEngineInfo ( int *  groupUUID,
int *  arrProfileUUID,
int *  arrProfileUUIDLen 
)
inline

Get loaded (with PFC_LoadAIEngine) categorization model info Call first with arrProfileUUID to get arrProfileUUIDLen to preallocate.

Parameters
groupUUID[out] - UUID of categories group supported by the model, to match preset loaded with PFC_LoadScenePresets()
arrProfileUUID[out] - array of preset UUIDS inside the categories group
arrProfileUUIDLen[out] - length of array to preallocate
Returns
false if AI engine was not loaded to pEngine or AI engine does not support categorization

Definition at line 2226 of file PerfectlyClearAdapter.cs.

◆ GetFaceInfo()

bool GetFaceInfo ( ref PFCFBFACEINFO  info,
int  index 
)
inline

Get face information.

Fetch face information of faces found by the Face Beautification library.

Parameters
info[out] PFCFBFACEINFO structure to receive face information.
index[in] Zero based index of the face to be fetched. (index must be less than number returned from FBFaceCount.)
Returns
True if operation succeeded

Definition at line 1885 of file PerfectlyClearAdapter.cs.

◆ GetScene()

int GetScene ( int *  version)
inline

Get scene detection label from profile obtained with Pfc.Calc For this to work you need to pass AI_SCENE_DETECTION enabled engine as a last param of Pfc.Calc.

Parameters
version[out] - version of detection engine
Returns
label of detected scene, -1 if none

Definition at line 2213 of file PerfectlyClearAdapter.cs.

◆ GetSceneDescription()

bool GetSceneDescription ( int  index,
ref PFCSCENEDESCRIPTION  sceneDescription 
)
inline

Get the scene description for the given index number Requires an initialized ai engine.

Parameters
index[in] - 0-based index to get the name for a given scene, unrelated to the scene guid
sceneDescription[out] - array of 100 characters to copy utf8 encoded scene name
Returns
true on success false otherwise

Example:

PFCSCENEDESCRIPTION sceneDescription;
int categoryIndex = 0;
while(pfc.GetSceneDescription(index, sceneDescription)) {
// use sceneDescription
++index;
}

Definition at line 2261 of file PerfectlyClearAdapter.cs.

◆ HasFaceBeautification()

bool HasFaceBeautification ( )
inline

Query if Face Beautification feature is available.

Returns
True if feature is available.

Definition at line 1862 of file PerfectlyClearAdapter.cs.

◆ LoadAiEngine()

int LoadAiEngine ( PFCAIFEATURE  aifeatures,
string  binPath 
)
inline

Load AI models into engine. Takes time and memory.

Parameters
aifeatures[in] - PFCAIFEATURE flags e.g. AI_SCENE_DETECTION | AI_CORRECTIONS | AI_COLOR
binPath[in] - utf8 path to folder containing dependency libs and models (.pnn)
Returns
bitwise 'or' of successfully loaded PFCAIFEATURE(s)

Definition at line 2149 of file PerfectlyClearAdapter.cs.

◆ LoadScenePresets()

unsafe int LoadScenePresets ( string  filePath,
int  groupUUID = 0,
int *  arrProfileUUID = null,
int  arrProfileUUIDLen = 0 
)
inline

Loads scene optimized presets from presets file. Engine may be AI-enabled with PFC_LoadAIEngine(). Presets are checked for compatibility with loaded scene detection AI. If Engine does not have its own AI engine, pass groupUUID and optionally arrProfileUUID and arrProfileUUIDLen reported by AI-enabled Engine.

Parameters
filePath[in] - path to .preset file containing presets for all scenes supported by loaded scene detection engine
groupUUID[in] - preset group UUID required by loaded AI model
arrProfileUUID[in] - array of preset UUIDs required by loaded AI model, if NULL check for match is ignored
arrProfileUUIDLen[in] - length of arrProfileUUID
Returns
0 on success or same error codes as Pfc.ReadPresets

Definition at line 2183 of file PerfectlyClearAdapter.cs.

◆ LoadScenePresetsFromStream()

int LoadScenePresetsFromStream ( FileStream  fs,
int  groupUUID = 0,
int *  arrProfileUUID = null,
int  arrProfileUUIDLen = 0 
)
inline

Read a Scene preset from a file stream.

Parameters
fs[in] The file stream of the preset (.preset) file.
groupUUID[in] - preset group UUID required by loaded AI model
arrProfileUUID[in] - array of preset UUIDs required by loaded AI model, if NULL check for match is ignored
arrProfileUUIDLen[in] - length of arrProfileUUID
Returns
int showing status
Return codes
0Preset read successfully.
-3Stream read error.
-4Parse error.
-8Exception occurred while reading preset file.
-9Preset file contains an unexpected group.
-10Preset file requires a Scene Detection model that is not available.

Definition at line 1837 of file PerfectlyClearAdapter.cs.

◆ ReadImage()

Bitmap ReadImage ( string  filename)
inline

Utility function for reading image file into Bitmap.

For convenience, this function is an alternative to the Bitmap class functions in reading image file in YCCK and 8bpp Black-n-white format.

Parameters
filename[in] The path of the image file.
Returns
Bitmap containing image data

Definition at line 2026 of file PerfectlyClearAdapter.cs.

◆ ReadPresets()

int ReadPresets ( string  path)
inline

Read a preset from .preset file.

Parameters
path[in] The path to the preset (.preset) file.
Returns
int showing status
Return codes
0Preset read successfully.
-1Attribute errors.
-2Unable to open file.
-3File read error.
-4Parse error.
-5Cannot convert text.
-6No text node.
-7Element depth exceeded.
-8Exception occurred while reading preset file.
-9Preset file contains an unexpected group.
-10Preset file requires a Scene Detection model that is not available.

Definition at line 1760 of file PerfectlyClearAdapter.cs.

◆ ReadPresetsFromStream()

int ReadPresetsFromStream ( FileStream  fs)
inline

Read a preset from a file stream.

Parameters
fs[in] The file stream of the preset (.preset) file.
Returns
int showing status
Return codes
0Preset read successfully.
-3Stream read error.
-4Parse error.
-8Exception occurred while reading preset file.
-9Preset file contains an unexpected group.
-10Preset file requires a Scene Detection model that is not available.

Definition at line 1795 of file PerfectlyClearAdapter.cs.

◆ ReadScenePreset()

int ReadScenePreset ( ref PFCPARAM  param,
int  scene 
)
inline

Fill param for the scene from the engine with previously loaded scene presets with LoadScenePresets.

Parameters
param[in, out] - PFCPARAM to be filled
scene[in] - detected scene
Returns
0 on success or same error codes as Pfc.ReadPresets

Definition at line 2202 of file PerfectlyClearAdapter.cs.

◆ ReleaseProtectionPath()

static void ReleaseProtectionPath ( )
inlinestatic

Releases resources from SetProtectionPath.

Call this only if you are also using the static SetProtectionPath() function, and not when using PerfectlyClear() constructor with path and license key arguments.

Definition at line 835 of file PerfectlyClearAdapter.cs.

◆ SetAddonPath()

static void SetAddonPath ( string  dirPath)
inlinestatic

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.

Parameters
dirPath[in] - path to the directory containing the add-ons to load

Definition at line 2234 of file PerfectlyClearAdapter.cs.

◆ SetParam()

void SetParam ( PFCPRESETID  id)
inline

Set process parameters in current instance.

Parameters
id[in] PFCPRESETID value to select preset.

Definition at line 1736 of file PerfectlyClearAdapter.cs.

◆ SetProtectionPath()

static int SetProtectionPath ( string  path,
string  licenseCode 
)
inlinestatic

Set path to location of SDK License files This enables license protection and allows activation using a license key file provided by EyeQ. Use either this function along with PerfectlyClear constuctor with no arguments, Or do not call this function, but use the PerfectlyClear constuctor with path and optional license key arguments.

Parameters
path[in] - UTF8 encoded path to the folder that contains the SDK license files
licenseCode[in] - optional 18-digits license code to be used instead of license.key in path
Returns
int in table showing license status
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

Definition at line 796 of file PerfectlyClearAdapter.cs.

Constructor & Destructor Documentation

◆ PerfectlyClear() [1/2]

PerfectlyClear ( )
inline

Special class constructor for multithreading.

Constructor for licensed version or for protected version for use if you intend to call multiple corrections at once (say in a threaded environment). Use this constructor after initializing the protection using the static function SetProtectionPath(), when you are done call ReleaseProtectionPath() after disposing any PerfectlyClear objects.

Definition at line 846 of file PerfectlyClearAdapter.cs.

◆ PerfectlyClear() [2/2]

PerfectlyClear ( string  path,
string  licenseCode = "" 
)
inline

Class constructor.

Parameters
path[in] (Protection version only) Path to license files issued by EyeQ
licenseCode[in] (Protection version only) This is the class constructor that accepts license path and optionally a license code. This version of the contstructor should be used in single-threaded applications when many simultaneous PerfectlyClear classed will not be instantiated concurrently.

Definition at line 884 of file PerfectlyClearAdapter.cs.


The documentation for this class was generated from the following file:
PFCIMAGE::width
int width
Pixel width of image.
Definition: PerfectlyClearPro.h:257
PFCSCENEDESCRIPTION
Scene description.
Definition: PerfectlyClearPro.h:1231
PFCFaceRect
Structure defining face attributes detected by the Face Detection library.
Definition: PerfectlyClearPro.h:227