Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
90 user(s) are online (52 user(s) are browsing Forums)

Members: 1
Guests: 89

livebyfaith74, more...

Headlines

 
  Register To Post  

Optical caracter recognition: gocr to be used with sgrab output.
Just can't stay away
Just can't stay away


See User information
Has anybody experience with gocr ? it needs gzip bzip22 & netpbm and system should support popen(3) (??) to be able to use eg jpg files that sgrab can produce.
gzip seems only available in 68 k version, a "similar" one, named dact is availmable in OS4depot. Can it be used?

Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Amigans Defender
Amigans Defender


See User information
You mean this?

It's rubbish, but it works.
(I suspect newer versions are better though)

Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Just can't stay away
Just can't stay away


See User information
I downloaded it from OS4Depot, but it is the same version (0.46)


Anything better as OCR for the Amiga ?

Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Just can't stay away
Just can't stay away


See User information
@JosDuchIt

I just compiled gocr 0.50 which is the currently latest version. You could try it if it works better for you:

https://dl.dropbox.com/u/26599983/gocr-0.50.7z

Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Just can't stay away
Just can't stay away


See User information
@salass00 thanks
@chris can you tell me how you installed it (see questions in 1st mail) ( and maybe test the new compile?)

Where oe all thes files of gzip bzip2 netpbm files go?
can i mix up th 68k gzip files with the rest?
Can dact (OS4 replacement?) be used instead of gzip 68k

.



Edited by JosDuchIt on 2013/3/12 14:53:49
Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Amigans Defender
Amigans Defender


See User information
@JosDuchIt

I'm afraid it's so long ago I can't remember. If it's just calling the command line versions (which it sounds like from your description), then simply putting them in the path should do the trick.

NetPBM is quite big so I'd advise chucking it on its own somewhere, and putting "path work:netpbm add" into user-startup.

Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Just can't stay away
Just can't stay away


See User information
@Chris
I tested the new compile with 2 "excellent" .pbm files indicated on the gocr website

I got crashes in both cases. (it might well be that it crashes on the previous compile , i did not test this)

5.Datas:Graphics/gocr> gocr -i font1.pbm -o ram:tks2
file downloaded from
http://jocr.sourceforge.net/tmp/examples/clean/font1.pbm.gz



5.Datas:Graphics/gocr> gocr -i font2.pbm -o ram:tks2
file downloaded from
http://jocr.sourceforge.net/tmp/examples/clean/font2.pbm.gz

Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Not too shy to talk
Not too shy to talk


See User information
If you haven't tried to increase the stack, do it
try with a very big one f.e. 1000000

Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Just can't stay away
Just can't stay away


See User information
@pvanni
Thanks that helped

Ihave now been trying with .jpg files(text grabbed with SGrab) and get this

Quote:

8.Datas:Graphics/gocr> gocr -i Snoopy.jpg -o Snoopy.txt

read-PNM-error: file number is 3, position -1
read-PNM-error: bad magic bytes, expect 0x50 0x3[1-6] but got 0x64 0x6a8.


The textfile Snoopy.txt is empty, and i don't see anything created in the /db folder.
I was at least expecting something there generated from the successful OCR read of the .pbm files.


Snoopy does not give me FAIL's that i can link to a bad installation.

BTW Bzip2 and gzip were present in the OS4 SDK and the netpbm/bin is in the path too.



Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Home away from home
Home away from home


See User information

Quote:

NetPBM is quite big so I'd advise chucking it on its own somewhere, and putting "path work:netpbm add" into user-startup.




path work:netpbm/bin/ add

Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Home away from home
Home away from home


See User information
Quote:


The textfile Snoopy.txt is empty, and i don't see anything created in the /db folder.
I was at least expecting something there generated from the successful OCR read of the .pbm files.


Snoopy does not give me FAIL's that i can link to a bad installation.

BTW Bzip2 and gzip were present in the OS4 SDK and the netpbm/bin is in the path too.


You need to convert the jpgs to PNM first. That's what you need netpbm for.

gocr doesn't do this for you.

[edit]
On scanning the docs it appears that gocr needs pnmtools not netpbm. If you only have netpbm you will need to do the conversion to pnm yourself.
[/edit]


Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Just can't stay away
Just can't stay away


See User information
@broadblues Thanks

I did find pnmtools.c here:
http://src.gnu-darwin.org/ports/print ... k/pnm2ppa-1.12/pnmtools.c
and pnmtools.h here:
http://pnm2ppa.sourcearchive.com/docu ... 5/pnmtools_8h-source.html

pnmtools.c has no main though. Maybe it should be compiled with gocr??

Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Just can't stay away
Just can't stay away


See User information
I just grabbed a text window with SGrab, converted the ilbm image to a ppm with dttoppm and used gocr to convert it to text. It works but has some errors in the converted text. Is there any way to train gocr for new fonts?

Wasn't gocr the evil Babylonian god in Ghostbusters?

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Just can't stay away
Just can't stay away


See User information
@xenic
I did use jpgtopnm for converting jpg filesand got lots of errors.

from http://sourceforge.net/projects/jocr/ ... forum/22204/topic/1280843

i then used.
gocr -p ./db/ -m 130 Haldmn50.pnm


You get the possibility to correct errors, but till now i did not succeed in saving them tot db/db.lst

I allways get an errror message (just before the big first characters to correc:

DB /db/db.lst not found
it is quite interesting to be able to do ocr in scripts (eg after having graabbed a number of textparts from a document image), so i hope to find out how to do it properly.

Some basic info here too
http://sid.ethz.ch/debian/gocr/gocr-0.45/doc/gocr.htm

lQuote:
I just grabbed a text window with SGrab, converted the ilbm image to a ppm with dttoppm and used gocr to convert it to text. It works but has some errors in the converted text. Is there any way to train gocr for new fonts?

I did not find dttoppm, i guess it should be ilbmtoppm
The results are not better though using an ilbm output for SGrab.



Edited by JosDuchIt on 2013/3/15 7:49:51
Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Just can't stay away
Just can't stay away


See User information
@JosDuchIt

I got dttoppm from Os4Depot. It will convert ILBM. It's probably better to save (or scan) the text image to a lossless image format like ILBM or PNG. JPEG doesn't preserve a 100% accurate image.

You might use Snoopy to see where gocr is looking for /db/db.lst.

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: Optical caracter recognition: gocr to be used with sgrab output.
Just can't stay away
Just can't stay away


See User information
@xenic
Quote:
I got dttoppm from Os4Depot. It will convert ILBM. It's probably better to save (or scan) the text image to a lossless image format like ILBM or PNG. JPEG doesn't preserve a 100% accurate image.


Yes i came to that conclusion too, but i did find a conversion program from ilbm to pnm in netpbm/bin so i used that

SOLVED the problem stupid confusion about paths used in the command line



Edited by JosDuchIt on 2013/3/16 11:07:31
Edited by JosDuchIt on 2013/3/16 11:09:02
Edited by JosDuchIt on 2013/3/16 11:18:49
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project