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 scipts
- 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 (arm, mips, x86 and so on), which means that the APK size in raw form is enormous (~203 MB). If you want to take a quick look at the app and the size does not bother you, go ahead and download the latest APK from the releases. If you want a smaller-sized APK, you can always clone the project and install it using Android Studio, which is smart enough to bundle only the native libraries for your phone's architecture and exclude others, resulting in a much smaller APK size (~30 MB).
- 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.