6 package PerfectlyClear;
8 import java.nio.ByteBuffer;
14 System.loadLibrary(
"PerfectlyClearPro");
261 public native
void SetParam(PFCParam param,
int id);
289 public native
int ReadPresets(PFCParam param, String filename);
338 public native ByteBuffer
Calc(
int width,
int height,
int stride,
int pixelFormat, ByteBuffer buffer,
339 int widthds,
int heightds,
int strideds, ByteBuffer bufferds,
340 ByteBuffer engine,
int bFastFAE,
int bNoTintCalc);
371 public native
int Apply(
int width,
int height,
int stride,
int pixelFormat, ByteBuffer buffer, ByteBuffer engine, ByteBuffer profile, PFCParam param);
398 public native
int ApplyLocal(
int width,
int height,
int stride,
int pixelFormat, ByteBuffer buffer,
399 int xOffset,
int yOffset,
int widthOrig,
int heightOrig,
400 ByteBuffer engine, ByteBuffer profile, PFCParam param);
439 public native
int AutoCorrect(
int width,
int height,
int stride,
int pixelFormat, ByteBuffer buffer,
440 int widthds,
int heightds,
int strideds, ByteBuffer bufferds,
441 PFCParam param,
int bFastFAE);
459 public native
int AutoCorrectPreset(
int width,
int height,
int stride,
int pixelFormat, ByteBuffer buffer,
460 int widthds,
int heightds,
int strideds, ByteBuffer bufferds,
461 int PresetID,
int bFastFAE);
462 public native
int ProfileStatus(ByteBuffer profile);
463 public native
int NRStatus(ByteBuffer profile);
464 public native
int COREStatus(ByteBuffer profile);
465 public native
int FBStatus(ByteBuffer profile);
466 public native
int REStatus(ByteBuffer profile);
501 public native
boolean GetFaceInfo(ByteBuffer profile, FaceInfo pFace,
int index);
511 public native
int GetREStatus(ByteBuffer profile);
531 public native
boolean IsNoiseDetected(ByteBuffer profile,
int iNoisePreset);
533 public native
void SetAddonPath(String s);
534 public native
void ReleaseAddonPath();
536 public int NRRETCODE(
int code)
538 return (code & 0x000000FF);
540 public int CORERETCODE(
int code)
542 return ((code >> 8) & 0x000000FF);
544 public int FBRETCODE(
int code)
546 return ((code >> 16) & 0x000000FF);
548 public int RERETCODE(
int code)
550 return ((code >> 24) & 0x000000FF);
static final int PRESET_IAUTO_2019
iAuto 2019 - even better automatic corrections
static final int PRESET_INTELLIGENTAUTO
Intelligent Auto.
native boolean IsNoiseDetected(ByteBuffer profile, int iNoisePreset)
Query if noise is detected.
native void freeNativeBuffer(ByteBuffer b)
static final int SKINTONINGTYPE_WHITE
Whitens (bleaches) face. Recommended mainly for darker skin.
native int AutoCorrect(int width, int height, int stride, int pixelFormat, ByteBuffer buffer, int widthds, int heightds, int strideds, ByteBuffer bufferds, PFCParam param, int bFastFAE)
Single function to perform Perfectly Clear correction.
native ByteBuffer allocNativeBuffer(long size)
static final int PFC_PixelFormat32bppARGB
static final int SKINTONINGTYPE_PALE
Makes skin look lighter and more pale.
static final int AGGRESSIVENESS_CONSERVATIVE
Less aggressive in exposure correction.
native boolean HasFaceBeautification(ByteBuffer engine)
Check if Face Beautification is available.
static final int TINTCORRECT_SPECIAL
Highest sensitivity level of tint detection.
static final int PRESET_BEAUTIFYPLUS
Beautify Plus.
static final int PFC_PixelFormat32bppABGR
static final int LIPSHARPENTYPE_MEDIUM
Stronger sharpening. Details are more pronounced.
native ByteBuffer Calc(int width, int height, int stride, int pixelFormat, ByteBuffer buffer, int widthds, int heightds, int strideds, ByteBuffer bufferds, ByteBuffer engine, int bFastFAE, int bNoTintCalc)
Perform initial analysis on images.
native int FBFaceCount(ByteBuffer profile)
Return number of faces detected.
static final int PFC_PixelFormat64bppARGB
native void SetParam(PFCParam param, int id)
Initialize a PFCParam class instance.
static final int SKINSMOOTHTYPE_SUBTLE
The subtle correction removes the wrinkles and spots alone while it keeps the texture of the face unc...
Interface Class for Perfectly Clear SDK for Android.
native int ReadPresetsFromStream(PFCParam param, String s)
Load image processing settings from a String instance.
native ByteBuffer CreateEngine()
Create PFCENGINE instance.
static final int DCF_STANDARD
For normal photo.
static final int AGGRESSIVENESS_MODERATE
Moderate level of exposure correction.
native boolean AbnormalTintDetected(ByteBuffer profile, int tintMethod)
Query if abnormal tint is detected.
static final int PFC_PixelFormat64bppABGR
native void DestroyEngine(ByteBuffer bbEngine)
Destroy PFCENGINE instance and release associated resources.
static final int PRESET_IAUTO_2019_RE
iAuto 2019 with Red Eye Correction
static final int HIGH_DEFINITION
Optimized to bring out more details in the shadows, more details in the highlights, and more pleasing skin tones.
static final int BIAS_BRIGHTER_PREFERENCE
Average usage with brighter tone.
static final int TINTCORRECT_DEFAULT
Moderate level of tint detection.
static final int PFC_PixelFormat24bppRGB
static final int BIAS_NONE
Turn off bias correction.
static final int SKINSMOOTHTYPE_SUPERSMOOTH
This is a more aggressive and effective correction where the appearance of the entire skin (including...
static final int SKINSMOOTHTYPE_DEFAULT
This type of correction provides a more uniform appearance to the complexion. It combines the natural...
static final int HIGH_CONTRAST
Optimized to bring higher contrast to the image.
native void ReleaseProfile(ByteBuffer profile)
Release PFCPROFILE instance.
native int Apply(int width, int height, int stride, int pixelFormat, ByteBuffer buffer, ByteBuffer engine, ByteBuffer profile, PFCParam param)
Correct image with parameters.
native int AutoCorrectPreset(int width, int height, int stride, int pixelFormat, ByteBuffer buffer, int widthds, int heightds, int strideds, ByteBuffer bufferds, int PresetID, int bFastFAE)
Single function to perform Perfectly Clear corrections.
native int ReadPresets(PFCParam param, String filename)
Load image processing settings from a .preset file.
static final int PFC_PixelFormat48bppBGR
static final int TINTCORRECT_AGGRESSIVE
Aggressive detection of tint.
static final int SKINMODE_FACE
Apply correction ONLY on skin regions included in faces.
static final int BIAS_ASIAN_PREFERENCE
Fine tuned for Asian skin tone.
static final int PFC_PixelFormat24bppBGR
native int ApplyLocal(int width, int height, int stride, int pixelFormat, ByteBuffer buffer, int xOffset, int yOffset, int widthOrig, int heightOrig, ByteBuffer engine, ByteBuffer profile, PFCParam param)
Apply correction locally.
native boolean GetFaceInfo(ByteBuffer profile, FaceInfo pFace, int index)
Utility function to query geometry of detected faces.
static final int PRESET_IAUTO_21_ASIA
Based on iAuto 21, but with brighter Skin & Depth Bias for truer skin tone.
static final int BIAS_AVERAGE_PREFERENCE
For average usage.
static final int SKINMODE_BODY
Apply correction on most skin regions regardless they are linked with a face or not.
static final int DCF_VIVID
For more color vibrancy.
static final int SKINTONINGTYPE_TAN
Darkens skin, makes it look naturally tanned.
static final int PRESET_DETAILS
Details.
static final int TINTCORRECT_CONSERVATIVE
Priority on minimum false positive detection.
static final int SKINTONINGTYPE_FOUNDATION
Adjust skin to user defined foundation color.
static final int PRESET_VIVID
Vivid.
static final int LIPSHARPENTYPE_COARSE
Lip details are coarsely pronounced.
static final int LIPSHARPENTYPE_FINE
Fine touch of sharpening.
static final int PFC_PixelFormat48bppRGB
static final int 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.
static final int PRESET_BEAUTIFY
Beautify.
static final int AGGRESSIVENESS_AGGRESSIVE
More aggressive in exposure correction.
static final int SKINTONINGTYPE_WARM
Warms skin tone.