# ocrscreen
ocr for recognizing text on computer screen
## Install ` pip install ocrscreen `
## Use
To create recognition database you need to create few (tens to hundreds) training samples in form of file pairs: png image file containing image of one line of text, and text file containing same line of text. Image and text should have same name except extension: .png for image and .gt.txt for text. Each character you want to recognize should be present in at least three samples.
If you have samples you can convert it into database with this command:
` ocrscreen-learn path/to/samples -o path/to/database `
Recognintion database is a list of directories, each directory contains .png files (one or many) representing character and .id file with text containing character (to avoid filesystem limitations). Directory name and file name does not matter. This form allows easy tuning and troubleshooting recognition problems.
When you have database you can run ocr on image
` ocrscreen-recognize -d path/to/database -i path/to/image `
or on screen ` ocrscreen-recognize -d path/to/database --screen `
or on portion of screen with –rect x y w h
` ocrscreen-recognize -d path/to/database --screen --rect 10 10 640 480 `
Inspect samples and database directory in the sources to get better understanding of data format.
## Notes
This ocr uses black and white bitmaps as search pattern to search on binarized image and only perfect equality counts as match. It doesn’t use dpi and neural networks, it cannot recognize scanned text or text in photo images, it is only for recognizing perfect digital text.
If you have linux and wayland you need to install pyscreenshot package. ` pip install pyscreenshot `
Metadata
Release files for ocrscreen 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ocrscreen-0.0.5.tar.gz | 136.9 kB | Without provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| ocrscreen-0.0.5-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
| ocrscreen-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| ocrscreen-0.0.5-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details |
| ocrscreen-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| ocrscreen-0.0.5-cp39-cp39-win_amd64.whl | CPython 3.9 | CPython 3.9 | Windows x86-64 | Details |
| ocrscreen-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 | Details |
Total release size: 2.0 MB
Release files / ocrscreen-0.0.5.tar.gz
| Download URL | ocrscreen-0.0.5.tar.gz |
|---|---|
| Size | 136.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
370a88b8d8b99c2f99bf2fe4d1051280988652b47cec4a8e227a094c9c75b65e
|
|
BLAKE2b-256 checksum How to use checksums |
11960650fd4f2b27d5e3074eceee8d3cdf1091beeca6ba76519c937bcbf0f83a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / ocrscreen-0.0.5-cp311-cp311-win_amd64.whl
| Download URL | ocrscreen-0.0.5-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 83.3 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a8425397417ce50b8fef391834fb878617db1df4766b2359d3de09a91751e1ad
|
|
BLAKE2b-256 checksum How to use checksums |
0ac8b96d497d92fd731e0ae9ce83ce13f1e483befd8eaa2c0346b919d5552227
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / ocrscreen-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
| Download URL | ocrscreen-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 556.4 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
0210b9bf25ee0135660c97c6e341dc8d2eab6005dffd51c392e9ff2ff7b07901
|
|
BLAKE2b-256 checksum How to use checksums |
1a4f18410979597228446b4d03928ea47ebd6a7f9cfce9ba1cce4ceb057ecb51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / ocrscreen-0.0.5-cp310-cp310-win_amd64.whl
| Download URL | ocrscreen-0.0.5-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 84.1 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
660b322a39e7c6fdcd7fef74a6f7c553541731c91e616b261af6d90a43e34db7
|
|
BLAKE2b-256 checksum How to use checksums |
5a77ea3ce3e3bcfa57503f3e3fe37fb12fcf7ea1c4ffd3dbb12b3c7cc4becd6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / ocrscreen-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
| Download URL | ocrscreen-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 528.2 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4303e70e35dcc6972e0a3faaef2c557fb59755669f60c4761f07c50cc246b6e1
|
|
BLAKE2b-256 checksum How to use checksums |
8f7ce99165ce418c398a19ea5dd234c0ca74a8d6cfba9d581d634c7ef74d441d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / ocrscreen-0.0.5-cp39-cp39-win_amd64.whl
| Download URL | ocrscreen-0.0.5-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 95.5 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3b748763abf6d54fc2d19dff5b07a73d2997387ffa5cf783cc765834f9a3bd8f
|
|
BLAKE2b-256 checksum How to use checksums |
4693b5186bc4583b56f18c5867b0c04c5fdbac8879ac1d28957f1986b0b97418
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / ocrscreen-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
| Download URL | ocrscreen-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 537.3 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ef6dc00bbc4db51cac266d259527df39a5e8a4d5c6097659f09155333094f4a0
|
|
BLAKE2b-256 checksum How to use checksums |
db1b5b7cd3cb31c1f55716a32ac67a0736adbde40ee2f5af10a9cf065c79c872
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Security for ocrscreen 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.