https://github.com/igorm/numericvision
Detects numeric displays in images using OpenCV
https://github.com/igorm/numericvision
computer-vision image-analysis object-detection ocr opencv
Last synced: 10 months ago
JSON representation
Detects numeric displays in images using OpenCV
- Host: GitHub
- URL: https://github.com/igorm/numericvision
- Owner: igorm
- License: apache-2.0
- Created: 2019-11-17T06:58:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-26T03:51:34.000Z (over 6 years ago)
- Last Synced: 2024-09-25T09:16:26.391Z (almost 2 years ago)
- Topics: computer-vision, image-analysis, object-detection, ocr, opencv
- Language: Python
- Size: 20.2 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# numericvision
A Python 3 package for detecting numeric
[seven-segment displays](https://en.wikipedia.org/wiki/Seven-segment_display) in images and running
[perspective correction](https://en.wikipedia.org/wiki/Perspective_control) on them using
[OpenCV 4](https://opencv.org).
`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
```python
from numericvision import detect_box_sequences
box_sequences = detect_box_sequences("image.jpg")
```
## Running from the command line
```
$ python -m numericvision image.jpg
```