Coder Social home page Coder Social logo

simpledocumentscanner-android's Introduction

Simple Document Scanner

A simple Android app which allows for scanning of documents similar to apps like GeniusScan.

Screenshots

Screenshot Screenshot Screenshot Screenshot

Details

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.

OpenCV

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:

  1. Download the OpenCV SDK
  2. 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).
  3. Rebuild

At this point, OpenCV Manager shouldn't be necessary anymore.

TODO

I leave these as an exercise for the reader.

  • Camera support
  • Save the resulting bitmap

Resources

  1. Integrating OpenCV with Android Studio
  2. OpenCV Manager
  3. OpenCV as an AAR
  4. OpenCV Perspective Transform
  5. Document Scanning Algorithm
  6. If you attempt to include the generated AAR from a module your app depends on, this might be helpful

simpledocumentscanner-android's People

Contributors

jbttn 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.