Skip to main content

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 Distribution

ocrscreen-0.0.2.tar.gz (135.8 kB view details)

Uploaded Source

Built Distributions

ocrscreen-0.0.2-cp311-cp311-win_amd64.whl (83.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

ocrscreen-0.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (556.4 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

ocrscreen-0.0.2-cp311-cp311-macosx_10_9_universal2.whl (176.4 kB view details)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)

ocrscreen-0.0.2-cp310-cp310-win_amd64.whl (84.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

ocrscreen-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (528.2 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

ocrscreen-0.0.2-cp310-cp310-macosx_11_0_x86_64.whl (99.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

ocrscreen-0.0.2-cp39-cp39-win_amd64.whl (95.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

ocrscreen-0.0.2-cp39-cp39-macosx_11_0_x86_64.whl (100.0 kB view details)

Uploaded CPython 3.9 macOS 11.0+ x86-64

File details

Details for the file ocrscreen-0.0.2.tar.gz.

File metadata

  • Download URL: ocrscreen-0.0.2.tar.gz
  • Upload date:
  • Size: 135.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for ocrscreen-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fa9dc5210fcf1bda5c18e0c6d03b1d526bace011d41b515238a0615503049c7e
MD5 4634beb378537fb6c5cb71fad61fc888
BLAKE2b-256 8c05e2b08be981410cf98af447cd5b96d11d0a16adabfe7673dcb92e8666e3bf

See more details on using hashes here.

File details

Details for the file ocrscreen-0.0.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ocrscreen-0.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fab795f7a31cda004abe5c8f454020b13651bba6a263698d5183f2f578f8c146
MD5 a2b9b36d72edb949fc801459ea1b51e1
BLAKE2b-256 ed803255e09abdfb037d825fb007356179415afb710603d43a655c9758720b14

See more details on using hashes here.

File details

Details for the file ocrscreen-0.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ocrscreen-0.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3975bd89ef65f2149f39915decc6d1eabd24489946f6a7ab292fca4b8bc151c2
MD5 159b2560b9a39c559e3bb23262a9d4ea
BLAKE2b-256 4d5b0399464c38fc7522a9d39839a7098c15c527baa2f731f773a89bba6af39a

See more details on using hashes here.

File details

Details for the file ocrscreen-0.0.2-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ocrscreen-0.0.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 12f6d9e1240f93516e2d7a85e764c6a68cbcaa48714a60c85a1c33cf63fba9e2
MD5 c17f1842eb81b73cd4ca777216190c98
BLAKE2b-256 675d2140408aa3089d6006e5f3fe0249009cba90a848520666a24af1e4e18679

See more details on using hashes here.

File details

Details for the file ocrscreen-0.0.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for ocrscreen-0.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 761f0c6cdd15d3f3dc7e9c788e5f3a2972980150d8b30b5f2719ad6a9047d215
MD5 8face030e69c047564a10326faf66943
BLAKE2b-256 d59c59b85d208bfc90bf37e91ef1f7a27485c8dc468f91e86af0dfda7ae6028d

See more details on using hashes here.

File details

Details for the file ocrscreen-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ocrscreen-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 26c3f2929ec28b160b0ccc6140b0afaa4fe7f377028796d62b82a40fd0847d9d
MD5 9ec34ac0807360465084421edc98b774
BLAKE2b-256 ed430e4bfed67da2c9a339a4d8596eb71776a2ead7f19fd7b9ff50ce51e1469c

See more details on using hashes here.

File details

Details for the file ocrscreen-0.0.2-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for ocrscreen-0.0.2-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 96a4b05e9a4f6f19f0754ed8909419573d454e92e90f6cf60c2775cc326c4950
MD5 04c400939a1da6d7dd4c253e1a7e72ac
BLAKE2b-256 0e790366f365b829592a8d4d02b7e6b38fd58d47276cf54e03c7c62a6f07d199

See more details on using hashes here.

File details

Details for the file ocrscreen-0.0.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: ocrscreen-0.0.2-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

Hashes for ocrscreen-0.0.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3d8e2ca42a16e95ce5ddd9ab035e4f617f85a6a9e7b5b4ed4dd9430a7e2f52fc
MD5 5504190434950137d28999371d39fc17
BLAKE2b-256 42ebe69104b17b9c840fd79014e77816382a66e7e1f6bfb6bb3870dfd7db0a34

See more details on using hashes here.

File details

Details for the file ocrscreen-0.0.2-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for ocrscreen-0.0.2-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d835038f5afa2188a7d836b382d2a68b8df0d7a038e21a43ec2cf9c491228141
MD5 26246e3d085ca8bd0356da3e6e4629c8
BLAKE2b-256 0d0ea11401c46ac03fe866c38b6f6f5e90c196be6d96ae9589db2c889fb09ba9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page