Skip to content

beartung/tclip-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Bitmap Smart Clipping using OpenCV

#Demo Screenshots

demo screenshots

#Features

  • using OpenCV to detect faces firstly, if have faces, won't cut faces off
  • using OpenCV to detect other characters secondly, if found significant zone, won't cut it off
  • using FAST feature detector instead of SURF, thanks for @yanunon

#Usage

  • copy config file to app dir

    String configPath = TClip.copyConfig(context, TClip.CONFIG, R.raw.haarcascade_frontalface_alt);
    
  • get cropped bitmap

    //config: /data/data/com.demo.tclip.debug/haarcascade_frontalface_alt.xml
    Bitmap ret = TClip.crop(configPath, sourceBitmap, width, height);
    

#Build

  • download OpenCV & unzip to /home/user/opencv-android-sdk
  • export OPENCV_PACKAGE_DIR="/home/user/opencv-android-sdk"
  • libnonfree.so & libopencv_java.so from beartung/nonfree-opencv-android
  • using FAST feature detector without libnonfree
  • cd jni && ndk-build

About

Bitmap smart clipping using OpenCV

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published