-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpnmunpaper.1.xml
1844 lines (1612 loc) · 65.9 KB
/
pnmunpaper.1.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version='1.0'?>
<!--
Copyright © 2005-2007, Jens Gulden
Copyright © 2011, Diego Elio Pettenò <[email protected]>
Copyright © 2013 Michael McMaster <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this generator; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<article xmlns="http://docbook.org/ns/docbook"
xmlns:xl="http://www.w3.org/1999/xlink"
version="5.0" xml:lang="en">
<info>
<title>pnmunpaper</title>
<authorgroup>
<author>
<personname>
<firstname>Jens Gulden</firstname>
<surname>Pettenò</surname>
</personname>
</author>
<author>
<personname>
<firstname>Diego Elio</firstname>
<surname>Pettenò</surname>
</personname>
<affiliation>
<address><email>[email protected]</email></address>
</affiliation>
</author>
<author>
<personname>
<firstname>Michael</firstname>
<surname>McMaster</surname>
</personname>
<affiliation>
<address><email>[email protected]</email></address>
</affiliation>
</author>
</authorgroup>
<copyright>
<year>2011</year>
<holder>Diego Elio Pettenò</holder>
</copyright>
<legalnotice>
<para>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
</para>
<para>
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
</para>
<para>
You should have received a copy of the GNU General Public
License along with this generator; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
MA 02110-1301 USA
</para>
</legalnotice>
</info>
<section>
<title>Reference</title>
<refentry>
<info>
<date>September 2011</date>
<productname>pnmunpaper</productname>
</info>
<refmeta>
<refentrytitle>pnmunpaper</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>pnmunpaper</refname>
<refpurpose>Post-processing tool for scanned sheets of paper.</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>pnmunpaper</command>
<arg choice="opt">
<replaceable>options</replaceable>
</arg>
<group choice="req">
<arg choice="plain">
<group choice="plain">
<replaceable>input-pattern </replaceable>
<replaceable>output-pattern</replaceable>
</group>
</arg>
<arg choice="plain">
<replaceable>input-file(s)</replaceable>
<replaceable>output-file(s)</replaceable>
</arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
<refsection>
<title>Overview</title>
<para>
pnmunpaper is a post-processing tool for scanned sheets of paper, especially for book pages
that have been scanned from previously created photocopies. The main purpose is to make
scanned book pages better readable on screen after conversion to PDF. Additionally,
pnmunpaper might be useful to enhance the quality of scanned pages before performing optical
character recognition (OCR).
</para>
<para>
pnmunpaper tries to clean scanned images by removing dark edges that appeared through
scanning or copying on areas outside the actual page content (e.g. dark areas between the
left-hand-side and the right-hand-side of a double- sided book-page scan). The program
also tries to detect disaligned centering and rotation of pages and will automatically
straighten each page by rotating it to the correct angle. This process is called
"deskewing". Note that the automatic processing will sometimes fail. It is always a good
idea to manually control the results of pnmunpaper and adjust the parameter settings
according to the requirements of the input. Each processing step can also be disabled
individually for each sheet.
</para>
<para>
Input and output files can be in either <filename>.pbm</filename>,
<filename>.pgm</filename> or <filename>.ppm</filename> format, thus generally in
<filename>.pnm</filename> format, as also used by the Linux scanning tools
<command>scanimage</command> and <command>scanadf</command>. Conversion to PDF can
e.g. be achieved with the Linux tools <command>pgm2tiff</command>,
<command>tiffcp</command> and <command>tiff2pdf</command>.
</para>
</refsection>
<refsection>
<title>Input and Output files</title>
<para>
Input and output files need to be designed either by using patterns or an ordered list of
input and output files; if patterns are used, such as <literal>%04d</literal>, then they
are substituted for the input and output sheet number before opening the file for input or
output.
</para>
<para>
If you're not using patterns, then the program expects one or two input files depending on
what is passed as <option>--input-pages</option> and one or two output files depending on
what is passed as <option>--output-pages</option>, in order.
</para>
<para>
Missing output file names are fatal and will stop processing; missing initial input file
names are fatal, and so is any missing input file if a range of sheets is defined through
<option>--sheet</option> or <option>--end-sheet</option>.
</para>
<para>
<command>pnmunpaper</command> accepts files in PNM format, which means they might be in
<filename>.pbm</filename>, <filename>.pgm</filename>, <filename>.ppm</filename> or
<filename>.pnm</filename> format, which is what is produced by Linux command line scanning
tools such as <command>scanimage</command> and <command>scanadf</command>.
</para>
</refsection>
<refsection>
<title>Options</title>
<variablelist>
<varlistentry>
<term>
<option>-l</option> { <option>single</option> | <option>double</option> |
<option>none</option> }
</term>
<term>
<option>--layout</option> { <option>single</option> | <option>double</option> |
<option>none</option> }
</term>
<listitem>
<para>
Set default layout options for a sheet:
</para>
<variablelist>
<varlistentry>
<term><option>single</option></term>
<listitem>
<para>One page per sheet.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>double</option></term>
<listitem>
<para>
Two pages per sheet, landscape orientation (one page on the left half, one
page on the right half).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>none</option></term>
<listitem>
<para>No auto-layout, mask-scan-points may individually be specified.</para>
</listitem>
</varlistentry>
</variablelist>
<para>
Using <option>single</option> or <option>double</option> automatically sets
corresponding <option>--mask-scan-points</option>. The default is
<option>single</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-start</option> <replaceable>sheet</replaceable></term>
<term><option>--start-sheet</option> <replaceable>start-sheet</replaceable></term>
<listitem>
<para>
Number of first sheet to process in multi-sheet mode. (default: 1)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-end</option> <replaceable>sheet</replaceable></term>
<term><option>--end-sheet</option> <replaceable>sheet</replaceable></term>
<listitem>
<para>
Number of last sheet to process in multi-sheet mode. -1 indicates processing until
no more input file with the corresponding page number is available (default: -1)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-#</option> <replaceable>sheet-range</replaceable></term>
<term><option>--sheet</option> <replaceable>sheet-range</replaceable></term>
<listitem>
<para>
Optionally specifies which sheets to process in the range between start-sheet and
end-sheet.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-x</option> <replaceable>sheet-range</replaceable></term>
<term><option>--exclude</option> <replaceable>sheet-range</replaceable></term>
<listitem>
<para>
Excludes sheets from processing in the range between start-sheet and end-sheet.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--pre-rotate</option> { <option>-90</option> | <option>90</option> }
</term>
<listitem>
<para>
Rotates the whole image clockwise (<option>90</option>) or anti-clockwise
(<option>-90</option>) before any other processing.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--post-rotate</option> { <option>-90</option> | <option>90</option> }
</term>
<listitem>
<para>
Rotates the whole image clockwise (<option>90</option>) or anti-clockwise
(<option>-90</option>) after any other processing.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-M</option> { <option>v</option> | <option>h</option> | <option>v,h</option> }
</term>
<term>
<option>--pre-mirror</option> { <option>v</option> | <option>h</option> | <option>v,h</option> }
</term>
<listitem>
<para>
Mirror the image, after possible pre-rotation. Either <option>v</option> (for vertical mirroring),
<option>h</option> (for horizontal mirroring) or <option>v,h</option> (for both) can be specified.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--post-mirror</option> { <option>v</option> | <option>h</option> | <option>v,h</option> }
</term>
<listitem>
<para>
Mirror the image, after any other processing except possible post-rotation. Either
<option>v</option> (for vertical mirroring), <option>h</option> (for horizontal
mirroring) or <option>v,h</option> (for both) can be specified.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--pre-shift</option> <replaceable>h</replaceable><option>,</option><replaceable>v</replaceable>
</term>
<listitem>
<para>
Shift the image before further processing. Values for <replaceable>h</replaceable>
(horizontal shift) and <replaceable>v</replaceable> (vertical shift) can either be
positive or negative.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--post-shift</option> <replaceable>h</replaceable><option>,</option><replaceable>v</replaceable>
</term>
<listitem>
<para>
Shift the image after other processing. Values for <replaceable>h</replaceable>
(horizontal shift) and <replaceable>v</replaceable> (vertical shift) can either be
positive or negative.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--pre-wipe</option>
<replaceable>left</replaceable><option>,</option><replaceable>top</replaceable><option>,</option><replaceable>right</replaceable><option>,</option><replaceable>bottom</replaceable>
</term>
<listitem>
<para>
Manually wipe out an area before further processing. Any pixel in a wiped area will
be set to white. Multiple areas to be wiped may be specified by multiple occurrences
of this options.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--post-wipe</option>
<replaceable>left</replaceable><option>,</option><replaceable>top</replaceable><option>,</option><replaceable>right</replaceable><option>,</option><replaceable>bottom</replaceable>
</term>
<listitem>
<para>
Manually wipe out an area after processing. Any pixel in a wiped area will be set to
white. Multiple areas to be wiped may be specified by multiple occurrences of this
options.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--pre-border</option>
<replaceable>left</replaceable><option>,</option><replaceable>top</replaceable><option>,</option><replaceable>right</replaceable><option>,</option><replaceable>bottom</replaceable>
</term>
<listitem>
<para>
Clear the border-area of the sheet before further processing. Any pixel in the
border area will be set to white.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--post-border</option>
<replaceable>left</replaceable><option>,</option><replaceable>top</replaceable><option>,</option><replaceable>right</replaceable><option>,</option><replaceable>bottom</replaceable>
</term>
<listitem>
<para>
Clear the border-area of the sheet after other processing. Any pixel in the border
area will be set to white.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--pre-mask</option>
<replaceable>x1</replaceable><option>,</option><replaceable>y1</replaceable><option>,</option><replaceable>x2</replaceable><option>,</option><replaceable>y2</replaceable>
</term>
<listitem>
<para>
Specify masks to apply before any other processing. Any pixel outside a mask will be
set to white, unless another mask includes this pixel.
</para>
<para>
Only pixels inside a mask will remain. Multiple masks may be specified. No
deskewing will be applied to the masks specified by <option>--pre-mask</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-s</option>
{ <replaceable>width</replaceable><option>,</option><replaceable>height</replaceable>
| <replaceable>size-name</replaceable> }
</term>
<term>
<option>--size</option>
{ <replaceable>width</replaceable><option>,</option><replaceable>height</replaceable>
| <replaceable>size-name</replaceable> }
</term>
<listitem>
<para>
Change the sheet size before other processing is applied. Content on the sheet gets
zoomed to fit to the appropriate size, but the aspect ratio is preserved. Instead,
if the sheet's aspect ratio changes, the zoomed content gets centered on the
sheet.
</para>
<para>
Possible values for <replaceable>size-name</replaceable> are: <option>a5</option>,
<option>a4</option>, <option>a3</option>, <option>letter</option>,
<option>legal</option>. All size names can also be applied in rotated landscape
orientation, use <option>a4-landscape</option>, <option>letter-landscape</option>
etc.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--post-size</option>
{ <replaceable>width</replaceable><option>,</option><replaceable>height</replaceable>
| <replaceable>size-name</replaceable> }
</term>
<listitem>
<para>
Change the sheet size preserving the content's aspect ratio after other processing
steps are applied.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--stretch</option>
{ <replaceable>width</replaceable><option>,</option><replaceable>height</replaceable>
| <replaceable>size-name</replaceable> }
</term>
<listitem>
<para>
Change the sheet size before other processing is applied. Content on the sheet gets
stretched to the specified size, possibly changing the aspect ratio.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--post-stretch</option>
{ <replaceable>width</replaceable><option>,</option><replaceable>height</replaceable>
| <replaceable>size-name</replaceable> }
</term>
<listitem>
<para>
Change the sheet size after other processing is applied. Content on the sheet gets
stretched to the specified size, possibly changing the aspect ratio.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-z</option> <replaceable>factor</replaceable></term>
<term><option>--zoom</option> <replaceable>factor</replaceable></term>
<listitem>
<para>
Change the sheet size according to the given factor before other processing is done.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--post-zoom</option> <replaceable>factor</replaceable></term>
<listitem>
<para>
Change the sheet size according to the given factor after processing is done.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-bn</option>
{ <option>v</option> | <option>h</option> | <option>v,h</option> }
</term>
<term>
<option>--blackfilter-scan-direction</option>
{ <option>v</option> | <option>h</option> | <option>v,h</option> }
</term>
<listitem>
<para>
Directions in which to search for solidly black areas. Either <option>v</option>
(for vertical mirroring), <option>h</option> (for horizontal mirroring) or
<option>v,h</option> (for both) can be specified.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-bs</option>
{ <replaceable>size</replaceable> |
<replaceable>h-size</replaceable><option>,</option><replaceable>v-size</replaceable> }
</term>
<term>
<option>--blackfilter-scan-size</option>
{ <replaceable>size</replaceable> |
<replaceable>h-size</replaceable><option>,</option><replaceable>v-size</replaceable> }
</term>
<listitem>
<para>
Width of virtual bar used for mask detection. Two values may be specified to
individually set horizontal and vertical size. (default: <option>20,20</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-bd</option>
{ <replaceable>depth</replaceable> |
<replaceable>h-depth</replaceable><option>,</option><replaceable>v-depth</replaceable> }
</term>
<term>
<option>--blackfilter-scan-depth</option>
{ <replaceable>depth</replaceable> |
<replaceable>h-depth</replaceable><option>,</option><replaceable>v-depth</replaceable> }
</term>
<listitem>
<para>
Size of virtual bar used for black area detection. (default: <option>500,500</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-bp</option>
{ <replaceable>step</replaceable> |
<replaceable>h-step</replaceable><option>,</option><replaceable>v-step</replaceable> }
</term>
<term>
<option>--blackfilter-scan-step</option>
{ <replaceable>step</replaceable> |
<replaceable>h-step</replaceable><option>,</option><replaceable>v-step</replaceable> }
</term>
<listitem>
<para>
Steps to move virtual bar for black area detection. (default: <option>5,5</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-bt</option>
<replaceable>threshold</replaceable>
</term>
<term>
<option>--blackfilter-scan-threshold</option>
<replaceable>threshold</replaceable>
</term>
<listitem>
<para>
Ratio of dark pixels above which a black area gets detected. (default:
<option>0.95</option>).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-bx</option>
<replaceable>left</replaceable><option>,</option><replaceable>top</replaceable><option>,</option><replaceable>right</replaceable><option>,</option><replaceable>bottom</replaceable>
</term>
<term>
<option>--blackfilter-scan-exclude</option>
<replaceable>left</replaceable><option>,</option><replaceable>top</replaceable><option>,</option><replaceable>right</replaceable><option>,</option><replaceable>bottom</replaceable>
</term>
<listitem>
<para>
Area on which the blackfilter should not operate. This can be useful to prevent the
blackfilter from working on inner page content. May be specified multiple times to
set more than one area.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-bi</option> <replaceable>intensity</replaceable>
</term>
<term>
<option>--blackfilter-intensity</option> <replaceable>intensity</replaceable>
</term>
<listitem>
<para>
Intensity with which to delete black areas. Larger values will leave less
noise-pixels around former black areas, but may delete page content. (default:
<option>20</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-ni</option> <replaceable>intensity</replaceable>
</term>
<term>
<option>-noisefilter-intensity</option> <replaceable>intensity</replaceable>
</term>
<listitem>
<para>
Intensity with which to delete individual pixels or tiny clusters of pixels. Any
cluster which only contains <replaceable>intensity</replaceable> dark pixels
together will be deleted. (default: <option>4</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-ls</option>
{ <replaceable>size</replaceable> |
<replaceable>h-size</replaceable><option>,</option><replaceable>v-size</replaceable> }
</term>
<term>
<option>--blurfilter-size</option>
{ <replaceable>size</replaceable> |
<replaceable>h-size</replaceable><option>,</option><replaceable>v-size</replaceable> }
</term>
<listitem>
<para>
Size of blurfilter area to search for "lonely" clusters of pixels. (default:
<option>100,100</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-lp</option>
{ <replaceable>step</replaceable> |
<replaceable>h-step</replaceable><option>,</option><replaceable>v-step</replaceable> }
</term>
<term>
<option>--blurfilter-step</option>
{ <replaceable>step</replaceable> |
<replaceable>h-step</replaceable><option>,</option><replaceable>v-step</replaceable> }
</term>
<listitem>
<para>
Size of "blurring" steps in each direction. (default: <option>50,50</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-li</option>
<replaceable>ratio</replaceable>
</term>
<term>
<option>--blurfilter-intensity</option>
<replaceable>ratio</replaceable>
</term>
<listitem>
<para>
Relative intensity with which to delete tiny clusters of pixels. Any blurred area
which contains at most the <replaceable>ratio</replaceable> of dark pixels will be
cleared. (default: <option>0.01</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-gs</option>
{ <replaceable>size</replaceable> |
<replaceable>h-size</replaceable><option>,</option><replaceable>v-size</replaceable> }
</term>
<term>
<option>--grayfilter-size</option>
{ <replaceable>size</replaceable> |
<replaceable>h-size</replaceable><option>,</option><replaceable>v-size</replaceable> }
</term>
<listitem>
<para>
Size of grayfilter mask to search for "gray-only" areas of pixels. (default:
<option>50,50</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-gp</option>
{ <replaceable>step</replaceable> |
<replaceable>h-step</replaceable><option>,</option><replaceable>v-step</replaceable> }
</term>
<term>
<option>--grayfilter-step</option>
{ <replaceable>step</replaceable> |
<replaceable>h-step</replaceable><option>,</option><replaceable>v-step</replaceable> }
</term>
<listitem>
<para>
Size of steps moving the grayfilter mask in each direction. (default:
<option>20,20</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-gt</option>
<replaceable>ratio</replaceable>
</term>
<term>
<option>--grayfilter-threshold</option>
<replaceable>ratio</replaceable>
</term>
<listitem>
<para>
Relative intensity of grayness which is accepted before clearing the grayfilter mask
in cases where no black pixel is found in the mask. (default: <option>0.5</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-p</option>
<replaceable>x</replaceable><option>,</option><replaceable>y</replaceable>
</term>
<term>
<option>--mask-scan-point</option>
<replaceable>x</replaceable><option>,</option><replaceable>y</replaceable>
</term>
<listitem>
<para>
Manually set starting point for mask-detection. Multiple
<option>--mask-scan-point</option> options may be specified to detect multiple
masks.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-m</option>
<replaceable>x1</replaceable><option>,</option><replaceable>y1</replaceable><option>,</option><replaceable>x2</replaceable><option>,</option><replaceable>y2</replaceable>
</term>
<term>
<option>--mask</option>
<replaceable>x1</replaceable><option>,</option><replaceable>y1</replaceable><option>,</option><replaceable>x2</replaceable><option>,</option><replaceable>y2</replaceable>
</term>
<listitem>
<para>
Manually add a mask, in addition to masks automatically detected around the
<option>--mask-scan-point</option> coordinates (unless
<option>--no-mask-scan</option> is specified).
</para>
<para>
Any pixel outside a mask will be set to white, unless another mask covers this
pixel.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-mn</option>
{ <option>v</option> | <option>h</option> | <option>v,h</option> }
</term>
<term>
<option>--mask-scan-direction</option>
{ <option>v</option> | <option>h</option> | <option>v,h</option> }
</term>
<listitem>
<para>
Directions in which to search for mask borders, starting from --mask-scan-point
coordinates. Either <option>v</option> (for vertical mirroring), <option>h</option>
(for horizontal mirroring) or <option>v,h</option> (for both) can be specified.
(default: <option>h</option>, as <option>v</option> may cut text- paragraphs on
single-page sheets)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-ms</option>
{ <replaceable>size</replaceable> |
<replaceable>h-size</replaceable><option>,</option><replaceable>v-size</replaceable> }
</term>
<term>
<option>--mask-scan-size</option>
{ <replaceable>size</replaceable> |
<replaceable>h-size</replaceable><option>,</option><replaceable>v-size</replaceable> }
</term>
<listitem>
<para>
Width of the virtual bar used for mask detection. Two values may be specified to
individually set horizontal and vertical size. (default: <option>50,50</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-md</option>
{ <replaceable>depth</replaceable> |
<replaceable>h-depth</replaceable><option>,</option><replaceable>v-depth</replaceable> }
</term>
<term>
<option>--mask-scan-depth</option>
{ <replaceable>depth</replaceable> |
<replaceable>h-depth</replaceable><option>,</option><replaceable>v-depth</replaceable> }
</term>
<listitem>
<para>
Height of the virtual bar used for mask detection. (default: <option>-1,-1</option>,
using the total width or height of the sheet)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-mp</option>
{ <replaceable>step</replaceable> |
<replaceable>h-step</replaceable><option>,</option><replaceable>v-step</replaceable> }
</term>
<term>
<option>--mask-scan-step</option>
{ <replaceable>step</replaceable> |
<replaceable>h-step</replaceable><option>,</option><replaceable>v-step</replaceable> }
</term>
<listitem>
<para>
Steps to move the virtual bar for mask detection. (default: <option>5,5</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-mt</option>
{ <replaceable>threshold</replaceable> |
<replaceable>h-threshold</replaceable><option>,</option><replaceable>v-threshold</replaceable> }
</term>
<term>
<option>--mask-scan-threshold</option>
{ <replaceable>threshold</replaceable> |
<replaceable>h-threshold</replaceable><option>,</option><replaceable>v-threshold</replaceable> }
</term>
<listitem>
<para>
Ratio of dark pixels below which an edge gets detected, relative to maximum
blackness when counting from the start coordinate heading towards one
edge. (default: <option>0.1</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-mm</option>
<replaceable>w</replaceable><option>,</option><replaceable>h</replaceable>
</term>
<term>
<option>--mask-scan-minimum</option>
<replaceable>w</replaceable><option>,</option><replaceable>h</replaceable>
</term>
<listitem>
<para>
Minimum allowed size of an auto-detected mask. Masks detected below this size will
be ignored and set to the size specified by mask-scan-maximum. (default:
<option>100,100</option>)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-mM</option>
<replaceable>w</replaceable><option>,</option><replaceable>h</replaceable>
</term>
<term>
<option>--mask-scan-maximum</option>
<replaceable>w</replaceable><option>,</option><replaceable>h</replaceable>
</term>
<listitem>
<para>
Maximum allowed size of an auto-detected mask. Masks detected above this size will
be shrunk to the maximum value, each direction individually. (default: sheet size,
or page size derived from <option>--layout</option> option)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-mc</option> <replaceable>color</replaceable>
</term>