Debian Codegraph @

upstream/debian-unstable/man1/pamtilt.1

raw
1 \
2 .\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
3 .\" Do not hand-hack it! If you have bug fixes or improvements, please find
4 .\" the corresponding HTML page on the Netpbm website, generate a patch
5 .\" against that, and send it to the Netpbm maintainer.
6 .TH "Pamtilt User Manual" 1 "28 August 2005" "netpbm documentation"
7
8 .SH NAME
9 pamtilt - print the tilt angle of a PGM file
10
11 .UN synopsis
12 .SH SYNOPSIS
13
14 \fBpamtilt\fP
15 [\fB-angle=\fP\fImaxangle\fP]
16 [\fB-fast\fP]
17 [\fB-quality=\fP\fIq\fP]
18 [\fB-hstep=\fP\fIn\fP]
19 [\fB-vstep=\fP\fIn\fP]
20 [\fB-dstep=\fP\fIn\fP]
21 [\fB-astep=\fP\fIn\fP]
22 [\fB-verbose\fP]
23 [\fIpgmfile\fP]
24
25 .UN examples
26 .SH EXAMPLES
27
28 .nf
29 \f(CW
30 scanimage --mode Gray --resolution 300 >crooked.pgm
31 pnmrotate -b white `pamtilt crooked.pgm` crooked.pgm >straight.pgm
32 \fP
33 (then crop, threshold, etc.)
34
35 .fi
36
37 .UN description
38 .SH DESCRIPTION
39 .PP
40 This program is part of
41 .BR "Netpbm" (1)\c
42 \&.
43 .PP
44 \fBpamtilt\fP tries to find the correct angle for untilting
45 (de-skewing) a scanned text document. The output is a single
46 floating-point number (the angle in degrees) for use as the argument
47 to pnmrotate.
48 .PP
49 "Document skew" is the name given to what happens when
50 you feed a page into an image scanner at an angle: the resulting image
51 is tilted. \fBpamtilt\fP aims to help correct that.
52 .PP
53 \fBpamtilt\fP makes three iterations at successively finer
54 increments, testing prospective rotation angles to find the best one.
55 \fBpamtilt\fP works best for straightening images with strong
56 horizontal lines and does poorly with arbitrary photos. If
57 \fBpamtilt\fP has no confidence in its results, it prints the special
58 value 00.00; you can check for this or just pass it as a legal
59 argument to pnmrotate.
60 .PP
61 \fBpamtilt\fP operates on the first plane of the input image,
62 which is either PNM or PAM, and ignores any other planes. Ordinarily,
63 the input is PGM or GRAYSCALE PAM, so there is only one plane.
64 .PP
65 \fBpamtilt\fP works on bilevel (PBM, BLACKANDWHITE PAM) images as
66 well as grayscale, but you will minimize artifacts if you scan and
67 rotate in grayscale before you apply a threshold to make a bilevel
68 image.
69
70 .UN options
71 .SH OPTIONS
72 .PP
73 In addition to the options common to all programs based on libnetpbm
74 (most notably \fB-quiet\fP, see
75 .UR index.html#commonoptions
76 Common Options
77 .UE
78 \&), \fBpamtilt\fP recognizes the following
79 command line options:
80
81
82
83 .TP
84 \fB-angle=\fP\fImaxangle\fP
85 Assume a maximum tilt angle of \fImaxangle\fP (measured in degrees).
86 The default value is sufficient for most images, even those scanned
87 somewhat carelessly.
88 .sp
89 The default is 10.0.
90
91 .TP
92 \fB-fast\fP
93 Skip the third iteration for speed at the expense of accuracy.
94
95 .TP
96 \fB-verbose\fP
97 Show on Standard Error the measurements computed at each tested angle.
98
99
100 .PP
101 Here are some other options you can use to tune the operation of
102 \fBpamtilt\fP but they're seldom needed. The default values
103 accommodate a wide variety of input documents.
104
105
106 .TP
107
108 \fB-quality=\fP\fIq\fP
109 Require a signal-to-noise ratio of a least \fIq\fP on the first
110 iteration to report a valid result. Larger values reduce the chances
111 of obtaining a bogus result at the risk of obtaining no result at all.
112 .sp
113 The default is 1.0.
114
115 .TP
116 \fB-hstep=\fP\fIn\fP
117 Set the horizontal increment to check every \fIn\fPth column. This
118 value affects both run time and memory requirements.
119 .sp
120 The default is 11.
121
122 .TP
123 \fB-vstep=\fP\fIn\fP
124 Set the vertical increment to check every nth row. Larger values
125 usually work, reducing run time, but they increase the risk of
126 incorrect results.
127 .sp
128 The default is 5.
129
130 .TP
131 \fB-dstep=\fP\fIn\fP
132 Set the vertical distance used when checking pixels in a column. The
133 default is intended to minimize the effect of noise along a horizontal
134 boundary.
135 .sp
136 The default is 2.
137
138 .TP
139 \fB-astep=\fP\fIn\fP
140 Set the angle increment of the first iteration, in degrees.
141 .sp
142 The default is 1.0.
143
144
145
146
147 .UN references
148 .SH REFERENCES
149 .PP
150 \fBpamtilt\fP implements a somewhat simplified algorithm inspired
151 by: "Measuring Document Image Skew and Orientation", by Bloomberg,
152 Kopec, and Dasari. In SPIE Volume 2422, Document Recognition II,
153 pages 302-316, February 1995.
154
155 .UN seealso
156 .SH SEE ALSO
157
158
159 .IP \(bu
160 .BR "\fBpnmrotate\fP" (1)\c
161 \&
162 .IP \(bu
163 .BR "pgm" (1)\c
164 \&
165
166
167 .UN history
168 .SH HISTORY
169 .PP
170 \fBpamtilt\fP was new in Netpbm 10.30 (October 2005).
171 .PP
172 Gregg Townsend wrote it and sent it to Bryan Henderson in August
173 2005. Bryan recoded it to fit Netpbm conventions.
174 .SH DOCUMENT SOURCE
175 This manual page was generated by the Netpbm tool 'makeman' from HTML
176 source. The master documentation is at
177 .IP
178 .B http://netpbm.sourceforge.net/doc/pamtilt.html
179 .PP