OpenCV python pipeline to finds black bordered frame in an image. Fix the perspective, crop and rotate.
Project description
Cardscan
OpenCV python pipeline to extract black bordered frame in an image. Post process the image, find and filter contours, fix the perspective, crop and rotate. No machine learning involved.
Experimental stage project
Install
pip install cardscan
Usage
import cv2
from cardscan import scan
img = cv2.imread('path_to_your_image.jpg')
img_result_array = scan(img)
More examples here
Dev
install poetry
pip install poetry
install dependencies
# cd at the project root
poetry install
run one of the pipeline visualization app
poetry run python -m examples.cam_draw_pip
poetry run python -m examples.cam_use_pipeline
poetry run python -m examples.cam_visual_pipeline
poetry run python -m examples.cam_visual_contours
poetry run python -m examples.cam_simple
poetry run python -m examples.from_file
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cardscan-0.4.0.tar.gz.
File metadata
- Download URL: cardscan-0.4.0.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-32-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce3d5786289a1ae2bfa97a14323c8624d36f73a1ccde6ffc7d9c8da839a11613
|
|
| MD5 |
4bfa77922c26909ad51c7e585bb78cdf
|
|
| BLAKE2b-256 |
1449f4f13889b6ce24c27f57565cc2de9bafb658893fade320e4b2f84f4bfd35
|
File details
Details for the file cardscan-0.4.0-py3-none-any.whl.
File metadata
- Download URL: cardscan-0.4.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-32-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2399296d3eb3133db1e4849a5b24fdf6bd84564fceb6b7191a7410b8516d39a5
|
|
| MD5 |
4801cb4022ad53d9516aa8ed88c6a030
|
|
| BLAKE2b-256 |
9ff3ac8f082caca47e5d338f1ae82c4abd9d9233301800f1483e8afd0489f74a
|