An Android application that makes it possible to automatically scan and digitize documents from photos.
- Kotlin language
- Coroutines and Flow for asynchronous programming
- Architecture:
- MVVM and sprinkles of MVI (View <--> ViewModel <--> UseCase)
- Cleanish architecture project structure (domain, data and presentation modules)
- JetPack libraries:
- OpenCV for image processing
- PdfDocument for generating PDF documents
- AndroidPdfViewer for displaying PDF documents
- Picasso for image loading and caching
- Material Components for common UI components
- Material Dialogs for displaying dialogs
- Dexter for requesting runtime permissions
- Kotlin Gradle DSL for build scripts
- buildSrc module for dependency management
- Gradle Versions Plugin for updating dependencies
For more information about used dependencies, see this file.
This project contains OpenCV native libraries for every mobile architecture, which means that the APK is split into multiple ones to prevent a one big fat APK. You can install the application in one of two ways:
- Go to the releases and download the APK for your phone's architecture. If you don't know it, here is a nice article describing how to determine it. If don't have time to read the article, then
arm64-v8a
should be a safe bet. - Clone the project and install it using Android Studio.
- Canny Edge Detection. This tutorial explains the Canny edge detection algorithm, which plays a big role in identifying a document in the photo.
- Fundementals of Image Contours. This article explains image countours, what they are, and why they are useful for image processing.
- Contour Features. This tutorial explains the features of contours, like area, perimeter, centroid, bounding box.
- Perspective Morphing. This article goes into the details of what perspective morphing is, where it is applicable, how it works, etc.
- Application of Perspective Morphing. This article shows an example of applying perspective morhping to cut out and collect images of pokemons.
DocSkanner is licensed under the Apache 2.0 License.