Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.68 KB

README.md

File metadata and controls

42 lines (31 loc) · 1.68 KB

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