entangledstate-isbn 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. data/README +1 -1
  2. data/Rakefile +0 -18
  3. data/VERSION +1 -0
  4. data/isbn.gemspec +290 -7
  5. data/lib/isbn.rb +6 -6
  6. data/src/gocr-0.48/.cvsignore +6 -0
  7. data/src/gocr-0.48/AUTHORS +7 -0
  8. data/src/gocr-0.48/BUGS +55 -0
  9. data/src/gocr-0.48/CREDITS +17 -0
  10. data/src/gocr-0.48/HISTORY +243 -0
  11. data/src/gocr-0.48/INSTALL +83 -0
  12. data/src/gocr-0.48/Makefile +193 -0
  13. data/src/gocr-0.48/Makefile.in +193 -0
  14. data/src/gocr-0.48/README +165 -0
  15. data/src/gocr-0.48/READMEde.txt +80 -0
  16. data/src/gocr-0.48/REMARK.txt +18 -0
  17. data/src/gocr-0.48/REVIEW +538 -0
  18. data/src/gocr-0.48/TODO +65 -0
  19. data/src/gocr-0.48/bin/.cvsignore +2 -0
  20. data/src/gocr-0.48/bin/create_db +38 -0
  21. data/src/gocr-0.48/bin/gocr.tcl +527 -0
  22. data/src/gocr-0.48/bin/gocr_chk.sh +44 -0
  23. data/src/gocr-0.48/configure +4689 -0
  24. data/src/gocr-0.48/configure.in +71 -0
  25. data/src/gocr-0.48/doc/.#Makefile.1.6 +39 -0
  26. data/src/gocr-0.48/doc/.cvsignore +2 -0
  27. data/src/gocr-0.48/doc/Makefile +39 -0
  28. data/src/gocr-0.48/doc/Makefile.in +39 -0
  29. data/src/gocr-0.48/doc/example.dtd +53 -0
  30. data/src/gocr-0.48/doc/example.xml +21 -0
  31. data/src/gocr-0.48/doc/examples.txt +67 -0
  32. data/src/gocr-0.48/doc/gocr.html +578 -0
  33. data/src/gocr-0.48/doc/unicode.txt +57 -0
  34. data/src/gocr-0.48/examples/.#Makefile.1.22 +166 -0
  35. data/src/gocr-0.48/examples/4x6.png +0 -0
  36. data/src/gocr-0.48/examples/4x6.txt +2 -0
  37. data/src/gocr-0.48/examples/5x7.png +0 -0
  38. data/src/gocr-0.48/examples/5x7.png.txt +2 -0
  39. data/src/gocr-0.48/examples/5x8.png +0 -0
  40. data/src/gocr-0.48/examples/5x8.png.txt +2 -0
  41. data/src/gocr-0.48/examples/Makefile +166 -0
  42. data/src/gocr-0.48/examples/color.fig +20 -0
  43. data/src/gocr-0.48/examples/ex.fig +16 -0
  44. data/src/gocr-0.48/examples/font.tex +22 -0
  45. data/src/gocr-0.48/examples/font1.tex +46 -0
  46. data/src/gocr-0.48/examples/font2.fig +27 -0
  47. data/src/gocr-0.48/examples/font_nw.tex +24 -0
  48. data/src/gocr-0.48/examples/handwrt1.jpg +0 -0
  49. data/src/gocr-0.48/examples/handwrt1.txt +10 -0
  50. data/src/gocr-0.48/examples/inverse.fig +20 -0
  51. data/src/gocr-0.48/examples/matrix.jpg +0 -0
  52. data/src/gocr-0.48/examples/ocr-a-subset.png +0 -0
  53. data/src/gocr-0.48/examples/ocr-a-subset.png.txt +4 -0
  54. data/src/gocr-0.48/examples/ocr-a.png +0 -0
  55. data/src/gocr-0.48/examples/ocr-a.txt +6 -0
  56. data/src/gocr-0.48/examples/ocr-b.png +0 -0
  57. data/src/gocr-0.48/examples/ocr-b.png.txt +4 -0
  58. data/src/gocr-0.48/examples/polish.tex +28 -0
  59. data/src/gocr-0.48/examples/rotate45.fig +14 -0
  60. data/src/gocr-0.48/examples/score +36 -0
  61. data/src/gocr-0.48/examples/text.tex +28 -0
  62. data/src/gocr-0.48/gocr.spec +143 -0
  63. data/src/gocr-0.48/gpl.html +537 -0
  64. data/src/gocr-0.48/include/.cvsignore +2 -0
  65. data/src/gocr-0.48/include/config.h +36 -0
  66. data/src/gocr-0.48/include/config.h.in +36 -0
  67. data/src/gocr-0.48/include/version.h +2 -0
  68. data/src/gocr-0.48/install-sh +3 -0
  69. data/src/gocr-0.48/make.bat +57 -0
  70. data/src/gocr-0.48/man/.cvsignore +2 -0
  71. data/src/gocr-0.48/man/Makefile +29 -0
  72. data/src/gocr-0.48/man/Makefile.in +29 -0
  73. data/src/gocr-0.48/man/man1/gocr.1 +166 -0
  74. data/src/gocr-0.48/src/.cvsignore +4 -0
  75. data/src/gocr-0.48/src/Makefile +132 -0
  76. data/src/gocr-0.48/src/Makefile.in +132 -0
  77. data/src/gocr-0.48/src/amiga.h +31 -0
  78. data/src/gocr-0.48/src/barcode.c +846 -0
  79. data/src/gocr-0.48/src/barcode.c.orig +593 -0
  80. data/src/gocr-0.48/src/barcode.h +11 -0
  81. data/src/gocr-0.48/src/box.c +372 -0
  82. data/src/gocr-0.48/src/database.c +462 -0
  83. data/src/gocr-0.48/src/detect.c +943 -0
  84. data/src/gocr-0.48/src/gocr.c +373 -0
  85. data/src/gocr-0.48/src/gocr.h +288 -0
  86. data/src/gocr-0.48/src/jconv.c +168 -0
  87. data/src/gocr-0.48/src/job.c +84 -0
  88. data/src/gocr-0.48/src/lines.c +350 -0
  89. data/src/gocr-0.48/src/list.c +334 -0
  90. data/src/gocr-0.48/src/list.h +90 -0
  91. data/src/gocr-0.48/src/ocr0.c +6756 -0
  92. data/src/gocr-0.48/src/ocr0.h +63 -0
  93. data/src/gocr-0.48/src/ocr0n.c +1475 -0
  94. data/src/gocr-0.48/src/ocr1.c +85 -0
  95. data/src/gocr-0.48/src/ocr1.h +3 -0
  96. data/src/gocr-0.48/src/otsu.c +289 -0
  97. data/src/gocr-0.48/src/otsu.h +23 -0
  98. data/src/gocr-0.48/src/output.c +289 -0
  99. data/src/gocr-0.48/src/output.h +37 -0
  100. data/src/gocr-0.48/src/pcx.c +153 -0
  101. data/src/gocr-0.48/src/pcx.h +9 -0
  102. data/src/gocr-0.48/src/pgm2asc.c +2893 -0
  103. data/src/gocr-0.48/src/pgm2asc.h +105 -0
  104. data/src/gocr-0.48/src/pixel.c +537 -0
  105. data/src/gocr-0.48/src/pnm.c +533 -0
  106. data/src/gocr-0.48/src/pnm.h +35 -0
  107. data/src/gocr-0.48/src/progress.c +87 -0
  108. data/src/gocr-0.48/src/progress.h +42 -0
  109. data/src/gocr-0.48/src/remove.c +703 -0
  110. data/src/gocr-0.48/src/tga.c +87 -0
  111. data/src/gocr-0.48/src/tga.h +6 -0
  112. data/src/gocr-0.48/src/unicode.c +1314 -0
  113. data/src/gocr-0.48/src/unicode.h +1257 -0
  114. data/src/jpeg-7/Makefile.am +133 -0
  115. data/src/jpeg-7/Makefile.in +1089 -0
  116. data/src/jpeg-7/README +322 -0
  117. data/src/jpeg-7/aclocal.m4 +8990 -0
  118. data/src/jpeg-7/ansi2knr.1 +36 -0
  119. data/src/jpeg-7/ansi2knr.c +739 -0
  120. data/src/jpeg-7/cderror.h +132 -0
  121. data/src/jpeg-7/cdjpeg.c +181 -0
  122. data/src/jpeg-7/cdjpeg.h +187 -0
  123. data/src/jpeg-7/change.log +270 -0
  124. data/src/jpeg-7/cjpeg.1 +325 -0
  125. data/src/jpeg-7/cjpeg.c +616 -0
  126. data/src/jpeg-7/ckconfig.c +402 -0
  127. data/src/jpeg-7/coderules.txt +118 -0
  128. data/src/jpeg-7/config.guess +1561 -0
  129. data/src/jpeg-7/config.sub +1686 -0
  130. data/src/jpeg-7/configure +17139 -0
  131. data/src/jpeg-7/configure.ac +317 -0
  132. data/src/jpeg-7/depcomp +630 -0
  133. data/src/jpeg-7/djpeg.1 +251 -0
  134. data/src/jpeg-7/djpeg.c +617 -0
  135. data/src/jpeg-7/example.c +433 -0
  136. data/src/jpeg-7/filelist.txt +215 -0
  137. data/src/jpeg-7/install-sh +520 -0
  138. data/src/jpeg-7/install.txt +1097 -0
  139. data/src/jpeg-7/jaricom.c +148 -0
  140. data/src/jpeg-7/jcapimin.c +282 -0
  141. data/src/jpeg-7/jcapistd.c +161 -0
  142. data/src/jpeg-7/jcarith.c +921 -0
  143. data/src/jpeg-7/jccoefct.c +453 -0
  144. data/src/jpeg-7/jccolor.c +459 -0
  145. data/src/jpeg-7/jcdctmgr.c +482 -0
  146. data/src/jpeg-7/jchuff.c +1612 -0
  147. data/src/jpeg-7/jcinit.c +65 -0
  148. data/src/jpeg-7/jcmainct.c +293 -0
  149. data/src/jpeg-7/jcmarker.c +667 -0
  150. data/src/jpeg-7/jcmaster.c +770 -0
  151. data/src/jpeg-7/jcomapi.c +106 -0
  152. data/src/jpeg-7/jconfig.bcc +48 -0
  153. data/src/jpeg-7/jconfig.cfg +45 -0
  154. data/src/jpeg-7/jconfig.dj +38 -0
  155. data/src/jpeg-7/jconfig.mac +43 -0
  156. data/src/jpeg-7/jconfig.manx +43 -0
  157. data/src/jpeg-7/jconfig.mc6 +52 -0
  158. data/src/jpeg-7/jconfig.sas +43 -0
  159. data/src/jpeg-7/jconfig.st +42 -0
  160. data/src/jpeg-7/jconfig.txt +155 -0
  161. data/src/jpeg-7/jconfig.vc +45 -0
  162. data/src/jpeg-7/jconfig.vms +37 -0
  163. data/src/jpeg-7/jconfig.wat +38 -0
  164. data/src/jpeg-7/jcparam.c +632 -0
  165. data/src/jpeg-7/jcprepct.c +358 -0
  166. data/src/jpeg-7/jcsample.c +545 -0
  167. data/src/jpeg-7/jctrans.c +381 -0
  168. data/src/jpeg-7/jdapimin.c +396 -0
  169. data/src/jpeg-7/jdapistd.c +275 -0
  170. data/src/jpeg-7/jdarith.c +762 -0
  171. data/src/jpeg-7/jdatadst.c +151 -0
  172. data/src/jpeg-7/jdatasrc.c +212 -0
  173. data/src/jpeg-7/jdcoefct.c +736 -0
  174. data/src/jpeg-7/jdcolor.c +396 -0
  175. data/src/jpeg-7/jdct.h +393 -0
  176. data/src/jpeg-7/jddctmgr.c +382 -0
  177. data/src/jpeg-7/jdhuff.c +1309 -0
  178. data/src/jpeg-7/jdinput.c +384 -0
  179. data/src/jpeg-7/jdmainct.c +512 -0
  180. data/src/jpeg-7/jdmarker.c +1360 -0
  181. data/src/jpeg-7/jdmaster.c +663 -0
  182. data/src/jpeg-7/jdmerge.c +400 -0
  183. data/src/jpeg-7/jdpostct.c +290 -0
  184. data/src/jpeg-7/jdsample.c +361 -0
  185. data/src/jpeg-7/jdtrans.c +136 -0
  186. data/src/jpeg-7/jerror.c +252 -0
  187. data/src/jpeg-7/jerror.h +304 -0
  188. data/src/jpeg-7/jfdctflt.c +174 -0
  189. data/src/jpeg-7/jfdctfst.c +230 -0
  190. data/src/jpeg-7/jfdctint.c +4348 -0
  191. data/src/jpeg-7/jidctflt.c +242 -0
  192. data/src/jpeg-7/jidctfst.c +368 -0
  193. data/src/jpeg-7/jidctint.c +5137 -0
  194. data/src/jpeg-7/jinclude.h +91 -0
  195. data/src/jpeg-7/jmemansi.c +167 -0
  196. data/src/jpeg-7/jmemdos.c +638 -0
  197. data/src/jpeg-7/jmemdosa.asm +379 -0
  198. data/src/jpeg-7/jmemmac.c +289 -0
  199. data/src/jpeg-7/jmemmgr.c +1118 -0
  200. data/src/jpeg-7/jmemname.c +276 -0
  201. data/src/jpeg-7/jmemnobs.c +109 -0
  202. data/src/jpeg-7/jmemsys.h +198 -0
  203. data/src/jpeg-7/jmorecfg.h +369 -0
  204. data/src/jpeg-7/jpegint.h +395 -0
  205. data/src/jpeg-7/jpeglib.h +1135 -0
  206. data/src/jpeg-7/jpegtran.1 +272 -0
  207. data/src/jpeg-7/jpegtran.c +546 -0
  208. data/src/jpeg-7/jquant1.c +856 -0
  209. data/src/jpeg-7/jquant2.c +1310 -0
  210. data/src/jpeg-7/jutils.c +179 -0
  211. data/src/jpeg-7/jversion.h +14 -0
  212. data/src/jpeg-7/libjpeg.map +4 -0
  213. data/src/jpeg-7/libjpeg.txt +3067 -0
  214. data/src/jpeg-7/ltmain.sh +8406 -0
  215. data/src/jpeg-7/makcjpeg.st +36 -0
  216. data/src/jpeg-7/makdjpeg.st +36 -0
  217. data/src/jpeg-7/makeadsw.vc6 +77 -0
  218. data/src/jpeg-7/makeasln.vc9 +33 -0
  219. data/src/jpeg-7/makecdep.vc6 +82 -0
  220. data/src/jpeg-7/makecdsp.vc6 +130 -0
  221. data/src/jpeg-7/makecmak.vc6 +159 -0
  222. data/src/jpeg-7/makecvcp.vc9 +186 -0
  223. data/src/jpeg-7/makeddep.vc6 +82 -0
  224. data/src/jpeg-7/makeddsp.vc6 +130 -0
  225. data/src/jpeg-7/makedmak.vc6 +159 -0
  226. data/src/jpeg-7/makedvcp.vc9 +186 -0
  227. data/src/jpeg-7/makefile.ansi +220 -0
  228. data/src/jpeg-7/makefile.bcc +291 -0
  229. data/src/jpeg-7/makefile.dj +226 -0
  230. data/src/jpeg-7/makefile.manx +220 -0
  231. data/src/jpeg-7/makefile.mc6 +255 -0
  232. data/src/jpeg-7/makefile.mms +224 -0
  233. data/src/jpeg-7/makefile.sas +258 -0
  234. data/src/jpeg-7/makefile.unix +234 -0
  235. data/src/jpeg-7/makefile.vc +217 -0
  236. data/src/jpeg-7/makefile.vms +142 -0
  237. data/src/jpeg-7/makefile.wat +239 -0
  238. data/src/jpeg-7/makejdep.vc6 +423 -0
  239. data/src/jpeg-7/makejdsp.vc6 +285 -0
  240. data/src/jpeg-7/makejdsw.vc6 +29 -0
  241. data/src/jpeg-7/makejmak.vc6 +425 -0
  242. data/src/jpeg-7/makejsln.vc9 +17 -0
  243. data/src/jpeg-7/makejvcp.vc9 +328 -0
  244. data/src/jpeg-7/makeproj.mac +213 -0
  245. data/src/jpeg-7/makerdep.vc6 +6 -0
  246. data/src/jpeg-7/makerdsp.vc6 +78 -0
  247. data/src/jpeg-7/makermak.vc6 +110 -0
  248. data/src/jpeg-7/makervcp.vc9 +133 -0
  249. data/src/jpeg-7/maketdep.vc6 +43 -0
  250. data/src/jpeg-7/maketdsp.vc6 +122 -0
  251. data/src/jpeg-7/maketmak.vc6 +131 -0
  252. data/src/jpeg-7/maketvcp.vc9 +178 -0
  253. data/src/jpeg-7/makewdep.vc6 +6 -0
  254. data/src/jpeg-7/makewdsp.vc6 +78 -0
  255. data/src/jpeg-7/makewmak.vc6 +110 -0
  256. data/src/jpeg-7/makewvcp.vc9 +133 -0
  257. data/src/jpeg-7/makljpeg.st +68 -0
  258. data/src/jpeg-7/maktjpeg.st +30 -0
  259. data/src/jpeg-7/makvms.opt +4 -0
  260. data/src/jpeg-7/missing +376 -0
  261. data/src/jpeg-7/rdbmp.c +439 -0
  262. data/src/jpeg-7/rdcolmap.c +253 -0
  263. data/src/jpeg-7/rdgif.c +38 -0
  264. data/src/jpeg-7/rdjpgcom.1 +63 -0
  265. data/src/jpeg-7/rdjpgcom.c +515 -0
  266. data/src/jpeg-7/rdppm.c +459 -0
  267. data/src/jpeg-7/rdrle.c +387 -0
  268. data/src/jpeg-7/rdswitch.c +365 -0
  269. data/src/jpeg-7/rdtarga.c +500 -0
  270. data/src/jpeg-7/structure.txt +945 -0
  271. data/src/jpeg-7/testimg.bmp +0 -0
  272. data/src/jpeg-7/testimg.jpg +0 -0
  273. data/src/jpeg-7/testimg.ppm +4 -0
  274. data/src/jpeg-7/testimgp.jpg +0 -0
  275. data/src/jpeg-7/testorig.jpg +0 -0
  276. data/src/jpeg-7/testprog.jpg +0 -0
  277. data/src/jpeg-7/transupp.c +1533 -0
  278. data/src/jpeg-7/transupp.h +205 -0
  279. data/src/jpeg-7/usage.txt +605 -0
  280. data/src/jpeg-7/wizard.txt +211 -0
  281. data/src/jpeg-7/wrbmp.c +442 -0
  282. data/src/jpeg-7/wrgif.c +399 -0
  283. data/src/jpeg-7/wrjpgcom.1 +103 -0
  284. data/src/jpeg-7/wrjpgcom.c +583 -0
  285. data/src/jpeg-7/wrppm.c +269 -0
  286. data/src/jpeg-7/wrrle.c +305 -0
  287. data/src/jpeg-7/wrtarga.c +253 -0
  288. metadata +287 -6
  289. data/LICENSE +0 -20
  290. data/VERSION.yml +0 -4
@@ -0,0 +1,193 @@
1
+ #
2
+ # type "make help" for help
3
+ #
4
+ # TODO: examples
5
+ # add rpm to dist package, man page
6
+ #
7
+ # Changes:
8
+ # - be sure that configure is called after untgz, tar original file attributes
9
+ # - suggestion of Marcel Pol 6Dec2001:
10
+ # make install DESTDIR=$RPM_BUILD_ROOT
11
+ #
12
+
13
+ prefix = @prefix@
14
+ #bindir = $(prefix)/bin
15
+ bindir = @prefix@@bindir@
16
+
17
+ SHELL = @SHELL@
18
+ # this does not work on SuSE 6.0, why? (autoconf 2.12 do not set @SHELL@ ?)
19
+ #SHELL = bash #
20
+ INSTALL = @INSTALL@
21
+ CC = @CC@
22
+ CFLAGS = @CFLAGS@
23
+ # following DEFs are not used, but I play with it for training
24
+ CPPFLAGS = @CPPFLAGS@
25
+ DEFS = @DEFS@
26
+ includedir = @includedir@
27
+ #
28
+ # -pedantic -ansi -Wall
29
+ LDFLAGS = @LDFLAGS@
30
+ LIBS = @LIBS@
31
+
32
+ # RANLIB = @RANLIB@
33
+ # AR = @AR@
34
+ @SET_MAKE@
35
+
36
+ # files for devel.tgz
37
+ FILES = \
38
+ AUTHORS Makefile Makefile.in bin/ doc/ include/ examples/ man/ src/\
39
+ BUGS README make.bat CREDITS READMEde.txt REMARK.txt\
40
+ HISTORY REVIEW configure gpl.html INSTALL TODO configure.in\
41
+ install-sh gocr.spec .cvsignore
42
+
43
+ # files for distribution
44
+ AFILES = $(FILES) lib/
45
+
46
+ DIRS = doc/ include/ man/ examples/ bin/ src/ lib/
47
+
48
+ # export all make-variables to submakes - said to be not working on IRIS
49
+
50
+ # default rule
51
+ default: all
52
+
53
+ .PHONY : src doc examples help clean proper distclean dist tgz rpm libs
54
+
55
+ # example file generation takes lot of memory and time, do it explicitely
56
+ # by make examples
57
+ all: src Makefile
58
+ @echo " --- for help do: make help ---"
59
+ @echo " --- for documentation do: make doc ---"
60
+ @echo " --- for examples do: make examples ---"
61
+
62
+ include/config.h: include/config.h.in configure
63
+ ./configure
64
+
65
+ configure: configure.in
66
+ autoconf
67
+
68
+ Makefile: Makefile.in configure
69
+ ./configure
70
+
71
+ src/Makefile: src/Makefile.in configure
72
+ ./configure
73
+
74
+ src: src/Makefile
75
+ $(MAKE) -C src all
76
+
77
+ libs: src/Makefile
78
+ $(MAKE) -C src libs
79
+
80
+ man:
81
+ $(MAKE) -C man all
82
+
83
+ doc:
84
+ $(MAKE) -C doc all
85
+
86
+ examples:
87
+ $(MAKE) -C examples all
88
+
89
+ help:
90
+ @printf "make - compile all\n"
91
+ @printf "make libs - compile libraries libPgm2asc.{a,so}\n"
92
+ @printf "make src - build lib and gocr\n"
93
+ @printf "make man - build manual\n"
94
+ @printf "make doc - make documentation\n"
95
+ @printf "make examples - create examples ./examples/\n"
96
+ @printf "make clean - erase temporary files\n"
97
+ @printf "make proper - erase all created files\n"
98
+ @printf "make install - Really? Its development version!\n"
99
+ @printf "make uninstall - remove installed files from the system\n"
100
+
101
+
102
+ # you can override this variable by: make install DESTDIR=yourpath
103
+ DESTDIR=@prefix@
104
+ .PHONY : install uninstall test examples
105
+ install:
106
+ $(MAKE) -C src install
107
+ $(MAKE) -C man install
108
+ # following steps are not needed for end users, but cost dependencies
109
+ # therefore removed in 0.48
110
+ # $(MAKE) -C doc install
111
+ # $(MAKE) -C examples install
112
+ # $(MAKE) -C frontend install
113
+
114
+ uninstall:
115
+ $(MAKE) -C src uninstall
116
+ $(MAKE) -C man uninstall
117
+ # $(MAKE) -C doc uninstall
118
+ # $(MAKE) -C examples uninstall
119
+ # $(MAKE) -C frontend uninstall
120
+
121
+ # generate version file before packaging (most up to date)
122
+ # release is the date of the last modified src file (for bug reports)
123
+ # to distinguish different developper versions of same version number
124
+ include/version.h: src/*.[ch] Makefile
125
+ echo "#define version_string \"@PACKAGE_VERSION@\"" > $@
126
+ echo "#define release_string \"`date +%Y%m%d`\"" >> $@
127
+
128
+ dist: include/version.h
129
+ echo gocr-@PACKAGE_VERSION@ > .fname
130
+ -rm -rf `cat .fname`
131
+ mkdir `cat .fname`
132
+ # create subdirs, because cp -r bin/gocr.tcl jocr => jocr/gocr.tcl
133
+ (cd `cat .fname`; mkdir $(DIRS))
134
+ cp -r -p -d $(AFILES) `cat .fname`
135
+ $(MAKE) -C `cat .fname` proper
136
+ # for Win, DOS and Mac no configure available, reset config.h
137
+ cp `cat .fname`/include/config.h.in `cat .fname`/include/config.h
138
+ touch `cat .fname`/configure # Makefile will be updated
139
+ tar chzf ../`cat .fname`.tar.gz `cat .fname`
140
+ -gpg -ab --default-key 0x53BDFBE3 ../`cat .fname`.tar.gz # .asc
141
+ ls -l ../`cat .fname`.tar.gz{,.asc}
142
+ -rm -rf `cat .fname` .fname
143
+
144
+
145
+ # the tgz-option is only for the author, to carry the sources home
146
+ tgz: include/version.h
147
+ mkdir jocr # causes an error if exist
148
+ # create subdirs, because cp -r bin/gocr.tcl jocr => jocr/gocr.tcl
149
+ (cd jocr; mkdir $(DIRS))
150
+ -cp -rup -d $(FILES) CVS jocr
151
+ $(MAKE) -C jocr proper
152
+ if test -d jocr/src/api; then echo "--- rm -r jocr/src/api ---"; fi
153
+ -rm -rf jocr/src/api
154
+ # -rm -rf jocr/CVS jocr/*/CVS jocr/*/*/CVS # CVS tree
155
+ -rm -rf jocr/Makefile jocr/src/Makefile jocr/include/config.h
156
+ tar chzf ../jocr.tgz jocr
157
+ -gpg -ab --default-key 0x53BDFBE3 ../jocr.tgz # .asc
158
+ -cp ../jocr.tgz ../jocr.tgz.`date +%y%m%d` # backup, remove later
159
+ ls -l ../jocr.tgz{,.asc}
160
+ -rm -rf jocr
161
+
162
+ # the rpm option is for the author, to create simple rpm packages
163
+ TRPM = $(HOME)/tmp_gocr_build
164
+ # only gocr?
165
+ #VERSION=$(shell sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q src/gocr.c)
166
+ rpm:
167
+ echo "%_topdir $(TRPM)" > ~/.rpmmacros
168
+ mkdir -p $(TRPM)/{SOURCES,SPECS,BUILD,RPMS,SRPMS}
169
+ sed "s/version.*[0-9]\.[0-9]*/version @PACKAGE_VERSION@/"\
170
+ gocr.spec >$(TRPM)/SPECS/gocr.spec
171
+ cp ../gocr-@PACKAGE_VERSION@.tar.gz $(TRPM)/SOURCES
172
+ #rpmbuild -ba --nobuild gocr.spec # bin+src-rpm
173
+ (cd $(TRPM)/SPECS; rpmbuild -bb gocr.spec)
174
+ rpm -qil -p $(TRPM)/RPMS/i?86/gocr-@PACKAGE_VERSION@-*.i?86.rpm
175
+
176
+ # PHONY = don't look at file clean, -rm = start rm and ignore errors
177
+ .PHONY : clean proper
178
+ clean:
179
+ -rm -f config.cache config.status config.log
180
+ -rm -f *.aux *.log *.dvi *.ps *.lj *~ gocr.ini out.txt
181
+ -rm -f convert.cc convert convert.o # remove v0.2.4 rests
182
+ $(MAKE) -C src clean
183
+ $(MAKE) -C doc clean
184
+ $(MAKE) -C examples/ clean
185
+
186
+
187
+ distclean: proper
188
+
189
+ proper: clean
190
+ $(MAKE) -C src/ proper
191
+ $(MAKE) -C doc proper
192
+ $(MAKE) -C examples/ proper
193
+ -rm -f gocr bin/gocr libPgm2asc.* out??.bmp
@@ -0,0 +1,165 @@
1
+ GOCR (JOCR at SF.net)
2
+
3
+ GOCR is an optical character recognition program, released under the
4
+ GNU General Public License. It reads images in many formats and outputs
5
+ a text file. Possible image formats are pnm, pbm, pgm, ppm, some pcx and
6
+ tga image files. Other formats like pnm.gz, pnm.bz2, png, jpg, tiff, gif,
7
+ bmp will be automatically converted using the netpbm-progs, gzip and bzip2
8
+ via unix pipe.
9
+ A simple graphical frontend written in tcl/tk and some
10
+ sample files are included.
11
+ Gocr is also able to recognize and translate barcodes.
12
+ You do not have to train the program or store large font bases.
13
+ Simply call gocr from the command line and get your results.
14
+
15
+ To see installation instructions, see the INSTALL file.
16
+
17
+ How to start? (QUICK START)
18
+ ---------------------------
19
+ Some examples of how you can use gocr:
20
+
21
+ gocr -h # help
22
+ gocr file.pbm # minimum options
23
+ gocr -v 1 file.pbm >out.txt 2>out.log # generate text- and log file
24
+ djpeg -pnm -gray text.jpg | gocr - # using JPEG-files
25
+ gzip -cd text.pbm.gz | gocr - # using gzipped PBM-files
26
+ giftopnm text.gif | gocr - # using GIF-files
27
+ gocr -v 1 -v 32 -m 4 file.pbm # zoning and out30.bmp output
28
+ xli -geometry 400x400 out30.bmp # see details using xli (recommanded viewer)
29
+ wish gocr.tcl # X11-tcl/tk-frontend (development version)
30
+ # see manual pages for more details
31
+
32
+
33
+ How to get image files?
34
+ -----------------------
35
+ Scan text pages and save it as PGM/PBM/PNM file. Use a program such as
36
+ The GIMP or Sane. You can also use netpbm-progs to convert several image
37
+ formats into PGM/PBM/PNM. The tool djpeg can be used to convert jpeg into pgm.
38
+ If you have a POSIX compatible system like linux and PNM-tools, gzip and bzip2
39
+ are installed, you are lucky and gocr will do conversion
40
+ from [.pnm.gz, .pnm.bz2, .jpg, .jpeg, .bmp, .tiff, .png, .ps, .eps]
41
+ to [.pgm] for you. This list can easily be extended editing src/pnm.c.
42
+
43
+ Gocr also comes with some examples, try: make examples.
44
+
45
+ Memory limitations
46
+ ------------------
47
+ WARNING!!!
48
+
49
+ If you use a 300dpi scan of A4 letter, the image is about 2500x3500 pixels and
50
+ gocr requires 8.75MB for storing the picture into the memory. Not only that,
51
+ but gocr may create a 2nd copy, using a total of 17MB. This is independent
52
+ of using b/w or gray-scale images. Be sure that you have enough RAM installed
53
+ in your machine! Alternatively you can cut the picture into small pieces.
54
+ You can use the pnmcut, from the netpbm package to cut the file. Example:
55
+
56
+ pnmcut -left 0 -right 2500 -top 0 -height 1000 bigfile.pnm > smallfile.pnm
57
+
58
+ And then use gocr in the cropped image as usual. Take care: if you chopp the
59
+ characters, gocr won't be able to understand that line.
60
+
61
+ Future versions will take care of this issue automatically.
62
+
63
+ Limitations
64
+ -----------
65
+ gocr is still in its early stages. Your images should fit in these requirements
66
+ if you want a good output:
67
+
68
+ - good scans (all chars well seperated, one column, no tables etc, 12pt 300dpi)
69
+ should work well
70
+ - fonts 20-60 pixels ( 5pt * 1in/72pt * 300 dpi = 20 dots )
71
+ - output of image file for controlling detection
72
+
73
+ And note that speed is very slow (this will be changed when recognition works
74
+ well)
75
+ 12pt 300dpi 1700x950 16lines 700chars 22x28 P90=40s..90s v0.2.3 (gcc -O0)
76
+
77
+ You can try to optimize the results:
78
+ - make good scans/treat image
79
+ - try to change the critical gray level (option -l <n>)
80
+ - control the result on out10.png, out30.png (option -v 32)
81
+ example: ./gocr -v 32 -m 4 -m 256 -m 56 ~/aac.jpg # only check layout
82
+ - enlarge option -d <n> for high resolution images which are noisy
83
+ - try different combinations for option -m <n>
84
+ - for thousends of documents with same font
85
+ you can use/create a database (-m 2/-m 130)
86
+ - use options -d 0 -m 8 on screen shots (font8x12)
87
+ - use filter option -C to through out wrong recognized chars (ex: gothic)
88
+
89
+ What does >> NOT << work at the moment:
90
+ - complex layouts (try option -m 4)
91
+ - bad scans, noisy/snowy images, FAX-quality images
92
+ - serif fonts, italic fonts, slanted fonts
93
+ - handwritten texts (this is valid for the next ten years I guess)
94
+ the exisctence of autotrace can shorten this
95
+ - rotated images (but slightly rotated images should be no problem)
96
+ - small fonts (fax like) or mix of different font size
97
+ - colored images (use gray or black/white)
98
+ - Chinese, Arabian, Egyptian, Cyrillic or Klingon fonts
99
+
100
+ How it works or how it should work?
101
+ - put the entire file into RAM (300dpi grayscale recommended)
102
+ - remove dust and snow
103
+ - detect small angle (lines which are not horizontal)
104
+ - detect text boxes (option -m 4)
105
+ - detect text-lines
106
+ - detect characters
107
+ - first step recognition (every character has its own empirical procedure)
108
+ - no neural network or similar general algorithms
109
+ - analyze not detected chars by comparison with detected ones
110
+ - try to divide overlapping chars
111
+ - testwise: compare all letters (like compression of pictures)
112
+ - for more details look to the gocr.html documentation
113
+
114
+ Why the result of the new version are worse compared to the old version?
115
+ - the algorithms of gocr are sometimes evolutionary, a fine tuned old
116
+ algorithm will be replased by a completly new algorithm which is more
117
+ general but a bit worse for your problem.
118
+ Please send your sample and give the new algo the chance to become
119
+ better as the old one.
120
+
121
+ Security
122
+ --------
123
+ Because gocr only reads and writes files it is quite sure, except the
124
+ popen-function which allows you to call gocr with non-pnm-image formats
125
+ directly. The popen function can be misused to start other probably
126
+ dangerous programs.
127
+ If you care about conversion to pnm format, you can safely disable
128
+ popen-function by removing "#define HAVE_POPEN 1" from config.h before
129
+ compiling the gocr package.
130
+
131
+
132
+ How can you help gocr?
133
+ ----------------------
134
+ - Send comments, ideas and patches (diff -ru gocr_original/ gocr_changed/).
135
+ - If you have a lot of money, spend a bit (paypal). Ok, paypal has changed,
136
+ so please forget about it. Also the importand problem is now the missing
137
+ spare time for coding.
138
+ - I always need example files (.pbm.gz or jpeg <100kB) for testing
139
+ the behavior of the ocr engine under different conditions,
140
+ because scanning does take a lot of time which I do not have.
141
+ But do not send files which are not convertable by commercial ocr programs
142
+ or which are protected from copying and electronic processing by copyright.
143
+ That will help, to get the world's best OCR open source program. :) Thanks!
144
+ - Please dont send captchas.
145
+ - Send me your results (errors,num_chars,dpi) and if possible results
146
+ and name of professional OCR programs for statistics.
147
+ - Read OCR literature, extract the essentials and send a short report
148
+ to me ;).
149
+ - If you have a good idea, how to manage some OCR-tasks, tell me!
150
+ - Tell your friends about gocr. Tell me about your success. Be happy.
151
+
152
+
153
+ After all, is it gocr or jocr?
154
+ ------------------------------
155
+ The original name of this project is gocr, from GNU Optical Character
156
+ Recognition. Another project is using the same name, however; so the
157
+ name was changed to jocr. If you have a good idea for a name, please
158
+ send it.
159
+
160
+
161
+ Latest news
162
+ ------------
163
+ http://jocr.sourceforge.net
164
+
165
+ Authors: (see AUTHORS)
@@ -0,0 +1,80 @@
1
+
2
+ This is the short german version for README.
3
+ Dies ist die deutsche Kurzinformation fuer README.
4
+
5
+ --- GOCR v0.38 ---
6
+
7
+ Worum gehts?
8
+ - OCR = optical character recognition = Schrifterkennung
9
+ - liest pnm, pbm, pgm, ppm, einige pcx und tga Bilddateien
10
+ (auf un*x-systemen mit libpnm fast alle Formate)
11
+ - gibt text aus
12
+ - Dieses Programm ist herausgegeben unter GPL (General Public License).
13
+ Das bedeutet unter anderem: FREI FUER ALLE BENUTZER.
14
+
15
+ Wie kompilieren?
16
+
17
+ gzip -cd gocr-0.38.tgz | tar xfv - # auspacken
18
+ cd gocr-0.38 # Ordner wechseln
19
+ ./configure # Makefile anpassen
20
+ make # gcc/g++ sollte installiert sein
21
+
22
+
23
+ Wie starten?
24
+ gocr -h # Kurz(!)-Hilfe
25
+ gocr file.pbm # minimale Argumente
26
+ gocr -v 1 -v 32 -m 4 file.pbm # zusaetzlich debug-Modus und Layout-Analyse
27
+ Optionen (bitte auch das aktuelle Manual zu gocr (man gocr) ansehen!):
28
+ [-i] name - Bilddatei (pnm,pgm,pbm,ppm,pcx), - fuer stdin
29
+ -o name - Ausgabefile (Umlenkung der Standardausgabe)
30
+ -e name - Ausgabefile (Umlenkung der Fehlerausgabe)
31
+ -x name - Fortschrittsanzeige (file, fifo oder fd=1..255)
32
+ -p name - Verzeichnis der optionalen Datenbasis (z.B.: ./db/)
33
+ -l num - Schwellenwert 0<160<=255
34
+ -d num - Schmutzgroesse (Entfernen von Schmutz, -1=autodetect)
35
+ -s num - Wortabstand in Punkten (0 = autodetect)
36
+ -v num - Mehr Infos [summiert]
37
+ 1 mehr Informationen
38
+ 2 Groesse der Boxen anzeigen (siehe -c)
39
+ 4 Boxen anzeigen (siehe -c)
40
+ 8 Ausgabe der Muster nach Erkennung
41
+ 16 Zeilenerkennung ausgeben
42
+ 32 debug-Ausgaben outXX.pgm
43
+ -c string - Liste der auszugebenen Zeichen (_ = nicht erkanntes Zeichen)
44
+ -C string - Zeichenfilter (z.B.: hexdigits: 0-9A-Fx, nur ASCII)
45
+ -m num - Arbeitsarten, ~ = abschalten
46
+ 2 Datenbank nutzen (in Entwicklung)
47
+ 4 Layout-Analyse (zum Testen)
48
+ 8 ~ vergleiche nichterkannte Zeichen
49
+ 16 ~ Teile verklebte Zeichen
50
+ 32 ~ Kontextkorrektur
51
+ 64 Zeichen komprimieren
52
+ 130 Datenbank erweitern (unbekannte Zeichen, Interaktiv)
53
+ 256 OCR Engine abschalten, macht nur Sinn mit -m 2
54
+ Beispiel: gocr -v 6 -v 32 -c _YV text1.pbm
55
+ - Programm ist noch sehr langsam, bitte Geduld!
56
+
57
+ Was geht nicht?
58
+ - vieles ... siehe README
59
+
60
+ Wie koennen Sie helfen?
61
+ - Schicken Sie Bemerkungen und KLEINE Beispieldaten als .pbm.gz.
62
+ - Geld oder einen neuen Notebook koennte ich auch brauchen (paypal).
63
+ Ok, paypal ist nicht mehr was es war, also vergesst es und mangelnde
64
+ Zeit zum programmieren ist jetzt das groessere Problem.
65
+ - Wie finden Sie das Programm, wie viele Fehler erzeugt es im Vergleich
66
+ zu anderen OCR-Programmen?
67
+ (bitte Anzahl Fehler, Zeichen und Programmversion angeben)
68
+ - Gute Ideen nehme ich gern entgegen
69
+ (d.h. kleine Aenderungen mit grosser Wirkung).
70
+ - Lob und Tadel nehm ich ebenfalls gerne entgegen.
71
+
72
+ Bugs:
73
+ - Das Programm hat sicher viele Fehler, nur welche? (siehe README)
74
+
75
+ Letzte Neuerungen:
76
+ http://jOCR.sourceforge.net
77
+
78
+ Authoren: (siehe README und AUTHORS)
79
+
80
+ --- HAVE FUN ---
@@ -0,0 +1,18 @@
1
+
2
+ testfile size num_c quality time num_errors
3
+ -------- x y ------- p1 p1 p2 p3
4
+ g300a1.pbm 703 580 469 + 2s 4 - 0
5
+ g300a2.pbm 724 1252 1021 + 5s 2 0 0
6
+ g300b1.pbm 1564 277 55 + 4s 0 1 1
7
+ g300b2.pbm 599 1319 860 snowy 9s 76 - 40
8
+ g300b3.pbm 592 1324 934 snowy 7s 36 2 15
9
+ g300c1.pbm 750 2771 2182 + 15s 35 1 14
10
+ liebfrau1 2289 3200 1927 + 19s 13 0 8
11
+ meraji1 1912 1355 1246 thinn 15s 65 4 40
12
+ paraguay1 2617 1375 3280 frame 78s 1000 1 55
13
+
14
+ p1=gocr0.2.4a3 on P400
15
+ p2=recognita+4.0
16
+ p3=gocr0.2.5
17
+
18
+ most errors: connected chars, like fi,ff, italic font