CVScanner

Additional

Language
Java
Version
N/A
Created
Sep 22, 2016
Updated
Aug 31, 2017
Owner
Credntia
Contributor
Mehedi Hasan Khan (iamMehedi)
1
Activity
Badge
Generate
Download
Source code

Announcement

CVScanner

An OpenCV based library for Android to scan ID documents or Passports.

Usage

The easiest way is to launch the DocumentScannerActivity

Intent i = new Intent(context, DocumentScannerActivity.class);
i.putExtra(DocumentScannerActivity.IsScanningPassport, true);
startActivityForResult(i, REQ_SCAN);

You'll get the path to the scanned image in onActivityResult

if(requestCode == REQ_SCAN && resultCode == RESULT_OK){
  String path = (data != null && data.getExtras() != null)? data.getStringExtra(DocumentScannerActivity.ImagePath):null;
}

You can use the DocumentScannerFragment too

Fragment fragment = DocumentScannerFragment.instantiate(isScanningPassport);
getSupportFragmentManager().beginTransaction()
        .add(R.id.container, fragment)
        .commit();

The host Activity should implement DocumentScannerCallback to get scanning results.