A simple Android app which allows for scanning of documents similar to apps like GeniusScan.
I needed this type of functionality inside of an app I was building recently and I was unable to find exactly what I was looking for anywhere online, so I put something together myself.
I should note that this is not a library. This is just an example meant to demonstrate how to implement a feature like this in your own app.
This app relies on OpenCV for image processing, but integrating it was not a simple task. For this project, I followed these steps. This works fine, but having an extra module in your app may be undesirable. If that's the case, simply build the app and add the compiled AAR into your own app as a dependency.
By default, the app will use OpenCV Manager (availiable on Google Play) in order to link to the OpenCV binary. This is the recommended way to use OpenCV on Android by the OpenCV developers, but I find this a clunky approach and prefer to statically link OpenCV at build time. To do this you will need to follow the following steps:
- Download the OpenCV SDK
- Unzip and then copy all folders from OpenCV SDK Dir/sdk/native/libs to this project/opencv/src/main/jniLibs (You may need to create the jniLibs folder).
- Rebuild
At this point, OpenCV Manager shouldn't be necessary anymore.
I leave these as an exercise for the reader.
- Camera support
- Save the resulting bitmap