Skip to content

Python Script written with OpenCV to implement document scanner.

Notifications You must be signed in to change notification settings

projjal1/Document-Scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Document-Scanner

Python Script written with OpenCV to implement document scanner.

In this scenario we make use of Perspective transform to get the top-down view of the image in a plane.

Four-Point Transform is applied to approximate Region of Interest and filter selected area from the image provided. Here we assume that the document will be one with a rectangular contour, and thus apply transformations accordingly.

More on Region on Interest at Wiki Link

What is Four Point Transform and its Application?

Command to Start Execution

python script.py

Set the input image path

img,ratio,edged,orig=read_img("image.jpg")

Change file to your file_path

Dependencies:

  • Python 3.5+
  • Numpy
  • OpenCV 2.4+
  • imutils

Output

Input Output

Note: Take image of document against a dark background.

Attributions: PyImageSearch

About

Python Script written with OpenCV to implement document scanner.

Topics

Resources

Stars

Watchers

Forks

Languages