OpenCV4Android

Looks like I’m going to have to work with OpenCV and android a lot in the near future. Though documentation seems okay, I’ve run into multiple instances of having to google the same thing over and over again and have finally decided to compile everything in this post, which will be expanded and updated as I hit, and clear roadblocks.

Motivation - xkcd: Wisdom of the Ancients

Motivation - xkcd: Wisdom of the Ancients

Setup

  1. OpenCV in Android Studio
  2. SourceSets for jniLibs: To be used when the debug log says library not found.
  3. Initialization

Resources

  1. Get started with OpenCV on Android: Camera Capture, some image processing and conversion utility examples.
  2. OpenCV Java API: Official Documentation
  3. Drawing a line on custom view canvas: Contains solutions for cubic splines and stuff, to make the path look smooth.
  4. OpenCV Native Calls
  5. Returning Mat Object

JNI

(Comments disabled. Email me instead.)