Capture 2 Text

9
Capture2Text Contents What is Capture2Text? Download How to Launch OCR Speech Recognition Output Options Configuration Substitutions Command Line Options Troubleshooting & FAQ Tips to Increase OCR Accuracy How to Run Capture2Text from Source Code  Acknowledgments/Tools Used Related Tools for Japanese Language Learners What is Capture2Text? Capture2Text enables users to do the following: Optical Character Recognition (OCR)  Allows the user to quickly  snapshot a small portion of the screen, OCR it and (by default) save the result to the clipboard. Speech Recognition (experimental)  Using speech recognition the user can speak into their microphone and Capture2Text will convert the speech to text. If the speech recognition technology is not 100% sure, Capture2Text will present the user with a list of the most likely transcriptions. The selected result will (by default) be copied to the clipboard. Conceptual illustration: Download The latest version can be found on the Capture2Text download page hosted by SourceForge. Source code is included. How to Launch (no installation required) 1. Unzip the contents of the zip file. Make sure that there are no Asian or other non-ASCII characters in the path where you unzipped it.  Also, if you are on Windows 7, don't unzip it to the Program F iles directory (this will avoid issues related to write privileges). 2. Double-click on Capture2Text.exe. You should see the Captur e2Text icon on the bottom-right of your screen (though it might be hidden in which case you will have to click on the "Show hidden icons" arrow).

description

klfyy

Transcript of Capture 2 Text

  • Capture2Text

    Contents

    What is Capture2Text?DownloadHow to LaunchOCRSpeech RecognitionOutput OptionsConfigurationSubstitutionsCommand Line OptionsTroubleshooting & FAQTips to Increase OCR AccuracyHow to Run Capture2Text from Source CodeAcknowledgments/Tools UsedRelated Tools for Japanese Language Learners

    What is Capture2Text?

    Capture2Text enables users to do the following:

    Optical Character Recognition (OCR)Allows the user to quickly snapshot a small portion of the screen, OCR it and (by default) save the result to the clipboard.

    Speech Recognition (experimental) Using speech recognition the user can speak into their microphone and Capture2Text will convert the speech to text. If the speechrecognition technology is not 100% sure, Capture2Text will present the user with a list of the most likely transcriptions. The selectedresult will (by default) be copied to the clipboard.

    Conceptual illustration:

    Download

    The latest version can be found on the Capture2Text download page hosted by SourceForge. Source code is included.

    How to Launch (no installation required)

    1. Unzip the contents of the zip file. Make sure that there are no Asian or other non-ASCII characters in the path where you unzipped it.Also, if you are on Windows 7, don't unzip it to the Program Files directory (this will avoid issues related to write privileges).

    2. Double-click on Capture2Text.exe. You should see the Capture2Text icon on the bottom-right of your screen (though it might behidden in which case you will have to click on the "Show hidden icons" arrow).

  • OCR

    Capture2Text can OCR the following languages:

    Afrikaans Finnish MalteseAlbanian Frankish NorwegianAncient Greek French PolishArabic Galician PortugueseAzerbaijani German RomanianBasque Greek RussianBelarusian Hebrew SerbianBengali Hindi SlovakianBulgarian Hungarian SlovenianCatalan Icelandic SpanishCherokee Indonesian SwahiliChinese (Simplified) Italian SwedishChinese (Traditional) Japanese TagalogCroatian Kannada TamilCzech Korean TeluguDanish Latvian ThaiDutch Lithuanian TurkishEnglish Macedonian UkrainianEsperanto Malay VietnameseEstonian Malayalam

    By default only English, French, German, Italian, Japanese and Spanish are installed.

    To acquire other languages:

    1. Download the appropriate OCR language dictionaries from http://code.google.com/p/tesseract-ocr/downloads/list. These files end in".tar.gz" (ex. tesseract-ocr-3.02.rus.tar.gz).

    2. Open the ".tar.gz" file you just downloaded with 7-Zip or similar decompression software and navigate to the directory that has the filethat ends in ".traineddata".

    3. Drag the ".traineddata" file (and any other file in this directory) to this path in the Capture2Text directory:Capture2Text\Utils\tesseract\tessdata

    4. Restart Capture2Text

    Note: Arabic and Hindi are more CPU intensive and will thus be slower to OCR.

    To install the Chinese (NHocr) language pack:

    1. Download nhocr-0.18-dic-zh_CN-091226.tar.gz from https://code.google.com/p/nhocr/downloads/list

    2. Open it with 7-Zip and copy PLM-zh_CN.dic and cctable-zh_CN to Capture2Text\Utils\nhocr\Dic

    3. Restart Capture2Text

    OCR Usage

    Press the OCR capture key (default: Windows Key + Q) to start the capture. Now, using your mouse, resize the blue capture box over thearea of the screen that you want to OCR. A preview of the captured OCR'd text will appear in the top-left corner of the screen shortly afteryou have stopped resizing the capture box. Press the capture key again or the left mouse button to complete the capture. The capturedscreen area will be OCR'd and the textual result will be stored in the clipboard by default.

    To cancel an OCR capture, press Esc.

    To move the capture box, hold down the right mouse button and drag the mouse.

    To nudge the capture box, use the arrow keys.

    To toggle the active capture box corner, press the space bar.

    To change the OCR language, right-click the Capture2Text tray icon, select the OCR Language option and then select the desiredlanguage.

    To quickly switch between 3 languages, use the OCR language quick access keys: Windows Key + 1, Windows Key + 2, and WindowsKey + 3.

    When the Tesseract versions of Chinese or Japanese is selected, you should specify the text direction (vertical/horizontal/auto) using the

  • text direction key: Windows Key + W. The text direction will not have any effect on the NHocr Chinese/Japanese dictionaries. If auto isselected, horizontal will be used when the capture width is more than twice the height, otherwise vertical will be used. The text directionalso affects how furigana is stripped from Japanese text.

    (For Japanese) When OCR pre-processing is enabled, by default, Capture2Text will attempt to strip out furigana. You may disable thisbehavior in "Preferences... -> OCR -> Strip Furigana".

    Using the Preferences dialog, you can change the following OCR settings:

    OCR Hotkeys.Current OCR Language.The 3 Quick-Access OCR Languages.Capture Box color and opacity.Enable/Disable the preview box and change its colors, font, opacity and location.Change the text direction (used for Chinese and Japanese).Specify whitelist characters.Enable/Disable OCR pre-processing.Enable/Disable stripping of furigana (for Japanese).

    Speech Recognition

    Capture2Text can perform speech recognition for the following languages:

    Afrikaans French PolishChinese German PortugueseCzech Italian RussianDutch Japanese SpanishEnglish Korean Turkish

    Speech Recognition Usage

    Press the speech recognition capture key (default: Windows Key + A) to start the capture. You will see a box that says "Recording..." inthe top-left corner of your screen. Speak a word or phrase or sentence into your microphone. Capture2Text will automatically recognizewhen you are done speaking and will display a box that says "Analyzing...". The speech recognition will take a couple of seconds. Whenthe speech recognition is complete you will see a list of possible transcriptions to choose from. When you choose a transcription, it will bestored in the clipboard by default.

    When the results windows is displayed, you can press Enter to select the first transcription or use the number keys (1-9) to select thecorresponding transcription.

    To cancel a speech recognition capture, press Esc.

    To change the speech recognition language, right-click the Capture2Text tray icon, select the Speech Recognition Language option andthen select the desired language.

    To quickly toggle between 2 languages, use the speech recognition language hotkey: Windows Key + 4.

    Using the Preferences dialog, you can change the following speech recognition settings:

    Speech recognition Hotkeys.Current speech recognition Language.The 2 speech recognition languages to toggle between.The properties of the Results window (font, color, number of results).How much silence to wait for before recording stops.

    Output Options

    By default, the OCR'd or speech recognized text will be placed in the clipboard.

    You also have 3 more ways to output the text.

    To send the text to a pop-up window you can right-click the Capture2Text tray icon and select Show Popup Window.

    To send the text to whichever textbox currently contains the blinking cursor/I-beam, right-click the Capture2Text tray icon and select Sendto Cursor.

    (Advanced) To send the text directly to a window/control (for example, Notepad++), first fill in the Send to Control settings in thePreferences dialog.

    Using the Preferences dialog, you can change the following output settings:

    Text to prepend/append to the captured text.Enable/Disable outputting to the clipboard.Enable/Disable outputting to a popup window.Popup window properties (default width and height).

  • Enable/Disable sending the output text to the cursor.Enable/Disable outputting to a control.Additional command to send to the output control.

    Configuration

    Right-click the Capture2Text tray icon in the bottom-right of your screen and then select the "Preferences..." option to bring up thePreferences dialog.

  • Substitutions

    Sometimes Capture2Text consistently makes the same OCR mistakes such as recognizing an "M" as "I\/|".

    By editing the substitutions.txt file in the Capture2Text directory, you may tell Capture2Text to substitute one text string for another textstring.

    Just find the appropriate language section and add one substitution per line in this format:from_text = to_text

    Example (adding 3 substitutions to the English section):

    English:I\/| = M>< = Xsome%space%text = some_text

    To create a substitution regardless of language, add the substitution to the "All:" section.

    Special tokens and escape characters:

    %space% Space character%tab% Tab character%eq% Equals (=)%perc% Percent sign (%)%lf% Linefeed character (\n)%cr% Carriage return character (\r)

    You may disable a substitution by adding a "#" in front.

    When done editing substitutions.txt, either restart Capture2Text or switch language for the substitutions to take effect.

  • Command Line Options

    You may OCR the screen via command line by calling Capture2Text in this format:

    Capture2Text.exe x1 y1 x2 y2 [output_file]

    Required Arguments:x1 - X1-Coordinate of the screeny1 - Y1-Coordinate of the screenx2 - X2-Coordinate of the screeny2 - Y2-Coordinate of the screen

    Optional Arguments:output_file - The OCR'd text will be written to this file if specified.

    Capture2Text will read settings.ini to determine settings such as OCR language and output options (clipboard, popup, etc.).

    Examples:Capture2Text.exe 10 152 47 321 output.txtCapture2Text.exe 10 152 47 321

    Note: Make sure that you wait for Capture2Text to finish processing before attempting to start a new instance of Capture2Text.

    Troubleshooting & FAQ

    Issue #1: Capture2Text doesn't work at all. What can I do?

    Possible solutions:

    Make sure that you have unzipped Capture2Text to a path that does not contain Asian or other non-English characters. SearchGoogle if you do not know how to unzip a file.

    Make sure that you did not unzip Capture2Text to the Program Files directory. This will avoid possible issues related to writeprivileges.

    Try unzipping Capture2Text to a very short path such as C:\Capture2Text. Some computers supposedly have issues with longerpaths. I have never actually seen this happen though.

    Make sure that your Anti-virus software is not blocking Capture2Text. Refer to the documentation that was bundled with your Anti-virus software.

    Make sure that you have downloaded the latest version from SourceForge:http://sourceforge.net/projects/capture2text/files/Capture2Text/

    Restart your computer.

    Right-click Capture2Text.exe and select "Run as administrator". Capture2Text shouldn't need administrator privileges, but if all elsefails it won't hurt to try.

    Ask one of your grandchildren to help you :)

    If none of these things work for you, I suggest deleting Capture2Text and looking for some other OCR software (do not ask me forrecommendations).

    Issue #2: Capture2Text stopped working.

    Just restart it. I have never actually seen this happen though.

    Issue #3: The language that I'm interested in doesn't appear in the OCR language menu.

    Read the OCR section of this document to learn how to add new languages.

    Issue #4: I don't see the Capture2Text tray icon.

    Perhaps Windows did you the disservice of hiding it for you. Click the "Show hidden icons" button (it looks like an triangle) to see theCapture2Text tray icon.

    Issue #5: I've clicked on the Capture2Text tray icon but it doesn't do anything.

  • Right-click it instead.

    Issue #6: Capture2Text isn't properly OCR'ing some word or character.

    Since I don't maintain the OCR training files, there is nothing that I can do about it. If you have a technical background and a lot of freetime, feel free to create your own training files: https://code.google.com/p/tesseract-ocr/wiki/TrainingTesseract3

    Issue #7: Capture2Text isn't working on my Mac.

    Capture2Text is a Windows-only software. If you have a technical background, feel free to port it (but don't ask me to help).

    Issue #8: Speech recognition isn't working very well.

    Speech recognition is an experimental feature and I might remove it in a future release of Capture2Text.

    Issue #9: Where is the uninstaller?

    There isn't one. Capture2Text doesn't have an installer either. To remove Capture2Text from your computer, simply delete theCapture2Text directory.

    Issue #10: Should I use "Japanese (Tesseract)" or "Japanese (NHocr)"?

    "Japanese (Tesseract)" is usually more accurate and properly supports both horizontal and vertical text. If it makes a mistake, you cantry using "Japanese (NHocr)". "Japanese (NHocr)" treats all text as horizontal text, so when using it to OCR vertical text, make sure thatyou only select a column of text that is one character in width.

    Tips to Increase OCR Accuracy

    Sometimes it helps to shape the capture box very tightly around the text.

    Enable the OCR pre-preprocessing option in Preferences -> Output.

    Make sure that what you are viewing is >= its original size. For example, make sure that your image viewer isn't zoomed out too much.

    How to Run Capture2Text from Source Code

    1. Download and install AutoHotkey 32-bit Unicode from: http://ahkscript.org/download/

    2. Copy the .ahk files from SourceCode/Capture2Text_AHK_Script to the root Capture2Text folder (the same folder that containsCapture2Text.exe)

    3. Double-click Capture2Text.ahk

    Acknowledgments/Tools Used

    Tesseract OCR engineNHocr Alternate OCR engine for Japanese and ChineseLeptonica Image processing and analysis librarySoX Audio utility used here to capturing voice to FLAC fileGoogle Voice recognition servicewget Utility used here to send voice recognition request to GoogleScreenCapture AutoHotKey screen capture script

    Related Tools for Japanese Language Learners

    JGlossator (Windows)

    Automatically lookup Japanese words that you have OCR'd with Capture2Text. Supports de-inflected expressions, readings, audiopronunciation, example sentences, pitch accent, word frequency, kanji information, and grammar analysis. Supports both EDICT andEPWING dictionaries.

  • OCR Manga Reader (Android)

    Free and open source Manga reader android app that allows you to quickly OCR and lookup Japanese words in real-time. There are noads and no mysterious network permissions. Supports both EDICT and EPWING dictionaries.