Questions tagged [leptonica]

Leptonica is open source software used for image processing and analysis.

148 questions
14
votes
3 answers

OCR: Image to text?

Before mark as copy or repeat question, please read the whole question first. I am able to do at pressent is as below: To get image and crop the desired part for OCR. Process the image using tesseract and leptonica. When the applied document is…
The iOSDev
  • 5,237
  • 7
  • 41
  • 78
13
votes
3 answers

Android (ART) crash with error JNI DETECTED ERROR IN APPLICATION: jarray is an invalid stack indirect reference table or invalid reference

I am writing an Android application that processes a picture from the native C (NDK r10d). The code was working well until recent ART introduction that is more strict with JNI. So the code is working fine with Dalvik (e.g. on pre-Lolipop devices)…
Stef
  • 308
  • 1
  • 3
  • 9
10
votes
4 answers

Unable to load library 'tesseract': libtesseract.so: cannot open shared object file: No such file or directory

I've had tesseract and Tess4J running on my MBP for a while now. Today I started to migrate my app to the server and started installing everything on the server. Prior to running Tess4J in tomcat I tried to run a simple java program to make sure…
Omnipresent
  • 29,434
  • 47
  • 142
  • 186
7
votes
0 answers

python-tesseract giving different results than the command line tesseract

I'm using python-tesseract wrapper to OCR an image. However, for certain images I'm getting different results than what the tesseract command from command line fetches. On command line I do tesseract myimg.png myimg && more myimg.txt However, the…
birdy
  • 9,286
  • 24
  • 107
  • 171
6
votes
2 answers

Error When installing Tesseract 3.05 in Centos7 "error: Leptonica 1.74 or higher is required. Try to install libleptonica-dev package"

We had initially installed tesseract 3.04 in centos 7, and know switching to tesseract 3.05. We have un-installed the older versions and have already installed leptonica-1.75.3 downloaded from leptonica home site. But, when we go for installing…
Tom Antony
  • 79
  • 2
  • 9
5
votes
1 answer

Leptonica conflicts with Xcode framework

I'm trying to build an OSX OCR C++ application using openFrameworks (0.9.0) with Xcode 7 . The OCR library is Tesseract which requires Leptonica, and I've installed these two through Homebrew. Tesseract is compiled and linked as an static library…
Xinlei
  • 51
  • 4
5
votes
0 answers

How to tweak Tesseract project to link statically to Leptonica

I'm currently attempting to make an existing project to link statically to its main dependency in order to reduce size of the resulting output library. The project I'm trying to change is Tesseract OCR that depends on Leptonica image processing…
Max Pole
  • 299
  • 2
  • 12
5
votes
5 answers

Missing allheaders.h in Android Studio Project

I am following the tutorial from this tesseract tutorial and had everything go smoothly up until my actual running of the Java code. When I try new TessBaseApi(); It throws the following error Error Code: 2 Output: In file included from…
Michael
  • 53
  • 1
  • 3
5
votes
3 answers

C++: Hbitmap/BITMAP into .bmp file

Ok, whole story is, I am trying to use Leptonica+Tesseract OCR in C++ to take a screenshot, save it to a *.bmp file, then load it back up to OCR with it. I won't need to do this frequently, but as I cannot seem to copy the screenshot data directly…
user3285714
  • 75
  • 1
  • 1
  • 5
4
votes
3 answers

Convert between OpenCV Mat and Leptonica Pix

I need to convert between OpenCV Mat image and Leptonica Pix image formats in C++. This is being used for binarization of 8bit gray images.
loot
  • 150
  • 1
  • 9
4
votes
2 answers

Tesseract runtime error: Error in pixReadMemPng: function not present

I built Tesseract 3.04.01 on Cygwin. It can recognize .bmp files, but it fails on .png files: $ tesseract.exe testing/phototest.png output Tesseract Open Source OCR Engine v3.04.01 with Leptonica Error in pixReadMemPng: function not present Error in…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
4
votes
3 answers

How to determine if an image needs to be rotated

I am trying to find a way to determine whether an image needs to be rotated in order for the text to be horizontally aligned. And if it does need to be rotated then by how many degrees? I am sending the images to tesseract and for tesseract to be…
Adam
  • 109
  • 1
  • 6
4
votes
1 answer

How to convert Leptonica Pix Object to Android's Bitmap

I have a Leptonica Pix object returned by TessBaseApi.getThresholdedImage(); now, how can I convert it to bitmap so that I can show it through the ImageView. leptonica.android.Pix to android.graphics.Bitmap; I didn't find conversion methods looking…
Aavaas
  • 787
  • 1
  • 7
  • 16
4
votes
1 answer

How to convert a bitmap to PIX in memory?

Tesseract doesn't appear to work well with a bitmap, works on some inputs but screws up others. While at the same time performs fine on inputs that are identical to previous but in leptonica's format PIX. How can I convert a bitmap in memory to…
user2180519
4
votes
4 answers

Scan Business Card Tesseract and Leptonica iOS

I am trying to scan a business card using tesseract OCR, all I am doing is sending the image in with no preprocessing, heres the code I am using. Tesseract* tesseract = [[Tesseract alloc] initWithLanguage:@"eng+ita"]; tesseract.delegate =…
user3247146
1
2 3
9 10