summaryrefslogtreecommitdiff
path: root/graphics/ocrad/files
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/ocrad/files')
-rw-r--r--graphics/ocrad/files/ocrad.1114
-rw-r--r--graphics/ocrad/files/patch-Makefile.in33
-rw-r--r--graphics/ocrad/files/patch-configure26
-rw-r--r--graphics/ocrad/files/patch-iso_8859_1.h15
4 files changed, 43 insertions, 145 deletions
diff --git a/graphics/ocrad/files/ocrad.1 b/graphics/ocrad/files/ocrad.1
deleted file mode 100644
index a99b2fdfdd73..000000000000
--- a/graphics/ocrad/files/ocrad.1
+++ /dev/null
@@ -1,114 +0,0 @@
-.TH OCRAD 1 "30 December 2003" "0.6" "GNU Ocrad"
-.SH NAME
-ocrad \- Optical Character Recognition
-.SH SYNOPSIS
-.I ocrad
-\-afhivV \-b NUMBER \-l MODE \-o FILE \-x FILE [FILES ...]
-.Sh DESCRIPTION
-.LP
-.I ocrad
-is an OCR (Optical Character Recognition) program
-implemented as a filter and based on a feature extraction method. It
-reads a bitmap image in pbm format and outputs text in ISO\-8859\-1
-(Latin\-1) charset. Also includes a layout analyser able to separate
-the columns or blocks of text normally found on printed pages. It can
-be used as a stand\-alone console application, or as a backend to other
-programs.
-.SH OPTIONS
-.TP
-.I "\-a", "\-\-append"
-Append generated text to the output file instead of overwriting it.
-.TP
-.I "\-b NUMBER", "\-\-block=NUMBER"
-Process only the specified text block, beginning from 1.
-Is only useful when used in conjunction with layout analysis (see below).
-.TP
-.I "\-D LEVEL", "\-\-debug=LEVEL"
-The Levels are:
-.nf
-100 - Show raw block list, unordered
- 99 - Show recursive block list, unordered
- 98 - Show main block list, unordered
- 97 - Show recursive block list, ordered
- 96 - Show main block list, ordered
- 95..90 - reserved
- 89 - Show all blocks from every character
- 88 - Show main black blocks from every character
- 87 - Show guess list for every character
- 86 - Show best guess for every character
-.fi
-.TP
-.I "\-f", "\-\-force"
-Force overwrite of output file.
-.TP
-.I "\-h", "\-\-help"
-Print an informative help message describing the options and then exit.
-.TP
-.I "\-i", "\-\-invert"
-Invert image levels (white on black).
-.TP
-.I "\-l MODE", "\-\-layout=MODE"
-Enable page layout analysis. The meaning of
-.I MODE
-is:
-.nf
-`0' no analysis at all,
-`1' column separation,
-`2' full analysis.
-.fi
-.TP
-.I "\-o FILE"
-Place the output into
-.I FILE
-instead of into the standard output.
-.TP
-.I "\-v", "\-\-verbose"
-Verbose mode.
-.TP
-.I "\-V", "\-\-version"
-Print the version number of Ocrad on the standard output and then exit.
-.TP
-.I "\-x FILE"
-Write (export) OCR Results File to
-.I FILE
-\.
-.SH BUGS
-If you find a bug in GNU Ocrad, please send electronic mail to
-<bug-ocrad@gnu.org>. Include the version number, which you can find by
-running `ocrad \-\-version'.
-.SH CAVEATS
-.IP \(bu 2
-Scan directly in b/w mode. Convert from grayscale only if you know what
-you are doing.
-.IP \(bu 2
-For better results the characters should be at least 20 pixels high.
-.IP \(bu 2
-Merged characters are always a problem. Try to avoid them.
-.IP \(bu 2
-Very bold or very light (broken) characters are also a problem.
-.IP \(bu 2
-Always see with your own eyes the pbm file before blaming Ocrad for the
-results. Remember the saying, "garbage in, garbage out".
-.SH TODO
-.IP \(bu 2
-Deal with broken characters.
-.IP \(bu 2
-Make a better layout detector. Every character on its line.
-.IP \(bu 2
-Separate (more) merged characters.
-.IP \(bu 2
-Deal better with frames, lines, pictures, etc.
-.IP \(bu 2
-Change to ISO_8859\-15 (update for ISO_8859\-1 with euro sign).
-.IP \(bu 2
-Add an option for recognizing ISO_8859\-9 chars (Turkish).
-.SH GETTING
-.I ocrad
-is available from http://www.gnu.org/software/ocrad/ocrad.html
-.SH AUTHOR
-.nf
-Antonio Diaz <ant_diaz@teleline.es>
-.fi
-.SH HISTORY
-.I ocrad
-0.6 was released in December 2003.
diff --git a/graphics/ocrad/files/patch-Makefile.in b/graphics/ocrad/files/patch-Makefile.in
index dae15cfc0777..5c6f2fb7e0b9 100644
--- a/graphics/ocrad/files/patch-Makefile.in
+++ b/graphics/ocrad/files/patch-Makefile.in
@@ -1,14 +1,15 @@
---- Makefile.in.orig Thu Dec 18 11:11:05 2003
-+++ Makefile.in Tue Dec 30 20:20:01 2003
-@@ -4,13 +4,14 @@
+--- Makefile.in.orig Mon Feb 9 12:08:00 2004
++++ Makefile.in Mon Mar 1 12:42:34 2004
+@@ -3,14 +3,14 @@
- DISTNAME = ocrad-0.6
+ DISTNAME = ocrad-0.7
-CXX = g++
-INSTALL = install
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
-SHELL = /bin/sh
+-CPPFLAGS =
-CXXFLAGS = -Wall -W -O2
-LDFLAGS =
+CXX?= g++
@@ -16,13 +17,13 @@
+INSTALL_PROGRAM?= $(INSTALL)
+INSTALL_DATA?= $(INSTALL) -m 644
+SHELL?= /bin/sh
-+CXXFLAGS?= -Wall -W -O2
+CPPFLAGS?=
++CXXFLAGS?= -Wall -W -O2
+LDFLAGS?=
- objs = common.o rectangle.o iso_8859_1.o bitmap.o block.o blockmap.o \
- profile.o feats.o character.o recognize1.o \
-@@ -22,10 +23,10 @@
+ objs = common.o rectangle.o ucs.o bitmap.o block.o blockmap.o \
+ profile.o feats.o character.o character_r11.o character_r12.o \
+@@ -23,10 +23,10 @@
all : ocrad
ocrad : $(objs)
@@ -34,12 +35,12 @@
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) -pg -o ocradp $(objs)
%.o : %.cc
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-@@ -43,6 +44,7 @@
- recognize2.o : block.h character.h iso_8859_1.h textline.h
- textblock.o : block.h character.h textline.h textblock.h
- main.o : block.h blockmap.h bitmap.h character.h textline.h textblock.h
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
+@@ -41,6 +41,7 @@
+ character_r13.o : ucs.h block.h blockmap.h character.h profile.h feats.h
+ feats.o : ucs.h block.h blockmap.h profile.h feats.h
+ main.o : bitmap.h block.h blockmap.h character.h textline.h textblock.h
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c main.cc
-
-
- install : all install-info
+ profile.o : block.h blockmap.h profile.h
+ textblock.o : block.h character.h textline.h textblock.h
+ textline.o : ucs.h block.h character.h textline.h
diff --git a/graphics/ocrad/files/patch-configure b/graphics/ocrad/files/patch-configure
new file mode 100644
index 000000000000..32502d238db9
--- /dev/null
+++ b/graphics/ocrad/files/patch-configure
@@ -0,0 +1,26 @@
+--- configure.orig Fri Jan 23 22:55:38 2004
++++ configure Mon Mar 1 11:34:35 2004
+@@ -19,12 +19,6 @@
+ progname=$0
+ srctrigger=ocrad.png
+
+-# clear some things potentially inherited from environment.
+-srcdir=
+-prefix=/usr/local
+-infodir=${prefix}/share/info
+-mandir=${prefix}/share/man
+-
+ # Loop over all args
+ while [ x$1 != x ] ; do
+
+@@ -64,6 +58,10 @@
+ exit 1 ;;
+ esac
+ done
++
++prefix=${prefix:-/usr/local}
++infodir=${infodir:-${prefix}/share/info}
++mandir=${mandir:-${prefix}/share/man}
+
+ # Find the source files, if location was not specified.
+ srcdirtext=
diff --git a/graphics/ocrad/files/patch-iso_8859_1.h b/graphics/ocrad/files/patch-iso_8859_1.h
deleted file mode 100644
index 9e78ee087ed8..000000000000
--- a/graphics/ocrad/files/patch-iso_8859_1.h
+++ /dev/null
@@ -1,15 +0,0 @@
---- iso_8859_1.h.orig Wed Dec 3 12:12:01 2003
-+++ iso_8859_1.h Tue Dec 30 17:12:05 2003
-@@ -100,6 +100,12 @@
- static unsigned char base_letter( unsigned char ch ) throw();
- static unsigned char compose( unsigned char base_letter,
- unsigned char accent ) throw();
-+#undef isalnum
-+#undef isalpha
-+#undef islower
-+#undef isupper
-+#undef isvowel
-+#undef toupper
- static bool isalnum( unsigned char ch ) throw();
- static bool isalpha( unsigned char ch ) throw();
- static bool islower( unsigned char ch ) throw();