Perfectly Clear SDK Documentation  8.3.1.149
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 (string path="")
 Class constructor. More...
 
unsafe ADPTRRETURNCODE Calc (ref Bitmap bm)
 Performs precalc analysis. More...
 
unsafe ADPTRRETURNCODE Calc (ref Bitmap bm, ref Bitmap bmds)
 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)
 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 Bitmap bm, int iOpacity)
 Apply correction. More...
 
int AutoCorrect (ref Bitmap bm)
 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 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 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 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...
 
Bitmap ReadImage (string filename)
 Utility function for reading image file into Bitmap. More...
 

Detailed Description

Name: PerfectlyClear Scope: public

C# wrapper class for PerfectlyClearPro dll.

Definition at line 547 of file PerfectlyClearAdapter.cs.

Constructor & Destructor Documentation

◆ PerfectlyClear()

PerfectlyClear ( string  path = "")
inline

Class constructor.

Parameters
path[in] (Protection version only) Path to license files issued by Athentech

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

Definition at line 1458 of file PerfectlyClearAdapter.cs.

◆ Apply() [1/2]

unsafe PFCAPPLYSTATUS Apply ( ref Bitmap  bm)
inline

Apply correction.

Parameters
bm[in] Bitmap instance to be corrected.

Definition at line 847 of file PerfectlyClearAdapter.cs.

◆ Apply() [2/2]

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.

Definition at line 857 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [1/8]

int AutoCorrect ( ref Bitmap  bm)
inline

Overload method for auto correction.

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.
< 0PFCAPPLYSTATUS enum.
Parameters
bm[in,out] Image to be corrected.

Definition at line 967 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [2/8]

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

Overload method for auto correction.

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.
< 0PFCAPPLYSTATUS enum.
Parameters
bm[in,out] Image to be corrected.
bmds[in] Down sampled image to assist in precalc analysis.

Definition at line 991 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [3/8]

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

Performs auto correction.

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.
< 0PFCAPPLYSTATUS enum.
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.

Definition at line 1017 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [4/8]

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

Overload method for auto correction.

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.
< 0PFCAPPLYSTATUS enum.
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.

Definition at line 1095 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [5/8]

int AutoCorrect ( ref Bitmap  bm,
string  pathPreset 
)
inline

Overload method for auto correction.

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.
< 0PFCAPPLYSTATUS 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.
Parameters
bm[in,out] Image to be corrected.
pathPreset[in] Path to .preset file exported from one of Athentech's desktop products.

Definition at line 1182 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [6/8]

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

Overload method for auto correction.

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

Definition at line 1224 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [7/8]

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

Overload method for auto correction.

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

Definition at line 1268 of file PerfectlyClearAdapter.cs.

◆ AutoCorrect() [8/8]

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

Overload method for auto correction.

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

Definition at line 1313 of file PerfectlyClearAdapter.cs.

◆ Calc() [1/6]

unsafe ADPTRRETURNCODE Calc ( ref Bitmap  bm)
inline

Performs precalc analysis.

Parameters
bm[in] Source image for precalc analysis.

Definition at line 661 of file PerfectlyClearAdapter.cs.

◆ Calc() [2/6]

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.

Definition at line 671 of file PerfectlyClearAdapter.cs.

◆ Calc() [3/6]

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.

Definition at line 681 of file PerfectlyClearAdapter.cs.

◆ Calc() [4/6]

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.

Definition at line 692 of file PerfectlyClearAdapter.cs.

◆ Calc() [5/6]

unsafe ADPTRRETURNCODE Calc ( ref Bitmap  bm,
PFCFEATURE  feature,
int  ISO,
string  CameraModel 
)
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.

Definition at line 704 of file PerfectlyClearAdapter.cs.

◆ Calc() [6/6]

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.

Definition at line 764 of file PerfectlyClearAdapter.cs.

◆ FBFaceCount()

int FBFaceCount ( )
inline

Get number of faces.

Get number of faces found by the Face Beautification library.

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

Definition at line 1439 of file PerfectlyClearAdapter.cs.

◆ HasFaceBeautification()

bool HasFaceBeautification ( )
inline

Query if Face Beautification feature is available.

Return true if feature is available.

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

Definition at line 1568 of file PerfectlyClearAdapter.cs.

◆ ReadPresets()

int ReadPresets ( string  path)
inline

Read a preset from .preset file.

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.
Parameters
path[in] The path to the preset (.preset) file.

Definition at line 1348 of file PerfectlyClearAdapter.cs.

◆ ReadPresetsFromStream()

int ReadPresetsFromStream ( FileStream  fs)
inline

Read a preset from a file stream.

Return codes
0Preset read successfully.
-3Stream read error.
-4Parse error.
-8Exception occurred while reading preset file.
Parameters
fs[in] The file stream of the preset (.preset) file.

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


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