Skip to content

A native Android source to live detection of document using OpenCV and Kotlin language.

License

Notifications You must be signed in to change notification settings

connaughttechnologies/DocScaner

Repository files navigation

Installation

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

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

Add the dependency

dependencies {
	implementation 'com.github.connaughttechnologies:DocScaner:Release'
}

Usage

Inherit from BaseScannerActivity

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()
    }
}

About

A native Android source to live detection of document using OpenCV and Kotlin language.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages