Leptonica is open source software used for image processing and analysis.
Questions tagged [leptonica]
148 questions
0
votes
1 answer
How to pass a list of TIFF files to TessAPI1.TessBaseAPIProcessPages
I am using the Tesseract Java API (tess4J) to convert TIFF files to readable PDFs.
When I have a single source TIFF file, the results have been quite pleasing:
TessResultRenderer renderer =…

Jon H
- 394
- 3
- 17
0
votes
0 answers
How to solve Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) using OCR?
I am stuck with following error:
--> Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)
In this particular line of code:
--> outText = string(ocr->GetUTF8Text());
Here is the complete code:
// OCR Process Begins
string outText;
string imPath =…
user11297709
0
votes
0 answers
How to perform dilation with Leptonica
I am trying to use leptonica API as an OCR pre-processing step for Tesseract. I would like to perform a simple dilation but I don't understand how the structuring element part works in Leptonica. I have found different references on Leptonica but…

Nick Skywalker
- 1,027
- 2
- 10
- 26
0
votes
1 answer
JavaCPP Leptonica : How to clear memory of pixClone handles
Until now, I've always used pixDestroy to clean up PIX objects in my JavaCPP/Leptonica application. However, I recently noticed a weird memory leak issue that I tracked down to a Leptonica function internally returning a pixClone result. I managed…

SND
- 1,552
- 2
- 16
- 29
0
votes
1 answer
Installing OCRmyPDF on Windows Server 2016 - Can't find liblept.dll. Is editing Path safe?
I'm trying to import ocrmypdf on my company's client's Windows Server 2016 Build 14393 computer using Python 37-32. When I import the library, in a Jupyter Notebook, it is unable to locate leptonica by using ctypes.utility.find_library().
Ocrmypdf…

Spencer
- 5
- 3
0
votes
3 answers
Warning: Invalid resolution 0 dpi. Using 70 instead
I know this theme already exists, but I didn't find any solution for this.
I am trying to detect characters from picture in this code below:
#include
#include
#include
#include…

Jovan Slavujević
- 31
- 2
- 5
0
votes
0 answers
Convert a Bitmap to PIX
im making an application that takes a screenshot of the monitor and then reads it with tesseract.
To get better performance id like to avoid saving the screenshot before sending it to tesseract.
I found some example and other related post and came…

PappayaPokPok
- 9
- 2
0
votes
2 answers
Kotlin-native C-interop with leptonica issue
I'm trying to use leptonica library from Kotlin-native.
I've managed to create the klib and basic code is working.
My problem is :
I load an image with pixRead() --> OK,
Use the image --> OK,
I'm unable to call pixDestroy() on that image -->…

Xvolks
- 2,065
- 1
- 21
- 32
0
votes
0 answers
When I make check of leptonica, I got FAIL message
I want to use leptonica. So I download and make and make check.
But when I use command make check, there is one FAIL.
How to solve it? I searched the similar problem in stackoverflow but I couldn't…

Paul Go
- 69
- 1
- 1
- 8
0
votes
2 answers
TypeError: initializer for ctype 'unsigned int *' must be a cdata pointer, not bytes
I try to convert PIL image to leptonica PIX. Here is my code python 3.6:
import os, cffi
from PIL import Image
# initialize leptonica
ffi = cffi.FFI()
ffi.cdef("""
typedef int l_int32;
typedef unsigned int l_uint32;
struct …

ZdPo Ster
- 300
- 5
- 12
0
votes
1 answer
Ghostscript does not write resolution in header of pgm files
I like to convert many pdf to pgm picture files to prepare them for OCR with tesseract. This is the command I use:
gs -dQUIET -dINTERPOLATE -dSAFER -dBATCH -dNOPAUSE -dPDFSETTINGS=/ebook -dNumRenderingThreads=4 -sDEVICE=pgmraw -r300…

Til Hund
- 1,543
- 5
- 21
- 37
0
votes
1 answer
Using OpenCV Mat for reading text using tesseract (Java)
I need to read text using tesseract, for my processed image which is done using OpenCV. I have already tried the methods mentioned in the following link, but to no avail:
Method 1
Converting using MatOfBytes SO Link
public static PIX…

Abhishek Keshri
- 3,074
- 14
- 31
0
votes
0 answers
Jupyter Notebook object has no attribute
I'm getting an error to convert images into text when I'm working on Jupyter notebook using ubuntu. but when I'm working with windows I'm successfully retrieving text from Images. Please see on Image click here to see image

CVK
- 53
- 1
- 1
- 10
0
votes
1 answer
Tesseract/Leptonica proper way to handle single and multipage images?
I got a few questions about how input images are handled in Tesseract (with leptonica).
What I'm trying to do here is to have a method that can process any image file (no specific format requiered) and feed it later to the tesseract API, but this…

Toby
- 13
- 3
0
votes
2 answers
Tesseract Open Source OCR Engine v3.05.00dev with Leptonica Warning in pixReadMemPng
I am trying to convert PNG image file to text using pytesseract. It is giving me the below error.
TesseractError: (1, 'Tesseract Open Source OCR Engine v3.05.00dev with Leptonica Warning in pixReadMemPng: work-around: writing to a temp file
libpng…

Aswathi Mohankumar Nambiar
- 457
- 7
- 18