This program captures a part of the screen, reads the text from the captured image than translates and prints it to a target language. Currently from German to English, because I'm trying to learn German. You can easily change the "from" and "to" languages from the lines "60" and "98" in "visual_translation.py".
I was thinking about learning languages, about the languages I know, and suddenly I remembered how I learned English. Not at school, of course. I learned it by playing games and using Translate. Memorising all the unknown words, understanding the sentence structures and grammar rules by myself, etc. I thought I could recreate the learning process by playing the games with another language with a faster, automated learning process and here we are with this programme.
(Screenshots are from the game "King's Bounty: The Legend", one of my favourite games.)
First, you've got to be in a screen where there is text to be screenshot of. first.png
Second, when you start the program, it captures a screenshot of the screen. second.png
Third, you can select 2 green dots on the screenshot. These 2 green dots select the area between them and create a rectangle. third.png
Fourth, you press enter, a window pops up with the text inside the rectangle you selected. You can adjust the captured text within this menu if wrong. fourth.png
Fifth, you can press the button "Translate" and enjoy the translated text. fifth.png