Built to order

Offline Document Scanner Android App with Edge Detection and PDF Export

This project builds an Offline Document Scanner Android App using Kotlin, CameraX and OpenCV that turns a phone camera into a pocket scanner with automatic edge detection, perspective correction and multi-page PDF export — fully offline. Pages are found with contour-based edge detection, the crop can be fine-tuned with draggable corners, and enhancement filters clean up each page before it is merged into a shareable PDF stored on the device. It demonstrates real computer-vision and Android development skills through a genuinely useful everyday tool. Suitable for B.E./B.Tech final-year

Android KotlinRoom databaseMaterial Design 3Android StudioAndroid SDK · CameraXOpenCV for AndroidAndroid PdfDocument APIsGradle buildSoftware
Offline Document Scanner Android App with Edge Detection and PDF Export — project thumbnail preview
More project photos (2)

The problem

Students, teachers and small offices constantly need clean digital copies of notes, bills, certificates and forms, but flatbed scanners are rarely at hand and most free "scanner" apps upload every page to a cloud account before returning a PDF. That means private documents leave the device, the app stops working without internet, and subscriptions gate basic features like multi-page export. A phone camera is already a capable scanner — what is missing is the software that finds the page, flattens the perspective and produces a proper PDF without sending anything anywhere. This project builds exactly that: a native Android app that detects the document edges live in the camera preview using OpenCV, lets the user fine-tune the crop with draggable corners, rectifies the perspective into a flat page, applies clean-up filters and merges pages into a standard PDF — every step on-device. Because the whole pipeline is implemented in the open with Kotlin, CameraX and OpenCV, the student can explain and demonstrate each stage in the viva instead of hiding behind a black-box SDK.

SYSTEM FLOW

5 components 7 connections

Live flow
Drag to explore
100%
userUser

User photographing documents and adjusting crop corners.

Follow the working sequence

How it works

  1. The CameraX preview streams frames to the OpenCV pipeline: grayscale conversion, Gaussian blur, Canny edge detection and contour extraction.
  2. The largest quadrilateral contour is approximated and drawn as the live crop overlay on the preview.
  3. The user taps the shutter — or auto-capture fires when the quad stays steady — and the full-resolution frame is grabbed.
  4. The crop quad is mapped to full resolution and the user can drag any corner to correct the boundary.
  5. A perspective transform warps the selected quad into a rectangular, flat-looking page image.
  6. The chosen enhancement filter (grayscale, B&W or enhance) is applied to clean up the page.
  7. The page is saved into the current multi-page document using on-device storage (Room database plus image files).
  8. Export merges the document's pages into a PDF with Android's PdfDocument APIs and hands it to the system share sheet.

Tech stack:

  • Kotlin
  • Android SDK · CameraX
  • OpenCV for Android
  • Android PdfDocument APIs
  • Room database
  • Material Design 3
  • Gradle
  • Android Studio
Parameter Value
Platform Native Android app (Kotlin)
Minimum SDK API 26, Android 8.0 (design target)
Camera Rear camera; autofocus recommended, fixed-focus falls back to manual capture
Edge detection OpenCV Canny + contour approximation, fully on-device
PDF output Multi-page PDF via Android PdfDocument APIs; A4 and Letter page sizes
Storage On-device only; approximately 300 KB–2 MB per exported page (expected, content-dependent)
Export speed Approximately 1–2 seconds for a 5-page document on a mid-range device (expected)
Internet Not required for any feature

Project features

  • [Automatic edge detection] An OpenCV pipeline (grayscale, blur, Canny edges, contour detection) finds the document outline in the live camera preview and draws the crop quad in real time; when no clear quadrilateral is found the app falls back gracefully to a manual crop.
  • [Manual corner adjustment] Four draggable handles let the user fine-tune the crop boundary after capture, so slightly misdetected corners never ruin a scan.
  • [Perspective correction] The selected quad is warped with a perspective transform into a flat, straight-on page image, removing the skew of angled handheld photos.
  • [Enhancement filters] Original, grayscale, high-contrast black-and-white and an enhance mode that lifts faded prints and evens out uneven lighting.
  • [Multi-page documents] Pages keep stacking into one document with rename and reorder, so a 4-page report or a long bill stays grouped correctly.
  • [Offline PDF export] The document's pages are merged into a standard multi-page PDF saved to device storage, ready to share, print or submit.
  • [On-device document library] All scans live in local storage with search; nothing leaves the phone unless the user explicitly shares it.
  • [Auto-capture mode] Configurable: the app snaps automatically once the detected page outline stays steady for a moment.

What is included

  • Complete Android source code in Kotlin with Gradle build files
  • OpenCV integration module: edge detection, corner handling and perspective warp
  • PDF export module with multi-page document assembly
  • Room database schema and storage layer for the document library
  • Material Design 3 UI: capture, enhance and library screens
  • Setup instructions (Android Studio, SDK versions, OpenCV Android SDK steps)
  • Project report PDF (background, vision-pipeline explanation, methodology, results)
  • PPT presentation for final review
  • Viva Q&A preparation document (CameraX, OpenCV pipeline, perspective transform, PDF generation)

Limitations & prerequisites

  • Edge detection needs reasonable lighting and contrast — glossy, shadowed or low-contrast pages may need manual corner adjustment.
  • The perspective transform assumes a roughly flat page; curved book pages and crumpled receipts rectify imperfectly.
  • The base build has no OCR: the PDF contains page images, not searchable text. Text recognition can be added as an optional customization.
  • Very long documents (50+ pages) increase export time and storage use; the tested scope is typical student-sized documents.
  • Output sharpness follows the phone's camera — a low-end fixed-focus camera yields softer scans than a mid-range autofocus one.
  • This is an academic build demonstrating a real pipeline, not a certified archival-digitization product.

Frequently Asked Questions

Does it really work fully offline?

Yes. Edge detection, cropping, perspective correction, filters and PDF export all run on the device with OpenCV and Android APIs. No account, no server and no internet connection are needed for any feature.

Is this project suitable for a final-year project?

Yes — for Computer Engineering, Information Technology and mobile-computing programs. It demonstrates native Android development, CameraX camera pipelines, classical computer vision with OpenCV, local databases and PDF generation, all in one coherent, demonstrable app.

Does it include OCR (text recognition)?

Not in the base build — the exported PDF contains clean page images rather than searchable text. OCR can be added as an optional customization using on-device libraries, and the report lists it under future scope.

Which Android versions are supported?

The design target is API 26 (Android 8.0) and above, covering the large majority of devices in use. CameraX and the PdfDocument APIs used are stable across this range.

Can it scan books, or only flat sheets?

Flat sheets, receipts, ID cards, certificates and whiteboards work well. Curved book pages are a known limitation of the flat-page transform and are disclosed honestly in the report.

What will I receive with the project?

The complete Kotlin source code, the OpenCV scanning module, the PDF export module, setup instructions, the project report PDF, a review PPT and a viva Q&A document. Suitable for B.E./B.Tech final-year projects in Computer Engineering and Information Technology.

Components & software requirements
  • Kotlin
  • Android SDK · CameraX
  • OpenCV for Android
  • Android PdfDocument APIs
  • Room database
  • Material Design 3
  • Gradle
  • Android Studio
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and email — the synopsis PDF downloads immediately. We may send occasional project updates; no spam, unsubscribe anytime.

Related guides

All guides

Best 10 Android App Projects for Final Year

Ten Android app projects for final year from real, published projectech.in listings — donation camp finders, job marketplaces, booking apps, expense splitters, gym trackers, visitor management — each with its real problem, how it works, and why students pick it.

Read guide

Best 10 Android Utility App Projects for Daily Life

Clients keep asking for one thing: an app project they can actually install and use every day — not a demo that only runs during the viva. This guide lists 10 real, published Projectech Android projects built exactly for that: medicine reminders, a parking-spot saver, vehicle maintenance logs, PUC reminders, vegetable price tracking, WiFi coverage mapping, offline-first notes, a safety SOS app, a study planner and spaced-repetition flashcards. Every entry links to its live project page with full source, documentation and build details.

Read guide

Controlling Arduino and ESP32 from an Android App: Bluetooth, BLE and WiFi

Most app-to-hardware student builds pick one of three links: Bluetooth Classic via an HC-05 (~10 m, dead-simple serial), BLE on the ESP32 (low power, app talks through GATT characteristics), or WiFi (ESP32 as hotspot or on your LAN, HTTP or MQTT). This guide walks all three, shows the HC-05 AT-mode wiring, a minimal message protocol you can design in ten minutes, Flutter vs native Kotlin tradeoffs, and the Android 12+ BLUETOOTH_CONNECT permission bug that silently breaks most student apps. End with a demo-day checklist and a failure table so your demo survives the classroom.

Read guide
Get a quotation