>![]() |
Commentary: This module defines Emacspeak front-end to OCR. This module assumes that sane is installed and working for image acquisition, and that there is an OCR engine that can take acquired images and produce text. Prerequisites: Sane installed and working. scanimage to generate tiff files from scanner. tiffcp to compress the tiff file. working ocr executable by default this module assumes that the OCR executable is named "ocr"
Automatically generated documentation for commands defined in module emacspeak-ocr.
control e control o
An OCR front-end for the Emacspeak desktop.
Page image is acquired using tools from the SANE package. The acquired image is run through the OCR engine if one is available, and the results placed in a buffer that is suitable for browsing the results.
For detailed help, invoke command emacspeak-ocr bound to C-e C-o to launch emacspeak-ocr-mode, and press `?' to display mode-specific help for emacspeak-ocr-mode.
Not bound to any key.
Like backward page, but tracks page number of current document.
Not bound to any key.
Run OCR engine on current image after flip-flopping it. Useful if you've scanned a page upside down and are using an engine that does not automatically flip the image for you. You need the imagemagik family of tools — we use mogrify to transform the image. Prompts for image file if file corresponding to the expected `current page' is not found.
Not bound to any key.
Like forward page, but tracks page number of current document.
Not bound to any key.
An OCR front-end for the Emacspeak desktop.
Pre-requisites:
1) A working scanner back-end like SANE on Linux.
2) An OCR engine.
1: Make sure your scanner back-end works, and that you have the utilities to scan a document and acquire an image as a tiff file. Then set variable emacspeak-ocr-scan-image-program to point at this utility. By default, this is set to `scanimage' which is the image scanning utility provided by SANE.
By default, this front-end attempts to compress the acquired tiff image; make sure you have a utility like tiffcp. Variable emacspeak-ocr-compress-image is set to `tiffcp' by default; if you use something else, you should customize this variable.
2: Next, make sure you have an OCR engine installed and working. By default this front-end assumes that OCR is available as /usr/bin/ocr.
Once you have ensured that acquiring an image and applying OCR to it work independently of Emacs, you can use this Emacspeak front-end to enable easy OCR access from within Emacspeak.
The Emacspeak OCR front-end is launched by command emacspeak-ocr bound to C-e C-o.
This command switches to a special buffer that has OCR commands bounds to single keystrokes– see the ke-binding list at the end of this description. Use Emacs online help facility to look up help on these commands.
emacspeak-ocr-mode provides the necessary functionality to scan, OCR, read and save documents. By default, scanned images and the resulting text are saved under directory ~/ocr; see variable emacspeak-ocr-working-directory. Invoking command emacspeak-ocr-open-working-directory bound to M-x emacspeak-ocr-open-working-directory will open this directory.
By default, the document being scanned is named `untitled'. You can name the document by using command emacspeak-ocr-name-document bound to M-x emacspeak-ocr-name-document. The document name is used in constructing the name of the image and text files.
Key Bindings:
See key binding — ———
RET emacspeak-ocr-scan-and-recognize SPC emacspeak-ocr-read-current-page 1 .. 9 emacspeak-ocr-page ? describe-mode C emacspeak-ocr-set-compress-image-options I emacspeak-ocr-set-scan-image-options [ emacspeak-ocr-backward-page ] emacspeak-ocr-forward-page c emacspeak-ocr-customize d emacspeak-ocr-open-working-directory f emacspeak-ocr-flipflop-and-recognize-image i emacspeak-ocr-scan-image j emacspeak-ocr-scan-photo n emacspeak-ocr-name-document o emacspeak-ocr-recognize-image p emacspeak-ocr-page q bury-buffer s emacspeak-ocr-save-current-page w emacspeak-ocr-write-document .
In addition to any hooks its parent mode `text-mode' might have run, this mode runs the hook `emacspeak-ocr-mode-hook', as the final step during initialization.
Not bound to any key.
Name document being scanned in the current OCR buffer. Pick a short but meaningful name.
Not bound to any key.
Launch dired on OCR working directory.
Not bound to any key.
Speaks current page.
Not bound to any key.
Run OCR engine on current image. Prompts for image file if file corresponding to the expected `current page' is not found.
Not bound to any key.
Writes out recognized text from current page to an appropriately named file.
Not bound to any key.
Scan in a page and run OCR engine on it. Use this command once you've verified that the separate steps of acquiring an image and running the OCR engine work correctly by themselves.
Not bound to any key.
Scan in a photograph. The scanned image is converted to JPEG.
Not bound to any key.
Interactively update image compression options. Prompts with current setting in the minibuffer. Setting persists for current Emacs session.