Android document scanner using opencv

PowerMan2015 picture PowerMan2015 · Jun 18, 2015 · Viewed 13.2k times · Source

I am in the process of trying to develop a document scanner within an application of mine. As an example of what I want to achieve you can take a look at the Google document t scanner built into the Google drive app.

This allows

  1. Detect edges
  2. Manipulate into perspective
  3. Display top down view of document

I have been looking at a number of 3rd party api to see if this can be achieved but they seem more focused on OCR. Which is not a priority of mine.

I have however stumbled across this document scanner

Where it makes a document scanner using java open cv. Within the comments someone asked about the possibility of porting this to an android application. Apparently this is possible.

I have researched importing the open cv library within my IDE (android studio). This is also possible.

As I have not done this before I would be grateful if someone could help me identify any potential issues or alternative implementations which would help me achieve my goal.

I am eager to develop this myself with relying on 3rd parties where possible

Answer

Vulovic Vukasin picture Vulovic Vukasin · Mar 17, 2017

I have written a demo code with native support, please find it on: link. Feel free to edit my code if you find a better solution for this.