A Screen Translator/OCR Translator made by using Python and Tesseract, the user interface are made using Tkinter. All code written in python.

Overview

About

An OCR translator tool. Made by me by utilizing Tesseract, compiled to .exe using pyinstaller. I made this program to learn more about python.

Inspired by Visual Novel Reader (VNR), Visual Novel OCR, and QTranslate

Requirements

For User

  • tesseract, You only need to install it and its language tessdata
  • Internet connection Obviously

For Dev

  • Python 3.5+, checked using vermin (I am using python 3.9.6)
  • Libraries from python: os, sys, functools, json, webbrowser, subprocess, datetime, Mbox, tkinter, pathlib, asyncio
  • External libraries: pyperclip, pytesseract, pyautogui, pillow, deepl_scraper_pp, deep_translator, keyboard

You can install them by running pip_install.bat or by installing them yourself, full details are located at requirements.txt.
*If i miss anything please let me know.

Tutorial on How To Install and Setup

For User

  1. Download the latest release of this program

  2. Install tesseract, make sure to select install all language pack when prompted

  3. Open the ScreenTranslate.exe

  4. Check settings, make sure tesseract location is correct

  5. Set monitor scaling to 100% so that image is captured accurately (If scaling is not set to 100% you will need to set offset in setting) (Recommended)

  6. Set offset if on multiple monitors. (Optional)

  7. Try capturing image and see if it works or not, if it doesn't, go check the image captured in img_cache folder. If it still doesn't work, try to change the offset.

  8. Now that you have set everything, the app should be ready. Feel free to submit new issue on the github repository if you encounter any bugs.

For Dev

  1. Clone the repo or download the source code of the latest release

  2. Install tesseract, make sure select install all language pack when prompted

  3. Install all the dependencies used for the project

  4. Run and test the source code

  5. If everything works, you can run the app normally running the ScreenTranslate.py file or using the TempRun.bat

if everything works and you have a suggestion or improvement, you can submit a pull request on the github repository. I will check if it's a good idea to add it.

How To Compile It To .exe Yourself

You can use p2exe or many other stuff. I use pyinstaller to compile it.
Command used are

# On Source Code Directory
pyinstaller ScreenTranslate.spec

Read this stackoverflow post to learn more on how to do it.

Tutorial on How To Use

  1. Select Language
  2. Translate or Capture Image using the capture window
  3. Set hotkeys and delays as needed
  4. Set offset if needed (Usually when scaling is not 100% or when using multiple monitors)
  5. Done

Disclaimer

This is a free open source software, you can use it for any purpose. However, I am not responsible for any damage caused by this software. Use it at your own risk. (Not that it will do anything to you, it's just a tool to help you translate text lol)

This is also non profit, I gain no money from creating this.

Comments
  • Thank you for creating the software. But can you help me to solve the following problems.

    Thank you for creating the software. But can you help me to solve the following problems.

    I tried translating the game tales of arise. doesn't seem to work well with large fonts. And often appear "Please enter some text". Does (Opacity) affect the effectiveness of text detection in the game? How should I adjust the Offset X , Y , W , H, for the software to work best image

    opened by nonamebatbai 25
  • Multiple improvements, view comment

    Multiple improvements, view comment

    • Add hotkey for capture and translate
      • Uses python module 'keyboard'
      • Example: Set hotkey to 'Enter' such that pressing enter can both advance the VN and capture
      • User is able to set the hotkey in settings by pressing button and press desired hotkey
    • Instead of reading Setting.json everytime the screen is captured, cached settings in memory is read to reduce read from hard drive
    • Auto copy resource and user_manual from source through .spec file; Removed redundant files from copy_after_compiling
    • Fix typo
    • Add files to .gitignore
    opened by laggykiller 8
  • Changing directory structure

    Changing directory structure

    • Change directory structure
    • Use os.path.join() instead of string joining for handling paths
    • Use variables of paths instead of joining path everytime it is used
    opened by laggykiller 4
  • i have an idea

    i have an idea

    hfg

    pretty good results. so my idea is you can create an extra window. and darken the surroundings. to see the text better and the "Text Capture Area" will work better and the "Text Capture Area" window must be overlaid on the new window to darken the surroundings to work properly. hfg12 I darkened the "Text Capture Area" and used "Capture Area Settings" to translate and got the exact same result as the picture above.

    opened by nonamebatbai 3
  •  Can you add more OCR engines to your software?

    Can you add more OCR engines to your software?

    Untitled This dialogue with black border translates very accuratel Untitled1 y or the dark scene, the translation is also very accurat Untitled 2 e but the light scene cannot be translated. Can you solve this problem? Why does the software not work when the scene is bright?

    opened by nonamebatbai 3
  • thank you very much

    thank you very much

    thank you very much . The software is considered complete. I'm so grateful for your hard work to create great software like this. And this is also the last version you updated?

    opened by nonamebatbai 0
Releases(V1.8.5)
Owner
Fauzan F A
An Informatics Engineering Student at UIN Syarif Hidayatullah Jakarta
Fauzan F A
📷 This repository is focused on having various feature implementation of OpenCV in Python.

📷 This repository is focused on having various feature implementation of OpenCV in Python. The aim is to have a minimal implementation of all OpenCV features together, under one roof.

Aditya Kumar Gupta 128 Dec 04, 2022
Learn computer graphics by writing GPU shaders!

This repo contains a selection of projects designed to help you learn the basics of computer graphics. We'll be writing shaders to render interactive two-dimensional and three-dimensional scenes.

Eric Zhang 1.9k Jan 02, 2023
原神风花节自动弹琴辅助

GenshinAutoPlayBalladsofBreeze 原神风花节自动弹琴辅助(已适配1920*1080分辨率) 本程序基于opencv图像识别技术,不存在任何封号。 因为正确率取决于你的cpu性能,10900k都不一定全对。 由于图像识别存在误差,根本无法确定出错时间。更不用说被检测到了。

晓轩 20 Oct 27, 2022
Code for paper "Role-based network embedding via structural features reconstruction with degree-regularized constraint"

Role-based network embedding via structural features reconstruction with degree-regularized constraint Train python main.py --dataset brazil-flights

wang zhang 1 Jun 28, 2022
Creating of virtual elements of the graphical interface using opencv and mediapipe.

Virtual GUI Creating of virtual elements of the graphical interface using opencv and mediapipe. Element GUI Output Description Button By default the b

Aleksei 4 Jun 16, 2022
Python Computer Vision from Scratch

This repository explores the variety of techniques commonly used to analyze and interpret images. It also describes challenging real-world applications where vision is being successfully used, both f

Milaan Parmar / Милан пармар / _米兰 帕尔马 221 Dec 26, 2022
Sort By Face

Sort-By-Face This is an application with which you can either sort all the pictures by faces from a corpus of photos or retrieve all your photos from

0 Nov 29, 2021
A tool combining EasyOCR and LaMa to automatically detect text and replace it with an inpainted background.

EasyLaMa (WIP) This is a tool combining EasyOCR and LaMa to automatically detect text and replace it with an inpainted background. Installation For GP

3 Sep 17, 2022
Text modding tools for FF7R (Final Fantasy VII Remake)

FF7R_text_mod_tools Subtitle modding tools for FF7R (Final Fantasy VII Remake) There are 3 tools I made. make_dualsub_mod.exe: Merges (or swaps) subti

10 Dec 19, 2022
Controlling Volume by Hand Gestures

This program allows the user to control the volume of their device with specific hand gestures involving their thumb and index finger!

Riddhi Bajaj 1 Nov 11, 2021
Handwritten Text Recognition (HTR) using TensorFlow 2.x

Handwritten Text Recognition (HTR) system implemented using TensorFlow 2.x and trained on the Bentham/IAM/Rimes/Saint Gall/Washington offline HTR data

Arthur Flôr 160 Dec 21, 2022
PyQT5 app that colorize black & white pictures using CNN(use pre-trained model which was made with OpenCV)

About PyQT5 app that colorize black & white pictures using CNN(use pre-trained model which was made with OpenCV) Colorizor Приложение для проекта Yand

1 Apr 04, 2022
Primary QPDF source code and documentation

QPDF QPDF is a command-line tool and C++ library that performs content-preserving transformations on PDF files. It supports linearization, encryption,

QPDF 2.2k Jan 04, 2023
virtual mouse which can copy files, close tabs and many other features !

AI Virtual Mouse Controller Developed an AI-based system to control the mouse cursor using Python and OpenCV with the real-time camera. Fingertip loca

Diwas Pandey 23 Oct 05, 2021
OCR system for Arabic language that converts images of typed text to machine-encoded text.

Arabic OCR OCR system for Arabic language that converts images of typed text to machine-encoded text. The system currently supports only letters (29 l

Hussein Youssef 144 Jan 05, 2023
Opencv face recognition desktop application

Opencv-Face-Recognition Opencv face recognition desktop application Program developed by Gustavo Wydler Azuaga - 2021-11-19 Screenshots of the program

Gus 1 Nov 19, 2021
OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched

OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted. ocrmypdf # it's a scriptable c

jbarlow83 7.9k Jan 03, 2023
pyntcloud is a Python library for working with 3D point clouds.

pyntcloud is a Python library for working with 3D point clouds.

David de la Iglesia Castro 1.2k Jan 07, 2023
Select range and every time the screen changes, OCR is activated.

ASOCR(Auto Screen OCR) Select range and every time you press Space key, OCR is activated. 範囲を選ぶと、あなたがスペースキーを押すたびに、画面が変わる度にOCRが起動します。 usage1: simple OC

1 Feb 13, 2022
Document blur detection based on Laplacian operator and text detection.

Document Blur Detection For general blurred image, using the variance of Laplacian operator is a good solution. But as for the blur detection of docum

JoeyLr 5 Oct 20, 2022