snakeotakon / BubbleOCR

Gimp plugins to extract text from images (Bubble/Balloons)
7 stars 1 forks source link
gimp gimp-plugin ocr ocr-recognition

Other GOOOD Translator

https://github.com/dmMaze/BallonsTranslator

(Abandoned) BubbleOCR 2.2

It allows you to translate any text of an image, specially designed for text bubbles/balloon

IMAGE ALT TEXT HERE

Features

With this plugin for Gimp, it is possible to perform optical character recognition (OCR) of images, and their translation(many language), it also allows you to edit all the text in various ways, as well as make corrections using word lists. It also offers spell checking through browsers or subtitle programs like Aegisub.

Requirements:

GIMP The Free & Open Source Image Editor

Gimp 2.10.x (Tested gimp-2.10.32)

https://www.gimp.org/

Note: Version Gimp 2.10.18 has a bug, when selecting the font from a script.

Tesseract Open Source OCR Engine

https://github.com/tesseract-ocr/tesseract


Download

Plugin-only Version:

https://github.com/snakeotakon/BubbleOCR/releases

Tesseract needs to be installed separately for it to work. Waifu2x and Deep-translator.exe are optional

Standard Version

This is the recommended version, so that the program can work normally.

170 MB https://drive.google.com/file/d/1QCi7Zrj2oX_2U8HfQFrzSnjq06OlQ534/view?usp=sharing

Extended Version (+2 engine OCR)

Standard version +

291 MB https://drive.google.com/file/d/19JlRub4PDXdiZZuCDkQwnI7BzSuM_WVO/view?usp=sharing

Full Version This version includes everything that previous versions have, along with Gimp version 2.10.32. It is recommended for users who do not have Gimp on their computers.

543 MB https://drive.google.com/file/d/1dVlqmJnWxREAdTP2zuIlThVJMuRfU_FS/view?usp=sharing


Installation plug-ins:

Manual Installation

Copy plug-ins to %Appdata%\GIMP\2.10\plug-ins\ or C:\Users\ YOURNAME \AppData\Roaming\GIMP\2.10\plug-ins

Download tesseract-ocr-w32 or tesseract-ocr-w64

https://github.com/UB-Mannheim/tesseract/wiki The installer will allow you to select all available languages for the OCR


Installation

Unzip the standard or extended version, and run the bat file Run Install.bat

Usage

Start Gimp and there will be a new menu: "LAYER/TOOLS/", and a new file will be created in plug-ins\Config_OCRBalloons.ini

Plugins

LAYER/TOOLS/BubbleGloom

Options

Fix OCR/Translation: Allows you to make corrections/substitutions using word lists in both OCR files and translations In the .INI configuration file, you can specify the files that will be used to perform all the corrections, it supports two types of files, those that are simple text (filetext) or those that use regular expressions (fileregex), all can be specified the files that require (filetext1,filetext2,filetext3...) in their respective section [REPLACE OCR ENGLISH] or [REPLACE TRANSLATION ENGLISH], for the language shown in "Language OCR/Balloon" and "Language for Translation" respectively.

Editor OCR & Translation:

Proyect Name:

Proyect Directory :

Reduce filter selection: Reduce in pixel la selections saved, useful borders add noise (0-3 recommended)

Detect Backcolor Ballons: Detect automatic color globe text, for default is white. useful globe text black or color

Reduce Filter border in pixels: Reduce Edge irregularities, useful to make the selection smoother, or to eliminate small selections. Test with values of 1-20.

Config_BubbleOCR.ini

Here you can configure the different options of the plugin, but mainly establish where the programs that are needed are located.

Using with many images

Import all the images of the project up to a maximum of 250 . Up to 100 images recommended. Go to the top layer, select with the magic wand the white area of the speech bubbles, the text gaps are eliminated when executing the script, or Select-Remove Holes. In some cases it will be necessary to separate the text balloons, this can be easily done by cutting them with a line using Toggle Quick Mask, which allows you to use tools such as a brush or pencil, to draw the selected. Tutorial Quick Mask IMAGE ALT TEXT HERE

Once you have the selected areas (multiple speech bubbles), this can be saved with Selection to Path or Selection to Path <-->. Which will remove the gaps, will move the active layer to the last one and select the top layer. Repeat the process, but now you can use the Ctrl-F key combination, which will repeat the last action (script), without a dialog box.

Tip

It is recommended to hide all other images/layers so Gimp doesn't slow down. The best way to hide layers in the current level is by pressing Shift plus the left mouse button.

http://ahmed.amayem.com/gimp-hide-all-layers-show-all-layers/

Exporting many images (Groups)

To export many grouped images, this other plugin is necessary

File - Export layers... (plugin)

https://github.com/khalim19/gimp-plugin-export-layers/releases https://khalim19.github.io/gimp-plugin-export-layers/sections/Installation.html

Usage

IMAGE ALT TEXT HERE

IMAGE ALT TEXT HERE

Tips

LINKS.

OCR Optical character recognition or optical character reader Tesseract: use 4.0 alpha, is legacy tessdata 3.0 (languages)

https://sourceforge.net/projects/capture2text/files/Dictionaries/

Tesseract LSTM (5.0): training Neural net based, is compatible NEW Tessdata

https://tesseract-ocr.github.io/tessdoc/Home.html

OCR Tesseract Version 5.0

https://github.com/UB-Mannheim/tesseract/wiki https://tesseract-ocr.github.io/tessdoc/Home.html

OCR Tesseract Version 4.0

https://tesseract-ocr.github.io/tessdoc/4.0-with-LSTM.html# 400-alpha-for-windows

Information Tessdata (data languages Training)

https://tesseract-ocr.github.io/tessdoc/Training-Tesseract.html

Capture2TEXT: variant Tesseract 4.0 compatible legacy tessdata

http://capture2text.sourceforge.net

Waifu2X (scale):improves word recognition in small images

http://waifu2x.udp.jp/index.es.html https://github.com/DeadSix27/waifu2x-converter-cpp https://github.com/nihui/waifu2x-ncnn-vulkan

Subtitle:

http://www.aegisub.org/ (compatible Avisynth) https://www.nikse.dk/subtitleedit/ (List words, spell check, translator)

Microsoft Visual C++ Redistributable latest Visual Studio 2015, 2017, 2019, and 2022

https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170