Re: [orca-list] OCRdesktop 3.0 Released



Hello,
After updating to tesseract 5, I started getting an error while using ocrdesktop.
Here is a dirty fix
Open the file ocrdesktop and look for this content at line 440

int(OCRWords['conf'][i])]) # confidence

and change that to

int(float(OCRWords['conf'][i]))]) # confidence

The line is supposed to start with 18 space characters and followed by this text.
And here is a full traceback.

Traceback (most recent call last):
  File "/usr/bin/ocrdesktop", line 1592, in <module>
    Application.run()
  File "/usr/bin/ocrdesktop", line 994, in run
    self.showGUI()
  File "/usr/bin/ocrdesktop", line 807, in showGUI
    self._gui = self._createNavListDialog()
  File "/usr/bin/ocrdesktop", line 763, in _createNavListDialog
    self._refreshContent()
  File "/usr/bin/ocrdesktop", line 498, in _refreshContent
    self._ocrAllImages()
  File "/usr/bin/ocrdesktop", line 375, in _ocrAllImages
    self._processOCRWords(OCRWords, modifiedImg)
  File "/usr/bin/ocrdesktop", line 440, in _processOCRWords
    int(OCRWords['conf'][i])]) # confidence
ValueError: invalid literal for int() with base 10: '90.664742'

Greetings
Peter

Dňa 17. 1. 2022 o 23:42 Linux A11y napísal(a):

Howdy,
Will you add it into orca when this version with plugins availability will be ready? It would be great, when screenreader have ocr inside.
Of course. I can do that. But we furst have to bring some other stuff in place ;).By the way. I just merged master into plugin_system branch. So they are equal besides the plugin stuff.Cheers chrys
Am 17.01.2022 um 16:13 schrieb Arkadiusz Kozioł via orca-list <orca-list gnome org>:Will you add it into orca when this version with plugins availability will be ready? It would be great, when screenreader have ocr inside.W dniu 12.01.2022 o 22:12, chrys pisze:
Howdy List,sorry for cross posting, but I thought you might be interested into that.I just released OCRdesktop 3.0 with some very nice stuff :).For those who don't know about OCRdesktop:https://wiki.archlinux.org/title/Ocrdesktop1. i removed unmaintained "tesserwrap" bindings and use "pytesseract" now. This is very good maintained and is able to use Tesseract 4.1.x and Tesseract 5.0. Last didnt work with tesserwrap anymore cause by broken API.2. Removed all deprecation warnings, Modernize the code, use spaces instead of Tab and all kind of cleanup goodness.3. i added an very nice new feature to analyze the color of an given Text and its background. So you can figure what text is highlighted, has the focus and all kind of useful stuff. its off by default and could be used by "-O" flag as parameter. For this we need some new dependency webcolor and scipy.See the full story here:https://www.patreon.com/posts/ocr-desktop-60895292https://www.patreon.com/posts/color-analyzing-60988555Where to get:https://github.com/chrys87/ocrdesktop/releases/tag/v3.0Depencys:- python3- tesseract- tesseract-lang-<yourLanguageCode>- python3-pillow- python-atspi- python-pytesseract- libwnck3- GTK3Optional Depencys- python-scipy (for color detection)- python-webcolors (for color detection)I hope you have as much fun while using it as i had while working on it :).have a good day and stay healthy in those crazy times.cheers chrys_______________________________________________orca-list mailing listorca-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/orca-listOrca wiki: https://wiki.gnome.org/Projects/OrcaOrca documentation: https://help.gnome.org/users/orca/stable/GNOME Universal Access guide: https://help.gnome.org/users/gnome-help/stable/a11y.html
_______________________________________________orca-list mailing listorca-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/orca-listOrca wiki: https://wiki.gnome.org/Projects/OrcaOrca documentation: https://help.gnome.org/users/orca/stable/GNOME Universal Access guide: https://help.gnome.org/users/gnome-help/stable/a11y.html
_______________________________________________orca-list mailing listorca-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/orca-listOrca wiki: https://wiki.gnome.org/Projects/OrcaOrca documentation: https://help.gnome.org/users/orca/stable/GNOME Universal Access guide: https://help.gnome.org/users/gnome-help/stable/a11y.html

Attachment: OpenPGP_0x144312F3EB650A2D.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]