Convert photos of documents made with a camera to a 'scanned' documents. It will take documents' contour and apply a four point transformation
Project description
Four-Point-Invoice-Transform-with-OpenCV
forked from KMKnation/Four-Point-Invoice-Transform-with-OpenCV
This code is inspired from [4 Point OpenCV getPerspective Transform Example]
I have customized the code of Adrian to find 4 points of document or rectangle dynamically. Here i have added findLargestCountours and convert_object, where convert_object is our driver method which actually doing image processing and getting all 4 point rectangles from image. After getting all 4 point rectangle list findLargestCountours method finding largest countour in list.
Run it
Before running the examples, create a virtual environment and install
dependencies with make init
, this will also add an entry point
image-to-scan
from which you can call the script.
Activate your virtualenv source venv/bin/activate
.
Sample2
Run image-to-scan tests/samples/02/original.png
Original Image | Edge Detection | Warped Image |
---|---|---|
Sample3
Run image-to-scan tests/samples/03/original.png
Original Image | Edge Detection | Warped Image |
---|---|---|
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for image_to_scan-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12822eae357abe69eb02726282faaf2fcbbb85e0ee43b0eedb2084d99b799d8a |
|
MD5 | 444e4f14b33415373f039f04cb8518e7 |
|
BLAKE2b-256 | 66edeeca3de32b10758a932df34ab547754385f63d503536f13ec951652b0f71 |