Created
October 26, 2018 11:42
-
-
Save simion314/1670078e298af1a4c466bc16c56738c9 to your computer and use it in GitHub Desktop.
using tessauract,imagemagic and jovie to read text from games
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
import -window root -crop 1120x150+380+946 /home/simi/Apps/TTS-OCR/shot.png | |
convert -units PixelsPerInch /home/simi/Apps/TTS-OCR/shot.png -adaptive-resize 300% -density 300 -colorspace gray -depth 1 -negate /home/simi/Apps/TTS-OCR/shot2.png | |
killall tesseract | |
tesseract -c tessedit_char_whitelist=abcdefghijklmnopqrstuvwxyz --psm 6 /home/simi/Apps/TTS-OCR/shot2.png /home/simi/Apps/TTS-OCR/text-file | |
qdbus org.kde.KSpeech /KSpeech sayFile /home/simi/Apps/TTS-OCR/text-file.txt 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment