Python OCR GUI for various languages: PyQt5 tutorial - Part 08

preview_player
Показать описание
This tutorial is about creating a multi-language OCR GUI in PyQt5 in Python. We start from very basic GUI in the Qt designer. We have tested various languages for image to text extraction process of pytesseract. These languages are tested for OCR:
ARABIC, BENGALI, BULGARIAN, CHINESE(TRADITIONAL), CHINESE(SIMPLIFIED), DANISH, ENGLISH, FINNISH, FRENCH, GERMAN, GREEK, GUJRATI,
HINDI, HUNGRARIAN, IGBO, ITALIAN, JAPANESE, KANNADA, KAZAKH,
KHMER, KOREAN, LAO, MACEDONIAN, MALAYALAM, MARATHI, NEPALI, RUSSIAN, TURKISH, URDU.

In this video you will learn:
How to use OpenCV in PyQt5 GUI?
How to use tesseract optical character recognition in PyQt5 GUI?
How to use event filter in PyQt5 GUI?
How to use Dock widget and Q Rubber band in PyQt5?
How to Perform OCR on multiple languages?
How to make use of .ui file without converting it to .py file?

Рекомендации по теме
Комментарии
Автор

Would it be possible to make a system like this with real-time screen capture? As if it were Windows Onarrado but instead of voice it puts it in txt?

SolitárioDedé
Автор

it worked perfectly. i have a question rather than cropped the picture using mouse, how to convert the whole image using a another specific button.

boringguy
Автор

I'm working for a desktop application with multi languages. My method in working was to create the interface with qt designer then translate it with pyiuc5 command to get the Ui_Form class and load it after in  my program. So I don't know where to include the translate part in my program. For example, I create my login.ui with qt designer then I convert the login.py to login-fr.ts and translate it to french language with qt linguist and compile it to get the .qm file but after that I didn't find the right solution. I wish you understand my problem and thank you

akrambaklouti
Автор

Thank you so much for uploading this video very helpfull new bies.
How can I add Zoom in and zoom out function in gui that automatically resize the image according to screen window. please tell me. Regards.

hammadmalik
Автор

Thank you so much! How could I do a sequence for saving different data each time I select a section of the image? How can I contact you? Thank you!

Автор

a big compliment to you, that is a very good job.
it worked for me now i don't know why i get the app displayed and then it disappears after a few seconds, maybe you have an idea

chahramanehafid
Автор

Hello, first of all, your project works great in English. I made a plugin and downloaded the Turkish data and added it to the traindata folder, but when I add the image to the comboBox, I can't get any output. Can you tell me where the problem is?

sefakocamansk
Автор

Every time I open the window and select an area for OCR, it gives me an error and saves a cropped image and closes the program.

snoopi
Автор

error
Traceback (most recent call last): File "C:\projedeneme\gui.py", line 119, in eventFilter image = File "C:\Python312\Lib\site-packages\PIL\ImageQt.py", line 86, in fromqpixmap return fromqimage(im) File "C:\Python312\Lib\site-packages\PIL\ImageQt.py", line 75, in fromqimage im.save(buffer, "ppm") TypeError: arguments did not match any overloaded call: save(self, fileName: Optional[str], format: Optional[str] = None, quality: int = -1): argument 1 has unexpected type 'PySide6.QtCore.QBuffer' save(self, device: Optional[QIODevice], format: Optional[str] = None, quality: int = -1): argument 1 has unexpected type 'PySide6.QtCore.QBuffer'

serkankaragoz
Автор

Traceback (most recent call last):
File "C:\projedeneme\gui.py", line 119, in eventFilter
image =

File "C:\Python312\Lib\site-packages\PIL\ImageQt.py", line 86, in fromqpixmap
return fromqimage(im)

File "C:\Python312\Lib\site-packages\PIL\ImageQt.py", line 75, in fromqimage
im.save(buffer, "ppm")
TypeError: arguments did not match any overloaded call:
save(self, fileName: Optional[str], format: Optional[str] = None, quality: int = -1): argument 1 has unexpected type 'PySide6.QtCore.QBuffer'
save(self, device: Optional[QIODevice], format: Optional[str] = None, quality: int = -1): argument 1 has unexpected type 'PySide6.QtCore.QBuffer'

I am getting the error please help

serkankaragoz