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