Skip to main content

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

cardscan output example

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

cardscan-0.4.0.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cardscan-0.4.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

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

Hashes for cardscan-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ce3d5786289a1ae2bfa97a14323c8624d36f73a1ccde6ffc7d9c8da839a11613
MD5 4bfa77922c26909ad51c7e585bb78cdf
BLAKE2b-256 1449f4f13889b6ce24c27f57565cc2de9bafb658893fade320e4b2f84f4bfd35

See more details on using hashes here.

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

Hashes for cardscan-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2399296d3eb3133db1e4849a5b24fdf6bd84564fceb6b7191a7410b8516d39a5
MD5 4801cb4022ad53d9516aa8ed88c6a030
BLAKE2b-256 9ff3ac8f082caca47e5d338f1ae82c4abd9d9233301800f1483e8afd0489f74a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page