rhatlapa / pdfrecompressor

Automatically exported from code.google.com/p/pdfrecompressor
0 stars 0 forks source link

Segmentation fault #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
trying to encode a bundle of tif images (other types also tried, but no success)

jbig2 -s -p -v -useOcr -autoThresh *.tif

I get this error:

---------------------------------------------------------
recognizing letters using OCR
Please call SetImage before attempting recognition.Please call SetImage
before attempting recognition.Segmentation fault
--------------------------------------------------------

I built jbig2enc modified with gcc 4.1.2 + leptonica 1.67 + tesseract 3.0 
headers

I attach also a sample tif file

Original issue reported on code.google.com by dria...@gmail.com on 12 Oct 2011 at 11:57

Attachments:

GoogleCodeExporter commented 8 years ago
I am using gcc 4.4.5 + leptonica 1.67 + tesseract 3.01 and it works fine, so I 
suggest try to use tesseract version 3.01.

I am attaching also output of jbig2 as one file without option -p (not in 
format suitable for putting in PDF, but it works with this option as well).

You can decode it for example using jbig2dec -o decodedImage.png out.jb

Original comment by hata.ra...@gmail.com on 12 Oct 2011 at 7:53

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by hata.ra...@gmail.com on 12 Oct 2011 at 7:55

GoogleCodeExporter commented 8 years ago
thanks

I used this package

tesseract-3.00.tar.gz

downloaded from:

http://code.google.com/p/tesseract-ocr/downloads/detail?name=tesseract-3.00.tar.
gz&can=2&q=

I'll try with latest svn version (r 628, that I have just downloaded)

Original comment by dria...@gmail.com on 12 Oct 2011 at 8:39

GoogleCodeExporter commented 8 years ago
Great, just let know, if it helped or not.

Original comment by hata.ra...@gmail.com on 13 Oct 2011 at 10:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I tried to build again (r88 of jbig2enc modified)

using same environment (leptonica 1.67 + tesseract 3.0 headers)

but, this time, I compiled with gcc 4.2.2

and I successful built finally your jbig2enc

I made some tests with and without -useOcr switch

0368.tif
jbig2 -s -p -v -useOcr -autoThresh
source image: 3577 x 4396 (1 bits) 600dpi x 600dpi, refcount = 1
thresholded image: 3577 x 4396 (1 bits) 600dpi x 600dpi, refcount = 2
JBIG2 compression complete. pages:1 symbols:1699 log2:11

jbig2 -s -p -v 
source image: 3577 x 4396 (1 bits) 600dpi x 600dpi, refcount = 1
thresholded image: 3577 x 4396 (1 bits) 600dpi x 600dpi, refcount = 2
JBIG2 compression complete. pages:1 symbols:1705 log2:11
------------

0-109.png
jbig2 -s -p -v -useOcr -autoThresh
source image: 2778 x 3881 (32 bits) 300dpi x 300dpi, refcount = 1
thresholded image: 2778 x 3881 (1 bits) 300dpi x 300dpi, refcount = 1
JBIG2 compression complete. pages:1 symbols:2779 log2:12

jbig2 -s -p -v
source image: 2778 x 3881 (32 bits) 300dpi x 300dpi, refcount = 1
thresholded image: 2778 x 3881 (1 bits) 300dpi x 300dpi, refcount = 1
JBIG2 compression complete. pages:1 symbols:2781 log2:12

Original comment by dria...@gmail.com on 14 Oct 2011 at 11:35

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by hata.ra...@gmail.com on 14 Oct 2011 at 11:43

GoogleCodeExporter commented 8 years ago
that's great, don't forget, that now the integration with tesseract api 
is only in progress and right now there are only some outputs which 
doesn't modify the result. But I am currently working on it and I guess 
some beta version using tesseract should appear quite soon (probably 
during next month). But testing can take some time. If you have some 
idea for making some semi-automatic tests let me know.

Original comment by hata.ra...@gmail.com on 14 Oct 2011 at 11:46