Metadata-Version: 2.4
Name: screen-ocr
Version: 0.7.0
Summary: Library for processing screen contents using OCR
Project-URL: Homepage, https://github.com/wolfmanstout/screen-ocr
Author: James Stout
License-File: LICENSE
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Requires-Dist: dxcam>=0.0.5; sys_platform == 'win32'
Requires-Dist: mss>=10.0.0; sys_platform == 'darwin'
Requires-Dist: pillow>=9.0
Requires-Dist: rapidfuzz
Provides-Extra: easyocr
Requires-Dist: easyocr; extra == 'easyocr'
Requires-Dist: numpy; extra == 'easyocr'
Provides-Extra: tesseract
Requires-Dist: numpy; extra == 'tesseract'
Requires-Dist: pandas; extra == 'tesseract'
Requires-Dist: pytesseract; extra == 'tesseract'
Requires-Dist: scikit-image; extra == 'tesseract'
Provides-Extra: winrt
Requires-Dist: winrt-windows-foundation-collections>=3.2.1; extra == 'winrt'
Requires-Dist: winrt-windows-foundation>=3.2.1; extra == 'winrt'
Requires-Dist: winrt-windows-graphics-imaging>=3.2.1; extra == 'winrt'
Requires-Dist: winrt-windows-media-ocr>=3.2.1; extra == 'winrt'
Requires-Dist: winrt-windows-storage-streams>=3.2.1; extra == 'winrt'
Description-Content-Type: text/markdown

# Screen OCR

[![PyPI](https://img.shields.io/pypi/v/screen-ocr.svg)](https://pypi.org/project/screen-ocr/)
[![Changelog](https://img.shields.io/github/v/release/wolfmanstout/screen-ocr?include_prereleases&label=changelog)](https://github.com/wolfmanstout/screen-ocr/releases)
[![Tests](https://github.com/wolfmanstout/screen-ocr/actions/workflows/test.yml/badge.svg)](https://github.com/wolfmanstout/screen-ocr/actions/workflows/test.yml)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/wolfmanstout/screen-ocr/blob/master/LICENSE)

The `screen-ocr` package makes it easy to perform OCR on portions of the screen.

## Installation

Choose one of the following backends and follow the steps. WinRT is recommended for Windows and Tesseract for all other platforms.

### WinRT

WinRT is a Windows-only backend that is very fast and reasonably accurate. To install screen-ocr with WinRT support, run `pip install screen-ocr[winrt]`

### Tesseract

Tesseract is a cross-platform backend that is much slower and slightly less accurate than WinRT. To install screen-ocr with Tesseract support:

1. Install Tesseract binaries. For Windows, see
   https://github.com/UB-Mannheim/tesseract/wiki.
2. pip install screen-ocr[tesseract]

### EasyOCR

EasyOCR is a very accurate but slow backend and only runs on Python 64-bit, and hence is considered experimental. To install screen-ocr with WinRT support, run `pip install screen-ocr[easyocr]`

## Usage

You can do a simple test by running `python -m screen_ocr` to OCR the current screen contents. See [`__main__.py`](https://github.com/wolfmanstout/screen-ocr/blob/master/screen_ocr/__main__.py) for the code.

If using Tesseract with a custom installation directory on Windows, set
`tesseract_data_path` and `tesseract_command` paths appropriately when
constructing a `Reader` instance.

See also [gaze-ocr](https://github.com/wolfmanstout/gaze-ocr/blob/master/gaze_ocr/_gaze_ocr.py) for more a more involved usage example.
