6 package PerfectlyClear;
8 import java.nio.ByteBuffer;
14 System.loadLibrary(
"PerfectlyClearPro");
250 public native
void SetParam(PFCParam param,
int id);
278 public native
int ReadPresets(PFCParam param, String filename);
328 public native ByteBuffer
Calc(
int width,
int height,
int stride,
int pixelFormat, ByteBuffer buffer,
329 int widthds,
int heightds,
int strideds, ByteBuffer bufferds,
330 ByteBuffer engine,
int bFastFAE,
int bNoTintCalc);
361 public native
int Apply(
int width,
int height,
int stride,
int pixelFormat, ByteBuffer buffer, ByteBuffer engine, ByteBuffer profile, PFCParam param);
386 public native
int ApplyLocal(
int width,
int height,
int stride,
int pixelFormat, ByteBuffer buffer,
387 int xOffset,
int yOffset,
int widthOrig,
int heightOrig,
388 ByteBuffer engine, ByteBuffer profile, PFCParam param);
426 public native
int AutoCorrect(
int width,
int height,
int stride,
int pixelFormat, ByteBuffer buffer,
427 int widthds,
int heightds,
int strideds, ByteBuffer bufferds,
428 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);
502 public native
boolean GetFaceInfo(ByteBuffer profile, FaceInfo pFace,
int index);
513 public native
int GetREStatus(ByteBuffer profile);
530 public native
boolean IsNoiseDetected(ByteBuffer profile,
int iNoisePreset);
532 public int NRRETCODE(
int code)
534 return (code & 0x000000FF);
536 public int CORERETCODE(
int code)
538 return ((code >> 8) & 0x000000FF);
540 public int FBRETCODE(
int code)
542 return ((code >> 16) & 0x000000FF);
544 public int RERETCODE(
int code)
546 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_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 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.