411
@node Image Requirements
412
@section Image Requirements
413
@cindex input image requirements
415
All input images must comply with the following requirements.
422
The images agree on their number of bits-per-channel, this is, their
435
See option@tie{}@option{--depth} below for an explanation of different
439
Enfuse understands the images' filename extensions as well as their
442
You can check the supported extensions and formats by calling Enfuse
443
with the option pair @option{--version@tie{}--verbose} and scan the
444
output for @samp{Supported image formats} or @samp{Supported file
448
Moreover, there are some ``good practices'', which are not enforced by
449
the application, but almost certainly deliver superior results.
453
Either all files lack an @acronym{ICC} profile, or all images are
454
supplied with the @emph{same} @acronym{ICC} profile.
457
If the images' meta-data contains resolution information
458
(``@acronym{DPI}''), it is the same for all pictures.
380
462
@node Response Files
381
463
@section Response Files
382
464
@cindex response file
401
490
for @var{COMPRESSION}.
493
@item @acronym{JPEG} format.
405
494
@cindex @acronym{JPEG} compression
406
495
@cindex compression, @acronym{JPEG}
407
@var{COMPRESSION} is a @acronym{JPEG} quality level ranging from
411
@var{COMPRESSION} is one of the keywords:
497
The compression either is a literal integer or a keyword-option
502
Set @acronym{JPEG} quality@tie{}@var{LEVEL}, where @var{LEVEL} is an
503
integer that ranges from 0--100.
505
@item jpeg[:@var{LEVEL}]
506
Same as above; without the optional argument just switch on (standard)
507
@acronym{JPEG} compression.
509
@item jpeg-arith[:@var{LEVEL}]
510
@cindex arithmetic @acronym{JPEG} compression
511
@cindex compression, arithmetic @acronym{JPEG}
512
Switch on arithmetic @acronym{JPEG} compression. With optional
513
argument set the arithmetic compression@tie{}@var{LEVEL}, where
514
@var{LEVEL} is an integer that ranges from 0--100.
517
@item @acronym{TIF} format.
518
Here, @var{COMPRESSION} is one of the keywords:
415
522
Do not compress. This is the default.
418
525
@cindex deflate compression
419
526
@cindex compression, deflate
420
527
Use the @sc{Deflate} compression scheme also called
422
529
compression algorithm that uses a combination of the @acronym{LZ77}
423
530
algorithm and @sc{Huffman} coding.
532
@item jpeg[:@var{LEVEL}]
533
@cindex compression, @acronym{JPEG}
534
Use @acronym{JPEG} compression. With optional argument set the
535
compression@tie{}@var{LEVEL}, where @var{LEVEL} is an integer that
426
539
@cindex @acronym{LZW} compression
427
540
@cindex compression, @acronym{LZW}
428
541
Use @sc{Lempel}-@sc{Ziv}-@sc{Welch} (@acronym{LZW}) adaptive
429
542
compression scheme. @acronym{LZW} compression is lossless.
432
545
@cindex packbits compression
433
546
@cindex compression, packbits
434
547
Use @sc{PackBits} compression scheme. @sc{PackBits} is a particular
435
548
variant of run-length compression; it is lossless.
438
@item Any other format
551
@item Any other format.
439
552
Other formats do not accept a @var{COMPRESSION} setting.
441
554
However, @uref{http://@/hci.iwr.uni-@/heidelberg.de/@/vigra/,
443
556
@sc{Deflate} method.
559
@item --layer-selector=@var{ALGORITHM}
560
@opindex --layer-selector
561
@cindex layer selection
562
@cindex layer selection
563
Override the standard layer selector algorithm, which is
564
@samp{@value{srcCOLONCOLONlayerDASHselector}}.
566
This version of Enfuse offers the following algorithms:
569
@cindex layer selection, all-layers
570
Select all layers in all images.
573
@cindex layer selection, first-layer
574
Select only first layer in each multi-layer image. For single-layer
575
images this is the same as @samp{all-layers}.
578
@cindex layer selection, largest-layer
579
Select largest layer in each multi-layer image, where the
580
``largeness'', this is the size is defined by the product of the layer
581
width and its height. The channel width of the layer is ignored. For
582
single-layer images this is the same as @samp{all-layers}.
585
@cindex layer selection, no layer
586
Do not select any layer in any image.
588
This algorithm is useful to temporarily exclude some images in
450
Print information on the available options then exit.
596
Print information on the available options and exit.
452
598
@item -l @var{LEVELS}
453
599
@itemx --levels=@var{LEVELS}
605
791
@cindex wrap around
606
792
Blend around the boundaries of the panorama.
794
As this option significantly increases memory usage and computation
795
time only use it, if the panorama will be
799
consulted for any kind measurement, this is, all boundaries must match
800
as accurately as possible, or
803
printed out and the boundaries glued together, or
806
@cindex virtual reality
807
fed into a virtual reality (@abbr{VR}) generator, which creates a
808
seamless environment.
811
Otherwise, always avoid this option!
608
813
With this option, Enfuse treats the panorama of width@tie{}@math{w}
609
814
and height@tie{}@math{h} as an infinite data structure, where each
610
815
pixel@tie{}@math{P(x, y)} of the input images represents the set of
611
pixels@tie{}@math{S_P(x, y)}@footnote{Solid-state physicists will be
821
<mathinline xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
853
@footnote{Solid-state physicists will be reminded of the
613
854
@uref{http://@/en.wikipedia.org/@/wiki/@/Born-@/von_@/Karman_@/boundary_@/condition,
614
@sc{Born}-@sc{von K@'arm@'an} boundary condition}.}.
855
@sc{Born}-@sc{von@tie{}K@'arm@'an} boundary condition}.}.
616
857
@var{MODE} takes the following values:
829
1172
@code{enfuse --version --verbose}.
833
1178
@cindex color appearance model
834
1179
@cindex @acronym{CIECAM02}
835
Use the @acronym{CIECAM02} color appearance model for blending colors.
1180
Force the use of the @acronym{CIECAM02} color appearance model for
1181
blending colors instead of blending inside the @acronym{RGB} color
1184
@cindex color profile
837
1185
@cindex @acronym{ICC} profile
838
1186
@cindex profile, @acronym{ICC}
839
1187
@cindex @acronym{sRGB} color space
840
1188
@cindex color space, @acronym{sRGB}
841
The input files should have embedded @acronym{ICC} profiles when this
1189
All input files should have identical @acronym{ICC} profiles when this
842
1190
option is specified. If no @acronym{ICC} profile is present, Enfuse
843
will assume that the image uses the @acronym{sRGB} color space. The
844
difference between this option and Enfuse's default color blending
845
algorithm is slight, and will only be noticeable when areas of
846
different primary colors are blended together.
1191
assumes that all images use the @acronym{sRGB} color space.
1192
@xref{Color Profiles}.
1194
Please keep in mind that using @acronym{CIECAM02} blending may change
1195
the colors in the output image.
1197
This option can be negated; see option@tie{}@option{--no-ciecam}
849
1201
@itemx --depth=@var{DEPTH}
968
1320
@item -f @var{WIDTH}x@var{HEIGHT}
969
@itemx -f @var{WIDTH}x@var{HEIGHT}+x@var{X-OFFSET}+y@var{Y-OFFSET}
1321
@itemx -f @var{WIDTH}x@var{HEIGHT}+x@var{XOFFSET}+y@var{YOFFSET}
971
1323
@cindex output image, set size of
972
Set the size of the output image manually to
1325
@cindex size, canvas
1326
Ensure that the minimum ``canvas'' size of the output image is at
974
1328
@classictimes{}@c
975
@var{HEIGHT}. Optionally specify the
976
@var{X-OFFSET} and @var{Y-OFFSET}, too.
1329
@/@var{HEIGHT}. Optionally specify
1330
the @var{XOFFSET} and @var{YOFFSET}, too.
978
1332
@pindex nona @r{(Hugin)}
980
This option is useful when the input images are cropped @acronym{TIFF}
981
files, such as those produced by @command{nona}. The stitcher
982
@command{nona} is part of Hugin. @xref{Helpful Programs}.
1334
This option only is useful when the input images are cropped
1335
@acronym{TIFF} files, such as those produced by
1336
@command{nona}@footnote{The stitcher @command{nona} is part of Hugin.
1337
@xref{Helpful Programs}.}.
1339
Note that option@tie{}@option{-f} neither rescales the output image,
1340
nor shrinks the canvas size below the minimum size occupied by the
1341
union of all input images.
1343
@item --fallback-profile=@var{PROFILE-FILENAME}
1344
@opindex --fallback-profile
1345
@cindex profile, fallback
1346
@cindex fallback profile
1347
@cindex @acronym{CIECAM02}
1348
Use the @acronym{ICC} profile in @var{PROFILE-FILENAME} instead of the
1349
default @acronym{sRGB}. See option@tie{}@option{--ciecam} and
1350
@ref{Color Profiles}.
1352
This option only is effective if the input images come without color
1353
profiles and blending is performed in @acronym{CIECAM02} color
1026
1408
@item --contrast-weight=@var{WEIGHT}
1027
1409
@opindex --contrast-weight
1028
1410
@cindex weight, local contrast
1029
@opindex --wContrast @r{(deprecated)}
1030
(This option supersedes the deprecated
1031
option@tie{}@option{--wContrast}.)
1033
1412
Sets the relative @var{WEIGHT} of high local-contrast pixels.
1034
Default: @value{srcCOLONCOLONdefaultDASHweightDASHcontrast}. Valid range:
1036
@value{srcCOLONCOLONminimumDASHweightDASHcontrast} @leq{} @var{WEIGHT} @leq{}
1037
@value{srcCOLONCOLONmaximumDASHweightDASHcontrast}.
1040
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1042
<mn>@value{srcCOLONCOLONminimumDASHweightDASHcontrast}</mn>
1044
<mi mathvariant="italic">WEIGHT</mi>
1046
<mn>@value{srcCOLONCOLONmaximumDASHweightDASHcontrast}</mn>
1052
$@value{srcCOLONCOLONminimumDASHweightDASHcontrast} \le \mathit{WEIGHT} \le
1053
@value{srcCOLONCOLONmaximumDASHweightDASHcontrast}$.
1414
Valid range: @value{srcCOLONCOLONminimumDASHweightDASHcontrast} @leq{} @var{WEIGHT}
1415
@leq{} @value{srcCOLONCOLONmaximumDASHweightDASHcontrast}.
1417
Default: @value{srcCOLONCOLONdefaultDASHweightDASHcontrast}.
1056
1419
See @ref{Local Contrast Weighting} and @ref{Expert Options, Option
1057
1420
contrast-window-size}.
1059
1422
@item --entropy-weight=@var{WEIGHT}
1060
1423
@opindex --entropy-weight
1061
1424
@cindex weight, entropy
1062
@opindex --wEntropy @r{(deprecated)}
1063
(This option supersedes the deprecated
1064
option@tie{}@option{--wEntropy}.)
1066
Sets the relative @var{WEIGHT} of high local entropy pixels. Default:
1067
@value{srcCOLONCOLONdefaultDASHweightDASHentropy}. Valid range:
1069
@value{srcCOLONCOLONminimumDASHweightDASHentropy} @leq{} @var{WEIGHT} @leq{}
1070
@value{srcCOLONCOLONmaximumDASHweightDASHentropy}.
1073
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1075
<mn>@value{srcCOLONCOLONminimumDASHweightDASHentropy}</mn>
1077
<mi mathvariant="italic">WEIGHT</mi>
1079
<mn>@value{srcCOLONCOLONmaximumDASHweightDASHentropy}</mn>
1085
$@value{srcCOLONCOLONminimumDASHweightDASHentropy} \le \mathit{WEIGHT} \le
1086
@value{srcCOLONCOLONmaximumDASHweightDASHentropy}$.
1426
Sets the relative @var{WEIGHT} of high local entropy pixels.
1428
Valid range: @value{srcCOLONCOLONminimumDASHweightDASHentropy} @leq{} @var{WEIGHT}
1429
@leq{} @value{srcCOLONCOLONmaximumDASHweightDASHentropy}.
1431
Default: @value{srcCOLONCOLONdefaultDASHweightDASHentropy}.
1089
1433
See @ref{Local Entropy Weighting} and @ref{Expert Options, Options
1090
1434
entropy-window-size and entropy-cutoff}.
1092
1436
@item --exposure-weight=@var{WEIGHT}
1093
1437
@opindex --exposure-weight
1094
1438
@cindex weight, exposure
1095
@opindex --wExposureMu @r{(deprecated)}
1096
(This option supersedes the deprecated
1097
option@tie{}@option{--wExposureMu}.)
1099
1440
Sets the relative @var{WEIGHT} of the well-exposedness criterion.
1100
1441
Increasing this weight relative to the others will make well-exposed
1101
pixels contribute more to the final output. Default:
1102
@value{srcCOLONCOLONdefaultDASHweightDASHexposure}. Valid range:
1104
@value{srcCOLONCOLONminimumDASHweightDASHexposure} @leq{} @var{WEIGHT} @leq{}
1105
@value{srcCOLONCOLONmaximumDASHweightDASHexposure}.
1108
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1110
<mn>@value{srcCOLONCOLONminimumDASHweightDASHexposure}</mn>
1112
<mi mathvariant="italic">WEIGHT</mi>
1114
<mn>@value{srcCOLONCOLONmaximumDASHweightDASHexposure}</mn>
1120
$@value{srcCOLONCOLONminimumDASHweightDASHexposure} \le \mathit{WEIGHT} \le
1121
@value{srcCOLONCOLONmaximumDASHweightDASHexposure}$.
1442
pixels contribute more to the final output.
1444
Valid range: @value{srcCOLONCOLONminimumDASHweightDASHexposure} @leq{} @var{WEIGHT}
1445
@leq{} @value{srcCOLONCOLONmaximumDASHweightDASHexposure}.
1447
Default: @value{srcCOLONCOLONdefaultDASHweightDASHexposure}.
1124
1449
@xref{Exposure Weighting}.
1126
1451
@item --exposure-mu=@var{MEAN}
1127
1452
@opindex --exposure-mu
1128
@opindex --wExposureMu @r{(deprecated)}
1129
(This option supersedes the deprecated
1130
option@tie{}@option{--wExposureMu}.)
1132
1454
Set the @var{MEAN} (this is, the center) of the Gaussian exposure
1133
weight curve. Default: @value{srcCOLONCOLONdefaultDASHexposureDASHmu}. Valid
1136
@value{srcCOLONCOLONminimumDASHexposureDASHmu} @leq{} @var{MEAN} @leq{}
1137
@value{srcCOLONCOLONmaximumDASHexposureDASHmu}.
1140
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1142
<mn>@value{srcCOLONCOLONminimumDASHexposureDASHmu}</mn>
1144
<mi mathvariant="italic">MEAN</mi>
1146
<mn>@value{srcCOLONCOLONmaximumDASHexposureDASHmu}</mn>
1152
$@value{srcCOLONCOLONminimumDASHexposureDASHmu} \le \mathit{MEAN} \le
1153
@value{srcCOLONCOLONmaximumDASHexposureDASHmu}$.
1457
Valid range: @value{srcCOLONCOLONminimumDASHexposureDASHmu} @leq{} @var{MEAN}
1458
@leq{} @value{srcCOLONCOLONmaximumDASHexposureDASHmu}.
1460
Default: @value{srcCOLONCOLONdefaultDASHexposureDASHmu}.
1156
1462
Use this option to fine-tune exposure weighting (@pxref{Exposure
1159
1465
@item --exposure-sigma=@var{STD-DEV}
1160
1466
@opindex --exposure-sigma
1161
@opindex --wExposureSigma @r{(deprecated)}
1162
(This option supersedes the deprecated
1163
option@tie{}@option{--wExposureSigma}.)
1165
1468
Standard deviation @var{STD-DEV} of the Gaussian exposure weight
1166
curve. Default: @value{srcCOLONCOLONdefaultDASHexposureDASHsigma}. Low numbers
1167
give less weight to pixels that are far from @option{--wMu} and vice
1170
@value{srcCOLONCOLONminimumDASHexposureDASHsigma} @leq{} @var{STD-DEV}.
1173
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1175
<mn>@value{srcCOLONCOLONminimumDASHexposureDASHsigma}</mn>
1177
<mi mathvariant="italic">STD-DEV</mi>
1183
$@value{srcCOLONCOLONminimumDASHexposureDASHsigma} \le \mathit{STD-DEV}$.
1469
curve. Low numbers give less weight to pixels that are far from
1470
@option{--wMu} and vice versa.
1472
Valid range: @var{STD-DEV} @geq{} @value{srcCOLONCOLONminimumDASHexposureDASHsigma}.
1474
Default: @value{srcCOLONCOLONdefaultDASHexposureDASHsigma}.
1186
1476
Use this option to fine-tune exposure weighting (@pxref{Exposure
1189
1479
@item --saturation-weight=@var{WEIGHT}
1190
1480
@opindex --saturation-weight
1191
@opindex --wSaturation @r{(deprecated)}
1192
(This option supersedes the deprecated
1193
option@tie{}@option{--wSaturation}.)
1195
1482
Sets the relative @var{WEIGHT} of high-saturation pixels. Increasing
1196
1483
this weight makes pixels with high saturation contribute more to the
1197
final output. Default: @value{srcCOLONCOLONdefaultDASHweightDASHsaturation}. Valid
1200
@value{srcCOLONCOLONminimumDASHweightDASHsaturation} @leq{} @var{WEIGHT} @leq{}
1201
@value{srcCOLONCOLONmaximumDASHweightDASHsaturation}.
1204
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1206
<mn>@value{srcCOLONCOLONminimumDASHweightDASHsaturation}</mn>
1208
<mi mathvariant="italic">WEIGHT</mi>
1210
<mn>@value{srcCOLONCOLONmaximumDASHweightDASHsaturation}</mn>
1216
$@value{srcCOLONCOLONminimumDASHweightDASHsaturation} \le \mathit{WEIGHT} \le
1217
@value{srcCOLONCOLONmaximumDASHweightDASHsaturation}$.
1486
Valid range: @value{srcCOLONCOLONminimumDASHweightDASHsaturation}
1487
@leq{} @var{WEIGHT} @leq{} @value{srcCOLONCOLONmaximumDASHweightDASHsaturation}.
1489
Default: @value{srcCOLONCOLONdefaultDASHweightDASHsaturation}.
1220
1491
Saturation weighting is only defined for color images.
1221
1492
@xref{Saturation Weighting}.
1230
1501
to read the manual before applying them successfully.
1233
@item --contrast-window-size=@var{SIZE}
1234
@opindex --contrast-window-size
1235
@opindex --ContrastWindowSize @r{(deprecated)}
1236
(This option supersedes the deprecated
1237
option@tie{}@option{--ContrastWindowSize}.)
1239
Set the window @var{SIZE} for local contrast analysis. The window
1240
will be a square of @var{SIZE}@c
1244
For contrast analysis @var{SIZE} values larger than 5 might result in
1245
a blurry composite image. Values of 3 and 5 have given good results
1250
@var{SIZE} @geq{} @value{srcCOLONCOLONminimumDASHcontrastDASHwindowDASHsize}.
1253
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1255
<mi mathvariant="italic">SIZE</mi>
1257
<mn>@value{srcCOLONCOLONminimumDASHcontrastDASHwindowDASHsize}</mn>
1263
$\mathit{SIZE} \ge @value{srcCOLONCOLONminimumDASHcontrastDASHwindowDASHsize}$.
1266
If given an even @var{SIZE}, Enfuse will automatically use the next
1269
See also @ref{Fusion Options, Option --contrast-weight} and
1270
@option{--hard-mask} below.
1272
1504
@item --contrast-edge-scale=@var{EDGE-SCALE}
1273
1505
@itemx --contrast-edge-scale=@var{EDGE-SCALE}:@var{LCE-SCALE}:@var{LCE-FACTOR}
1274
1506
@opindex --contrast-edge-scale
1275
@opindex --EdgeScale @r{(deprecated)}
1276
(This option supersedes the deprecated
1277
option@tie{}@option{--EdgeScale}.)
1508
@cindex Laplacian-of-Gaussian
1279
1509
A non-zero value for @var{EDGE-SCALE} switches on the
1280
1510
Laplacian-of-Gaussian (@acronym{LoG}) edge detection algorithm.
1281
1511
@var{EDGE-SCALE} is the radius of the Gaussian used in the search for
1285
1515
(@acronym{LCE}) before the @acronym{LoG} edge detection.
1286
1516
@var{LCE-SCALE} is the radius of the Gaussian used in the enhancement
1287
1517
step, @var{LCE-FACTOR} is the weight factor (``strength'').
1290
@math{enhanced = (1 + LCE-FACTOR) * original
1291
- LCE-FACTOR * GaussianSmooth(original, LCE-SCALE)}
1295
<math xmlns="http://www.w3.org/1998/Math/MathML">
1299
<mi mathvariant="italic">enhanced</mi>
1309
<mi mathvariant="italic">LCE-FACTOR</mi>
1313
<mi mathvariant="italic">original</mi>
1322
<mi mathvariant="italic">LCE-FACTOR</mi>
1325
<mo>GaussianSmooth</mo>
1326
<mo>⁡</mo>
1328
<mi mathvariant="italic">original</mi>
1329
<mi mathvariant="italic">LCE-SCALE</mi>
1340
\eqalign{enhanced & = (1 + \mathit{LCE-FACTOR}) \; \mathit{original}\cr
1341
& - \mathit{LCE-FACTOR} \;
1342
\mathrm{GaussianSmooth}(\mathit{original},
1343
\mathit{LCE-SCALE})\cr}
1519
@var{enhanced} = (1 + @var{LCE-FACTOR}) @c
1522
@minus{} @var{LCE-FACTOR} @c
1524
Gaussian@/Smooth(@var{original},
1347
1527
@var{LCE-SCALE} defaults to @value{srcCOLONCOLONdefaultDASHlceDASHscale} pixels and
1348
1528
@var{LCE-FACTOR} defaults to @value{srcCOLONCOLONdefaultDASHlceDASHfactor}. Append
1350
1530
@var{EDGE-SCALE}. Append @samp{%} to @var{LCE-FACTOR} to specify the
1351
1531
weight as a percentage.
1533
@item --contrast-min-curvature=@var{CURVATURE}
1534
@opindex --contrast-min-curvature
1536
Define the minimum @var{CURVATURE} for the @acronym{LoG} edge
1537
detection. Default: @value{srcCOLONCOLONdefaultDASHminimumDASHcurvature}. Append a
1538
@samp{%} to specify the minimum curvature relative to maximum pixel
1539
value in the source image (for example 255 or 65535).
1541
A positive value makes Enfuse use the local contrast data (controlled
1542
with @option{--contrast-window-size}) for curvatures less than
1543
@var{CURVATURE} and @acronym{LoG} data for values above it.
1545
A negative value truncates all curvatures less than
1546
@minus{}@var{CURVATURE} to zero. Values above @var{CURVATURE} are
1547
left unchanged. This effectively suppresses weak edges.
1549
@item --contrast-window-size=@var{SIZE}
1550
@opindex --contrast-window-size
1552
Set the window @var{SIZE} for local contrast analysis. The window
1553
will be a square of @var{SIZE}@c
1555
@/@var{SIZE} pixels. If
1556
given an even @var{SIZE}, Enfuse will automatically use the next odd
1559
For contrast analysis @var{SIZE} values larger than 5 might result in
1560
a blurry composite image. Values of 3 and 5 have given good results
1563
Valid range: @var{SIZE} @geq{} @value{srcCOLONCOLONminimumDASHcontrastDASHwindowDASHsize}.
1565
Default: @value{srcCOLONCOLONdefaultDASHcontrastDASHwindowDASHsize}@dmn{pixels}.
1567
See also @ref{Fusion Options, Option --contrast-weight} and
1568
@option{--hard-mask} below.
1353
1570
@item --entropy-cutoff=@var{LOWER-CUTOFF}
1354
1571
@itemx --entropy-cutoff=@var{LOWER-CUTOFF}:@var{UPPER-CUTOFF}
1355
1572
@opindex --entropy-cutoff
1356
@opindex --EntropyCutoff @r{(deprecated)}
1357
(This option supersedes the deprecated
1358
option@tie{}@option{--EntropyCutoff}.)
1360
1574
The first form defines the lower cutoff value below which pixels are
1361
1575
treated as pure black when calculating the local entropy. The second
1393
1605
@item --entropy-window-size=@var{SIZE}
1394
1606
@opindex --entropy-window-size
1395
@opindex --EntropyWindowSize @r{(deprecated)}
1396
(This option supersedes the deprecated
1397
option@tie{}@option{--EntropyWindowSize}.)
1399
1608
Window @var{SIZE} for local entropy analysis. The window will be a
1400
1609
square of @var{SIZE}@c
1401
1610
@classictimes{}@c
1611
@/@var{SIZE} pixels.
1404
1613
In the entropy calculation @var{SIZE} values of 3 to 7 yield an
1405
1614
acceptable compromise of the locality of the information and the
1406
1615
significance of the local entropy value itself.
1410
@var{SIZE} @geq{} @value{srcCOLONCOLONminimumDASHentropyDASHwindowDASHsize}.
1413
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1415
<mi mathvariant="italic">SIZE</mi>
1417
<mn>@value{srcCOLONCOLONminimumDASHentropyDASHwindowDASHsize}</mn>
1423
$\mathit{SIZE} \ge @value{srcCOLONCOLONminimumDASHentropyDASHwindowDASHsize}$.
1617
Valid range: @var{SIZE} @geq{} @value{srcCOLONCOLONminimumDASHentropyDASHwindowDASHsize}.
1619
Default: @value{srcCOLONCOLONdefaultDASHentropyDASHwindowDASHsize}@dmn{pixels}.
1426
1621
If given an even @var{SIZE} Enfuse will automatically use the next odd
1624
@item --exposure-cutoff=@var{LOWER-CUTOFF}
1625
@itemx --exposure-cutoff=@var{LOWER-CUTOFF}:@var{UPPER-CUTOFF}
1626
@itemx --exposure-cutoff=@var{LOWER-CUTOFF}:@var{UPPER-CUTOFF}:@var{LOWER-PROJECTOR}:@var{UPPER-PROJECTOR}
1627
@opindex --exposure-cutoff
1629
The first form sets the weight for all pixels below the lower cutoff
1630
to zero. The second form sets the lower cutoff and the upper cutoff
1631
at the same time. For color images the values of @var{LOWER-CUTOFF}
1632
and @var{UPPER-CUTOFF} refer to the gray-scale projection as selected
1633
with the option @option{--gray-projector}.
1635
The impact of this option is similar, but not identical to
1636
transforming @emph{all} input images with
1637
@uref{http://@/www.imagemagick.org/, ImageMagick's} @command{convert}
1638
(@pxref{Helpful Programs}) prior to fusing with the following
1645
\( +clone -threshold LOWER-CUTOFF \) \
1646
-compose copy_opacity -composite \
1654
\( IMAGE -threshold LOWER-CUTOFF \) \
1655
\( IMAGE -threshold UPPER-CUTOFF -negate \) \
1656
-compose multiply -composite \
1658
-compose copy_opacity -composite \
1663
(Transforming some or all input images as shown in the above examples
1664
gives the user more flexibility because the thresholds can be chosen
1665
for each image individually.)
1667
The third form specifies projection operators as in
1668
option@tie{}@option{--gray-projector} for the @var{LOWER-CUTOFF} and
1669
@var{UPPER-CUTOFF} thresholds.
1671
This option can be helpful if the user wants to exclude underexposed
1672
or overexposed pixels from the fusing process in @emph{all} of the
1673
input images. The values of @var{LOWER-CUTOFF} and @var{UPPER-CUTOFF}
1674
as well as the gray-scale projector determine which pixels are
1675
considered ``underexposed'' or ``overexposed''. As any change of the
1676
exposure-weight curve this option changes the brightness of the
1677
resulting image: increasing @var{LOWER-CUTOFF} lightens the final
1678
image and lowering @var{UPPER-CUTOFF} darkens it.
1680
Defaults: @value{srcCOLONCOLONdefaultDASHexposureDASHlowerDASHcutoff} for
1681
@var{LOWER-CUTOFF} and @value{srcCOLONCOLONdefaultDASHexposureDASHupperDASHcutoff} for
1682
@var{UPPER-CUTOFF}, that is, all pixels' values are weighted according
1683
to the ``uncut'' exposure-weight curve.
1685
Append a @samp{%} to specify the cutoff relative to the maximum pixel
1686
value in the source image (for example 255 or 65535).
1688
@ref{Figure:exposure-cutoff} shows an example.
1690
The gray-scale projectors @var{LOWER-PROJECTOR} and
1691
@var{UPPER-PROJECTOR} default to
1692
@samp{@value{srcCOLONCOLONdefaultDASHexposureDASHlowerDASHcutoffDASHprojector}} and
1693
@samp{@value{srcCOLONCOLONdefaultDASHexposureDASHupperDASHcutoffDASHprojector}}, which are
1694
usually the best choices for effective cutoff operations on the
1697
@float Figure,Figure:exposure-cutoff
1698
@vimage{exposure-cutoff}
1700
@caption{Exposure weight, a Gaussian with @var{Mu} = 0.5 and @var{Sigma} = 0.2 submitted to an exposure-cutoff of @var{LOWER-CUTOFF} = 5% and @var{UPPER-CUTOFF} = 97%.}
1702
@shortcaption{Exposure cutoff function}
1705
Note that the application of the respective cutoffs is completely
1706
independent of the actual shape of the exposure weight function.
1708
If a set of images stubbornly refuses to ``react'' to this option,
1709
look at their histograms to verify the cutoff actually falls into
1710
populated ranges of the histograms. In the absence of an image
1711
manipulation program like @uref{http://@/www.gimp.org/, The Gimp},
1712
@uref{http://@/www.imagemagick.org/, ImageMagick} (@pxref{Helpful
1713
Programs}) can be used to generate
1714
@uref{http://@/www.imagemagick.org/@/Usage/@/files/@/#histogram,
1715
histograms}, like, for example,
1719
convert -define histogram:unique-colors=false \
1720
IMAGE histogram:- | \
1429
1725
@item --gray-projector=@var{PROJECTOR}
1430
1726
@opindex --gray-projector
1431
1727
@cindex gray projector
1432
@opindex --GrayProjector @r{(deprecated)}
1433
(This option supersedes the deprecated
1434
option@tie{}@option{--GrayProjector}.)
1436
1729
Use gray projector@tie{}@var{PROJECTOR} for conversion of
1437
@acronym{RGB} images to grayscale masks:
1730
@acronym{RGB} images to grayscale:
1439
1732
@math{(R, G, B) --> Y.}
1442
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1735
<mathinline xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1449
1742
<mo>→</mo>
1451
1744
<mtext>.</mtext>
1456
1749
$(R, G, B) \rightarrow Y.$
1459
1768
In version@tie{}@value{VERSION} of Enfuse, the option is effective for
1460
1769
exposure weighting and local contrast weighting. Default:
1652
Y = 0.30 \, R + 0.59 \, G + 0.11 \, B
2103
Y = 0.30 \times R + 0.59 \times G + 0.11 \times B
2116
<mml:cn type="real">0.30</mml:cn>
2121
<mml:cn type="real">0.59</mml:cn>
2126
<mml:cn type="real">0.11</mml:cn>
2136
@cindex gray projector, @samp{pl-star}
2137
@cindex @samp{pl-star} gray projector
2138
@cindex RGB'-L*a*b* conversion
2139
@cindex conversion, RGB'-L*a*b*
2140
Use the L-channel of the L*a*b*-conversion of the image as its
2141
grayscale representation. This is a useful projector for
2142
gamma-corrected data. It reveals minute contrast variations even in
2143
the shadows and the highlights. This projector is computationally
2144
expensive. Compare with @samp{l-star}, which is intended for gamma =
2147
See @uref{http://@/en.wikipedia.org/@/wiki/@/Lab_@/color_@/space,
2148
Wikipedia} for a detailed description of the @acronym{Lab}@tie{}color
1657
2152
@cindex gray projector, @samp{value}
2153
@cindex @samp{value} gray projector
1658
2154
Take the Value-channel of the Hue-Saturation-Value (@acronym{HSV})
1659
2155
conversion of the image.
1703
2212
See also @ref{Fusion Options, Option --contrast-weight} and
1704
2213
@option{--contrast-window-size} above.
1706
@item --contrast-min-curvature=@var{CURVATURE}
1707
@opindex --contrast-min-curvature
1708
@opindex --MinCurvature @r{(deprecated)}
1709
(This option supersedes the deprecated
1710
option@tie{}@option{--MinCurvature}.)
1712
Define the minimum @var{CURVATURE} for the @acronym{LoG} edge
1713
detection. Default: @value{srcCOLONCOLONdefaultDASHminimumDASHcurvature}. Append a
1714
@samp{%} to specify the minimum curvature relative to maximum pixel
1715
value in the source image (for example 255 or 65535).
1717
A positive value makes Enfuse use the local contrast data (controlled
1718
with @option{--contrast-window-size}) for curvatures less than
1719
@var{CURVATURE} and @acronym{LoG} data for values above it.
1721
A negative value truncates all curvatures less than
1722
@minus{}@var{CURVATURE} to zero. Values above @var{CURVATURE} are
1723
left unchanged. This effectively suppresses weak edges.
2216
@itemx --load-masks=@var{SOFT-MASK-TEMPLATE}
2217
@itemx --load-masks=@var{SOFT-MASK-TEMPLATE}:@var{HARD-MASK-TEMPLATE}
2218
@opindex --load-masks
2220
Load masks from images instead of computing them.
2222
The masks have to be a grayscale images.
2224
@cindex mask, loading
2225
First form: Load all soft-weight masks from files that were previously
2226
saved with option@tie{}@option{--save-masks}. If
2227
option@tie{}@option{--hard-mask} is effective only load hard masks.
2228
The defaults are @file{@value{srcCOLONCOLONdefaultDASHsoftDASHmaskDASHtemplate}} and
2229
@file{@value{srcCOLONCOLONdefaultDASHhardDASHmaskDASHtemplate}}.
2230
@cindex filename template
2231
@cindex mask, filename template
2232
In the second form, @var{SOFT-MASK-TEMPLATE} defines the names of the
2233
soft-mask files. In the third form, @var{HARD-MASK-TEMPLATE}
2234
additionally defines the names of the hard-mask files. See
2235
option@tie{}@option{--save-masks} below for the description of mask
2238
Options@tie{}@option{--load-masks} and @option{--save-masks} are
1725
2241
@item --save-masks
1726
2242
@itemx --save-masks=@var{SOFT-MASK-TEMPLATE}
1727
2243
@itemx --save-masks=@var{SOFT-MASK-TEMPLATE}:@var{HARD-MASK-TEMPLATE}
1728
2244
@opindex --save-masks
1729
@opindex --SaveMasks @r{(deprecated)}
1730
(This option supersedes the deprecated
1731
option@tie{}@option{--SaveMasks}.)
2247
Save the generated weight masks to image files.
1733
Save all weight files as @acronym{TIFF} images.
1734
@cindex mask, saving
1735
First form: Save all soft weight masks in files. If
2249
First form: Save all soft-weight masks in files. If
1736
2250
option@tie{}@option{--hard-mask} is effective also save the hard masks.
1737
2251
The defaults are @file{@value{srcCOLONCOLONdefaultDASHsoftDASHmaskDASHtemplate}} and
1738
2252
@file{@value{srcCOLONCOLONdefaultDASHhardDASHmaskDASHtemplate}}.
2182
2815
and $f_{\mathrm{ent}}$ along with the window sizes~$r_{\mathrm{cont}}$
2183
2816
and $r_{\mathrm{ent}}$ are explained in the next sections.
2834
<mml:mi mathvariant="normal">exp</mml:mi>
2841
<mml:mi mathvariant="normal">exp</mml:mi>
2852
<mml:mi mathvariant="normal">sat</mml:mi>
2859
<mml:mi mathvariant="normal">sat</mml:mi>
2870
<mml:mi mathvariant="normal">cont</mml:mi>
2877
<mml:mi mathvariant="normal">cont</mml:mi>
2884
<mml:mi mathvariant="normal">cont</mml:mi>
2895
<mml:mi mathvariant="normal">ent</mml:mi>
2902
<mml:mi mathvariant="normal">ent</mml:mi>
2909
<mml:mi mathvariant="normal">ent</mml:mi>
2920
where we have abbreviated <inlineequation> <mml:math> <mml:apply>
2921
<mml:ci>P</mml:ci> <mml:ci>i</mml:ci> <mml:ci>x</mml:ci>
2922
<mml:ci>y</mml:ci> </mml:apply> </mml:math> </inlineequation> to
2923
<inlineequation> <mml:math> <mml:ci>P</mml:ci> </mml:math>
2924
</inlineequation> for simplicity. The user defines the
2925
constants <inlineequation> <mml:math> <mml:csymbol> <mml:msub>
2926
<mml:mi>w</mml:mi> <mml:mi mathvariant="normal">exp</mml:mi>
2927
</mml:msub> </mml:csymbol> </mml:math> </inlineequation>,
2928
<inlineequation> <mml:math> <mml:csymbol> <mml:msub>
2929
<mml:mi>w</mml:mi> <mml:mi mathvariant="normal">sat</mml:mi>
2930
</mml:msub> </mml:csymbol> </mml:math> </inlineequation>,
2931
<inlineequation> <mml:math> <mml:csymbol> <mml:msub>
2932
<mml:mi>w</mml:mi> <mml:mi mathvariant="normal">cont</mml:mi>
2933
</mml:msub> </mml:csymbol> </mml:math> </inlineequation>, and
2934
<inlineequation> <mml:math> <mml:csymbol> <mml:msub>
2935
<mml:mi>w</mml:mi> <mml:mi mathvariant="normal">ent</mml:mi>
2936
</mml:msub> </mml:csymbol> </mml:math> </inlineequation>, with the
2937
options <literal>--exposure-weight</literal>,
2938
<literal>--saturation-weight</literal>,
2939
<literal>--contrast-weight</literal>, and
2940
<literal>--entropy-weight</literal> respectively. The
2941
functions <inlineequation> <mml:math> <mml:csymbol> <mml:msub>
2942
<mml:mi>f</mml:mi> <mml:mi mathvariant="normal">exp</mml:mi>
2943
</mml:msub> </mml:csymbol> </mml:math> </inlineequation>,
2944
<inlineequation> <mml:math> <mml:csymbol> <mml:msub>
2945
<mml:mi>f</mml:mi> <mml:mi mathvariant="normal">sat</mml:mi>
2946
</mml:msub> </mml:csymbol> </mml:math> </inlineequation>,
2947
<inlineequation> <mml:math> <mml:csymbol> <mml:msub>
2948
<mml:mi>f</mml:mi> <mml:mi mathvariant="normal">cont</mml:mi>
2949
</mml:msub> </mml:csymbol> </mml:math> </inlineequation>, and
2950
<inlineequation> <mml:math> <mml:csymbol> <mml:msub>
2951
<mml:mi>f</mml:mi> <mml:mi mathvariant="normal">ent</mml:mi>
2952
</mml:msub> </mml:csymbol> </mml:math> </inlineequation> along with
2953
the window sizes <inlineequation> <mml:math> <mml:csymbol>
2954
<mml:msub> <mml:mi>r</mml:mi> <mml:mi
2955
mathvariant="normal">cont</mml:mi> </mml:msub>
2956
</mml:csymbol></mml:math> </inlineequation> and <inlineequation>
2957
<mml:math> <mml:csymbol> <mml:msub> <mml:mi>r</mml:mi> <mml:mi
2958
mathvariant="normal">ent</mml:mi> </mml:msub> </mml:csymbol>
2959
</mml:math> </inlineequation> are explained in the next sections.
2187
2963
* Weighted Average:: Enfuse's default weighting algorithm
2188
2964
* Disabling Averaging:: ``Super Trouper'' weighting for focus stacks
2965
* Single Criterion Fusing:: Fusing with only one of the criteria
2303
3082
\hbox{ for all } 1 \le j \le n.
2308
3147
Note that this ``averaging'' scheme lacks the nice noise-reduction
2309
property of the weighted average@tie{}(W), because only a single input
2310
pixel contributes to the output.
3148
property of the weighted average@tie{}@c
3151
single input pixel contributes to the output.
3154
@node Single Criterion Fusing
3155
@subsection Single Criterion Fusing
3156
@cindex single criterion fusing
3157
@cindex fusing, single criterion
3159
Enfuse allows the user to weight each pixel of an input image by up to
3160
four different criteria (@pxref{Overview}). However, it does not
3161
force the user to do so. For some applications and more often simply
3162
to gain further insight into the weighting and fusing process, looking
3163
at only a single criterion is the preferred way to work.
3165
@cindex active criterion
3166
@cindex criterion, active
3167
The version of Enfuse for which this documentation was prepared, uses
3168
the default weights as stated in @ref{Table:default-weights}. Notice
3169
that by default @emph{more than one} weight is larger than zero, which
3170
means they are @emph{active}.
3172
@float Table,Table:default-weights
3173
@multitable {Local Contrast} {0.0}
3174
@headitem Criterion @tab Weight
3175
@item Exposure @tab @value{srcCOLONCOLONdefaultDASHweightDASHexposure}
3176
@item Saturation @tab @value{srcCOLONCOLONdefaultDASHweightDASHsaturation}
3177
@item Local Contrast @tab @value{srcCOLONCOLONdefaultDASHweightDASHcontrast}
3178
@item Local Entropy @tab @value{srcCOLONCOLONdefaultDASHweightDASHentropy}
3181
@caption{Enfuse's default weights as compiled into version@tie{}@value{VERSION}.}
3183
@shortcaption{Default weights}
3185
@cindex default weights
3186
@cindex weights, default
3189
To disable a particular criterion set its weight to zero as for
3193
--exposure-weight=1 --saturation-weight=0 \
3194
--contrast-weight=0 --entropy-weight=0 \
3197
instructs Enfuse to consider only the exposure weight. Combine this
3198
with option@tie{}@option{--save-masks} and it will become clearer how
3199
Enfuse computes the exposure weight for the set of images.
3201
@cindex overpowering criteria
3202
@cindex criteria, overpowering one another
3203
Another problem that can be inspected by fusing with just a single
3204
active criterion and saving the masks is if the weights of one
3205
criterion completely overpower all others.
2313
3208
@node Exposure Weighting
3735
5270
Enfuse's defaults,
3736
5271
@samp{--exposure-weight=@value{srcCOLONCOLONdefaultDASHweightDASHexposure}} and
3737
@samp{--saturation-weight=@value{srcCOLONCOLONdefaultDASHweightDASHsaturation}} are well
3738
suited for fusion of @emph{color} images. Remember that saturation
3739
weighting only works for @acronym{RGB} data.
5272
@samp{--saturation-weight=@value{srcCOLONCOLONdefaultDASHweightDASHsaturation}} are
5273
well suited for fusion of @emph{color} images. Remember that
5274
saturation weighting only works for @acronym{RGB} data.
3740
5275
Option@tie{}@option{--saturation-weight} helps to control burnt-out
3741
highlights, as these are heavily desaturated. If no image suffers
3742
from troublesome highlights, the relative saturation weight can be
3743
reduced and even be set to zero. For black and white images
3744
@option{--entropy-weight} can be an alternative to
3745
@option{--saturation-weight} because it suppresses overexposed pixels, as
3746
these contain little information. However, entropy weighting is not
3747
limited to grayscale data; it has been successfully applied to
3748
@acronym{RGB} images, too. Note that saturation weighting considers
3749
@emph{each} color channel of an @acronym{RGB} image separately and
3750
chooses the channel with the minimum entropy as representative for the
5276
highlights, as these are heavily desaturated. Alternatively, use
5277
option@tie{}@option{--exposure-cutoff} to suppress noise or blown-out
5278
highlights without altering the overall brightness too much. If no
5279
image suffers from troublesome highlights, the relative saturation
5280
weight can be reduced and even be set to zero.
5282
For black and white images @option{--entropy-weight} can be an
5283
alternative to @option{--saturation-weight} because it suppresses
5284
overexposed pixels, as these contain little information. However,
5285
entropy weighting is not limited to gray-scale data; it has been
5286
successfully applied to @acronym{RGB} images, too. Note that entropy
5287
weighting considers @emph{each} color channel of an @acronym{RGB}
5288
image separately and chooses the channel with the minimum entropy as
5289
representative for the whole pixel.
3753
5291
Enfuse offers the photographer tremendous flexibility in fusing
3754
5292
differently exposed images. Whether you combine only two pictures or
4195
The @option{--contrast-min-curvature} option helps to mitigate both flaws.
5732
The @option{--contrast-min-curvature} option helps to mitigate both
4197
The argument to @code{--contrast-min-curvature}=@var{CURVATURE} either is an
4198
absolute lightness value, for example 0..255 for 8@dmn{bit} data and
4199
0..65535 for 16@dmn{bit} data, or, when given with a @samp{%}-sign it
4200
is a relative lightness value ranging from 0% to 100%.
5735
The argument to @code{--contrast-min-curvature}=@var{CURVATURE} either
5736
is an absolute lightness value, for example 0..255 for 8@dmn{bit} data
5737
and 0..65535 for 16@dmn{bit} data, or, when given with a @samp{%}-sign
5738
it is a relative lightness value ranging from 0% to 100%.
4202
5740
To suppress unreal edges or counter excessive noise, use the
4203
@option{--contrast-min-curvature} option with a @emph{negative} curvature
4204
measure @var{CURVATURE}. This forces all curvatures less than
4205
@minus{}@var{CURVATURE} to zero.
5741
@option{--contrast-min-curvature} option with a @emph{negative}
5742
curvature measure @var{CURVATURE}. This forces all curvatures less
5743
than @minus{}@var{CURVATURE} to zero.
4207
5745
A @emph{positive} curvature measure @var{CURVATURE} makes Enfuse merge
4208
5746
the @acronym{LoG} data with the local-contrast data. Every curvature
4271
5809
If some seams remain even in @acronym{LoG}-mode, decrease the
4272
5810
sensitivity of the edge detection with a positive
4273
@option{--contrast-min-curvature}. A too high value of @option{--contrast-min-curvature}
4274
suppresses fine detail though. Part of the detail can be brought back
4275
with pre-sharpening, that is, @ref{Local Contrast Enhancement} or
4276
combining @acronym{LoG} with local-contrast-window mode by using a
4277
negative @option{--contrast-min-curvature}.
5811
@option{--contrast-min-curvature}. A too high value of
5812
@option{--contrast-min-curvature} suppresses fine detail though. Part
5813
of the detail can be brought back with pre-sharpening, that is,
5814
@ref{Local Contrast Enhancement} or combining @acronym{LoG} with
5815
local-contrast-window mode by using a negative
5816
@option{--contrast-min-curvature}.
4279
5818
Carefully examining the masks (option@tie{}@option{--save-masks}) that
4280
5819
Enfuse uses helps to judge the effects of the parameters.