Skip to content

About

Computer vision document scanning pipeline implementing Canny edge detection, contour polygon approximation, and 4-point perspective homography.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vision Document Scanner Architectural Banner

DOMAIN: IMAGE PROCESSING ENGINE: OPENCV + PYTHON TRANSFORM: 4-POINT HOMOGRAPHY INTERFACE: WEB + CLI


Vision Document Scanner

Vision Document Scanner is a small computer vision utility that turns a photo of a document into a clean scanned image. It detects the document edges, corrects perspective, converts the result to grayscale, and applies adaptive thresholding for a high contrast output.

Vision Document Scanner interface

What It Does

  • Detects the largest document-like contour in a photo.
  • Applies a four-point perspective transform.
  • Produces a clean black and white scan.
  • Works from the terminal with one command.
  • Uses only Python, OpenCV, and NumPy.

Requirements

pip install -r requirements.txt

Usage

python scanner.py -i input_image.jpg -o output_image.png

Example Workflow

  1. Take a photo of a document on a contrasting background.
  2. Run the scanner with the image path.
  3. Open the generated PNG.
  4. If the document is not detected, try a photo with clearer edges and less blur.

Project Goal

The project is intentionally simple: one useful command that demonstrates document detection, perspective correction, and scan-style image processing.

About

Computer vision document scanning pipeline implementing Canny edge detection, contour polygon approximation, and 4-point perspective homography.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages