Android document scanner using opencv

2020-06-16 05:15发布

问题:

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

回答1:

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.