A WIP experiment in making a small, portable OCR output visualizer.
![]() |
![]() |
|---|---|
Tesseract's eurotext.png |
A sha256sum wrapper |
So far:
- Love2D >= 12.0
- This is a prerelease version
- See build info
- Tesseract for OCR
You can load arbitrary images if you have ImageMagick's magick command installed.
On Mac, homebrew should work. On Linux, your package manager should handle installing. For windows or more details, please see the ImageMagick download page.
- Lua-based applications:
- are easier to ship
- start and run faster than Python-based1 ones
- Refresh myself on Lua
- See how Love2D has progressed
Goals include:
- Word-level Tesseract-style TSV output
- Minimal color mapping
- System filepicker to choose files
- Optional extended format support beyond default Love2D formats
- Requires ImageMagick to be accessible via subprocess calls
- Permits loading
.webp,.avif,.tiff, and other formats (depends on your ImageMagick)
- Character-level Tesseract mapping from the word-level (WIP)
- Minimal UI:
- Mouse-based gestures
- Hot keys
XML-based ALTO may also happen, but it's not a priority given this is a port of an existing tool.
TL;DR: Install Love2D + Tesseract before ./run.sh
Important
VS Code can cause Love2D to launch with no window decorations! See VS Code Workaround for a fix.
Love2D's upcoming 12.0 release offers performance and API improvements even as an unfinished work in progress.
This means you currently have to build it from source to use this project. On Debian, you can use sudo ./get_deps.sh to get known build dependencies.
On other operating systems or Linux distros, you may need to consult the following:
- The Love2D dependencies list
- The relevant documentation for your package manager
- The Love2D compilation instructions
On sufficiently Debian-like Linux, sudo ./get_deps.sh force may work. However, it's best to double check.
Once you've compiled, find the build/ folder in the cloned Love2D repo. Then do one of the following to add the new Love2D 12.0 to your PATH as love12.0
- copy the file to install it
- link it into a
~/binfolder - alias it in your
.bashrc
Note
You can also skip ./run.sh and use your own build/runner script.
The ./run.sh script auto-packages a .love file from
the source folder.
$ ./run.shAll arguments after are passed through directly.
On some Linux systems running Wayland, VS Code can cause Love2D to launch with no Window decorations.
Console output will include the following:
libdecor-gtk-WARNING: Failed to initialize GTK
Failed to load plugin 'libdecor-gtk.so': failed to init
No plugins found, falling back on no decorations
As a workaround, you can launch VS Code with the following flags:
code --enable-features=UseOzonePlatform --ozone-platform=waylandYou'll want to use the AppImage for Love2D 12.0 once it releases, especially on Debian.
This will ensure you avoid creating a FrankenDebian.
Footnotes
-
Both CPython and Pillow can be fairly slow. ↩

