~ubuntu-branches/ubuntu/trusty/enblend-enfuse/trusty-proposed

« back to all changes in this revision

Viewing changes to .pc/15_texi_ids.diff/doc/enblend.texi

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-08-21 20:52:52 UTC
  • mfrom: (5.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20130821205252-n4p1m7q3or02ge3w
Tags: 4.0+dfsg-6ubuntu1
* Merge from Debian, remaining changes:
  - Build-depend on libtiff-dev rather than libtiff4-dev.
  - Build-depend on libglew-dev rather than libglew1.5-dev | libglew1.4-dev
    | libglew-dev.
  - Use default inlining parameters for the build.
  - Build using -O1 on armel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
\input auxmac
 
2
\input texinfo
 
3
 
 
4
 
 
5
@c
 
6
@c Header
 
7
@c
 
8
 
 
9
@c %**start of header
 
10
@setfilename enblend.info
 
11
@settitle Combining Multiple Images with Enblend @value{VERSION}
 
12
@include auxmac.texi
 
13
@include versenblend.texi
 
14
@include varsenblend.texi
 
15
@include config-h.texi
 
16
 
 
17
@set default-image-cache-cachesize 1024@dmn{MB}
 
18
@set default-image-cache-blocksize 2048@dmn{KB}
 
19
 
 
20
@c Define a new index for syntactic comments.
 
21
@defcodeindex sc
 
22
@c Define a new index for options.
 
23
@defcodeindex op
 
24
@c %**end of header
 
25
 
 
26
 
 
27
@c
 
28
@c Categorization for the GNU Info System
 
29
@c
 
30
 
 
31
@dircategory Individual utilities
 
32
 
 
33
@direntry
 
34
* enblend: (enblend).                   Blend images using a multiresolution spline.
 
35
@end direntry
 
36
 
 
37
 
 
38
@c
 
39
@c Summary Description and Copyright
 
40
@c
 
41
 
 
42
@copying
 
43
This manual is for Enblend (version @value{VERSION}, @value{UPDATED}),
 
44
a tool for compositing images in such a way that the seam between the
 
45
images is invisible, or at least very difficult to see.
 
46
 
 
47
Copyright @copyright{} 2004--2009 @sc{Andrew Mihal}.
 
48
 
 
49
@quotation
 
50
Permission is granted to copy, distribute and/or modify this document
 
51
under the terms of the @acronym{GNU} Free Documentation License,
 
52
Version 1.2 or any later version published by the Free Software
 
53
Foundation; with no Invariant Sections, no Front-Cover Texts and no
 
54
Back-Cover Texts.  A copy of the license is included in the section
 
55
entitled ``@acronym{GNU} Free Documentation License''.
 
56
@end quotation
 
57
@end copying
 
58
 
 
59
 
 
60
@c
 
61
@c Title Page and Copyright
 
62
@c
 
63
 
 
64
@titlepage
 
65
@title Enblend
 
66
@subtitle Combining Multiple Images
 
67
@subtitle with Enblend version @value{VERSION}, @value{UPDATED}
 
68
 
 
69
@author Andrew Mihal
 
70
 
 
71
@page
 
72
@vskip 0pt plus 1fill
 
73
@insertcopying
 
74
@end titlepage
 
75
 
 
76
 
 
77
@c @ifnothtml
 
78
@c @summarycontents
 
79
@c @end ifnothtml
 
80
@contents
 
81
 
 
82
 
 
83
@c For the TeX output the List-of-Tables and List-of-Figures appear
 
84
@c right after the Table-of-Contents.  In all other formats they go
 
85
@c right before the indices.
 
86
@iftex
 
87
@c Adjust page number so that we get roman numerals for the
 
88
@c List-of-Tables and List-of-Figures.  This screws up Texinfo's page
 
89
@c count so that we must undo it later.
 
90
@tex
 
91
\global\pageno=-4
 
92
@end tex
 
93
 
 
94
@unnumbered List of Tables
 
95
@listoffloats Table
 
96
 
 
97
 
 
98
@unnumbered List of Figures
 
99
@listoffloats Figure
 
100
@end iftex
 
101
 
 
102
 
 
103
@c
 
104
@c ``Top'' Node and Master Menu
 
105
@c
 
106
 
 
107
@ifnottex
 
108
@node Top
 
109
@top Enblend
 
110
 
 
111
This manual is for Enblend (version@tie{}@value{VERSION},
 
112
@value{UPDATED}), a tool for compositing images in such a way that the
 
113
seam between the images is invisible, or at least very difficult to
 
114
see.
 
115
@end ifnottex
 
116
 
 
117
@menu
 
118
* Overview::                    Overview of Enblend's features
 
119
* Workflow::                    Enblend's role in making panoramas
 
120
* Invocation::                  Command line options and arguments
 
121
* Understanding Masks::         How to interpret masks and mask files
 
122
* Tuning Memory Usage::         Balancing @acronym{RAM} and swap
 
123
* Helpful Programs::            Useful other programs
 
124
* Bug Reports::                 How to write bug reports
 
125
* Authors::                     Major Contributors
 
126
* FDL::                         @acronym{GNU} Free Documentation License
 
127
* Program Index::               Names of programs referenced
 
128
* Syntactic-Comment Index::     Keys of syntactic comments
 
129
* Option Index::                Index of all options
 
130
* General Index::               Topic index
 
131
@end menu
 
132
 
 
133
 
 
134
@c
 
135
@c Document Body
 
136
@c
 
137
 
 
138
@node Overview
 
139
@chapter Overview
 
140
 
 
141
@c Undo the roman page numbering we used for the Table-of-Contents,
 
142
@c the List-of-Tables, and the List-of-Figures.
 
143
@tex
 
144
\global\pageno=1
 
145
@end tex
 
146
 
 
147
@cindex overview
 
148
 
 
149
@cindex Burt-Adelson multiresolution spline
 
150
Enblend overlays multiple @acronym{TIFF} images using the
 
151
@sc{Burt}-@sc{Adelson} multiresolution spline
 
152
algorithm.@footnote{@sc{Peter J. Burt} and @sc{Edward H. Adelson}, ``A
 
153
Multiresolution Spline With Application to Image Mosaics'',
 
154
@acronym{ACM} Transactions on Graphics, @abbr{Vol@.} 2, @abbr{No@.} 4,
 
155
October 1983, pages 217--236.}  This technique tries to make the seams
 
156
between the input images invisible.  The basic idea is that image
 
157
features should be blended across a transition zone proportional in
 
158
size to the spatial frequency of the features.  For example, objects
 
159
like trees and windowpanes have rapid changes in color.  By blending
 
160
these features in a narrow zone, you will not be able to see the seam
 
161
because the eye already expects to see color changes at the edge of
 
162
these features.  Clouds and sky are the opposite.  These features have
 
163
to be blended across a wide transition zone because any sudden change
 
164
in color will be immediately noticeable.
 
165
 
 
166
@cindex alpha channel
 
167
@cindex channel, alpha
 
168
Enblend expects each input file to have an alpha channel.  The alpha
 
169
channel should indicate the region of the file that has valid image
 
170
data.  Enblend compares the alpha regions in the input files to find
 
171
the areas where images overlap.  Alpha channels can be used to
 
172
indicate to Enblend that certain portions of an input image should not
 
173
contribute to the final image.
 
174
 
 
175
@pindex hugin
 
176
@pindex PanoTools
 
177
@cindex feathering, detrimental effect of
 
178
Enblend does @emph{not} align images.  Use a tool such as
 
179
@command{hugin} or PanoTools to do this.  The
 
180
@acronym{TIFF}@tie{}files produced by these programs are exactly what
 
181
Enblend is designed to work with.  Sometimes these @acronym{GUI}s
 
182
allow you to select feathering for the edges of your images.  This
 
183
treatment is detrimental to Enblend.  Turn off feathering by
 
184
deselecting it or setting the feather width to zero.
 
185
 
 
186
Enblend blends the images in the order they are specified on the
 
187
command line.  You should order your images according to the way that
 
188
they overlap, for example from left-to-right across the panorama.  If
 
189
you are making a multi-row panorama, we recommend blending each
 
190
horizontal row individually, and then running Enblend a last time to
 
191
blend all of the rows together vertically.
 
192
 
 
193
@cindex multi-layer image
 
194
@cindex image, multi-layer
 
195
@cindex multi-directory @acronym{TIFF}
 
196
@cindex @acronym{TIFF}, multi-directory
 
197
@cindex @command{tiffcopy}
 
198
@cindex @command{tiffsplit}
 
199
Enblend reads all layers of multi-layer images, like, for example,
 
200
multi-directory @acronym{TIFF} images@footnote{Use utilities like,
 
201
e.g., @command{tiffcopy} and @command{tiffsplit} of LibTIFF to
 
202
manipulate multi-directory @acronym{TIFF} images.  @xref{Helpful
 
203
Programs}.}.  The input images are processed in the order they appear
 
204
on the command line.  Multi-layer images are processed from the first
 
205
layer to the last before Enblend considers the next image on the
 
206
command line.
 
207
 
 
208
@cindex SourceForge
 
209
Find out more about Enblend on its @uref{http://@/sourceforge.net/,
 
210
SourceForge} @uref{http://@/enblend.sourceforge.net/, web page}.
 
211
 
 
212
 
 
213
@node Workflow
 
214
@chapter Workflow
 
215
@cindex workflow
 
216
 
 
217
@include workflow.texi
 
218
 
 
219
 
 
220
@node Invocation
 
221
@chapter Invocation
 
222
@cindex invocation
 
223
 
 
224
@command{enblend} [@var{OPTIONS}] [@code{--output=}@var{IMAGE}]
 
225
@var{INPUT}@enddots{}
 
226
 
 
227
@noindent
 
228
Assemble the sequence of images @var{INPUT}@dots{} into a single
 
229
@var{IMAGE}.
 
230
 
 
231
@cindex literal filename
 
232
@cindex filename, literal
 
233
@cindex response file
 
234
Input images are either specified literally or via so-called response
 
235
files (see below).  The latter are an alternative to specifying image
 
236
filenames on the command line.
 
237
 
 
238
 
 
239
@menu
 
240
* Response Files::              Files listing the images' names
 
241
* Common Options::              General options
 
242
* Extended Options::            Memory and @acronym{GPU} control
 
243
* Mask Generation Options::     Mask generation control
 
244
@end menu
 
245
 
 
246
 
 
247
@node Response Files
 
248
@section Response Files
 
249
@cindex response file
 
250
 
 
251
@include filespec.texi
 
252
 
 
253
 
 
254
@node Common Options
 
255
@section Common Options
 
256
@cindex options, common
 
257
 
 
258
Common options control some overall features of Enblend.
 
259
 
 
260
@table @code
 
261
@item -a
 
262
@opindex -a
 
263
Pre-assemble non-overlapping images before each blending iteration.
 
264
 
 
265
This overrides the default behavior which is to blend the images
 
266
sequentially in the order given on the command line.  Enblend will use
 
267
fewer blending iterations, but it will do more work in each iteration.
 
268
 
 
269
@item --compression=@var{COMPRESSION}
 
270
@opindex --compression
 
271
@cindex output file compression
 
272
@cindex compression
 
273
Write a compressed output file.
 
274
 
 
275
Depending on the output file format Enblend accepts different values
 
276
for @var{COMPRESSION}.
 
277
 
 
278
@table @asis
 
279
@item @acronym{JPEG}
 
280
@cindex @acronym{JPEG} compression
 
281
@cindex compression, @acronym{JPEG}
 
282
@var{COMPRESSION} is a @acronym{JPEG} quality level ranging from
 
283
0--100.
 
284
 
 
285
@item @acronym{TIFF}
 
286
@var{COMPRESSION} is one of the keywords:
 
287
 
 
288
@table @samp
 
289
@item NONE
 
290
Do not compress.  This is the default.
 
291
 
 
292
@item DEFLATE
 
293
@cindex deflate compression
 
294
@cindex compression, deflate
 
295
Use the @sc{Deflate} compression scheme also called
 
296
@acronym{ZIP}-in-@acronym{TIFF}.  @sc{Deflate} is a lossless data
 
297
compression algorithm that uses a combination of the @acronym{LZ77}
 
298
algorithm and @sc{Huffman} coding.
 
299
 
 
300
@item LZW
 
301
@cindex @acronym{LZW} compression
 
302
@cindex compression, @acronym{LZW}
 
303
Use @sc{Lempel}-@sc{Ziv}-@sc{Welch} (@acronym{LZW}) adaptive
 
304
compression scheme.  @acronym{LZW} compression is lossless.
 
305
 
 
306
@item PACKBITS
 
307
@cindex packbits compression
 
308
@cindex compression, packbits
 
309
Use @sc{PackBits} compression scheme.  @sc{PackBits} is particular
 
310
variant of run-length compression.  It is lossless.
 
311
@end table
 
312
 
 
313
@item Any other format
 
314
Other formats do not accept a @var{COMPRESSION} setting.
 
315
 
 
316
However, @uref{http://@/hci.iwr.uni-@/heidelberg.de/@/vigra/,
 
317
@acronym{VIGRA}} automatically compresses @file{png}-files with the
 
318
@sc{Deflate} method.
 
319
@end table
 
320
 
 
321
@item -h
 
322
@itemx --help
 
323
@opindex -h
 
324
@opindex --help
 
325
Print information on the available options and exit.
 
326
 
 
327
@item -l @var{LEVELS}
 
328
@itemx --levels=@var{LEVELS}
 
329
@opindex -l
 
330
@opindex --levels
 
331
@cindex pyramid levels
 
332
@cindex levels, pyramid
 
333
Use at most this many @var{LEVELS} for pyramid @footnote{As
 
334
Dr.@tie{}Daniel Jackson correctly
 
335
@uref{http://stargate.wikia.com/@/wiki/@/The_@/Tomb, noted}, actually,
 
336
it is not a pyramid: ``Ziggaurat, it's a
 
337
@uref{http://en.wikipedia.org/@/wiki/@/Ziggaurat, Ziggaurat}.''}
 
338
blending if @var{LEVELS} is positive, or reduce the maximum number of
 
339
levels used by @minus{}@var{LEVELS} if @var{LEVELS} is negative.
 
340
 
 
341
The number of levels used in a pyramid controls the balance between
 
342
local and global image features (contrast, saturation, @dots{}) in the
 
343
blended region.  Fewer levels emphasize local features and suppress
 
344
global ones.  The more levels a pyramid has, the more global features
 
345
will be taken into account.
 
346
 
 
347
As a guideline, remember that each new level works on a linear scale
 
348
twice as large as the previous one.  So, the zeroth layer, the
 
349
original image, obviously defines the image at single-pixel scale, the
 
350
first level works at two-pixel scale, and generally, the @math{n}-th
 
351
level contains image data at @math{2^n}-pixel scale.  This is the
 
352
reason why an image of
 
353
@math{width}@classictimes{}@math{height}@tie{}pixels cannot be
 
354
deconstructed into a pyramid of more than
 
355
@ifinfo
 
356
@display
 
357
@math{floor(log_2(min(width, height)))}
 
358
@end display
 
359
@end ifinfo
 
360
@html
 
361
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
362
    <mrow>
 
363
        <mo>&LeftFloor;</mo>
 
364
        <mrow>
 
365
            <msub>
 
366
                <mo>log</mo>
 
367
                <mn>2</mo>
 
368
            </msub>
 
369
            <mo>&ApplyFunction;</mo>
 
370
            <mo>(</mo>
 
371
            <mrow>
 
372
                <mo>min</mo>
 
373
                <mo>&ApplyFunction;</mo>
 
374
                <mfenced>
 
375
                    <mi mathvariant="italic">width</mi>
 
376
                    <mi mathvariant="italic">height</mi>
 
377
                </mfenced>
 
378
            </mrow>
 
379
            <mo>)</mo>
 
380
        </mrow>
 
381
        <mo>&RightFloor;</mo>
 
382
    </mrow>
 
383
</math>
 
384
@end html
 
385
@tex
 
386
$$
 
387
    \lfloor \log_2(\min(\mathit{width}, \mathit{height})) \rfloor
 
388
$$
 
389
@end tex
 
390
levels.
 
391
 
 
392
If too few levels are used, ``halos'' around regions of strong local
 
393
feature variation can show up.  On the other hand, if too many levels
 
394
are used, the image might contain too much global features.  Usually,
 
395
the latter is not a problem, but is highly desired.  This is the
 
396
reason, why the default is to use as many levels as is possible given
 
397
the size of the overlap regions.  Enblend may still use a smaller
 
398
number of levels if the geometry of the overlap region demands.
 
399
 
 
400
Positive values of @var{LEVELS} limit the maximum number of pyramid
 
401
levels.  Depending on the size and geometry of the overlap regions
 
402
this may or may not influence any pyramid.  Negative values of
 
403
@var{LEVELS} reduce the number of pyramid levels below the maximum no
 
404
matter what the actual maximum is and thus always influence all
 
405
pyramids.
 
406
 
 
407
The valid range of the absolute value of @var{LEVELS} is
 
408
@value{src::minimum-pyramid-levels} to
 
409
@value{src::maximum-pyramid-levels}.
 
410
 
 
411
@item -o
 
412
@itemx --output=@var{FILE}
 
413
@opindex -o
 
414
@opindex --output
 
415
Place output in @var{FILE}.
 
416
 
 
417
@cindex @file{@value{src::default-output-filename}}
 
418
@cindex default output filename
 
419
@cindex output filename, default
 
420
If @option{--output} is not specified, the default is to put the
 
421
resulting image in @file{@value{src::default-output-filename}}.
 
422
 
 
423
@item -v
 
424
@itemx --verbose[=@var{LEVEL}]
 
425
@opindex -v
 
426
@opindex --verbose
 
427
Without an argument, increase the verbosity of progress reporting.
 
428
Giving more @option{--verbose}@tie{}options will make Enblend more
 
429
verbose.  Directly set a verbosity level with a non-negative integral
 
430
@var{LEVEL}.
 
431
 
 
432
Each level includes all messages of the lower levels.
 
433
 
 
434
@table @asis
 
435
@item Level
 
436
Messages
 
437
 
 
438
@item 0
 
439
only warnings and errors
 
440
 
 
441
@item 1
 
442
reading and writing of images
 
443
 
 
444
@item 2
 
445
mask generation, pyramid, and blending
 
446
 
 
447
@item 3
 
448
reading of response files, color conversions
 
449
 
 
450
@item 4
 
451
image sizes, bounding boxes and intersection sizes
 
452
 
 
453
@item 5
 
454
detailed information on the optimizer runs (Enblend only)
 
455
 
 
456
@item 6
 
457
estimations of required memory in selected processing steps
 
458
@end table
 
459
 
 
460
The default verbosity level of Enblend is
 
461
@value{src::default-verbosity-level}.
 
462
 
 
463
@item -V
 
464
@itemx --version
 
465
@opindex -V
 
466
@opindex --version
 
467
Output information on the Enblend version.
 
468
 
 
469
Team this option with @option{--verbose} to inquire about
 
470
configuration details, like the extra features that have been compiled
 
471
in.
 
472
 
 
473
@item -w
 
474
@itemx --wrap=@var{MODE}
 
475
@opindex -w
 
476
@opindex --wrap
 
477
@cindex 360@textdegree{} panoramas
 
478
@cindex wrap around
 
479
Blend around the boundaries of the panorama.
 
480
 
 
481
With this option Enblend treats the panorama of width@tie{}@math{w}
 
482
and height@tie{}@math{h} as an infinite data structure, where each
 
483
pixel@tie{}@math{P(x, y)} of the input images represents the set of
 
484
pixels@tie{}@math{S_P(x, y)}@footnote{Solid-state physicists will be
 
485
reminded of the
 
486
@uref{http://@/en.wikipedia.org/@/wiki/@/Born-@/von_@/Karman_@/boundary_@/condition,
 
487
@sc{Born}-@sc{von@tie{}K@'arm@'an} boundary condition}.}.
 
488
 
 
489
@var{MODE} takes the following values:
 
490
 
 
491
@table @samp
 
492
@item none
 
493
@itemx open
 
494
This is a ``no-op''; it has the same effect as not giving
 
495
@option{--wrap} at all.  The set of input images is considered open at
 
496
its boundaries.
 
497
 
 
498
@item horizontal
 
499
Wrap around horizontally:
 
500
@ifinfo
 
501
@display
 
502
@math{S_P(x, y) = @{P(x + m * w, y): m in Z@}.}
 
503
@end display
 
504
@end ifinfo
 
505
@html
 
506
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
507
    <mrow>
 
508
        <msub>
 
509
            <mi>S</mi>
 
510
            <mi>P</mi>
 
511
        </msub>
 
512
        <mfenced>
 
513
            <mi>x</mi>
 
514
            <mi>y</mi>
 
515
        </mfenced>
 
516
        <mo>=</mo>
 
517
        <mrow>
 
518
            <mo>&lcub;</mo>
 
519
            <mrow>
 
520
                <mi>P</mi>
 
521
                <mfenced>
 
522
                    <mrow>
 
523
                        <mi>x</mi>
 
524
                        <mo>+</mo>
 
525
                        <mi>m</mi>
 
526
                        <mo>&InvisibleTimes;</mo>
 
527
                        <mi>w</mi>
 
528
                    </mrow>
 
529
                    <mi>y</mi>
 
530
                </mfenced>
 
531
            </mrow>
 
532
            <mo>:</mo>
 
533
            <mrow>
 
534
                <mi>m</mi>
 
535
                <mtext>&ThickSpace;in&ThickSpace;</mtext>
 
536
                <mi>Z</mi>
 
537
            </mrow>
 
538
            <mo>&rcub;</mo>
 
539
        </mrow>
 
540
        <mtext>.</mtext>
 
541
    </mrow>
 
542
</math>
 
543
@end html
 
544
@tex
 
545
$$
 
546
    S_P(x, y) = \{P(x + m w, y): m \in Z\}.
 
547
$$
 
548
@end tex
 
549
This is useful for 360@textdegree{} horizontal panoramas as it
 
550
eliminates the left and right borders.
 
551
 
 
552
@item vertical
 
553
Wrap around vertically:
 
554
@ifinfo
 
555
@display
 
556
@math{S_P(x, y) = @{P(x, y + n * h): m in Z@}.}
 
557
@end display
 
558
@end ifinfo
 
559
@html
 
560
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
561
    <mrow>
 
562
        <msub>
 
563
            <mi>S</mi>
 
564
            <mi>P</mi>
 
565
        </msub>
 
566
        <mfenced>
 
567
            <mi>x</mi>
 
568
            <mi>y</mi>
 
569
        </mfenced>
 
570
        <mo>=</mo>
 
571
        <mrow>
 
572
            <mo>&lcub;</mo>
 
573
            <mrow>
 
574
                <mi>P</mi>
 
575
                <mfenced>
 
576
                    <mi>x</mi>
 
577
                    <mrow>
 
578
                        <mi>y</mi>
 
579
                        <mo>+</mo>
 
580
                        <mi>n</mi>
 
581
                        <mo>&InvisibleTimes;</mo>
 
582
                        <mi>h</mi>
 
583
                    </mrow>
 
584
                </mfenced>
 
585
            </mrow>
 
586
            <mo>:</mo>
 
587
            <mrow>
 
588
                <mi>n</mi>
 
589
                <mtext>&ThickSpace;in&ThickSpace;</mtext>
 
590
                <mi>Z</mi>
 
591
            </mrow>
 
592
            <mo>&rcub;</mo>
 
593
        </mrow>
 
594
        <mtext>.</mtext>
 
595
    </mrow>
 
596
</math>
 
597
@end html
 
598
@tex
 
599
$$
 
600
    S_P(x, y) = \{P(x, y + n h): n \in Z\}.
 
601
$$
 
602
@end tex
 
603
This is useful for 360@textdegree{} vertical panoramas as it
 
604
eliminates the top and bottom borders.
 
605
 
 
606
@item both
 
607
@itemx horizontal+vertical
 
608
@itemx vertical+horizontal
 
609
Wrap around both horizontally and vertically:
 
610
@ifinfo
 
611
@display
 
612
@math{S_P(x, y) = @{P(x + m * w, y + n * h): m, n in Z@}.}
 
613
@end display
 
614
@end ifinfo
 
615
@html
 
616
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
617
    <mrow>
 
618
        <msub>
 
619
            <mi>S</mi>
 
620
            <mi>P</mi>
 
621
        </msub>
 
622
        <mfenced>
 
623
            <mi>x</mi>
 
624
            <mi>y</mi>
 
625
        </mfenced>
 
626
        <mo>=</mo>
 
627
        <mrow>
 
628
            <mo>&lcub;</mo>
 
629
            <mrow>
 
630
                <mi>P</mi>
 
631
                <mfenced>
 
632
                    <mrow>
 
633
                        <mi>x</mi>
 
634
                        <mo>+</mo>
 
635
                        <mi>m</mi>
 
636
                        <mo>&InvisibleTimes;</mo>
 
637
                        <mi>w</mi>
 
638
                    </mrow>
 
639
                    <mrow>
 
640
                        <mi>y</mi>
 
641
                        <mo>+</mo>
 
642
                        <mi>n</mi>
 
643
                        <mo>&InvisibleTimes;</mo>
 
644
                        <mi>h</mi>
 
645
                    </mrow>
 
646
                </mfenced>
 
647
            </mrow>
 
648
            <mo>:</mo>
 
649
            <mrow>
 
650
                <mrow>
 
651
                    <mi>m</mi>
 
652
                    <mo>,</mo>
 
653
                    <mi>n</mi>
 
654
                </mrow>
 
655
                <mtext>&ThickSpace;in&ThickSpace;</mtext>
 
656
                <mi>Z</mi>
 
657
            </mrow>
 
658
            <mo>&rcub;</mo>
 
659
        </mrow>
 
660
        <mtext>.</mtext>
 
661
    </mrow>
 
662
</math>
 
663
@end html
 
664
@tex
 
665
$$
 
666
    S_P(x, y) = \{P(x + m w, y + n h): m, n \in Z\}.
 
667
$$
 
668
@end tex
 
669
In this mode, both left and right borders, as well as top and bottom
 
670
borders, are eliminated.
 
671
@end table
 
672
 
 
673
Specifying @option{--wrap} without @var{MODE} selects horizontal
 
674
wrapping.
 
675
 
 
676
@item -x
 
677
@opindex -x
 
678
Checkpoint partial results to the output file after each blending
 
679
step.
 
680
@end table
 
681
 
 
682
 
 
683
@node Extended Options
 
684
@section Extended Options
 
685
@cindex options, extended
 
686
 
 
687
Extended options control the image cache, the color model, and the
 
688
cropping of the output image.
 
689
 
 
690
@table @code
 
691
@item -b @var{BLOCKSIZE}
 
692
@opindex -b
 
693
@cindex image cache, block size
 
694
Set the @var{BLOCKSIZE} in kilobytes (@acronym{KB}) of Enblend's image
 
695
cache.
 
696
 
 
697
This is the amount of data that Enblend will move to and from the disk
 
698
at one time.  The default is @value{default-image-cache-blocksize},
 
699
which should be ok for most systems.  See @ref{Tuning Memory Usage}
 
700
for details.
 
701
 
 
702
Note that Enblend must have been compiled with the image-cache feature
 
703
for this option to be effective.  Find out about extra features with
 
704
@code{enblend --version --verbose}.
 
705
 
 
706
@item -c
 
707
@opindex -c
 
708
@cindex color appearance model
 
709
@cindex @acronym{CIECAM02}
 
710
Use the @acronym{CIECAM02} color appearance model for blending colors.
 
711
 
 
712
@cindex @acronym{ICC} profile
 
713
@cindex profile, @acronym{ICC}
 
714
@cindex @acronym{sRGB} color space
 
715
@cindex color space, @acronym{sRGB}
 
716
The input files should have embedded @acronym{ICC} profiles if this
 
717
option is specified.  If no @acronym{ICC} profile is present, Enblend
 
718
will assume that the image uses the @acronym{sRGB} color space.  The
 
719
difference between this option and Enblend's default color blending
 
720
algorithm is very slight and will only be noticeable when areas of
 
721
different primary colors are blended together.
 
722
 
 
723
@item -d
 
724
@itemx --depth=@var{DEPTH}
 
725
@opindex -d
 
726
@opindex --depth
 
727
@cindex bits per channel
 
728
@cindex channel width
 
729
Force the number of bits per channel and the numeric format of the
 
730
output image.
 
731
 
 
732
Enblend always uses a smart way to change the channel depth to assure
 
733
highest image quality (at the expense of memory), whether
 
734
requantization is implicit because of the output format or explicit
 
735
with option@tie{}@option{--depth}.
 
736
 
 
737
@itemize
 
738
@item
 
739
If the output-channel width is larger than the input-channel width of
 
740
the input images, the input images' channels are widened to the output
 
741
channel width immediately after loading, that is, as soon as possible.
 
742
Enblend then performs all blending operations at the output-channel
 
743
width, thereby preserving minute color details which can appear in the
 
744
blending areas.
 
745
 
 
746
@item
 
747
If the output-channel width is smaller than the input-channel width of
 
748
the input images, the output image's channels are narrowed only right
 
749
before it is written to disk, that is, as late as possible.  Thus the
 
750
data benefits from the wider input channels for the longest time.
 
751
@end itemize
 
752
 
 
753
All @var{DEPTH} specifications are valid in lowercase as well as
 
754
uppercase letters.  For integer format, use
 
755
 
 
756
@table @asis
 
757
@item @code{8}, @code{uint8}
 
758
Unsigned 8@dmn{bit}; range: 0..255
 
759
@item @code{int16}
 
760
Signed 16@dmn{bit}; range: @minus{}32768..32767
 
761
@item @code{16}, @code{uint16}
 
762
Unsigned 16@dmn{bit}; range: 0..65535
 
763
@item @code{int32}
 
764
Signed 32@dmn{bit}; range: @minus{}2147483648..2147483647
 
765
@item @code{32}, @code{uint32}
 
766
Unsigned 32@dmn{bit}; range: 0..4294967295
 
767
@end table
 
768
 
 
769
For floating-point format, use
 
770
 
 
771
@c Minimum positive normalized value: 2^(2 - 2^k)
 
772
@c Epsilon: 2^(1 - n)
 
773
@c Maximum finite value: (1 - 2^(-n)) * 2^(2^k)
 
774
 
 
775
@table @asis
 
776
@c IEEE single: 32 bits, n = 24, k = 32 - n - 1 = 7
 
777
@item @code{r32}, @code{real32}, @code{float}
 
778
@cindex @acronym{IEEE754} single precision float
 
779
@cindex single precision float, @acronym{IEEE754}
 
780
@acronym{IEEE754} single precision floating-point, 32@dmn{bit} wide,
 
781
24@dmn{bit} significant
 
782
 
 
783
@itemize
 
784
@item
 
785
Minimum normalized value: @semilog{1.2, -38}
 
786
@item
 
787
Epsilon: @semilog{1.2, -7}
 
788
@item
 
789
Maximum finite value: @semilog{3.4, 38}
 
790
@end itemize
 
791
 
 
792
@c IEEE double: 64 bits, n = 53, k = 64 - n - 1 = 10
 
793
@item @code{r64}, @code{real64}, @code{double}
 
794
@cindex @acronym{IEEE754} double precision float
 
795
@cindex double precision float, @acronym{IEEE754}
 
796
@acronym{IEEE754} double precision floating-point, 64@dmn{bit} wide,
 
797
53@dmn{bit} significant
 
798
 
 
799
@itemize
 
800
@item
 
801
Minimum normalized value: @semilog{2.2, -308}
 
802
@item
 
803
Epsilon: @semilog{2.2, -16}
 
804
@item
 
805
Maximum finite value: @semilog{1.8, 308}
 
806
@end itemize
 
807
@end table
 
808
 
 
809
If the requested @var{DEPTH} is not supported by the output file
 
810
format, Enblend warns and chooses the @var{DEPTH} that matches best.
 
811
 
 
812
@cindex @acronym{OpenEXR}, data format
 
813
The @acronym{OpenEXR} data format is treated as
 
814
@acronym{IEEE754}@tie{}float internally.  Externally, on disk,
 
815
@acronym{OpenEXR} data is represented by ``half'' precision
 
816
floating-point numbers.
 
817
 
 
818
@c ILM half: 16 bits, n = 10, k = 16 - n - 1 = 5
 
819
@cindex @acronym{OpenEXR}, half precision float
 
820
@cindex half precision float, @acronym{OpenEXR}
 
821
@uref{http://@/www.openexr.com/@/about.html#@/features,
 
822
@acronym{OpenEXR}} half precision floating-point, 16@dmn{bit} wide,
 
823
10@dmn{bit} significant
 
824
 
 
825
@itemize
 
826
@item
 
827
Minimum normalized value: @semilog{9.3, -10}
 
828
@item
 
829
Epsilon: @semilog{2.0, -3}
 
830
@item
 
831
Maximum finite value: @semilog{4.3, 9}
 
832
@end itemize
 
833
 
 
834
@item -f @var{WIDTH}x@var{HEIGHT}
 
835
@itemx -f @var{WIDTH}x@var{HEIGHT}+x@var{XOFFSET}+y@var{YOFFSET}
 
836
@opindex -f
 
837
@cindex output image, set size of
 
838
Set the size of the output image manually to
 
839
@var{WIDTH}@classictimes{}@var{HEIGHT}.  Optionally specify the
 
840
@var{X-OFFSET} and @var{Y-OFFSET}, too.
 
841
 
 
842
@pindex nona @r{(Hugin)}
 
843
@pindex hugin
 
844
This option is useful when the input images are cropped @acronym{TIFF}
 
845
files, such as those produced by @command{nona}.  The stitcher
 
846
@command{nona} is part of Hugin.  @xref{Helpful Programs}.
 
847
 
 
848
@item -g
 
849
@opindex -g
 
850
@cindex alpha channel, associated
 
851
Save alpha channel as ``associated''.  See the
 
852
@uref{http://@/www.awaresystems.be/@/imaging/@/tiff/@/tifftags/@/extrasamples.html,
 
853
@acronym{TIFF} documentation} for an explanation.
 
854
 
 
855
@pindex gimp
 
856
@pindex cinepaint
 
857
Gimp (before version@tie{}2.0) and Cinepaint (@pxref{Helpful
 
858
Programs}) exhibit unusual behavior when loading images with
 
859
unassociated alpha channels.  Use option @option{-g} to work around
 
860
this problem.  With this flag Enblend creates the output image with
 
861
the associated alpha tag set, even though the image is really
 
862
unassociated alpha.
 
863
 
 
864
@item --gpu
 
865
@opindex --gpu
 
866
@cindex graphics processing unit
 
867
@cindex @acronym{GPU} (Graphics Processing Unit)
 
868
Use the graphics card -- in fact the graphics processing unit
 
869
(@acronym{GPU}) -- to accelerate some computations.
 
870
 
 
871
This is an experimental feature that may not work on all systems.  In
 
872
this version of Enblend, @value{VERSION}, only mask optimization
 
873
strategy@tie{}1 benefits from this option.
 
874
 
 
875
Note that @acronym{GPU}-support must have been compiled into Enblend
 
876
for this option to be available.  Find out about this feature with
 
877
@code{enblend --version --verbose}.
 
878
 
 
879
@item -m @var{CACHESIZE}
 
880
@opindex -m
 
881
@cindex image cache, cache size
 
882
Set the @var{CACHESIZE} in megabytes (@acronym{MB}) of Enblend's image
 
883
cache.
 
884
 
 
885
This is the amount of memory Enblend will use for storing image data
 
886
before swapping to disk.  The default is
 
887
@value{default-image-cache-cachesize} which is good for systems with
 
888
3--4@dmn{gigabytes} (@acronym{GB}) of @acronym{RAM}.  See @ref{Tuning
 
889
Memory Usage} for details.
 
890
 
 
891
Note that Enblend must have been compiled with the image-cache feature
 
892
for this option to be effective.  Find out about extra features with
 
893
@code{enblend --version --verbose}.
 
894
@end table
 
895
 
 
896
 
 
897
@node Mask Generation Options
 
898
@section Mask Generation Options
 
899
@cindex options, mask generation
 
900
 
 
901
These options control the generation and the usage of masks.
 
902
 
 
903
@table @code
 
904
@item --anneal=@var{TAU}[:@var{DELTA-E-MAX}[:@var{DELTA-E-MIN}[:@var{K-MAX}]]]
 
905
@opindex --anneal
 
906
@cindex optimize, anneal parameters
 
907
@cindex anneal parameters
 
908
@cindex simulated annealing optimizer
 
909
@cindex optimizer, simulated annealing
 
910
Set the parameters of the Simulated Annealing optimizer used in
 
911
Optimizer Strategy@tie{}1 (see @ref{Table:optimizer-strategies}).
 
912
 
 
913
@table @var
 
914
@item TAU
 
915
@var{TAU} is the temperature reduction factor in the Simulated
 
916
Annealing; it also can be thought of as ``cooling factor''.  The
 
917
closer @var{TAU} is to one, the more accurate the annealing run will
 
918
be, and the longer it will take.
 
919
 
 
920
Append a percent sign (@samp{%}) to specify @var{TAU} as a percentage.
 
921
 
 
922
Valid range:
 
923
@ifinfo
 
924
@value{src::minimum-anneal-tau} < @var{TAU} <
 
925
@value{src::maximum-anneal-tau}.
 
926
@end ifinfo
 
927
@html
 
928
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
 
929
    <mrow>
 
930
        <mn>@value{src::minimum-anneal-tau}</mn>
 
931
        <mo>&lt;</mo>
 
932
        <mi mathvariant="italic">TAU</mi>
 
933
        <mo>&lt;</mo>
 
934
        <mn>@value{src::maximum-anneal-tau}</mn>
 
935
        <mtext>.</mtext>
 
936
    </mrow>
 
937
</math>
 
938
@end html
 
939
@tex
 
940
$@value{src::minimum-anneal-tau} < \mathit{TAU} <
 
941
@value{src::maximum-anneal-tau}$.
 
942
@end tex
 
943
 
 
944
The default is @value{src::default-anneal-tau}; values around 0.95 are
 
945
reasonable.  Usually, slower cooling results in more converged points.
 
946
 
 
947
@item DELTA-E-MAX
 
948
@itemx DELTA-E-MIN
 
949
@var{DELTA-E-MAX} and @var{DELTA-E-MIN} are the maximum and minimum
 
950
cost change possible by any single annealing move.
 
951
 
 
952
Valid range:
 
953
@ifinfo
 
954
@value{src::minimum-anneal-deltae-min} < DELTA-E-MIN < DELTA-E-MAX.
 
955
@end ifinfo
 
956
@html
 
957
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
 
958
    <mrow>
 
959
        <mn>@value{src::minimum-anneal-deltae-min}</mn>
 
960
        <mo>&lt;</mo>
 
961
        <mi mathvariant="italic">DELTA-E-MIN</mi>
 
962
        <mo>&lt;</mo>
 
963
        <mi mathvariant="italic">DELTA-E-MAX</mi>
 
964
        <mtext>.</mtext>
 
965
    </mrow>
 
966
</math>
 
967
@end html
 
968
@tex
 
969
$@value{src::minimum-anneal-deltae-min} < \mathit{DELTA-E-MIN} <
 
970
\mathit{DELTA-E-MAX}$.
 
971
@end tex
 
972
 
 
973
In particular they determine the initial and final annealing
 
974
temperatures according to:
 
975
@ifinfo
 
976
@display
 
977
                   DELTA-E-MAX
 
978
T_initial = ------------------------
 
979
            log(K-MAX / (K-MAX - 2))
 
980
 
 
981
                DELTA-E-MIN
 
982
T_final = ------------------------
 
983
          log(K-MAX^2 - K-MAX - 1)
 
984
@end display
 
985
@end ifinfo
 
986
@html
 
987
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
 
988
    <mtable>
 
989
        <mtr>
 
990
            <mtd>
 
991
                <mrow>
 
992
                    <msub>
 
993
                        <mi mathvariant="italic">T</mi>
 
994
                        <mi mathvariant="roman">initial</mi>
 
995
                    </msub>
 
996
                    <mo>=</mo>
 
997
                    <mfrac>
 
998
                        <mi mathvariant="italic">DELTA-E-MAX</mi>
 
999
                        <mrow>
 
1000
                            <mo>log</mo>
 
1001
                            <mo>&ApplyFunction;</mo>
 
1002
                            <mo>(</mo>
 
1003
                            <mrow>
 
1004
                                <mi mathvariant="italic">K-MAX</mi>
 
1005
                                <mo>/</mo>
 
1006
                                <mo>(<mo>
 
1007
                                <mrow>
 
1008
                                    <mi mathvariant="italic">K-MAX</mi>
 
1009
                                    <mo>-</mo>
 
1010
                                    <mn>2</mn>
 
1011
                                </mrow>
 
1012
                                <mo>)<mo>
 
1013
                            </mrow>
 
1014
                            <mo>)</mo>
 
1015
                        </mrow>
 
1016
                    </mfrac>
 
1017
                </mrow>
 
1018
            </mtd>
 
1019
        </mtr>
 
1020
 
 
1021
        <mtr>
 
1022
            <mtd>
 
1023
                <mrow>
 
1024
                    <msub>
 
1025
                        <mi mathvariant="italic">T</mi>
 
1026
                        <mi mathvariant="roman">final</mi>
 
1027
                    </msub>
 
1028
                    <mo>=</mo>
 
1029
                    <mfrac>
 
1030
                        <mi mathvariant="italic">DELTA-E-MIN</mi>
 
1031
                        <mrow>
 
1032
                            <mo>log</mo>
 
1033
                            <mo>&ApplyFunction;</mo>
 
1034
                            <mo>(</mo>
 
1035
                            <mrow>
 
1036
                                <msup>
 
1037
                                    <mi mathvariant="italic">K-MAX</mi>
 
1038
                                    <mn>2</mn>
 
1039
                                </msup>
 
1040
                                <mo>-</mo>
 
1041
                                <mi mathvariant="italic">K-MAX</mi>
 
1042
                                <mo>-</mo>
 
1043
                                <mn>1</mn>
 
1044
                            </mrow>
 
1045
                            <mo>)</mo>
 
1046
                        </mrow>
 
1047
                    </mfrac>
 
1048
                </mrow>
 
1049
            </mtd>
 
1050
        </mtr>
 
1051
    </mtable>
 
1052
</math>
 
1053
@end html
 
1054
@tex
 
1055
$$\eqalign{
 
1056
  T_{\mathrm{initial}} & =
 
1057
    {\mathit{DELTA-E-MAX} \over {\log(\mathit{K-MAX} / (\mathit{K-MAX} - 2))}} \cr
 
1058
  T_{\mathrm{final}} & =
 
1059
    {\mathit{DELTA-E-MIN} \over {\log(\mathit{K-MAX\/}^2 - \mathit{K-MAX} - 1)}} \cr
 
1060
}$$
 
1061
@end tex
 
1062
 
 
1063
The defaults are: @var{DELTA-E-MAX}:
 
1064
@value{src::default-anneal-deltae-max} and @var{DELTA-E-MIN}:
 
1065
@value{src::default-anneal-deltae-min}.
 
1066
 
 
1067
@item K-MAX
 
1068
@var{K-MAX} is the maximum number of ``moves'' the optimizer will make
 
1069
for each line segment.  Higher values more accurately sample the state
 
1070
space, at the expense of a higher computation cost.
 
1071
 
 
1072
Valid range:
 
1073
@ifinfo
 
1074
@var{K-MAX} @geq{} @value{src::minimum-anneal-kmax}.
 
1075
@end ifinfo
 
1076
@html
 
1077
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
 
1078
    <mrow>
 
1079
        <mi mathvariant="italic">K-MAX</mi>
 
1080
        <mo>&ge;</mo>
 
1081
        <mn></mn>
 
1082
        <mtext>@value{src::minimum-anneal-kmax}.</mtext>
 
1083
    </mrow>
 
1084
</math>
 
1085
@end html
 
1086
@tex
 
1087
$\mathit{K-MAX} \ge @value{src::minimum-anneal-kmax}$.
 
1088
@end tex
 
1089
 
 
1090
The default is @value{src::default-anneal-kmax}.  Values around 100
 
1091
seem reasonable.
 
1092
@end table
 
1093
 
 
1094
@item --coarse-mask[=@var{FACTOR}]
 
1095
@opindex --coarse-mask
 
1096
@cindex mask, coarse
 
1097
@cindex coarse mask
 
1098
Use a scaled-down version of the input images to create the seam line.
 
1099
This option reduces the number of computations necessary to compute
 
1100
the seam line and the amount of memory necessary to do so.  It is the
 
1101
default.
 
1102
 
 
1103
If omitted @var{FACTOR} defaults to
 
1104
@value{src::default-coarseness-factor}, this means,
 
1105
option@tie{}@option{--coarse-mask} shrinks the overlapping
 
1106
@emph{areas} by a factor of
 
1107
@math{@value{src::default-coarseness-factor} @classictimes{}
 
1108
@value{src::default-coarseness-factor}}.  With
 
1109
@var{FACTOR}@tie{}=@tie{}8 the total memory allocated during a run of
 
1110
Enblend shrinks approximately by 80% and the maximum amount of memory
 
1111
in use at a time is decreased to 60% (Enblend compiled with image
 
1112
cache) or 40% (Enblend compiled without image cache).
 
1113
 
 
1114
Valid range: @var{FACTOR} = 1, 2, 3,@dots{}.
 
1115
 
 
1116
Also see @ref{Table:mask-generation}.
 
1117
 
 
1118
@float Table,Table:mask-generation
 
1119
@multitable @columnfractions 0.2 0.35 0.35
 
1120
@headitem @tab @code{--no-optimize} @tab @code{--optimize}
 
1121
 
 
1122
@item @code{--fine-mask}
 
1123
@c no opt
 
1124
@tab
 
1125
Use @acronym{NFT} mask.
 
1126
 
 
1127
@c opt
 
1128
@tab
 
1129
Vectorize @acronym{NFT} mask, optimize vertices with simulated
 
1130
annealing and @sc{Dijkstra's} shortest path algorithm, fill vector
 
1131
contours.
 
1132
 
 
1133
@item @code{--coarse-mask}
 
1134
@c no opt
 
1135
@tab
 
1136
Scale down overlap region, compute @acronym{NFT} mask and vectorize
 
1137
it, fill vector contours.
 
1138
 
 
1139
@c opt
 
1140
@tab
 
1141
Scale down overlap region, vectorize @acronym{NFT} mask, optimize
 
1142
vertices with simulated annealing and @sc{Dijkstra's} shortest path
 
1143
algorithm, fill vector contours.
 
1144
@end multitable
 
1145
 
 
1146
@caption{Various options that control the generation of masks.  All
 
1147
mask computations are based on the Nearest-Feature Transformation
 
1148
(@acronym{NFT}) of the overlap region.}
 
1149
 
 
1150
@shortcaption{Mask generation options}
 
1151
 
 
1152
@cindex nearest-feature transform (@acronym{NFT})
 
1153
@cindex mask, generation
 
1154
@end float
 
1155
 
 
1156
@item --dijkstra=@var{RADIUS}
 
1157
@opindex --dijkstra
 
1158
@cindex @sc{Dijkstra} radius
 
1159
@cindex radius, @sc{Dijkstra}
 
1160
Set the search @var{RADIUS} of the @sc{Dijkstra} Shortest Path
 
1161
algorithm used in Optimizer Strategy@tie{}2 (see
 
1162
@ref{Table:optimizer-strategies}).
 
1163
 
 
1164
A small value prefers straight line segments and thus shorter seam
 
1165
lines.  Larger values instruct the optimizer to let the seam line take
 
1166
more detours when searching for the best seam line.
 
1167
 
 
1168
Valid range:
 
1169
@ifinfo
 
1170
@var{RADIUS} @geq{} @value{src::minimum-dijkstra-radius}.
 
1171
@end ifinfo
 
1172
@html
 
1173
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
 
1174
    <mrow>
 
1175
        <mi mathvariant="italic">RADIUS</mi>
 
1176
        <mo>&ge;</mo>
 
1177
        <mn>@value{src::minimum-dijkstra-radius}</mn>
 
1178
        <mtext>.</mtext>
 
1179
    </mrow>
 
1180
</math>
 
1181
@end html
 
1182
@tex
 
1183
$\mathit{RADIUS} \ge @value{src::minimum-dijkstra-radius}$.
 
1184
@end tex
 
1185
 
 
1186
Default: @value{src::default-dijkstra-radius}@dmn{pixels}.
 
1187
 
 
1188
@item --fine-mask
 
1189
@opindex --fine-mask
 
1190
@cindex mask, fine
 
1191
@cindex fine mask
 
1192
Instruct Enblend to employ the full-size images to create the seam
 
1193
line, which can be slow.  Use this option, for example, if you have
 
1194
very narrow overlap regions.
 
1195
 
 
1196
Also see @ref{Table:mask-generation}.
 
1197
 
 
1198
@item --load-masks[=@var{IMAGE-TEMPLATE}]
 
1199
@opindex --load-masks
 
1200
@cindex mask, load
 
1201
@cindex load mask
 
1202
Instead of generating masks, use those in @var{IMAGE-TEMPLATE}.  The
 
1203
default is @file{@value{src::default-mask-template}}.
 
1204
 
 
1205
See @option{--save-masks} below for details.
 
1206
 
 
1207
@item --mask-vectorize=@var{DISTANCE}
 
1208
@opindex --mask-vectorize
 
1209
@cindex mask, vectorization distance
 
1210
Set the mask vectorization @var{DISTANCE} Enblend uses to partition
 
1211
each seam.  Thus, break down the seam to segments of length
 
1212
@var{DISTANCE} each.
 
1213
 
 
1214
If Enblend uses a coarse mask (@option{--coarse-mask}) or Enblend
 
1215
optimizes (@option{--optimize}) a mask it vectorizes the initial seam
 
1216
line before performing further operations.  See
 
1217
@ref{Table:mask-generation} for the precise conditions.
 
1218
@var{DISTANCE} tells Enblend how long to make each of the line
 
1219
segments called vectors here.
 
1220
 
 
1221
The unit of @var{DISTANCE} is pixels unless it is a percentage as
 
1222
explained in the next paragraph.  In fine masks one mask pixel
 
1223
corresponds to one pixel in the input image, whereas in coarse masks
 
1224
one pixel represents for example
 
1225
@value{src::default-coarseness-factor}@dmn{pixels} in the input image.
 
1226
 
 
1227
Append a percentage sign (@samp{%}) to @var{DISTANCE} to specify the
 
1228
segment length as a fraction of the diagonal of the rectangle
 
1229
including the overlap region.  Relative measures do not depend on
 
1230
coarse or fine masks, they are recomputed for each mask.  Values
 
1231
around 5%--10% are a good starting point.
 
1232
 
 
1233
This option massively influences the mask generation process!  Large
 
1234
@var{DISTANCE} values lead to shorter, straighter, less wiggly, less
 
1235
baroque seams that are on the other hand less optimal, because they
 
1236
run through regions of larger image mismatch instead of avoiding them.
 
1237
Small @var{DISTANCE} values give the optimizers more possibilities to
 
1238
run the seam around high mismatch areas.
 
1239
 
 
1240
@cindex seam line, loops
 
1241
@cindex loops in seam line
 
1242
What should @emph{never} happen though, are loops in the seam line.
 
1243
Counter loops with higher weights of @var{DISTANCE-WEIGHT} (in
 
1244
option@tie{}@option{--optimizer-weights}), larger vectorization
 
1245
@var{DISTANCE}s, @var{TAU}s (in option@tie{}@option{--anneal}) that
 
1246
are closer to one, and blurring of the difference image with
 
1247
option@tie{}@option{--smooth-difference}.  Use
 
1248
option@tie{}@option{--visualize} to check the results.
 
1249
 
 
1250
Valid range:
 
1251
@ifinfo
 
1252
@var{DISTANCE} @geq{} @value{src::minimum-vectorize-distance}.
 
1253
@end ifinfo
 
1254
@html
 
1255
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
 
1256
    <mrow>
 
1257
        <mi mathvariant="italic">DISTANCE</mi>
 
1258
        <mo>&ge;</mo>
 
1259
        <mn>4</mn>
 
1260
        <mtext>.</mtext>
 
1261
    </mrow>
 
1262
</math>
 
1263
@end html
 
1264
@tex
 
1265
$\mathit{DISTANCE} \ge @value{src::minimum-vectorize-distance}$.
 
1266
@end tex
 
1267
Enblend limits @var{DISTANCE} so that it never gets below
 
1268
@value{src::minimum-vectorize-distance} even if it has been given as a
 
1269
percentage.  The user will be warned in such cases.
 
1270
 
 
1271
Default: @value{src::coarse-mask-vectorize-distance}@dmn{pixels} for
 
1272
coarse masks and @value{src::fine-mask-vectorize-distance}@dmn{pixels}
 
1273
for fine masks.
 
1274
 
 
1275
@item --no-optimize
 
1276
@opindex --no-optimize
 
1277
@cindex optimize seam
 
1278
@cindex seam optimization
 
1279
Turn off seam line optimization.  Combined with
 
1280
option@tie{}@option{--fine-mask} this will produce the same type of
 
1281
mask as Enblend version@tie{}2.5, namely the result of a
 
1282
@cindex nearest-feature transform (@acronym{NFT})
 
1283
Nearest-Feature Transform (@acronym{NFT}).@footnote{@sc{Muhammad
 
1284
H. Alsuwaiyel} and @sc{Marina Gavrilova}, ``On the Distance Transform
 
1285
of Binary Images'', Proceedings of the International Conference on
 
1286
Imaging Science, Systems, and Technology, June 2000, @abbr{Vols@.} I
 
1287
and II, pages 83--86.}
 
1288
 
 
1289
Also see @ref{Table:mask-generation}.
 
1290
 
 
1291
@item --optimize
 
1292
@opindex --optimize
 
1293
@cindex optimize seam
 
1294
@cindex seam optimization
 
1295
Use a two-strategy approach to route the seam line around mismatches
 
1296
in the overlap region.  This is the default.
 
1297
@ref{Table:optimizer-strategies} explains these strategies; also see
 
1298
@ref{Table:mask-generation}.
 
1299
 
 
1300
@float Table,Table:optimizer-strategies
 
1301
@cindex optimize strategy
 
1302
 
 
1303
@table @asis
 
1304
@item Stragegy 1: Simulated Annealing
 
1305
Tune with option@tie{}@code{--anneal} = @var{TAU} : @var{DELTA-E-MAX}
 
1306
: @var{DELTA-E-MIN} : @var{K-MAX}.
 
1307
 
 
1308
@uref{http://@/en.wikipedia.org/@/wiki/@/Simulated_@/annealing,
 
1309
Simulated-Annealing}
 
1310
 
 
1311
 
 
1312
@item Stragegy 2: @sc{Dijkstra} Shortest Path
 
1313
Tune with option@tie{}@code{--dijkstra} = @var{RADIUS}.
 
1314
 
 
1315
@uref{http://@/en.wikipedia.org/@/wiki/@/Dijkstra_@/algorithm,
 
1316
@sc{Dijkstra} algorithm}
 
1317
 
 
1318
@end table
 
1319
@caption{Enblend's two strategies to optimize the seam lines between
 
1320
images.}
 
1321
 
 
1322
@shortcaption{Optimizer strategies}
 
1323
@end float
 
1324
 
 
1325
@item --optimizer-weights=@var{DISTANCE-WEIGHT}[:@var{MISMATCH-WEIGHT}]
 
1326
@opindex --optimizer-weights
 
1327
@cindex optimizer weights
 
1328
@cindex weights, optimizer
 
1329
@cindex seam optimization
 
1330
 
 
1331
Set the weights of the seam-line optimizer.  If omitted,
 
1332
@var{MISMATCH-WEIGHT} defaults to 1.
 
1333
 
 
1334
The seam-line optimizer considers two qualities of the seam line:
 
1335
 
 
1336
@itemize
 
1337
@item
 
1338
The distance of the seam line from its initial position, which has
 
1339
been determined by @acronym{NFT} (see
 
1340
option@tie{}@option{--no-optimize}).
 
1341
 
 
1342
@item
 
1343
The total ``mismatch'' accumulated along it.
 
1344
@end itemize
 
1345
 
 
1346
The optimizer weights@tie{}@var{DISTANCE-WEIGHT} and
 
1347
@var{MISMATCH-WEIGHT} define how to weight these two criteria.
 
1348
Enblend up to version@tie{}3.2 used 1:1.  This version of Enblend
 
1349
(@value{VERSION}) uses
 
1350
@value{src::default-optimizer-weight-distance}:@value{src::default-optimizer-weight-mismatch}.
 
1351
 
 
1352
A large @var{DISTANCE-WEIGHT} pulls the optimized seam line closer to
 
1353
the initial postion.  A large @var{MISMATCH-WEIGHT} makes the seam
 
1354
line go on detours to find a path along which the mismatch between the
 
1355
images is small.  If the optimized seam line shows cusps or loops (see
 
1356
option@tie{}@option{--visualize}), reduce @var{MISMATCH-WEIGHT} or
 
1357
increase @var{DISTANCE-WEIGHT}.
 
1358
 
 
1359
Both weights must be non-negative.  They cannot be both zero at the
 
1360
same time.  Otherwise, their absolute values are not important as
 
1361
Enblend normalizes their sum.
 
1362
 
 
1363
@item --save-masks[=@var{IMAGE-TEMPLATE}]
 
1364
@opindex --save-masks
 
1365
@cindex mask, save
 
1366
@cindex save mask
 
1367
Save the generated masks to @var{IMAGE-TEMPLATE}.  The default is
 
1368
@file{@value{src::default-mask-template}}.  Enblend saves masks as
 
1369
8@dmn{bit} grayscale (single channel) images.  For accuracy we
 
1370
recommend to choose a lossless format.
 
1371
 
 
1372
Use this option if you wish to edit the location of the seam line by
 
1373
hand.  This will give you images of the right sizes that you can edit
 
1374
to make your changes.  Later, use @option{--load-masks} to blend the
 
1375
project with your custom seam lines.
 
1376
 
 
1377
@var{IMAGE-TEMPLATE} defines a template that is expanded for each
 
1378
input file.  In a template a percent sign (@samp{%}) introduces a
 
1379
variable part.  All other characters are copied literally.  Lowercase
 
1380
letters refer to the name of the respective input file, whereas
 
1381
uppercase ones refer to the name of the output file (@pxref{Common
 
1382
Options}).  @ref{Table:mask-template-characters} lists all variables.
 
1383
 
 
1384
A fancy mask filename template could look like this:
 
1385
 
 
1386
@example
 
1387
%D/mask-%02n-%f.tif
 
1388
@end example
 
1389
 
 
1390
It puts the mask files into the same directory as the output file
 
1391
(@samp{%D}), generates a two-digit index (@samp{%02n}) to keep the
 
1392
mask files nicely sorted, and decorates the mask filename with the
 
1393
name of the associated input file (@samp{%f}) for easy recognition.
 
1394
 
 
1395
@item --smooth-difference=@var{RADIUS}
 
1396
@opindex --smooth-difference
 
1397
@cindex smooth difference image
 
1398
@cindex blur difference image
 
1399
Smooth the difference image prior to seam-line optimization to get a
 
1400
shorter and -- on the length scale of @var{RADIUS} -- also a
 
1401
straighter seam-line.  The default is not to smooth.
 
1402
 
 
1403
If @var{RADIUS} is larger than zero Enblend blurs the difference
 
1404
images of the overlap regions with a @sc{Gaussian} filter having a
 
1405
radius of @var{RADIUS}@dmn{pixels}.  Values of 0.5 to 1.5@dmn{pixels}
 
1406
for @var{RADIUS} are good starting points; use
 
1407
option@tie{}@option{--visualize} to directly judge the effect.
 
1408
 
 
1409
When using this option in conjunction with
 
1410
@tie{}@option{--coarse-mask}=@var{FACTOR}, keep in mind that the
 
1411
smoothing occurs @emph{after} the overlap regions have been shrunken.
 
1412
Thus, blurring affects a @var{FACTOR}@classictimes{}@var{FACTOR} times
 
1413
larger area in the original images.
 
1414
 
 
1415
Valid range:
 
1416
@ifinfo
 
1417
@value{src::minimum-smooth-difference} @leq{} @var{RADIUS}.
 
1418
@end ifinfo
 
1419
@html
 
1420
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
 
1421
    <mrow>
 
1422
        <mn>@value{src::minimum-smooth-difference}</mn>
 
1423
        <mo>&le;</mo>
 
1424
        <mi mathvariant="italic">RADIUS</mi>
 
1425
        <mtext>.</mtext>
 
1426
    </mrow>
 
1427
</math>
 
1428
@end html
 
1429
@tex
 
1430
$@value{src::minimum-smooth-difference} \le \mathit{RADIUS}$.
 
1431
@end tex
 
1432
 
 
1433
@item --visualize[=@var{VISUALIZE-TEMPLATE}]
 
1434
@opindex --visualize
 
1435
@cindex mask, optimization visualization
 
1436
@cindex visualization of mask optimization
 
1437
Create an image according to @var{VISUALIZE-TEMPLATE} that visualizes
 
1438
the mask optimization process.  The default is
 
1439
@file{@value{src::default-visualize-template}}.
 
1440
 
 
1441
The image shows Enblend's view of the overlap region and how it
 
1442
decided to route the seam line.  If you are experiencing artifacts or
 
1443
unexpected output, it may be useful to include this visualization
 
1444
image in your bug report.  @xref{Bug Reports}.
 
1445
 
 
1446
@var{VISUALIZE-TEMPLATE} defines a template that is expanded for each
 
1447
input file.  In a template, a percent sign (@samp{%}) introduces a
 
1448
variable part; all other characters are copied literally.  Lowercase
 
1449
letters refer to the name of the respective input file, whereas
 
1450
uppercase ones refer to the name of the output file (@pxref{Common
 
1451
Options}).  @ref{Table:mask-template-characters} lists all variables.
 
1452
 
 
1453
@noindent
 
1454
@strong{Visualization Image}
 
1455
@cindex visualization image
 
1456
@cindex image, visualization
 
1457
@need 150
 
1458
The visualization image shows the symmetric difference of the pixels
 
1459
in the rectangular region where two images overlap.  The larger the
 
1460
difference the lighter shade of gray it appears in the visualization
 
1461
image.  Enblend paints the non-overlapping parts of the image pair --
 
1462
these are the regions where @emph{no} blending occurs -- in
 
1463
@value{src::visualize-no-overlap-value-color}.
 
1464
@ref{Table:visualization-colors} shows the meanings of all the colors
 
1465
that are used in seam-line visualization images.
 
1466
 
 
1467
@float Table,Table:visualization-colors
 
1468
@table @asis
 
1469
@item @value{src::visualize-no-overlap-value-color}
 
1470
Non-overlapping parts of image pair.
 
1471
 
 
1472
@item various shades of gray
 
1473
Difference of the pixel values in the overlap region.
 
1474
 
 
1475
@item @value{src::visualize-state-space-color}
 
1476
Location of an optimizer sample.
 
1477
 
 
1478
@item @value{src::visualize-first-vertex-value-color}
 
1479
First sample of a line segment.
 
1480
 
 
1481
@item @value{src::visualize-next-vertex-value-color}
 
1482
Any other but first sample of a line segment.
 
1483
 
 
1484
@item @value{src::visualize-state-space-inside-color}
 
1485
@cindex @sc{Dijkstra} radius
 
1486
@cindex radius, @sc{Dijkstra}
 
1487
State space sample inside the @sc{Dijkstra} radius.
 
1488
 
 
1489
@item @value{src::visualize-state-space-unconverged-color}
 
1490
Non-converged point.
 
1491
 
 
1492
@item @value{src::visualize-initial-path-color}
 
1493
@cindex nearest-feature transform (@acronym{NFT})
 
1494
Initial seam line as generated by the @acronym{NFT}.
 
1495
 
 
1496
@cindex frozen seam-line endpoint
 
1497
@cindex seam-line endpoint, frozen
 
1498
Enblend marks a non-movable (``frozen'') endpoint of a seam-line
 
1499
segment with a @value{src::visualize-frozen-point}
 
1500
@value{src::mark-frozen-point}, whereas it uses a
 
1501
@value{src::visualize-movable-point} @value{src::mark-movable-point}
 
1502
to denote an endpoint that the optimizer may move around.
 
1503
 
 
1504
@item @value{src::visualize-short-path-value-color}
 
1505
Final seam line.
 
1506
@end table
 
1507
 
 
1508
@shortcaption{Visualization colors}
 
1509
@caption{Colors used in seam-line visualization images.}
 
1510
 
 
1511
@cindex visualization image colors
 
1512
@cindex image colors, visualization
 
1513
@cindex colors, visualization image
 
1514
@end float
 
1515
@end table
 
1516
 
 
1517
@page
 
1518
 
 
1519
@include mask-template-characters.texi
 
1520
 
 
1521
 
 
1522
@node Understanding Masks
 
1523
@chapter Understanding Masks
 
1524
@cindex understanding masks
 
1525
@cindex masks, understanding
 
1526
 
 
1527
@include understanding-masks.texi
 
1528
 
 
1529
 
 
1530
@node Tuning Memory Usage
 
1531
@chapter Tuning Memory Usage
 
1532
@cindex memory, tuning usage of
 
1533
@opindex -b
 
1534
@opindex -m
 
1535
 
 
1536
@include tuning-memory-usage.texi
 
1537
 
 
1538
 
 
1539
@node Helpful Programs
 
1540
@chapter Helpful Additional Programs
 
1541
@cindex helpful programs
 
1542
@cindex programs, helpful additional
 
1543
 
 
1544
@include helpful-programs.texi
 
1545
 
 
1546
 
 
1547
@node Bug Reports
 
1548
@appendix Bug Reports
 
1549
@cindex bug reports
 
1550
 
 
1551
@include bug-reports.texi
 
1552
 
 
1553
 
 
1554
@node Authors
 
1555
@appendix Authors
 
1556
@cindex authors, list of
 
1557
 
 
1558
@include authors.texi
 
1559
 
 
1560
 
 
1561
@node FDL
 
1562
@appendix @acronym{GNU} Free Documentation License
 
1563
@cindex free documentation license (@acronym{FDL})
 
1564
@cindex @acronym{GNU} free documentation license
 
1565
 
 
1566
@include fdl.texi
 
1567
 
 
1568
 
 
1569
@c
 
1570
@c End of Document
 
1571
@c
 
1572
 
 
1573
@node Program Index
 
1574
@unnumbered Program Index
 
1575
@cindex program index
 
1576
@cindex index, program
 
1577
 
 
1578
@printindex pg
 
1579
 
 
1580
 
 
1581
@node Syntactic-Comment Index
 
1582
@unnumbered Syntactic-Comment Index
 
1583
@cindex syntactic-comment index
 
1584
@cindex index, syntactic-comment
 
1585
 
 
1586
@printindex sc
 
1587
 
 
1588
 
 
1589
@node Option Index
 
1590
@unnumbered Option Index
 
1591
@cindex option index
 
1592
@cindex index, option
 
1593
 
 
1594
@printindex op
 
1595
 
 
1596
 
 
1597
@node General Index
 
1598
@unnumbered General Index
 
1599
@cindex general index
 
1600
@cindex index, general
 
1601
 
 
1602
@printindex cp
 
1603
 
 
1604
@bye