Questions tagged [leptonica]

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

148 questions
2
votes
1 answer

Different Tesseract result for Mat and Pix

Goal Getting the same quality result when using OpenCV Mat as when using Leptonica Pix when doing OCR with Tesseract. Environment C++17, OpenCV 3.4.1, Tesseract 3.05.01, Leptonica 1.74.4, Visual Studio Community 2017, Windows 10 Pro…
Björn Larsson
  • 317
  • 1
  • 5
  • 19
2
votes
2 answers

improve the OCR quality of low quality scanned image

After automatic deskew and crop I have the following image: I need to OCR this image. Right now ABBYY Engine SDK 11 For Linux produces not very well result: IMerasers - www,raiyirnieti'^C9,co;i,ni …
alexanoid
  • 24,051
  • 54
  • 210
  • 410
2
votes
1 answer

How to efficiently convert an Android Bitmap to a Leptonica Pix?

I'm trying to convert a Bitmap to a Pix. However, manually reading every pixel from the Bitmap and setting it in the Pix is too slow. Pix pix = new Pix(width, height, depth); for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { …
2
votes
1 answer

unexpected token `LEPTONICA,' PKG_CHECK_MODULES(LEPTONICA

I'm using the JavaCPP Presets project to build Leptonica and Tesseract. I have managed to build Leptonica 1.7 using the following commands: cd leptonica ./cppbuild.sh install leptonica cd cppbuild/linux-x86_64/leptonica-1.72/ ./configure make &&…
Sergio Sánchez Sánchez
  • 1,694
  • 3
  • 28
  • 48
2
votes
0 answers

Reading barcode by using ZXing-cpp and Leptonica

I'm interested in reading barcode by using ZXing-cpp and Leptonica libraries. And I see in Github (https://github.com/creatale/node-dv) having a project regarding to this topic. I've read source code and seen in zxing.cc…
PhucHM
  • 41
  • 3
2
votes
0 answers

Leptonica cropping image on rotation

PIX* returnRotatedImage(PIX* image, float theta) { PIX* rotated = pixRotate(image, -theta, L_ROTATE_AREA_MAP, L_BRING_IN_BLACK, image->w, image->h); return rotated; } When I execute the above code on an image, the resulting image has the…
2
votes
1 answer

Trying to use C wrapper in Go?

I must be missing something but I'm trying to use the Leptonica C library in Go using a C wrapper that was made for that purpose: https://github.com/GeertJohan/go.leptonica/blob/master/leptonica.go But I don't understand... it allows me to import…
Alasdair
  • 13,348
  • 18
  • 82
  • 138
2
votes
1 answer

How to preprocess in EmguCV with Leptonica as done in Capture2Text

I am developing an OCR application in EmguCV. My target is to achieve the same results as done by Capture2Text. Capture2Text uses Tesseract engine for OCR and Leptonica library for Preprocessing. As we know EmguCV is using Tesseract engine for OCR…
Novice
  • 515
  • 7
  • 22
2
votes
4 answers

How to filter a texture from an image for OCR

I'm trying to do OCR to some forms that, however, have some texture as follows: This texture causes the OCR programs to ignore it tagging it as an image region. I considered using morphology. A closing operation with a star ends up as…
jdcaballerov
  • 1,452
  • 1
  • 12
  • 16
2
votes
1 answer

Get the Region of Interest(ROI) of an Image of a type Pix in Leptonica

I want to know what function shall I use to get the Region of Interest of an image of type Pix using Leptonica Image Processing Library. I already done this in OpenCV and I wanted a version of it in Leptonica. Thanks in Advance. OpenCV Code: Mat…
user2481398
2
votes
0 answers

Detection angle of tilt and rotation of images on Android

i create Android apps, that need skew angle detection. When image input in a slanting position after the image is processed using that functions, it will turn into a perpendicular position. So, i use Leptonica (tess-two library) to achieve that, i…
Papin Nasri
  • 51
  • 1
  • 7
2
votes
0 answers

Using leptonica with qt 5.2.0 (vs2012) issues

I'm trying to get the Leptonica 1.68 to work with Qt 5.2.0 (vs2012) static libraries. So i decided to try out the static libraries first, i downloaded the following package leptonica-1.68-win32-lib-include-dirs.zip And iclude it in my project like…
2
votes
1 answer

Qt and tesseract

I want to use the tesseract with qt 5 + mingw. I downloaded vc++ libs fir from here in my application i did: #include "tesseract/baseapi.h" ... tesseract::TessBaseAPI *OCRbase = new tesseract::TessBaseAPI(); if…
SirLanceloaaat
  • 213
  • 9
  • 18
2
votes
1 answer

How do I create a border around a rectangle in an image(PIX) in Leptonica?

I have an image in PIX format, and I have a BOX[with the necessary coordinates] too, I would like to draw a border around the content that's in the box, like for example - I've looked around in the documentation, but so far I've only found out how…
M. Ivanov
  • 283
  • 1
  • 2
  • 13
2
votes
1 answer

Is a library needed for Tesseract to detect PNG files?

I'm running Tesseract 2.04 to read a PNG file but I'm getting this error:- Tesseract Open Source OCR Engine name_to_image_type:Error:Unrecognized image type:png.png IMAGE::read_header:Error:Can't read this image type:png.png Tessedit:Error:Read of…
Sulaiman
  • 147
  • 4
  • 11
1 2
3
9 10