4,437 questions
0
votes
1
answer
49
views
Using Tesseract OCR with Docling PyTessBasseAPI call fails, won't init
I am using docling and trying to get images with scanned text to parse with Tesseract OCR (could be any OCR, but tesseract is preferred if possible).
My code is:
pipeline_options = PdfPipelineOptions()...
-1
votes
2
answers
182
views
How to find printed document in image
Image contains single document printed in white paper. Background of image can be different.
Tried to get document using code from https://scanbot.io/techblog/document-edge-detection-with-opencv/ with ...
0
votes
2
answers
74
views
Pytesseract cannot always understand very simple and clear text (font Consolas)
Pytesseract cannot understand very simple and clear text. I've tried nearest neighbor, bilinear, gaussian blur, and everything else and cannot get tesseract to read the text consistently, the best I ...
1
vote
1
answer
78
views
Can't find how to create a XML ALTO with tesseract on R
I am struggling with tesseract package (5.3.2 version) for R, trying to have a XML ALTO as output of the ocr() function. I read the documentation which states that this has something to do with the ...
-1
votes
1
answer
142
views
How to remove non uniform background from image [closed]
Receipt clip contains structured background:
Tried to remove it using textcleaner ImageMagic wrapper script from Remove receipt image border using ImageMagick answer.
Used code from answer How to use ...
2
votes
1
answer
210
views
Tesseract OCR cannot read dotted LED digits on MAUI/Xamarin
I am trying to extract numbers from dotted LED-style digits (0–9) using Tesseract OCR in a MAUI/Xamarin app on Android and iOS, fully offline. My boss wants a local solution that works on mobile ...
2
votes
3
answers
162
views
How to rewrite python code using Pyscript
My code works as python file but I am struggling to make it work using pyscript.I am sharing the code which I tried.
main.py
import pytesseract
pytesseract.pytesseract.tesseract_cmd = r"Tesseract-...
1
vote
0
answers
184
views
How to set Tesseract PSM in Docling (Python)
I’m using Docling to OCR scanned PDFs. I want to control Tesseract’s page-segmentation mode (PSM), e.g. --psm 6.
Docling exposes both TesseractOcrOptions and TesseractCliOcrOptions, but neither ...
2
votes
1
answer
70
views
Tesseract unable to recognise the letter O in plain image
I'm attempting to perform OCR on a set of single letters inside an image using Python. I'm new to this so apologies if I get the terminology wrong, but I've filtered and have obtained (I think) quite ...
0
votes
1
answer
154
views
How to install leptonica 1.85 in Debian 12
Tried to use https://github.com/Sicos1977/TesseractOCR Nuget package in Debian 12. It looks that it requires new version of leptonica libleptonica-1.85.0.dll.so which is not avaliable in Debian:
#apt ...
0
votes
1
answer
78
views
Unable to OCR Type3 Font after image preprocessing, training Tesseract
I am trying to OCR a specific area of a PDF page in a multi-page document (total page count varies between 600-10,000 pages). I initially receive the data as .pcl files in batches of 500 records, ...
1
vote
1
answer
83
views
When I Try To Train a Tesseract Model I get a Compute CTC targets failed error
I am currently using tesseract 5.0 and am training a model. I have generated the png, box and the ground truth files for a thousand images. However, when I run the command:
make training MODEL_NAME=...
0
votes
0
answers
82
views
Lstmtraining Tesseract-OCR
I followed the steps for fine-tuning Tesseract for handwriting recognition. I have the character images and the corresponding box files. Then I generated the .lstmf files, followed by the lstm_train....
0
votes
0
answers
35
views
How to select a WiFi network during Android device setup using automation? Automate WiFi selection screen during Android OOBE with Robot Framework
I’m trying to automate the process of selecting a WiFi network by its name during the initial setup of an Android device — the setup flow that includes selecting language, region, and connecting to ...
0
votes
1
answer
167
views
How to get good OCR results using pytesseract
I'm trying to get the data out of this image:
and no matter what I try I can't get a good result.
I have tried ImageEnhance and cv2
I got the most promising result using cv2 and adaptive Treshold:
...
1
vote
1
answer
330
views
Unable to build a Docker with OpenCV and Tesseract for a .NET 8.0 app
I've been building a Dockerfile which has to build my ASP.NET Core Web API and requires some libraries to work, such as OpenCV and Tesseract. My Dockerfile builds containers and images properly, but ...
1
vote
1
answer
81
views
Tesseract doesn't find page numbers
I have a PDF document that I want to scan with pytesseract, but the page numbers are not recognized. The page number is not recognized on any of the pages. The PDF is written with Latex. I ried ...
0
votes
1
answer
125
views
Remove noise and lines from the CAPTCHA image
I need support to treat a captcha image, I made an algorithm for testing to treat some images that come from a website's captcha and for some types I was able to treat and use tesseract to extract the ...
0
votes
2
answers
237
views
tesseract.js - draw bounding box
I am using Tesseract.js using a realtime video stream. I want to draw a box around the words that have been recognised. I found the below code but perhaps it's old so I can't get the bbox nor data....
2
votes
0
answers
87
views
Tesseract OCR fails to recognize the number “11” when using numeric‐only mode
I’m building a C# application that reads single numbers (1–13) from clean, binary‐style images using Tesseract OCR. Everything works perfectly except the number 11, which Tesseract consistently ...
0
votes
1
answer
62
views
Prevent tesseract guessing characters based on surrounding context instead of just the character outline
I'm using pytesseract to read tabular data out of an image but I'm having trouble with the software making "educated guesses" about characters and word splitting based on context.
I have a ...
0
votes
0
answers
62
views
lstm-unicharset file is unable to be created during tesseract training
I am trying to fine-tune an Optical Character Recognition (OCR) model on Tesseract's provided tesstrain repository for Japanese . I tried encoding the bash commands into Python in VSCode as I wanted ...
0
votes
0
answers
65
views
setLanguage not working in TesseractOCRParser for Apache Tika
I am trying to use the setLanguage method of TesseractOCRParser in Apache Tika in Java. When I pass any Indian language, such as Hindi, Marathi, Tamil, etc., it doesn't work and still displays data in ...
-2
votes
1
answer
152
views
How can I improve Tesseract OCR accuracy on rotated images in C++?
I am using Tesseract OCR (v5.5.0) in C++ to extract text from images, but I’m encountering issues when the images are rotated. Tesseract’s PSM_AUTO_OSD (PageSegMode::PSM_AUTO_OSD) works well for ...
2
votes
0
answers
111
views
Improving OCR detection using tesseract
I’m working on a project where I have to detect objects in a PDF document.
After detecting the objects, I need to read the text at this location since it will be used as the object's name.
Example:
I’...
1
vote
1
answer
120
views
How to prioritize French OCR over Arabic when using Tesseract (fra+ara) on bilingual documents?
I'm working on scanned documents (registers) that contain both French and Arabic text.
When I run Tesseract OCR with lang='fra', all the French text is extracted perfectly.
But when I use lang='ara+...
0
votes
0
answers
79
views
OCRMyPdf conversion issue specially in table format
I’m working with a scanned PDF that contains a table with two columns, where each column has two lines of text. When I convert the scanned PDF using OCRmyPDF, I'm encountering an issue with the ...
0
votes
0
answers
70
views
Tesseract HOCR to a structured text for LLMs
I want to use the HOCR that I get from TesseractJS (I work on Javascript) and somehow transform it to be readable by a LLM.
The goal is to reade technical documents with prices, tabs, header, lines, ...
0
votes
0
answers
147
views
Tesseract OCR Command in ocrmypdf Fails with 'SubprocessOutputError' on Windows
ExitCodeException _common.py:271
Traceback (most recent call last):
File "C:\<USER>\apps\python\...
0
votes
0
answers
28
views
How to prevent Tesseract OCR from re-ordering the sentence in RTL context?
I have a large collection of structured text, in Hebrew & English, mixed in every sentence.
Tesseract is re-ordering the words in these sentence, without success.
How can I tell Tesseract just to ...
1
vote
1
answer
159
views
Tesseract Training: Error 'Integer (fast) model' When Using Apex.lstm
I’ve been following this tutorial from YouTube:
Guide to Tesseract Training
https://www.youtube.com/watch?v=KE4xEzFGSU8&t=13s
and its corresponding GitHub repository: astutejoe/tesseract_tutorial.
...
-1
votes
1
answer
68
views
I'm having trouble trying to convert image to text in python
I'm trying to convert the attached image using the pytesseract and opencv libraries in python, but the conversion is not satisfactory, since many characters are converted incorrectly. Does anyone have ...
-1
votes
1
answer
58
views
Pytesseract not recognize text from image in Python
I am working with a Django application, there for some purpose i need to solve captcha i am already saving temporary captcha file but when i try to read captcha using pytesseract it return nothing ...
0
votes
2
answers
94
views
python cv2 replace color with white
I try to replace the turquoise part (words) from the image with white background to have a clear source for tesseract-ocr.
The picture is loaded ok, image mask is created ok.
My question is how to ...
0
votes
0
answers
62
views
Tesseract Training Issue: "Couldn't find a matching blob"
I'm having trouble training Tesseract with my custom dataset.
Despite double-checking that my box file coordinates are correct and setting the image resolution to 300 DPI, I keep getting the error &...
0
votes
0
answers
67
views
Having trouble getting OSD in Flutter app using flutter_tesseract_ocr package
I'm also new to flutter and tesseract so might be a problem with my understanding.
I am wanting to make an app that takes an image from my gallery and can read the text from them.
I'm using Google ML ...
0
votes
0
answers
67
views
Tesseract, OCR and text based layout
I'm trying to build a small application (C#) that can OCR process some images, extracting the raw text with layout roughly intact (using tabs, spaces or whatever, to position the text in the output ...
1
vote
1
answer
154
views
FastAPI using tesseract-ocr works fine in localhost Mac but not in DigitalOcean Linux server
I am trying to run a PoC for extracting text from an image file using tesseract-ocr in a FastAPI python code file installed in a DigitalOcean FARM Linux droplet and I get an error, while running the ...
0
votes
1
answer
246
views
OCRmyPDF - Wired error message from tesseract
I get a strange error message when running a OCRmyPDF command
My setup:
macOS Sequoia 15.2
OCRmyPDF 16.8.0 (installed by Brew)
tesseract 5.5.0 (installed by Brew)
Command: ocrmypdf -l deu+fra+eng --...
0
votes
1
answer
104
views
Python to Automate mini game. Tesseract unable to find single character
I'm still new to Python, and I've been using ChatGBT as my tutor, I'm trying to automate a mini game, it needs to read the single character (letter or number) on my screen, and then when the timing is ...
2
votes
0
answers
69
views
Bytedeco Tesseract API not working inside Docker
import org.bytedeco.tesseract.TessBaseAPI;
public class TesseractInitExample {
public static void main(String[] args) {
// Create a new Tesseract API instance
TessBaseAPI api = ...
1
vote
0
answers
66
views
When using Tess4j to read a pdf image, only the first heading line is returned as a string result the rest of the image is ignored
I am using Java - Tess4j-5.13.0.jar to read a pdf containing a table like image.
Its the first time using Tess4j/tesseract.
Tess4j is located here : https://github.com/nguyenq/tess4j
The pdf I am ...
0
votes
0
answers
43
views
tessbridge.cpp:5:10: fatal error: leptonica/allheaders.h: No such file or directory #include <leptonica/allheaders.h> [duplicate]
I'm building a Fiber Go application that uses the gosseract package for OCR. While Tesseract works perfectly from the command line, the application fails to compile with the following error:
github....
0
votes
0
answers
171
views
Karuta discord bot card text detection
There’s a bot on Discord called Karuta that generates an image with 3 or 4 cards. I’m trying to extract all the information from these cards. I’ve made significant progress, but sometimes the results ...
0
votes
1
answer
40
views
Pytesseract numbers image to text
I am trying to use pytesseract to extract numbers from images.
It works for some of them (1, 2, 3, 5, 6, 20...) but I would like to make it work for all of them.
Here is a sample of the data that I'm ...
0
votes
0
answers
72
views
PyTesseract and 7 segment numbers, how to get confidence of recognition?
I need to recognize digits on 7 seg clocks(see picture below), so I use following python code:
def detect_date(image: cv2.UMat, bbox:list) -> datetime:
gry1 = cv2.cvtColor(image, ...
0
votes
0
answers
51
views
Extracting data from a table with known labels with tesseract
I am trying to use Tesseract to create a small Windows application that allows the user to:
Take a screenshot of the monitor and cut a smaller portion containing a table (the table always has the ...
0
votes
0
answers
56
views
How can I ignore text with Tesseract if all characters are not in whitelist?
I'm using Tesseract both on my Windows 10 machine and in the Docker container based on the alpine:3.21 image.
Windows tesseract --version is
tesseract v5.5.0.20241111
leptonica-1.85.0
libgif 5.2.2 :...
0
votes
0
answers
442
views
How to make OCR function work with Naps2 SDK?
I'm trying to write a simple application in C# that uses Naps2.sdk to scan text documents and save a searchable PDF using the OCR feature. However, the output is a PDF with non-selectable text. I'm ...
0
votes
1
answer
107
views
FSCrawler not continuing job
I'm using FSCrawler 2.10 to crawl trough hundreds of PDF files, and with Tessarect OCR extract text from scanned documents/images.
It works, successfully configured everything, however the folder I am ...