No project description provided
Project description
# 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 `
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file ocrscreen-0.0.1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: ocrscreen-0.0.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 83.3 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bdfa69063043fbafbe7624af738d642bf846852287e7419ff04868b15eafcb6 |
|
MD5 | 110fa8ccc9a2b51f01003f6255a8379e |
|
BLAKE2b-256 | abc2497d7964c22e53df16710ec5c095d23d3d8a09e14dbc3ff992eae7dfec16 |
File details
Details for the file ocrscreen-0.0.1-cp311-cp311-macosx_10_9_universal2.whl
.
File metadata
- Download URL: ocrscreen-0.0.1-cp311-cp311-macosx_10_9_universal2.whl
- Upload date:
- Size: 176.4 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bd18191cc2f61cb6d5422d1cca5a0d09c1eef2cdac70a6e28e0bfeb3775550d |
|
MD5 | 0301af721463ca4fec28914aab8b8bdf |
|
BLAKE2b-256 | 01a42d8c34c8c68b007c7fa73c27abf026dbece047a018fc012cb42d6916f7e1 |
File details
Details for the file ocrscreen-0.0.1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: ocrscreen-0.0.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 84.1 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2f12ce5246320ed1832f54d69989c22875409ebeb805684866cd68026ed8c75 |
|
MD5 | 211c24b8d31ee8b7fcdf13384372f0f4 |
|
BLAKE2b-256 | ae5d65d84f044dbbd6c98895f7ad209558e6ac94afd1b7dce1cc4cfdd5dcfdbf |
File details
Details for the file ocrscreen-0.0.1-cp310-cp310-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: ocrscreen-0.0.1-cp310-cp310-macosx_11_0_x86_64.whl
- Upload date:
- Size: 99.7 kB
- Tags: CPython 3.10, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c399a757ac9216b4ca2b840c26bbf318cf3ae492f565ecf8417fc71e7f3a8f9b |
|
MD5 | bbe5ee0b3f8cf3b960b34092c224e4af |
|
BLAKE2b-256 | d06404aa4a298c0726f6e5d274364a45159367e935ef4628e674b8c91f047e73 |
File details
Details for the file ocrscreen-0.0.1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: ocrscreen-0.0.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 95.5 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d6aa5d81fe450c67523cb7fd4761229b469f0400325b4a98fb2f825ccdeb0d8 |
|
MD5 | 118bf0227ae892cbf700c370c6f1a113 |
|
BLAKE2b-256 | a6719f9cdd23eac0540154c5cd700606b426292071bc8e47e520fd3ccb1121af |
File details
Details for the file ocrscreen-0.0.1-cp39-cp39-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: ocrscreen-0.0.1-cp39-cp39-macosx_11_0_x86_64.whl
- Upload date:
- Size: 100.0 kB
- Tags: CPython 3.9, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92d31a4959794f7857a50e017bc3c7652ca712954a3efc193081cc47f48b3e7a |
|
MD5 | 3d1ac0c2eafca024fa212fc3b497e56c |
|
BLAKE2b-256 | 8c00e09162f5c689a99b95f94598aa51c46d8608c1c54de86502e6a4de1ae4f2 |