Android document scanner using opencv

14,911

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.

Share:
14,911
PowerMan2015
Author by

PowerMan2015

Updated on July 26, 2022

Comments

  • PowerMan2015
    PowerMan2015 almost 2 years

    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

    • Qadir Hussain
      Qadir Hussain almost 9 years
      have a look at this. github.com/jhansireddy/AndroidScannerDemo link updated
    • jean d'arme
      jean d'arme about 8 years
      @QadirHussain but does it have automatic edge detection?
    • Qadir Hussain
      Qadir Hussain about 8 years
      @jean d'arme I don't think so it has automatic edge detection.
    • PowerMan2015
      PowerMan2015 about 8 years
      I implemented this and it does have edge detection. You have to us open CV in your project
    • jean d'arme
      jean d'arme about 8 years
      @PowerMan2015 well, I reviewed documentation, but it's quite hard to read. Any suggestions where should I start? And will I have to dive into C++?
    • PowerMan2015
      PowerMan2015 about 8 years
      From what I remember it was a pain. No additional programming required. Look at adding opencv to the project and then add the scanner. There is a version fir android. Then simply pass the intent to the scanner
    • Suman
      Suman over 7 years
      @QadirHussain,i use this library which one you mentioned but i get a issues to upload application playstore ,showing libpng issues .how to solve this?