Enblend
Enblend
with
Enblend 4.2
2016-03-29†)
∗
) Original author
†
) Date reliably determined via source-code management system.
i
Abstract
This manual is for Enblend version h4.2i, a tool for compositing images in such a
way that the seam between the images is invisible, or at least very difficult to
see.
Copyright
c 2004–2009 Andrew Mihal.
Copyright
c 2009–2016 Christoph Spiel.
1 Overview 1
2 Known Limitations 3
3 Workflowc 5
4 Invocation 17
5 Seam Generators 47
6 Visualization Image 49
7 Color Spacesc 52
8 Understanding Masksc 59
A Helpful Programsc 63
B Bug Reportsc 66
C Authorsc 70
D GNU FDLc 71
Indices 79
ii
Contents
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
List of Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1 Overview 1
2 Known Limitations 3
3 Workflowc 5
3.1 Standard Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 External Masks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 Interacting with Enblendc . . . . . . . . . . . . . . . . . . . . . . 8
3.3.1 Finding Out Details . . . . . . . . . . . . . . . . . . . . . 8
3.3.2 Console Messages . . . . . . . . . . . . . . . . . . . . . . . 14
3.3.3 Environment Variables . . . . . . . . . . . . . . . . . . . . 16
4 Invocation 17
4.1 Image Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Command-Line Options . . . . . . . . . . . . . . . . . . . . . . . 18
4.2.1 Common Optionsc . . . . . . . . . . . . . . . . . . . . . . 18
4.2.2 Advanced Optionsc . . . . . . . . . . . . . . . . . . . . . . 20
4.2.3 Mask Generation Options . . . . . . . . . . . . . . . . . . 25
4.2.4 Expert Options . . . . . . . . . . . . . . . . . . . . . . . . 28
4.2.5 Expert Mask Generation Options . . . . . . . . . . . . . . 30
4.2.6 Information Optionsc . . . . . . . . . . . . . . . . . . . . 34
4.2.7 Program Flow Charts . . . . . . . . . . . . . . . . . . . . 35
4.3 Option Delimitersc . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.3.1 Numeric Arguments . . . . . . . . . . . . . . . . . . . . . 37
4.3.2 Filename Arguments . . . . . . . . . . . . . . . . . . . . . 37
4.4 Response Filesc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.4.1 Response File Format . . . . . . . . . . . . . . . . . . . . 40
4.4.2 Syntactic Comments . . . . . . . . . . . . . . . . . . . . . 41
4.4.3 Globbing Algorithms . . . . . . . . . . . . . . . . . . . . . 42
4.4.4 Default Layer Selection . . . . . . . . . . . . . . . . . . . 42
4.5 Layer Selectionc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
iii
iv
5 Seam Generators 47
6 Visualization Image 49
7 Color Spacesc 52
7.1 Mathematical Preliminaries . . . . . . . . . . . . . . . . . . . . . 53
7.2 Floating-Point Images . . . . . . . . . . . . . . . . . . . . . . . . 54
7.3 Color Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.4 Blending Color Spaces . . . . . . . . . . . . . . . . . . . . . . . . 56
7.5 Practical Considerations . . . . . . . . . . . . . . . . . . . . . . . 58
8 Understanding Masksc 59
8.1 Masks In Input Files . . . . . . . . . . . . . . . . . . . . . . . . . 59
8.2 Weight Mask Files . . . . . . . . . . . . . . . . . . . . . . . . . . 60
A Helpful Programsc 63
A.1 Raw Image Conversion . . . . . . . . . . . . . . . . . . . . . . . . 63
A.2 Image Alignment and Rendering . . . . . . . . . . . . . . . . . . 63
A.3 Image Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . 64
A.4 High Dynamic Range . . . . . . . . . . . . . . . . . . . . . . . . . 64
A.5 Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
A.6 Meta-Data Handling . . . . . . . . . . . . . . . . . . . . . . . . . 65
A.7 Camera Firmware Extension . . . . . . . . . . . . . . . . . . . . 65
B Bug Reportsc 66
B.1 Found a Bug? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
B.2 How to Report Bugs . . . . . . . . . . . . . . . . . . . . . . . . . 67
B.3 Sending Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
C Authorsc 70
D GNU FDLc 71
Indices 79
Syntactic Comment Index . . . . . . . . . . . . . . . . . . . . . . . . . 79
Program/Application Index . . . . . . . . . . . . . . . . . . . . . . . . 80
Option Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
General Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
v
List of Figures
7.1 Log-transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
vi
List of Examples
vii
viii
Notation
This manual uses some typographic conventions to clarify the subject. The
markup of the ready-to-print version differs from the web markup.
Overview
to Image Mosaics”, ACM Transactions on Graphics, Vol. 2, No. 4, October 1983, pages 217–
236.
1
2
) http://sourceforge.net/
) http://enblend.sourceforge.net/
Chapter 2
Known Limitations
Enblend has its limitations. Some of them are inherent to the programs proper
others are “imported” by using libraries as for example VIGRA). Here are
some of the known ones.
U = 2(a + b),
3
4
Photographic Workflowc
• Enfuse merges photos of the same subject at the same location and same
direction, but taken with varying exposure parameters.
Take Images
Take multiple images to form a panorama, an exposure series, a focus stack,
etc.. . .
There is one exception with Enfuse when a single raw image is converted
multiple times to get several – typically differently “exposed” – images.
Exemplary Benefits:
• Many pictures taken from the same vantage point but showing different
viewing directions. – Panorama
• Pictures of the same subject exposed with different shutter speeds. –
Exposure series
• Images of the same subject focused at differing distances. – Focus
stack
Remaining Problem: The “overlayed” images may not fit together, that is
the overlay regions may not match exactly.
5
3.1. STANDARD WORKFLOW 6
Take Images
[else]
[raw]
Convert Images
Convert the raw data) exploiting the full dynamic range of the camera
and capitalize on a high-quality conversion.
Align Images
Align the images so as to make them match as well as possible.
Again there is one exception and this is when images naturally align. For
example, a series of images taken from a rock solid tripod with a cable
release without touching the camera, or images taken with a shift lens, can
align without further user intervention.
This step submits the images to affine transformations.
If necessary, it rectifies the lens’ distortions (e.g. barrel or pincushion), too.
Sometimes even luminance or color differences between pairs of overlaying
images are corrected (“photometric alignment”).
Benefit: The overlay areas of images match as closely as possible given the
quality if the input images and the lens model used in the transformation.
Remaining Problem: The images may still not align perfectly, for example,
because of parallax) errors, or blur produced by camera shake.
Combine Images
Enblend and Enfuse combine the aligned images into one.
Benefit: The overlay areas become imperceptible for all but the most
misaligned images.
Remaining Problem: Enblend and Enfuse write images with an alpha
channel; for more information on alpha channels see Chapter 8 on page 59.
Furthermore, the final image rarely is rectangular.
Post-process
Post-process the combined image with your favorite tool. Often the user
will want to crop the image and simultaneously throw away the alpha
channel.
View
Print
Enjoy
their associated alpha-channels, and then they immediately use these masks for
multi-resolution blending or multi-resolution fusing the output image.
Sometimes more control over the masks is wanted. To this end, both applica-
tions provide the option pair --load-masks and --save-masks. See Chapter 4
on page 17, for detailed explanations of both options. With the help of these
options the processing can be broken up into two phases:
1. Save masks with --save-masks. Generate masks and save them into image
files.
Avoid option --output here unless the blended or fused image at this
point is wanted.
2. Load possibly modified masks with --load-masks from files and then
blend or fuse the final image with the help of the loaded masks only.
Neither application (re-)generates any mask in this phase. The loaded
masks completely control the multi-resolution blending or multi-resolution
fusing the output image.
In between these two steps the user may apply whatever transformation to
the mask files, as long as their geometries and offsets remain the same. Thus
the “Combine Images” box of Figure 3.1 becomes three activities as is depicted
in Figure 3.2.
To further optimize this kind of workflow, both Enblend and Enfuse stop after
mask generation if option --save-masks is given, but no output file is specified
with the --output option. This way the time for pyramid generation, blending,
fusing, and writing the final image to disk is saved, as well as no output image
gets generated.
Note that options --save-masks and --load-masks cannot be used simul-
taneously.
− what its exact version number is (see Sec. 3.3.1 on page 10 and op-
tion --version, page 35),
− what features it does support (see Sec. 3.3.1 on page 11 and options --ver=
sion, page 35 and --verbose, page 20),
3.3. INTERACTING WITH ENBLENDC 9
Blend or Fuse
Enblend, Enfuse --load-masks
Using Masks
Figure 3.2: Workflow for externally modified masks. The “Blend or Fuse Using
Masks” step utilizes the multi-resolution algorithm just as for internal workflow
without mask files.
3.3. INTERACTING WITH ENBLENDC 10
$ enblend --version
enblend 4.2-02c1f45857b4
Example 3.1: Example output of enblend when called with option --version.
− which image formats it can read and write without the need of conversion
(see Sec. 3.3.1 on page 12 and option --show-image-formats, page 34),
− who built it, (see Sec. 3.3.1 on page 13 and option --show-signature,
page 35), and finally
− what compiler and libraries were used to do so (see Sec. 3.3.1 on page 13
and option --show-software-components, page 35).
4.1.3-0a816672d475
Some unreleased version from the “Stable Branch”, which finally will lead
to version 4.1.3.
3.3. INTERACTING WITH ENBLENDC 11
4.1.3
Officially released version 4.1.3 in the “Stable Branch”.
4.2-1e4d237daabf
Some unreleased version from the “Development Branch”, which finally
will lead to version 4.2.
4.2
Officially released version 4.2 in the “Development Branch”.
Matching the version codes is the only reliably way to pair a given binary
with its manual page (“manual page for enblend 4.2-1e4d237daabf”) and its
documentation. This document mentions the version code for example on its
Title Page and the Abstract, page i.
The twelve-digit hexadecimal ID-CODE is automatically generated by our
source-code versioning system, Mercurial). Use the ID-CODE to look up the
version on the web in our public source code repository) or, if you have cloned
the project to your own workspace, with the command
hg log --verbose --rev ID-CODE
Compiled-In Features
Adding option --verbose to --version will reproduce the information described
in the previous section plus a list of “extra features”. Any unavailable feature in
the particular binary queried returns
(1.) “I’m running my enblend on a multi-core system, but it does not make use
of it.”
Check for extra feature OpenMP.
(2.) “My enblend complains when I call it with ‘--gpu’!”
Check for extra feature OpenCL.
(3.) “enblend is so slow!”
Ensure that neither feature mmap-view nor image-cache has been com-
piled in.
) https://www.mercurial-scm.org/
) http://hg.code.sf.net/p/enblend/code
3.3. INTERACTING WITH ENBLENDC 12
Example 3.2: Example output of enblend when called with options --version
and --verbose together.
(4.) “enblend eats away too much memory! Can I tell it to unload that onto
the disk?”
No, there is no command-line switch for that, but you can use a version
with mmap-view feature.
(5.) “My enblend has OpenMP enabled. Does it support dynamic adjustment
of the number of threads?”
Under extra feature OpenMP look for “support for dynamic adjustment
of the number of threads”.
− JPEG,
3.3. INTERACTING WITH ENBLENDC 13
Channel Bit-Depth
Format Mask Profile Integral Floating-Point
uint8 uint16 uint32 float double
JPEG − • • − − − −
PNG • • • • − − −
PNM ? − • • • − −
[V]TIFF • • • • • • •
Table 3.1: Bit-depths of selected image formats. These are the maximum
capabilities of the formats themselves, not Enblend’s. The “Mask”-column
indicates whether the format supports an image mask (alpha-channel), see
also Chapter 8. Column “Profile” shows whether the image format allows for
ICC-profiles to be included; see also Chapter 7.
− PNG, and
− TIFF.
All others are optional. In particular the high-dynamic range (HDR) format
OpenEXR only gets compiled if several non-standard libraries are available.
The provided per-channel depths range from just one, namely “8 bits unsigned
integral” (uint8) up to seven:
− 8 bits unsigned integral, ‘uint8’
− 16 bits unsigned or signed integral, ‘uint16’ or ‘int16’
− 32 bits unsigned or signed integral, ‘uint32’ or ‘int32’
− 32 bits floating-point, ‘float’
− 64 bits floating-point, ‘double’
Table 3.1 summarizes the channel bit depths of some prominent image
formats.
Name Of Builder
During building each enblend is automatically signed to give the users an extra
level of confidence that it was constructed by someone that they can trust to get
it right. Access this signature with ‘--show-signature’ and enblend will print
something like
Compiled on sgctrl03 by Walter Harriman on Wed, Dec 22 2004, 16:07:22
GMT-7.
where machine name, person, and date-time depend on the build.
$ enblend --show-software-components
Compiler
g++ 4.9.1
implementing OpenMP standard of 2013-7
implementing Cilk version 2.0
without support of " Cilk for" keyword
Libraries
GSL: 1.15
Little CMS: 2.7.0
Vigra: 1.10.0
Example 3.3: Output of enblend when asked to reveal the compiler that was
used to build it along with the libraries it was linked against.
and LibTIFF):
) https://www.cilkplus.org/
) http://openmp.org/wp/
) http://openmp.org/wp/
Chapter 4
Invocation
This is, either all images are black-and-white (one channel and alpha
channel) or all are RGB-color images (three channels and alpha channel).
• The images agree on their number of bits-per-channel, i.e., their “depth”:
– uint8,
– uint16,
– float,
– etc.
17
4.2. COMMAND-LINE OPTIONS 18
Moreover, there are some good practices, which are not enforced by the
application, but almost certainly deliver superior results.
• Either all files lack an ICC profile, or all images are supplied with the
same ICC profile.
• If the images’ meta-data contains resolution information (“DPI”), it is the
same for all pictures.
$ enblend --help
does and sort them alphabetically within their groups. For an alphabetic list of
all options consult the Option Index, page 81.
enblend accepts arguments to any option in uppercase as well as in lower-
case letters. For example, ‘deflate’, ‘Deflate’ and ‘DEFLATE’ as arguments
to the --compression option described below all instruct enblend to use the
Deflate compression scheme. This manual denotes all arguments in lowercase
for consistency.
--compression=COMPRESSION
Write a compressed output file. The default is not to compress the output
image.
Depending on the output file format, Enblend accepts different values for
COMPRESSION.
JPEG format.
The compression either is a literal integer or a keyword-option combi-
nation.
LEVEL
Set JPEG quality LEVEL, where LEVEL is an integer that
ranges from 0–100.
4.2. COMMAND-LINE OPTIONS 19
jpeg[:LEVEL ]
Same as above; without the optional argument just switch on
standard JPEG compression.
jpeg-arith[:LEVEL ]
Switch on arithmetic JPEG compression. With optional argu-
ment set the arithmetic compression LEVEL, where LEVEL is
an integer that ranges from 0–100.
TIF format.
Here, COMPRESSION is one of the keywords:
none
Do not compress. This is the default.
deflate
Use the Deflate compression scheme also called ZIP-in-TIFF.
Deflate is a lossless data compression algorithm that uses a
combination of the LZ77 algorithm and Huffman coding.
jpeg[:LEVEL ]
Use JPEG compression. With optional argument set the com-
pression LEVEL, where LEVEL is an integer that ranges from
0–100.
lzw
Use Lempel-Ziv-Welch (LZW) adaptive compression scheme.
LZW compression is lossless.
packbits
Use PackBits compression scheme. PackBits is a particular
variant of run-length compression; it is lossless.
Any other format.
Other formats do not accept a COMPRESSION setting. However,
the underlying VIGRA) library automatically compresses png-files
with the Deflate method. (VIGRA is the image manipulation
library upon which Enblend is based.)
-l LEVELS
--levels=LEVELS
Use at most this many LEVELS for pyramid) blending if LEVELS is
positive, or reduce the maximum number of levels used by −LEVELS if
LEVELS is negative; ‘auto’ or ‘automatic’ restore the default, which is
to use the maximum possible number of levels for each overlapping region.
The number of levels used in a pyramid controls the balance between local
and global image features (contrast, saturation, . . . ) in the blended region.
Fewer levels emphasize local features and suppress global ones. The more
levels a pyramid has, the more global features will be taken into account.
) https://ukoethe.github.io/vigra/
) As Dr. Daniel Jackson correctly noted, actually, it is not a pyramid: “Ziggaurat, it’s
a Ziggaurat.”
4.2. COMMAND-LINE OPTIONS 20
If too few levels are used, “halos” around regions of strong local
feature variation can show up. On the other hand, if too many
levels are used, the image might contain too much global features.
Usually, the latter is not a problem, but is highly desired. This is
the reason, why the default is to use as many levels as is possible
given the size of the overlap regions. Enblend may still use a smaller
number of levels if the geometry of the overlap region demands.
Level Messages
0 only warnings and errors
1 reading and writing of images
2 mask generation, pyramid, and blending
3 reading of response files, color conversions
4 image sizes, bounding boxes and intersection sizes
5 Enblend only. detailed information on the optimizer runs
6 estimations of required memory in selected processing steps
Table 4.1: Verbosity levels of enblend; each level includes all messages of the
lower levels.
--blend-colorspace=COLORSPACE
Force blending in selected COLORSPACE. Given well matched images
this option should not change the output image much. However, if Enblend
must blend vastly different colors (as e.g. anti-colors) the resulting image
heavily depends on the COLORSPACE.
Usually, Enblend chooses defaults depending on the input images:
• For grayscale or color input images with ICC profiles the default is
to use CIELUV colorspace.
• Images without color profiles and floating-point images are blended
in the trivial luminance interval (grayscale) or RGB-color cube by
default.
identity
id
unit
Compute blended colors in a naı̈ve way sidestepping any dedicated
colorspace.
• Use trivial, 1-dimensional luminance interval (see Eqn. 7.1 on
page 53) for grayscale images and
• for color images utilize 3-dimensional RGB-cube (see Eqn. 7.6
on page 54) spanned by the input ICC profile or sRGB if no
profiles are present. In the latter case, consider passing op-
tion --fallback-profile, page 28 to force a different profile
than sRGB upon all input images.
lab
cielab
lstar
l-star
Blend pixels in the CIEL*a*b* colorspace.
4.2. COMMAND-LINE OPTIONS 22
luv
cieluv
Blend pixels in the CIEL*u*v* colorspace.
ciecam
ciecam02
jch
Blend pixels in the CIECAM02 colorspace.
Enblend only.
2
-c
--ciecam
Deprecated. Use ‘--blend-colorspace=ciecam’ instead. To emulate the
negated option --no-ciecam use --blend-colorspace=identity.
-d DEPTH
--depth=DEPTH
Force the number of bits per channel and the numeric format of the output
image, this is, the DEPTH. The number of bits per channel is also known
as “channel width” or “channel depth”.
Enblend always uses a smart way to change the channel depth to assure
highest image quality at the expense of memory, whether requantization is
implicit because of the output format or explicit through option --depth.
8
uint8
Unsigned 8 bit; range: 0 . . . 255
int16
Signed 16 bit; range: −32768 . . . 32767
16
uint16
Unsigned 16 bit; range: 0 . . . 65535
int32
Signed 32 bit; range: −2147483648 . . . 2147483647
32
uint32
Unsigned 32 bit; range: 0 . . . 4294967295
r32
real32
float
IEEE754 single precision floating-point, 32 bit wide, 24 bit significant;
− Minimum normalized value: 1.2 · 10−38
− Epsilon: 1.2 · 10−7
− Maximum finite value: 3.4 · 1038
r64
real64
double
IEEE754 double precision floating-point, 64 bit wide, 53 bit signifi-
cant;
− Minimum normalized value: 2.2 · 10−308
− Epsilon: 2.2 · 10−16
− Maximum finite value: 1.8 · 10308
If the requested DEPTH is not supported by the output file format, Enblend
warns and chooses the DEPTH that matches best.
Versions with OpenEXR read/write support only.
− consulted for any kind measurement, this is, all boundaries must
match as accurately as possible, or
− printed out and the boundaries glued together, or
− fed into a virtual reality (VR) generator, which creates a seamless
environment.
none
open
This is a “no-op”; it has the same effect as not giving ‘--wrap’ at all.
The set of input images is considered open at its boundaries.
horizontal
Wrap around horizontally:
This is useful for 360◦ vertical panoramas as it eliminates the top and
bottom borders.
both
horizontal+vertical
vertical+horizontal
Wrap around both horizontally and vertically:
In this mode, both left and right borders, as well as top and bottom
borders, are eliminated.
--coarse-mask[=FACTOR ]
Use a scaled-down or “coarse” version of the input images to create the
seam line. This option reduces the number of computations necessary to
compute the seam line and the amount of memory necessary to do so. It
is the default.
If omitted FACTOR defaults to h8i, this means, option --coarse-mask
shrinks the overlapping areas by a factor of h8i×h8i. With FACTOR = 8
the total memory allocated during a run of Enblend shrinks approximately
by 80% and the maximum amount of memory in use at a time is decreased
to some 40% in comparison to a full-size (“fine”) mask.
Valid range: FACTOR = 1, 2, 3, . . ., where 1 reproduces --fine-mask.
Also see the negated option, ‘--fine-mask’, page 25 and Table 4.2.
4.2. COMMAND-LINE OPTIONS 26
Table 4.2: Various options that control the generation of masks. All mask
computations are based on the Nearest-Feature Transformation (NFT) of the
overlap region.
--fine-mask
Instruct Enblend to employ the full-size images to create the seam line,
which can be slow. Use this option, for example, if you have very narrow
overlap regions.
Also see option --coarse-mask, page 25 and Table 4.2.
--load-masks[=IMAGE-TEMPLATE ]
Instead of generating masks, load those in IMAGE-TEMPLATE. The
default is ‘hmask-%n.tifi’. The mask images must be 8 bit grayscale
images.
See option --save-masks, page 26 below for details.
--optimize
Use a multi-strategy approach to route the seam line around mismatches in
the overlap region. This is the default. Table 4.3 explains these strategies;
also see Table 4.2.
Option --no-optimize negates --optimize and thus turns off seam line
optimization. Combined with option --fine-mask, page 25 this will
produce the same type of mask as Enblend version 2.5, namely the result
of a Nearest-Feature Transform (NFT).
--save-masks[=IMAGE-TEMPLATE ]
Save the generated masks to IMAGE-TEMPLATE, which defaults to
‘hmask-%n.tifi’. Enblend saves masks as 8 bit grayscale, i.e. single channel
images. For accuracy we recommend to choose a lossless format.
4.2. COMMAND-LINE OPTIONS 27
Table 4.3: Enblend’s strategies to optimize the seam lines between overlapping
images.
Use this option if you wish to edit the location of the seam line by hand.
This will give you images of the right sizes that you can edit to make your
changes. Later, use option --load-masks, page 26 to blend the project
with your custom seam lines.
Enblend will stop after saving all masks unless option --output, page 20
is given, too. With both options given, this is, ‘--save-masks’ and
‘--output’, Enblend saves all masks and then proceeds to blend the output
image.
--visualize[=VISUALIZE-TEMPLATE ]
Create an image according to VISUALIZE-TEMPLATE that visualizes
the un-optimized mask and the applied optimizations (if any). The default
is ‘hvis-%n.tifi’.
This image will show Enblend’s view of the overlap region and how it decided
to route the seam line. If you are experiencing artifacts or unexpected
output, it may be useful to include this visualization image in your bug
report. For a detailed description of the image, consult Chapter 6 on
page 49.
4.2. COMMAND-LINE OPTIONS 28
--fallback-profile=PROFILE-FILENAME
Use the ICC profile in PROFILE-FILENAME instead of the default
sRGB. This option only is effective if the input images come without color
profiles and blending is not performed in the trivial luminance interval or
RGB-cube.
Compare option --blend-colorspace, page 20 and Chapter 7.3 on page 56
on color profiles.
--layer-selector=ALGORITHM
Override the standard layer selector algorithm ‘hall-layersi’.
Enblend offers the following algorithms:
all-layers
Select all layers in all images.
first-layer
Select only first layer in each multi-layer image. For single-layer
images this is the same as ‘all-layers’.
last-layer
Select only last layer in each multi-layer image. For single-layer images
this is the same as ‘all-layers’.
largest-layer
Select largest layer in each multi-layer image, where the “largeness”,
this is the size is defined by the product of the layer width and its
height. The channel width of the layer is ignored. For single-layer
images this is the same as ‘all-layers’.
no-layer
Do not select any layer in any image.
This algorithm is useful to temporarily exclude some images in re-
sponse files.
Format Interpretation
%% Produces a literal ‘%’-sign.
%i Expands to the index of the mask file starting at zero. ‘%i’ allows
for setting a pad character or a width specification:
% PAD WIDTH i
Table 4.4: Special format characters to control the generation of mask filenames.
Uppercase letters refer to the output filename and lowercase ones to the input
files.
4.2. COMMAND-LINE OPTIONS 30
This option has the negated form ‘--no-parameter’, which takes one or
more KEY s and removes them from the list of defined parameters. The
special key ‘*’ deletes all parameters at once.
Parameters allow the developers to change the internal workings of Enblend
without the need to recompile or relink.
Daniel Jackson: I just hope we won’t regret giving them those gate
addresses.
Jack O’Neill: I don’t think we will, first one being a black hole and all.
They get progressively darker after that.
-a
--pre-assemble
Pre-assemble non-overlapping images before each blending iteration.
This overrides the default behavior which is to blend the images sequentially
in the order given on the command line. Enblend will use fewer blending
iterations, but it will do more work in each iteration.
This option has the negated form ‘--no-pre-assemble’, which restores
the default.
-x Checkpoint partial results to the output file after each blending step.
DELTA-E-MAX
Tinitial =
log(K-MAX/(K-MAX − 2))
DELTA-E-MIN
Tfinal =
log(K-MAX2 − K-MAX − 1)
--dijkstra=RADIUS
Set the search RADIUS of the Dijkstra Shortest Path algorithm used in
Dijkstra Optimization (see Table 4.3 on page 27).
A small value prefers straight line segments and thus shorter seam lines.
Larger values instruct the optimizer to let the seam line take more detours
when searching for the best seam line.
Valid range: RADIUS ≥ h1i.
Default: h25i pixels.
--image-difference=ALGORITHM [:LUMINANCE-WEIGHT [:
CHROMINANCE-WEIGHT ]]
maximum-hue-luminance
maximum-hue-lum
max-hue-luminance
max-hue-lum
max
Calculate the difference d as the maximum of the differences of the
luminances l and hues h of each pair of pixels P1 and P2 :
h
2
d = wluma × (L(P1 ) − L(P2 )) +
2
wchroma × (a(P1 ) − a(P2 )) +
i1/2
2
wchroma × (b(P1 ) − b(P2 ))
--image-difference=delta-e:2:1
and
--image-difference=delta-e:0.6667:0.3333
--mask-vectorize=DISTANCE
Set the mask vectorization DISTANCE that Enblend uses to partition each
seam. Thus, break down the seam to segments of length DISTANCE each.
If Enblend uses a coarse mask (--coarse-mask, page 25) or Enblend op-
timizes (--optimize, page 26) a mask it vectorizes the initial seam line
before performing further operations. See Table 4.2 for the precise condi-
tions. DISTANCE tells Enblend how long to make each of the line segments
called vectors here.
The unit of DISTANCE is pixels unless it is a percentage as explained
in the next paragraph. In fine masks one mask pixel corresponds to one
pixel in the input image, whereas in coarse masks one pixel represents for
example h8i pixels in the input image.
Append a percentage sign (‘%’) to DISTANCE to specify the segment
length as a fraction of the diagonal of the rectangle including the overlap
region. Relative measures do not depend on coarse or fine masks, they
are recomputed for each mask. Values around 5%–10% are good starting
points.
This option strongly influences the mask generation process! Large DIS-
TANCE values lead to shorter, straighter, less wiggly, less baroque seams
that are on the other hand less optimal, because they run through regions
of larger image mismatch instead of avoiding them. Small DISTANCE
values give the optimizers more possibilities to run the seam around high
mismatch areas.
What should never happen though, are loops or cusps in the seam line.
Counter loops and cusps with higher weights of DISTANCE-WEIGHT (op-
tion --optimizer-weights, page 33), larger vectorization DISTANCEs,
and TAU s (option --anneal, page 30) that are closer to one. Use op-
tion --visualize, page 27 to check the results.
Valid range: DISTANCE ≥ h4i.
Enblend limits DISTANCE so that it never gets below h4i even if it has
been given as a percentage. The user will be warned in such cases.
Defaults: h4i pixels for coarse masks and h20i pixels for fine masks.
--optimizer-weights=DISTANCE-WEIGHT [:MISMATCH-WEIGHT ]
Set the weights of the seam-line optimizer. If omitted, MISMATCH-
WEIGHT defaults to 1.
The seam-line optimizer considers two qualities of the seam line:
• The distance of the seam line from its initial position, which has been
determined by NFT (see option --no-optimize, page 26).
• The total “mismatch” accumulated along it.
4.2. COMMAND-LINE OPTIONS 34
--show-image-formats
Show all recognized image formats, their filename extensions and the
supported per-channel depths.
Depending on the build-time configuration and the operating system, the
binary supports different image formats, typically: BMP, EXR, GIF,
HDR, JPEG, PNG, PNM, SUN, TIFF, and VIFF and recognizes differ-
ent image-filename extensions, again typically: bmp, exr, gif, hdr, jpeg, jpg,
pbm, pgm, png, pnm, ppm, ras, tif, tiff, and xv.
The maximum number of different per-channel depths any enblend provides
is seven:
− 8 bits unsigned integral, ‘uint8’
− 16 bits unsigned or signed integral, ‘uint16’ or ‘int16’
− 32 bits unsigned or signed integral, ‘uint32’ or ‘int32’
− 32 bits floating-point, ‘float’
− 64 bits floating-point, ‘double’
--show-signature
Show the user name of the person who compiled the binary, when the
binary was compiled, and on which machine this was done.
This information can be helpful to ensure the binary was created by a
trustworthy builder.
--show-software-components
Show the name and version of the compiler that built Enblend followed by
the versions of all important libraries against which Enblend was compiled
and linked.
Technically, the version information is taken from header files, thus it is
independent of the dynamic-library environment the binary runs within.
The library versions printed here can help to reveal version mismatches
with respect to the actual dynamic libraries available to the binary.
-V
--version
Output information on the binary’s version.
Team this option with --verbose, page 20 to show configuration details,
like the extra features that may have been compiled in. For details consult
Section 3.3.1 on page 10.
--load-masks
[default]
--fine-mask
[default]
--coarse-mask
Read matching,
Scale down mask
external mask
--primary-seam-generator=
nearest-feature-transform
[default]
--primary-seam-generator=
graph-cut
--no-optimize
[default]
--optimize
Optimizer Chain...
--save-masks
[default]
Write generated,
Final mask
possibly optimized mask
--output
Figure 4.1: Enblend’s internal work flow for the “next” image. The defaults are indicated like ‘[default]’.
The Optimizer Chain is complicated enough to warrant its own chart in Figure 4.2.
4.3. OPTION DELIMITERSC 37
--contrast-edge-scale=0.667:6.67:3.5
Separate all arguments with colons.
--contrast-edge-scale=0.667;6.67;3.5
Use semi-colons.
--contrast-edge-scale=0.667;6.67/3.5
Mix semicolon and slash in weird ways.
--entropy-cutoff=3%/99%
All delimiters also work in conjunction with percentages.
--gray-projector=channel-mixer:3/6/1
Separate arguments with a colon and two slashes.
--gray-projector=channel-mixer/30;60:10
Go wild and Enfuse will understand.
--save-masks=soft-mask-%03i.tif:hard-mask-03%i.tif
Separate all arguments with colons.
4.3. OPTION DELIMITERSC 38
Path-length/difference minimizer;
Simulated-Annealing
--optimizer-weights
minimizer
--anneal
Convert optimized
seam-line to mask
--save-masks=%d/soft-%n.tif,%d/hard-%n.tif
Use a comma.
The ultimate order in which the images are processed is: image-1.tif,
image-2.tif, image-3.tif.
Single response file.
Example:
enblend @list
img1.exr
img2.exr
img3.exr
img4.exr
image-01.png
@first.list
image-04.png
@second.list
image-08.png
4.4. RESPONSE FILESC 40
first.list is
image-02.png
image-03.png
image-05.png
image-06.png
image-07.png
# 4\pi panorama!
#exposure series
img-0.33ev.tif #"middle" EV
img-1.33ev.tif
img+0.67ev.tif
only the first line contains a comment, whereas the second line includes
none. Rather, it refers to a file called
img-0.33ev.tif #"middle" EV
If Enblend or Enfuse do not recognize a response file, they will skip the file
and issue a warning. To force a file being recognized as a response file add one
of the following syntactic comments to the first line of the file.
response-file: true
enblend-response-file: true
enfuse-response-file: true
syntactic-comment ::= space* ‘#’ space* key space* ‘:’ space* value
key ::= (‘A’. . . ‘Z’ | ‘a’. . . ‘z’ | ‘-’)+
where value is an arbitrary string.
# Horizontal panorama
# 15 images
# filename-globbing: wildcard
image 000[0-9].tif
image 001[0-4].tif
immediately and its effect persists to the end of the response file, unless another
syntactic comment undoes it.
Unknown syntactic comments are silently ignored.
A special index for syntactic comments, page 79 lists them in alphabetic
order.
literal
Do not glob. Interpret all filenames in response files as literals. This is the
default.
Please remember that white-space at both ends of a line in a response file
always gets discarded.
wildcard
Glob using the wildcard characters ‘?’, ‘*’, ‘[’, and ‘]’.
The Win32 implementation only globs the filename part of a path, whereas
all other implementations perform wildcard expansion in all path compo-
nents. Also see glob(7)a).
none
Alias for literal.
shell
The shell globbing algorithm works as literal does. In addition, it
interprets the wildcard characters ‘{’, ‘@’, and ‘~’. This makes the expansion
process behave more like common UN*X shells.
sh
Alias for shell.
a) http://man7.org/linux/man-pages/man7/glob.7.html
This syntactic comment affects the layer selection of all images listed after it
including those in included response files until another layer-selector overrides
it.
The simplest layer-specification are the layer-indexes. The first layer gets
index 1, the second layer 2, and so on. Zero never is a valid index! For convenience
indexing backwards) is also possible. This means by prefixing an index with a
minus-sign (‘-’) counting will start with the last layer of the associated multi-page
image, such that the last layer always has index -1, the next to last index -2 and
so on. Out-of-range indexes are silently ignored whether forward or backward.
The single layer of a single-layer file always can be accessed either with
index ‘1’ or ‘-1’.
Select a contiguous range of indexes with the range operator ‘h..i’, where
the range-bounds are forward or backward indices. Leaving out a bound or
substituting the open-range indicator ‘h_i’ means a maximal range into the
respective direction.
Layer specifications ignore white space, but usual shells do not. This means
that at the command-line
[] The empty selection selects nothing and in that way works like the layer-
selector ‘no-layer’.
[..] All layers in their natural order selected with the abbreviated notation.
[reverse _ .. _] All layers in reverse order. This yields 8, 7, 6, 5, 4, 3, 2,
and 1.
) Samantha Carter: “There has to be a way to reverse the process. The answer has to
be here.”
4.5. LAYER SELECTIONC 46
[rev ..] All layers in reversed order as before selected with the abbreviated
notation.
[r -3 ..] The last three layers in reverse order, this is 8, 7 and 6 in our running
example.
Shell expansion will not work anymore with a file name terminated
by a layer specification expression (or anything else), because to the
shell it is not a file name anymore. Work around with, for example,
$ enblend ‘for x in image-??.tif; do echo $x[2]; done‘
or
$ enblend $(ls -1 image-??.tif | sed -e ’s/$/[2]/’)
The order of the indices determines the order of the layers, this is, the
images. An index can occur multiple times, which causes layer to be
considered again. Consequently, this will lead to an error with Enblend,
but may be desired with Enfuse in soft-mask mode to give the image
more weight by mentioning it more than once.
Seam Generators
This version of Enblend supports two main algorithms to generate seam lines.
Use option --primary-seam-generator=ALGORITHM to select one of the
generators.
The most significant difference between the two algorithms is the output
mask gradation. NFT produces a coarse approximation of the seam, running
as far away from the overlap-region borders as possible. The resulting mask
could then be blended as-is, however, Enblend by default runs image-content
dependent optimizers to increase the mask gradation and for example omits
the regions where the images differ. The result is a finer seam line, which only
loosely follows the shape of NFT’s primary seam.
) https://en.wikipedia.org/wiki/Distance_transform
) Muhammad H. Alsuwaiyel and Marina Gavrilova, “On the Distance Transform of
Binary Images”, Proceedings of the International Conference on Imaging Science, Systems,
and Technology, June 2000, Vols. I and II, pages 83–86.
) https://en.wikipedia.org/wiki/Graph_cuts_in_computer_vision
47
48
Visualization Image
The visualization image shows the symmetric difference of the pixels in the
rectangular region where two images overlap. The larger the difference the
lighter shade of gray it appears in the visualization image. Enblend paints the
non-overlapping parts of the image pair – these are the regions where no blending
occurs – in hdark redi. Table 6.1 shows the meanings of all the colors that are
used in seam-line visualization images.
Figure 6.1 shows an example of a seam-line visualization. It was produced
with an Enblend run at all defaults plus passing options --fine-mask and --vi=
sualize.
The large hdark redi border is “off-limits” for Enblend, for the images do not
overlap there. The dark wedge inside the hdark redi frame is where the images
share a common region.
The initial seam-line (hdark yellowi) is almost straight with the exception of a
single bend on the left side of the image and the final seam-line (hbright yellowi)
meanders around it.
49
50
Figure 6.1: Seam-line visualization of a simple overlap. The 853×238 pixel image
has been rescaled to fit the width of the current page.
Chapter 7
This chapter explains the connection of pixel data types, ICC)-color profiles,
blend color spaces in Enblend or Enfuse.
Here, we collectively speak of blending and do not distinguish fusing, for the
basic operations are the same. Furthermore, we assume the multi-resolution
P spline
algorithm has calculated a set of weights wi for i = 1, 2, . . . and wi = 1 for each
pixel that must be blended from the participating input pixels Pi , i = 1, 2, . . ..
In the simplest, non-trivial case we have to blend a pair of grayscale input
pixels. Given their luminances L1 , L2 and their weighting factor 0 ≤ w ≤ 1,
what luminance L is their “weighted average”? This is the heart of Enblend’s
and Enfuse’s pyramidal blending operations! We are in particular interested in
a weighted average that appears visually correct, this is, our eyes and brains
consider L convincing or at the very least credible.
Note that Enblend and Enfuse face different obstacles in their respective
domains of use.
Enblend
The overlapping areas usually are well matched both geometrically
and photometrically. The differences of the pixels that must be
blended are small.
Enfuse (using a Soft Mask))
The input images greatly differ in exposure, saturation, or contrast.
This is exactly why we want to fuse them. Thus, the luminance,
saturation, and hue differences to be handled by Enfuse are gener-
ally quite high.
The details of blending pixels and in particular color pixels is quite intricate,
which is why we start this chapter with a mathematical introduction.
) https://en.wikipedia.org/wiki/ICC_profile
) Fusing with a Hard Mask is different, because exactly one weight factor is unity and all
the others are zero. There is nothing to blend – just to copy.
52
7.1. MATHEMATICAL PRELIMINARIES 53
Obviously,
0 ≤ L̄ ≤ 1 (7.3)
holds for all values L̄ := L/Lmax in the normalized luminance interval.
Sometimes images are gamma-encoded with exponent γ and the blended
luminance becomes γ
1/γ 1/γ
L0 = tL1 + (1 − t)L2 , (7.4)
which couples t and L0 in a non-linear way. See also Eric Brasseur’s explana-
tion of the gamma error in picture scaling).
Typical gamma values are γ = 2.2 for sRGB and AdobeRGB, 1.8
for AppleRGB, and ProPhotoRGB, 1.0 for Linear Rec709 RGB and
any others with “linear” in their names. For an extensive overview check
out Bruce Lindbloom’s Information on Working Color Spaces.)
The usual color-input images fed into Enblend are RGB-encoded, which
T
means each pixel comes as a triple of values (r, g, b) that represent the red,
green, and blue parts. We apply the normalization (7.2) to each of the three
primary colors and arrive at an “ RGB-cube” with unit edge length. The vectors
of primary colors span the cube
1 0 0
~r = 0 , ~g = 1 and ~b = 0 .
0 0 1
For each point inside – familiarly called pixel – the generalization of (7.3) holds
0 r 1
0 ≤ g ≤ 1 . (7.5)
0 b 1
) http://www.4p8.com/eric.brasseur/gamma.html
) http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html
7.2. FLOATING-POINT IMAGES 54
Blending the pixels of color images is more complicated than blending plain
luminances. Although we can write down the naı̈ve blending equation, (7.1),
again for RGB-coded pixels
r1 r2
P1 := g1 and P2 := g2
b1 b2
L2
Log(L) = 1 + L + + O(L3 ), for 0 ≤ L < 1.
2
This transform serves two purposes:
4
Log(L)
0
−20 0 20 40 60 80 100
L
Figure 7.1: Forward Log-transform shown for the range of −20 ≤ L ≤ 100. The
domain of Log(L) is the whole real axis.
7.3. COLOR PROFILES 56
and analogously what is the purest and brightest white, the white-point
T T
L=1 and (r, g, b) = (1, 1, 1) .
• For large projects switch on blending in the RGB color cube to speed up
the assembly of the images. When satisfied with all other parameters use
one of the computationally more expensive, but perceptually uniform color
spaces.
• Banding is best fought by input images with a high bit depth (≥ 16 bits
per channel). A cheap and mostly vain trick is to force a large output
bit depth with option --depth, page 22. No blend color space can avoid
banding if parts of the input images are almost “monochrome”.
• Enblend only. No color space can fix a seam-line gone haywire! First re-
run Enblend with ‘--visualize’, page 27 to inspect the seam-lines, then
try one or more of the following
Understanding Masksc
A binary mask indicates for every pixel of an image if this pixel must be
considered in further processing, or ignored. For a weight mask, the value of
the mask determines how much the pixel contributes, zero again meaning “no
contribution”.
Masks arise in two places: as part of the input files and as separate files,
showing the actual pixel weights prior to image blending or fusion. We shall
explore both occurrences in the next sections.
Mask
A mask defines a selection of pixels. A value of zero represents an unselected
pixel. The maximum value (“white”) represents a selected pixel and the
values between zero and the maximum are partially selected pixels. See
Gimp-Savy.)
) http://gimp-savvy.com/BOOK/index.html?node42.html
59
8.2. WEIGHT MASK FILES 60
$ identify -version
Version: ImageMagick 6.7.7-10 2014-03-08 Q16
http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
Example 8.1: Using identify to find out about the mask in image-0000.tif. ‘Matte’
indicates the existence of a mask.
Alpha Channel
The alpha channel stores the transparency value for each pixel, typically in
the range from zero to one. A value of zero means the pixel is completely
transparent, thus does not contribute to the image. A value of one on the
other hand means the pixel is completely opaque.
Matte
The notion “matte” as used by ImageMagick refers to an inverted alpha
channel, more precisely: 1 − alpha. See ImageMagick) for further explana-
tions.
Enblend and Enfuse only consider pixels that have an associated mask value
other than zero. If an input image does not have an alpha channel, Enblend
warns and assumes a mask of all non-zero values, that is, it will use every pixel
of the input image for fusion.
Stitchers like nona add a mask to their output images.
Sometimes it is helpful to manually modify a mask before fusion. For example
to suppress unwanted objects (insects and cars come into mind) that moved
across the scene during the exposures. If the masks of all input images are black
at a certain position, the output image will have a hole in that position.
) https://www.imagemagick.org/Usage/transform/
8.2. WEIGHT MASK FILES 61
$ tiffinfo
LIBTIFF, Version 4.0.2
Copyright (c) 1988-1996 Sam Leffler
Copyright (c) 1991-1996 Silicon Graphics, Inc.
...
$ tiffinfo image-0000.tif
TIFF Directory at off set 0x3a8182 (3834242)
Subfile Type: (0 = 0x0)
Image Width: 917 Image Length: 1187
Resolution: 150, 150 pixels/inch
Position: 0, 0
Bits/Sample: 8
Sample Format: unsigned integer
Compression Scheme: PackBits
Photometric Interpretation: RGB color
Extra Samples: 1<unassoc-alpha> mask
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 4 R, G, B, and mask
Rows/Strip: 285
Planar Configuration: single image plane
ImageFullWidth: 3000
ImageFullLength: 1187
Example 8.2: Using tiff info to find out about the mask in image-0000.tif. Here the
line ‘Extra Samples’ indicates one extra sample per pixel, which is interpreted
as an unassociated alpha-channel; Enblend and Enfuse interpret this as mask.
The second hint tiff info gives is in ‘Samples/Pixel’, where – for a RGB-image –
the 4 = 3 + 1 tells about the extra channel.
8.2. WEIGHT MASK FILES 62
You have your answer, Daniel Jackson. I suggest you act on it. –
Morgan le Fay (Ganos Lal)
Appendix A
Several programs and libraries have proven helpful when working with Enblend
or Enfuse.
63
A.3. IMAGE MANIPULATION 64
) http://www.libpng.org/pub/png/libpng.html
) http://www.remotesensing.org/libtiff/
) http://www.sno.phy.queensu.ca/ phil/exiftool/
~
) http://www.littlecms.com/
) http://www.magiclantern.fm/index.html
Appendix B
Bug Reportsc
Bug reports play an important role in making Enblend and Enfuse reliable
and enjoyable.
When you encounter a problem, the first thing to do is to see if it is already
known. To this end, visit the package’s LaunchPad) bug database). Search it
for your particular problem. If it is not known, please report it.
In order for a bug report to serve its purpose, you must include the information
that makes it possible to fix the bug.
• If Enblend or Enfuse get a fatal signal, for any options or input images,
that is a bug.
• If Enblend or Enfuse produce incorrect results, for any input whatever, that
is a bug.
• If Enblend or Enfuse produce an error message for valid input, that is a
bug.
66
B.2. HOW TO REPORT BUGS 67
• The exact version and configuration of Enblend. You can get the data by
running enblend with the options --version and --verbose together. See
also Section 3.3.1 on page 8 on how to find out the exact configuration of
your binary.
• A complete set of input images that will reproduce the bug. Strive for a
minimal set of small images, where images up to 1500×1000 pixels qualify
as small.
• The type of machine you are using, and the operating system name and
its version number.
• A complete list of any modifications you have made to the source. Be
precise about these changes. Show a delta generated with diff for them.
• Details of any other deviations from the standard procedure for installing
Enblend and Enfuse.
• The exact command line you use to call Enblend or Enfuse, which then
triggers the bug.
Examples:
$ ~/local/bin/enblend -v \
--fine-mask \
--optimizer-weights=3:2 \
--mask-vectorize=12.5% \
image-1.png image-2.png
or:
$ /local/bin/enfuse \
--verbose \
B.3. SENDING PATCHES 68
--exposure-weight=0 --saturation-weight=0
--entropy-weight=1 \
--gray-projector=l-star \
--entropy-cutoff=1.667% \
layer-01.ppm layer-02.ppm layer-03.ppm
If you call Enblend or Enfuse from within a GUI like, for example, Hugin)
or ImageFuser) by Harry van der Wolf, copy&paste or write down
the command line that launches Enblend or Enfuse.
• A description of what behavior you observe that you believe is incorrect.
For example, “The application gets a fatal signal,” or, “The output image
contains black holes.”
Of course, if the bug is that the application gets a fatal signal, then one
cannot miss it. But if the bug is incorrect output, we might not notice
unless it is glaringly wrong.
• Send an explanation with your changes of what problem they fix or what
improvement they bring about. For a bug fix, just include a copy of the
bug report, and explain why the change fixes the bug.
• Always include a proper bug report for the problem you think you have
fixed. We need to convince ourselves that the change is right before
installing it. Even if it is right, we might have trouble judging it if we do
not have a way to reproduce the problem.
• Include all the comments that are appropriate to help people reading the
source in the future understand why this change was needed.
• Do not mix together changes made for different reasons. Send them
individually.
If you make two changes for separate reasons, then we might not want to
install them both. We might want to install just one.
• Use the version control system to make your diffs. Prefer the unified diff)
format: hg diff --unified 4.
) http://hugin.sourceforge.net/
) http://imagefuser.sourceforge.net/onlinemanual/
) https://en.wikipedia.org/wiki/Diff#Unified_format
B.3. SENDING PATCHES 69
• You can increase the probability that your patch gets applied by basing it
on a recent revision of the sources.
Appendix C
Authorsc
70
Appendix D
The FreeGNU
Documentation Licensec
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
functional and useful document free in the sense of freedom: to assure
everyone the effective freedom to copy and redistribute it, with or without
modifying it, either commercially or noncommercially. Secondarily, this
License preserves for the author and publisher a way to get credit for their
work, while not being considered responsible for modifications made by
others.
This License is a kind of “copyleft”, which means that derivative works of
the document must themselves be free in the same sense. It complements
the GNU General Public License, which is a copyleft license designed for
free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free program
should come with manuals providing the same freedoms that the software
does. But this License is not limited to software manuals; it can be used for
any textual work, regardless of subject matter or whether it is published
as a printed book. We recommend this License principally for works whose
purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that
71
72
Both covers must also clearly and legibly identify you as the publisher of
these copies. The front cover must present the full title with all words of
the title equally prominent and visible. You may add other material on
the covers in addition. Copying with changes limited to the covers, as long
as they preserve the title of the Document and satisfy these conditions,
can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit legibly, you
should put the first ones listed (as many as fit reasonably) on the actual
cover, and continue the rest onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using public
has access to download using public-standard network protocols a complete
Transparent copy of the Document, free of added material. If you use the
latter option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this Transparent
copy will remain thus accessible at the stated location until at least one
year after the last time you distribute an Opaque copy (directly or through
your agents or retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under the
conditions of sections 2 and 3 above, provided that you release the Modified
Version under precisely this License, with the Modified Version filling the
role of the Document, thus licensing distribution and modification of the
Modified Version to whoever possesses a copy of it. In addition, you must
do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct from
that of the Document, and from those of previous versions (which
should, if there were any, be listed in the History section of the
Document). You may use the same title as a previous version if the
original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified Version,
together with at least five of the principal authors of the Document
(all of its principal authors, if it has fewer than five), unless they
release you from this requirement.
C. State on the Title page the name of the publisher of the Modified
Version, as the publisher.
D. Preserve all the copyright notices of the Document.
75
example, statements of peer review or that the text has been approved by
an organization as the authoritative definition of a standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list of
Cover Texts in the Modified Version. Only one passage of Front-Cover Text
and one of Back-Cover Text may be added by (or through arrangements
made by) any one entity. If the Document already includes a cover text
for the same cover, previously added by you or by arrangement made by
the same entity you are acting on behalf of, you may not add another;
but you may replace the old one, on explicit permission from the previous
publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or imply
endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified versions,
provided that you include in the combination all of the Invariant Sections
of all of the original documents, unmodified, and list them all as Invariant
Sections of your combined work in its license notice, and that you preserve
all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and multiple
identical Invariant Sections may be replaced with a single copy. If there
are multiple Invariant Sections with the same name but different contents,
make the title of each such section unique by adding at the end of it, in
parentheses, the name of the original author or publisher of that section if
known, or else a unique number. Make the same adjustment to the section
titles in the list of Invariant Sections in the license notice of the combined
work.
In the combination, you must combine any sections Entitled “History” in
the various original documents, forming one section Entitled “History”;
likewise combine any sections Entitled “Acknowledgements”, and any
sections Entitled “Dedications”. You must delete all sections Entitled
“Endorsements.”
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this License
in the various documents with a single copy that is included in the collection,
provided that you follow the rules of this License for verbatim copying of
each of the documents in all other respects.
You may extract a single document from such a collection, and distribute it
individually under this License, provided you insert a copy of this License
77
into the extracted document, and follow this License in all other respects
regarding verbatim copying of that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an “aggregate” if the copyright resulting
from the compilation is not used to limit the legal rights of the compilation’s
users beyond what the individual works permit. When the Document is
included in an aggregate, this License does not apply to the other works in
the aggregate which are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these copies of
the Document, then if the Document is less than one half of the entire
aggregate, the Document’s Cover Texts may be placed on covers that
bracket the Document within the aggregate, or the electronic equivalent of
covers if the Document is in electronic form. Otherwise they must appear
on printed covers that bracket the whole aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may distribute
translations of the Document under the terms of section 4. Replacing
Invariant Sections with translations requires special permission from their
copyright holders, but you may include translations of some or all Invariant
Sections in addition to the original versions of these Invariant Sections.
You may include a translation of this License, and all the license notices
in the Document, and any Warranty Disclaimers, provided that you also
include the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between the
translation and the original version of this License or a notice or disclaimer,
the original version will prevail.
If a section in the Document is Entitled “Acknowledgements”, “Dedica-
tions”, or “History”, the requirement (section 4) to Preserve its Title
(section 1) will typically require changing the actual title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to copy,
modify, sublicense or distribute the Document is void, and will automati-
cally terminate your rights under this License. However, parties who have
received copies, or rights, from you under this License will not have their
licenses terminated so long as such parties remain in full compliance.
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns. See GNU Copyleft).
Each version of the License is given a distinguishing version number. If the
Document specifies that a particular numbered version of this License “or
any later version” applies to it, you have the option of following the terms
and conditions either of that specified version or of any later version that
has been published (not as a draft) by the Free Software Foundation. If
the Document does not specify a version number of this License, you may
choose any version ever published (not as a draft) by the Free Software
Foundation.
) http://www.gnu.org/copyleft/
Syntactic Comment Index
enblend-response-file, 41
enfuse-response-file, 41
filename-globbing, 42
globbing, 42
glob, 42
layer-selector, 42
response-file, 41
79
Program/Application Index
80
Option Index
Locations marked like 12 indicate the place of the option’s genuine descrip-
tion.
--anneal, 30 --wrap, 4, 24
--blend-colorspace, 20 -V (long: --version), 35
--ciecam, 22 -a (long: --pre-assemble), 30
--coarse-mask, 25 -c (long: --ciecam), 22
--compression, 18 -d (long: --depth), 22
--depth, 22 -f, 24
--dijkstra, 31 -g, 24
--fallback-profile, 28 -h (long: --help), 34
--fine-mask, 25 -l (long: --levels), 19
--help, 34 -o (long: --output), 20
--image-difference, 31 -v (long: --verbose), 20
--layer-selector, 28 -w (long: --wrap), 24
--levels, 19 -x, 30
--load-masks, 8, 26
--mask-vectorize, 32
--no-ciecam, 22
--no-optimize, 26
--no-parameter, 30
--no-pre-assemble, 30
--optimizer-weights, 33
--optimize, 26
--output, 8, 20
--parameter, 28
--pre-assemble, 30
--primary-seam-generator, 34
--save-masks, 8, 26
--show-globbing-algorithms, 34
--show-image-formats, 12, 34
--show-signature, 13, 35
--show-software-components, 13,
35
--verbose, 11, 20
--version, 10, 11, 35
--visualize, 27
81
General Index
Locations marked like 12 indicate the location where a term gets introduced
or defined. Tables, lists, etc. that summarize material are indicated like 34.
Symbols B
#(response file comment), 40 BigTIFF, 3
@ (response file prefix), 39 binary mask, see mask, binary
binary version, see software, ver-
Numbers sion
360◦ bit depth, see bits per channel
horizontal panorama, see pa- bits per channel, 13, 22
norama, 360◦ black-and-white image, see image,
vertical panorama, see pano- black-and-white
rama, 360◦ black-point, 56
blend colorspace, see colorspace,
A blend
Adelson, Edward H., 1 blending
advanced options, 20–25 sequential, 3, 30
affine transformation, see transfor- blending color space, see colorspace,
mation, affine for blending and fusing
algorithm, see globbing algorithm blending pixels, see pixels, blend-
globbing, 34 ing
algorithms Born, Max, 24
globbing, 43 bracketing
alignment HDR, 65
photometric, 7 branches of Enblend/Enfuse
alpha, 59 development, 10
alpha channel Brasseur, Eric, 53
associated, 24 bug
Alsuwaiyel, Muhammad H., 47 database at LaunchPad, 66
anneal parameters, see optimize, reports, 66–69
anneal parameters how to, 67
arithmetic JPEG compression, see identification of bugs, 66
compression sending patches, 68
assemble, see preassemble builder, 13
associated alpha channel, see alpha Burt, Peter J., 1
channel, associated Burt-Adelson, 1
authors, 70
82
83
meta-data handling, 65 J
raw image conversion, 63 Jackson, Daniel, 19, 30, 62
hue-luminance maximum, 31 JFIF, see JPEG
JPEG, 64
I JPEG compression, see compres-
ICC, 65 sion
ICC profile, see profile, ICC, see JPEG quality level, see compres-
profile, ICC sion
ICC profile black-point, see black-
point K
ICC profile white-point, see white- von Kármán, Theodore, 24
point known limitations, 3–4
ICC profile, see profile, ICC
IEEE754 L
double precision float, 23 L*a*b* colorspace, see colorspace,
single precision float, 23 L*a*b*
image LaunchPad
EXR, 54 bug database, see bug, database
black-and-white, 56 at LaunchPad
directory, 44 layer
floating-point, 54 image, 44
floating-point TIFF, 54 selection, 44–46
floating-point VIFF, 54 layer selection, 28
frame, 46 all layers, 28
seam-line, see seam-line, visu- default, 42
alization first layer, 28
image difference, 31 largest-layer, 28
image formats, 12, 13, see format, last layer, 28
image no layer, 28
JPEG, 12 layer selection syntax, 44
OpenEXR, 13 lens distortion
PNG, 12 correction of, 7
TIFF, 13 level
image match quality, see quality, verbosity, 20
match levels
image processing order, see order pyramid, 19
of image processing LibJPEG, 64
image requirements, 17 LibPNG, 64
information libraries, 13
on software components, 35 LibTiff, 65
information options, 34–35 Lindbloom, Bruce, 53
input mask, see mask, input files literal filename, see filename, lit-
interaction with Enblend, 8–16 eral
invocation, 17–46 load mask, see mask, load
log-transform, see transform, log
86
optimizer fusing, 52
seam-line, 22 PNG, 64
simulated annealing, 30 preassemble, 30
optimizer weights, see weight, opti- primary seam generator, see seam,
mizer primary generator
option delimiters, see options, de- problem reports, see bug reports
limiters profile
options, 18–37 fallback, 28
advanced, 20 ICC, 13, 21, 52
common, 18 program flow, 35–37
delimiters, 37 internal, 35
filename arguments, 37 public repository, 11
numeric arguments, 37 pyramid levels, see levels, pyramid
expert, 28
information, 34 Q
mask generation, 25 quality
mask generation for experts, match, 32
30 query
program flow, 35 compiler, 13
order features, 11
of image processing, 39 image formats, 12
output libraries, 13
file compression, 18 name of builder, 13
output filename, see filename, out- query version, see version, query
put
default, see filename, output, R
default radius
output image Dijkstra, 31
set size, 24 Dijkstra, 50
overview, 1–2 raw conversion, see conversion, raw
rendering intent
P perceptual, 57
packbits compression, see compres- requantization, 22
sion requirements
panorama image, 17
360◦ response file, see file, response
horizontal, 25 comment (‘#’), see ‘#’
vertical, 25 force recognition of, 41
parallax error, 7 format, 40
perceptual rendering intent, see grammar, 40
rendering intent syntactic comment, 41
photographic workflow, 5–16 response file prefix
photometric alignment, see align- ‘@’, see ‘@’
ment, photometric response files, 39–44
pixels result
blending, 52 checkpoint, 30
88
W
weight
chrominance, 31
luminance, 31
mask, see mask, weight
optimizer, 33
weighting factor, 52
white-point, 56
D50, 57
workflow, see photographic work-
flow
Enblend, 6
Enfuse, 6
external mask, 9
standard, 5
wrap around, 24