Perfectly Clear SDK Documentation  9.1.1.325
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...
 
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...
 

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...
 

Detailed Description

Name: PerfectlyClear Scope: public

C# wrapper class for PerfectlyClearPro dll.

Definition at line 563 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 1696 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 1052 of file PerfectlyClearAdapter.cs.

◆ Apply() [2/4]

unsafe PFCAPPLYSTATUS Apply ( ref PFCImageFile  imgfile)
inline

Apply correction.

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

Definition at line 1062 of file PerfectlyClearAdapter.cs.

◆ Apply() [3/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 1073 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 1130 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 1706 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.

Definition at line 1244 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [2/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 AutoCorrect_Return_Values

Definition at line 1254 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 AutoCorrect_Return_Values

Definition at line 1266 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [4/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 AutoCorrect_Return_Values

Definition at line 1279 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [5/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 AutoCorrect_Return_Values

Definition at line 1341 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [6/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 AutoCorrect_Return_Values

Definition at line 1404 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 AutoCorrect_Return_Values

Definition at line 1464 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [8/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 AutoCorrect_Return_Values

Definition at line 1480 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [9/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 AutoCorrect_Return_Values

Definition at line 1497 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [10/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 AutoCorrect_Return_Values

Definition at line 1516 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [11/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 AutoCorrect_Return_Values

Definition at line 1535 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [12/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 AutoCorrect_Return_Values

Definition at line 1555 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 798 of file PerfectlyClearAdapter.cs.

◆ Calc() [2/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 808 of file PerfectlyClearAdapter.cs.

◆ Calc() [3/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 819 of file PerfectlyClearAdapter.cs.

◆ Calc() [4/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 830 of file PerfectlyClearAdapter.cs.

◆ Calc() [5/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 841 of file PerfectlyClearAdapter.cs.

◆ Calc() [6/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 853 of file PerfectlyClearAdapter.cs.

◆ Calc() [7/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 867 of file PerfectlyClearAdapter.cs.

◆ Calc() [8/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 928 of file PerfectlyClearAdapter.cs.

◆ Calc() [9/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 967 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 1663 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 1676 of file PerfectlyClearAdapter.cs.

◆ HasFaceBeautification()

bool HasFaceBeautification ( )
inline

Query if Face Beautification feature is available.

Returns
True if feature is available.

Definition at line 1653 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 1817 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.

Definition at line 1591 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.

Definition at line 1624 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 695 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 1569 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 656 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 706 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 736 of file PerfectlyClearAdapter.cs.


The documentation for this class was generated from the following file: