Skip to main content

Detects numeric displays in images using OpenCV

Project description

numericvision

A Python 3 package for detecting numeric seven-segment displays in images and running perspective correction on them using OpenCV 4.

detect_box_sequences() first applies a series of filters to the input image to reduce noise, bring out primary contours and bridge gaps between digit segments (see images.apply_filters()). Next, all resulting contours are analyzed by comparing their geometric properties to a set of criteria which define what it means for a contour to resemble a seven-segment digit. Lots of assumptions are being made here (see config.cfg). A contour resembling a seven-segment digit is used to instantiate a Box object. Several boxes lined up in a row make up a box Sequence. Sequences are contained in a Bag.

In other words, raw contours serve as input for an object detection pipeline which produces results in the form of a crawlable object tree.

Installation

$ brew install opencv
$ pip install numericvision

Using the package

from numericvision import detect_box_sequences

box_sequences = detect_box_sequences("image.jpg")

Running from the command line

$ python -m numericvision image.jpg

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

numericvision-0.1.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

numericvision-0.1.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file numericvision-0.1.0.tar.gz.

File metadata

  • Download URL: numericvision-0.1.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.5

File hashes

Hashes for numericvision-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2f565edc832f9c3b3d7abe48c1b596f7c0d6f81cb25cc35932feb88887d1f277
MD5 8bd224606ac87fca54bd70bad40f8240
BLAKE2b-256 5501cc4a0a16ce061dc165a6bf32202a6a59bc06c9817c1a70f8eb25d25f5f1e

See more details on using hashes here.

File details

Details for the file numericvision-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: numericvision-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.5

File hashes

Hashes for numericvision-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11f51838e69a5c9635de22ba33cf50f4710c663683acfa4f1bae43181b5861a8
MD5 dc7a84bfdbf071745afc7bfa22ebe6da
BLAKE2b-256 1676c2794332e311cfcb9ea3bba0278313b2815d07e98480cd055faa546d8c77

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