Tuesday, 9 January 2018

Set up android project with Open CV






Open CV is an open sourced computer vision library. It is a machine learning software library used for image processing and computer vision techniques. Open CV has more than 2500 optimized algorithms for Image Processing. It is mostly used for real time computer vision applications.

List of usage.

  • Face Detection
  • Object Detection
  • Line detection
  • Retina recognition
  • Motion understanding
  • Mobile robotics
  • Motion tracking
  • Hand gesture recognition


Step by step configuration: 
  • ·         Create new Android project with C++  support
  • ·         Select C++ version 11
  • ·         Download Open CV SDK From  https://opencv.org/
  • ·         From file ->Import new module -> select  OpenCV-android-sdk\sdk\java
  • ·         From project properties >Import as new module
  • ·         From App View ->Create new jni folder (Name should be jniLibs)
  • ·         Copy all folder from OpenCV-android-sdk\sdk\native\jni  and paste into newly created jniLibs folder
  • ·         Delete all files except .so file extension.
  • ·         Change  CMakeLists.txt  https://github.com/nithinchalakkal/Open-CV-Files/blob/master/CMakeLists.txt
  • ·         Make sure both Gradles  (OpenCV and app ) running in same SDK version
  • ·         Sync the application. 


      Source Ref : https://github.com/nithinchalakkal/Open-CV-Files







Monday, 8 January 2018

Run time permission in android (Dexter)



Here, we are going to simplify the process of adding the run time permissions using Dexter library. Using this library, the permissions can be implemented in seconds.




Requesting Single Permission

To request a single permission, you can use withPermission() method by passing the required permission. You also need a PermissionListener callback to receive the state of the permission.

> onPermissionGranted() will be called once the permission is granted.

> onPermissionDenied() will be called when the permission is denied. Here you can check whether the permission is permanently denied by using response.isPermanentlyDenied() condition.










Set up android project with Open CV

Open CV is an open sourced computer vision library. It is a machine learning software library used for image processing and...