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


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for numericvision, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size numericvision-0.1.0-py3-none-any.whl (16.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size numericvision-0.1.0.tar.gz (11.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page