GitPedia

Android document scanner

A A4-ish document scanner for Android, based on opencv

From Kuama-IT·Updated June 3, 2026·View on GitHub·

Contains an activity that allows the user to scan a A4 paper with the smartphone camera. It is based on CameraX and OpenCV The project is written primarily in Kotlin, distributed under the MIT License license, first published in 2020. Key topics include: android-library, camerax, document-scanner, kotlin, opencv.

Latest release: 0.1.8Version 0.1.8


License: MIT

Android Document Scanner

Contains an activity that allows the user to scan a A4 paper with the smartphone camera.
It is based on CameraX and OpenCV

Installation

Add it in your root build.gradle at the end of repositories:

groovy
allprojects { repositories { ... maven { url 'https://jitpack.io' } } }

Add the dependency

groovy
dependencies { implementation 'com.github.kuamanet:android-document-scanner:Tag' }

Usage

Inherit from BaseScannerActivity

kotlin
class ScannerActivity : BaseScannerActivity() { override fun onError(throwable: Throwable) { when (throwable) { is NullCorners -> Toast.makeText( this, R.string.null_corners, Toast.LENGTH_LONG ) .show() else -> Toast.makeText(this, throwable.message, Toast.LENGTH_LONG).show() } } override fun onDocumentAccepted(bitmap: Bitmap) { } override fun onClose() { finish() } }

Preview

Detect document

detect

Crop document

crop

Contributors

Showing top 4 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from Kuama-IT/android-document-scanner via the GitHub API.Last fetched: 6/20/2026