Skip to content

Translation of foreign languages using Image Analytics and Data Extraction

License

Notifications You must be signed in to change notification settings

Diya8/image-to-translated-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image-to-translated-text

Translation of foreign languages using Image Analytics and Data Extraction

This project uses:

  1. pytesseract
  2. PIL
  3. googletrans

How to run

The image file path can be given as command line argument. Run the following command in the terminal:

python main.py path/filename

Example:

python main.py images/ch1.png

In img_reader.py, image_reader() gets the image and converts its contents to a string. The language of the text in the image is mentioned in image_to_string().

text = pytesseract.image_to_string(Image.open(image_file), lang='chi_tra')

In text_translator.py, googletrans is used to translate the obtained text.

About

Translation of foreign languages using Image Analytics and Data Extraction

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages