GithubHelp home page GithubHelp logo

volcanoscar / highpassskinsmoothing-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from msoftware/highpassskinsmoothing-android

0.0 1.0 0.0 1.42 MB

An implementation of High Pass Skin Smoothing on Android Bitmap

License: Apache License 2.0

Java 33.19% C++ 65.26% Makefile 1.55%

highpassskinsmoothing-android's Introduction

HighPassSkinSmoothing-Android

An implementation of High Pass Skin Smoothing for Android

Supports for Android 14+ (Tested in MarshMallow Only, Need Some test Results)

##Previews

Preview 1

Preview 2

Preview 3

Preview 4

Preview 5

Preview 6

##Performance Analysis

Image Size: 1024 x 1920
Input Radius: 400 or 4.0
API Level: 23 
Device: OnePlus 3
Time: __120 Millis__  

##Concepts

The basic routine of HighPassSkinSmoothing can be described with the following diagram.

Routine

####Basic Concept

The main theory behind High Pass Skin Smoothing is Frequency Separation.

Frequency separation splits up the tones and colors of a image from its more detailed textures. It is possible because a digital image can be interpreted as different frequencies represented as sine waves.

High frequencies in an image will contain information about fine details, such as skin pores, hair, fine lines, skin imperfections.

Low frequencies are the image data that contains information about volume, tone and color transitions. In other words: shadows and light areas, colors and tones.

https://fstoppers.com/post-production/ultimate-guide-frequency-separation-technique-8699

By using High Pass filter, the image can be separated into high and low spatial frequencies. Then we will be able to smoothing the image while preseving a fine level of detail by applying adjustments (Curve Adjustment in the diagram) to certain frequencies of the image.

##Requirements

  • Android API 14+ (Might be Work on Below then this! Never Tried.)
  • Android Studio 2.2+ (For NDK Build)
  • Configured NDK! (Take some Help from Google if Need)

##Usage

Use the HighPassSkinSmoothing is Follows.

Make sure that You use below code in a worker Thread As its may take some couple of millis.

AmniXSkinSmooth amniXSkinSmooth = AmniXSkinSmooth.getInstance(); //Get Instance
amniXSkinSmooth.storeBitmap(bitmap, false); // Your Bitmap (define if you want to recycle it or not)
amniXSkinSmooth.initSdk();

amniXSkinSmooth.startFullBeauty(smoothR, whiteR); // Process Smoothness and Whiteness in single line
***OR***
amniXSkinSmooth.startSkinSmoothness(smoothR); //Process for Skin Smoothness
***OR***
amniXSkinSmooth.startSkinWhiteness(whiteR); //Process for Skin Whiteness

Bitmap processedBitmap = amniXSkinSmooth.getBitmapAndFree();
amniXSkinSmooth.unInitSdk();

Browse DemoApp and Library for More Information.

Please run the demo app on an actual device instead of Emulator.

##Demo

Download Demo Apk to test this Library.

##Installation

For now, You have to Clone or download this repo and include skinsmoothness as a android Module. Rememer to configure NDKFirst.

##Contributing

You are encouraged to try different input parameters or tweak the interal procedure to make this filter better or just fit your needs.

Don't hesitate to open an issue if you have any idea or suggestion.

If you find a bug and know exactly how to fix it, please open a pull request. Be sure to test the code first.

##Credits

Thanks a lot to Yu Ao for his iOS YUCIHighPassSkinSmoothing Library.

##License

HighPassSkinSmoothing is Free but under Apache 2.0 licensed. See LICENSE file for detail.

Copyright © 2016 AmniX

highpassskinsmoothing-android's People

Contributors

amnix avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.