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

« back to all changes in this revision

Viewing changes to doc/enfuse.texi

  • Committer: Package Import Robot
  • Author(s): Jackson Doak
  • Date: 2014-01-22 06:23:44 UTC
  • mfrom: (5.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20140122062344-gdj5nf671oxprqq7
Tags: 4.1.2+dfsg-2ubuntu1
* Merge from Debian, remaining changes:
  - Build-depend on libglew-dev rather than libglew1.5-dev | libglew1.4-dev
    | libglew-dev.
  - Build using -O1 on arm

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
a program to merge different exposures of the same scene to produce an
45
45
image that looks much like a tonemapped image.
46
46
 
47
 
Copyright @copyright{} 2004--2009 @sc{Andrew Mihal}.
 
47
Copyright @copyright{} 2004--2012 @sc{Andrew Mihal}.
48
48
 
49
49
@quotation
50
50
Permission is granted to copy, distribute and/or modify this document
117
117
* Overview::                    Overview of Enfuse's features
118
118
* Workflow::                    Enfuse's role in combining images
119
119
* Invocation::                  Command line options and arguments
 
120
* Color Profiles::              How Enblend handles @acronym{ICC} color profiles
120
121
* Weighting Functions::         Description of all weighting functions
121
122
* Understanding Masks::         How to interpret masks and mask files
122
123
* Tuning Memory Usage::         Balancing @acronym{RAM} and swap
125
126
* Bug Reports::                 How to write bug reports
126
127
* Authors::                     Major contributors
127
128
* FDL::                         @acronym{GNU} Free Documentation License
 
129
@ifnotdocbook
128
130
* List of Tables::              List of all tables
129
131
* List of Figures::             List of all figures
130
132
* Program Index::               Names of programs referenced
131
133
* Syntactic-Comment Index::     Keys of syntactic comments
132
134
* Option Index::                Index of all options
133
135
* General Index::               Topic index
 
136
@end ifnotdocbook
134
137
 
135
138
@detailmenu
136
139
 
140
143
 
141
144
Workflow
142
145
 
 
146
* Standard Workflow::           The usual, all-in-one thing
 
147
* External Mask Manipulation::  Fiddling around with the masks yourself
 
148
 
 
149
 
143
150
Invocation
144
151
 
145
152
* Common Options::              General options
148
155
* Expert Options::              Local contrast and local entropy selection configuration
149
156
* Option Delimiters::           How to separate options' arguments
150
157
 
 
158
Color Profiles
 
159
 
151
160
Weighting Functions
152
161
 
153
162
* Weighting Pixels::            General concept of weighting pixels
262
271
@ref{Table:weighting-criteria} briefly describes.
263
272
 
264
273
@float Table,Table:weighting-criteria
265
 
 
266
274
@table @asis
 
275
@dbtitle{Weighting Criteria}
267
276
@item Exposure
268
277
@cindex weighting, exposure
269
278
The exposure criteria favors pixels with luminance close to the middle
289
298
black threshold.
290
299
@end table
291
300
 
292
 
@caption{Enfuse's four weighting criteria.}
 
301
@caption{Enfuse's four weighting criteria.  (Also see @ref{Table:default-weights} for the default weights of these criteria.)}
293
302
 
294
303
@shortcaption{Weighting criteria}
295
304
@end float
345
354
@chapter Workflow
346
355
@cindex workflow
347
356
 
 
357
Enfuse is a part of a chain of tools to assemble images.  It merges
 
358
photos of the same subject at the same location and same direction,
 
359
but taken with varying exposure parameters.
 
360
 
 
361
@menu
 
362
* Standard Workflow::           The usual, all-in-one thing
 
363
* External Mask Manipulation::  Fiddling around with the masks yourself
 
364
@end menu
 
365
 
 
366
 
 
367
@node Standard Workflow
 
368
@section Standard Workflow
 
369
@cindex workflow, standard
 
370
 
348
371
@include workflow.texi
349
372
 
350
373
 
 
374
@node External Mask Manipulation
 
375
@section External Mask Manipulation
 
376
@cindex workflow, external mask manipulation
 
377
 
 
378
@include external-masks.texi
 
379
 
 
380
 
351
381
@node Invocation
352
382
@chapter Invocation
353
383
@cindex invocation
368
398
 
369
399
 
370
400
@menu
 
401
* Image Requirements::          Input image requirements
371
402
* Response Files::              Files listing the images' names
372
403
* Common Options::              General options
373
404
* Extended Options::            Memory control and others
377
408
@end menu
378
409
 
379
410
 
 
411
@node Image Requirements
 
412
@section Image Requirements
 
413
@cindex input image requirements
 
414
 
 
415
All input images must comply with the following requirements.
 
416
 
 
417
@itemize
 
418
@item
 
419
The images overlap.
 
420
 
 
421
@item
 
422
The images agree on their number of bits-per-channel, this is, their
 
423
``depth'':
 
424
@itemize --
 
425
@item
 
426
@code{UINT8},
 
427
@item
 
428
@code{UINT16},
 
429
@item
 
430
@code{FLOAT},
 
431
@item
 
432
etc.
 
433
@end itemize
 
434
 
 
435
See option@tie{}@option{--depth} below for an explanation of different
 
436
(output) depths.
 
437
 
 
438
@item
 
439
Enfuse understands the images' filename extensions as well as their
 
440
file formats.
 
441
 
 
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
 
445
extensions}.
 
446
@end itemize
 
447
 
 
448
Moreover, there are some ``good practices'', which are not enforced by
 
449
the application, but almost certainly deliver superior results.
 
450
 
 
451
@itemize
 
452
@item
 
453
Either all files lack an @acronym{ICC} profile, or all images are
 
454
supplied with the @emph{same} @acronym{ICC} profile.
 
455
 
 
456
@item
 
457
If the images' meta-data contains resolution information
 
458
(``@acronym{DPI}''), it is the same for all pictures.
 
459
@end itemize
 
460
 
 
461
 
380
462
@node Response Files
381
463
@section Response Files
382
464
@cindex response file
390
472
 
391
473
Common options control some overall features of Enfuse.
392
474
 
 
475
Enfuse accepts arguments to any option in uppercase as well as in
 
476
lowercase letters.  For example, @samp{deflate}, @samp{Deflate} and
 
477
@samp{DEFLATE} as arguments to the @code{--compression} option
 
478
described below, all instruct Enfuse to use the @sc{Deflate}
 
479
compression scheme.  This manual denotes all arguments in lowercase
 
480
for consistency.
 
481
 
393
482
@table @code
394
483
@item --compression=@var{COMPRESSION}
395
484
@opindex --compression
401
490
for @var{COMPRESSION}.
402
491
 
403
492
@table @asis
404
 
@item @acronym{JPEG}
 
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
408
 
0--100.
409
 
 
410
 
@item @acronym{TIFF}
411
 
@var{COMPRESSION} is one of the keywords:
412
 
 
413
 
@table @samp
414
 
@item NONE
 
496
 
 
497
The compression either is a literal integer or a keyword-option
 
498
combination.
 
499
 
 
500
@table @code
 
501
@item @var{LEVEL}
 
502
Set @acronym{JPEG} quality@tie{}@var{LEVEL}, where @var{LEVEL} is an
 
503
integer that ranges from 0--100.
 
504
 
 
505
@item jpeg[:@var{LEVEL}]
 
506
Same as above; without the optional argument just switch on (standard)
 
507
@acronym{JPEG} compression.
 
508
 
 
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.
 
515
@end table
 
516
 
 
517
@item @acronym{TIF} format.
 
518
Here, @var{COMPRESSION} is one of the keywords:
 
519
 
 
520
@table @code
 
521
@item none
415
522
Do not compress.  This is the default.
416
523
 
417
 
@item DEFLATE
 
524
@item deflate
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.
424
531
 
425
 
@item LZW
 
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
 
536
ranges from 0--100.
 
537
 
 
538
@item lzw
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.
430
543
 
431
 
@item PACKBITS
 
544
@item packbits
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.
436
549
@end table
437
550
 
438
 
@item Any other format
 
551
@item Any other format.
439
552
Other formats do not accept a @var{COMPRESSION} setting.
440
553
 
441
554
However, @uref{http://@/hci.iwr.uni-@/heidelberg.de/@/vigra/,
443
556
@sc{Deflate} method.
444
557
@end table
445
558
 
 
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}}.
 
565
 
 
566
This version of Enfuse offers the following algorithms:
 
567
@table @code
 
568
@item all-layers
 
569
@cindex layer selection, all-layers
 
570
Select all layers in all images.
 
571
 
 
572
@item first-layer
 
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}.
 
576
 
 
577
@item largest-layer
 
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}.
 
583
 
 
584
@item no-layer
 
585
@cindex layer selection, no layer
 
586
Do not select any layer in any image.
 
587
 
 
588
This algorithm is useful to temporarily exclude some images in
 
589
response files.
 
590
@end table
 
591
 
446
592
@item -h
447
593
@itemx --help
448
594
@opindex -h
449
595
@opindex --help
450
 
Print information on the available options then exit.
 
596
Print information on the available options and exit.
451
597
 
452
598
@item -l @var{LEVELS}
453
599
@itemx --levels=@var{LEVELS}
461
607
it is not a pyramid: ``Ziggaurat, it's a
462
608
@uref{http://en.wikipedia.org/@/wiki/@/Ziggaurat, Ziggaurat}.''}
463
609
blending if @var{LEVELS} is positive, or reduce the maximum number of
464
 
levels used by @minus{}@var{LEVELS} if @var{LEVELS} is negative.
 
610
levels used by @minus{}@var{LEVELS} if @var{LEVELS} is negative;
 
611
@samp{auto} or @samp{automatic} restore the default, which is to use
 
612
the maximum possible number of levels for each overlapping region.
465
613
 
466
614
The number of levels used in a pyramid controls the balance between
467
615
local and global image features (contrast, saturation, @dots{}) in the
473
621
twice as large as the previous one.  So, the zeroth layer, the
474
622
original image, obviously defines the image at single-pixel scale, the
475
623
first level works at two-pixel scale, and generally, the @math{n}-th
476
 
level contains image data at @math{2^n}-pixel scale.  This is the
 
624
level contains image data at 
 
625
@power{2, n}
 
626
-pixel scale.  This is the
477
627
reason why an image of
478
628
@math{width}@c
479
629
@classictimes{}@c
480
 
@math{height}@tie{}pixels cannot be
 
630
@/@math{height}@dmn{pixels} cannot be
481
631
deconstructed into a pyramid of more than
482
632
@ifinfo
483
633
@display
485
635
@end display
486
636
@end ifinfo
487
637
@html
488
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
489
 
    <mrow>
 
638
<mathinline xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
 
639
    <mrowinline>
490
640
        <mo>&LeftFloor;</mo>
491
 
        <mrow>
492
 
            <msub>
 
641
        <mrowinline>
 
642
            <msubinline>
493
643
                <mo>log</mo>
494
644
                <mn>2</mo>
495
 
            </msub>
 
645
            </msubinline>
496
646
            <mo>&ApplyFunction;</mo>
497
647
            <mo>(</mo>
498
 
            <mrow>
 
648
            <mrowinline>
499
649
                <mo>min</mo>
500
650
                <mo>&ApplyFunction;</mo>
501
 
                <mfenced>
 
651
                <mfencedinline>
502
652
                    <mi mathvariant="italic">width</mi>
503
653
                    <mi mathvariant="italic">height</mi>
504
 
                </mfenced>
505
 
            </mrow>
 
654
                </mfencedinline>
 
655
            </mrowinline>
506
656
            <mo>)</mo>
507
 
        </mrow>
 
657
        </mrowinline>
508
658
        <mo>&RightFloor;</mo>
509
 
    </mrow>
510
 
</math>
 
659
    </mrowinline>
 
660
</mathinline>
511
661
@end html
512
662
@tex
513
 
$$
514
 
    \lfloor \log_2(\min(\mathit{width}, \mathit{height})) \rfloor
515
 
$$
 
663
$\lfloor \log_2(\min(\mathit{width}, \mathit{height})) \rfloor$
516
664
@end tex
517
 
 
 
665
@docbook
 
666
<inlineequation>
 
667
    <mml:math>
 
668
        <mml:apply>
 
669
            <mml:floor/>
 
670
            <mml:apply>
 
671
                <mml:log/>
 
672
                <mml:logbase>
 
673
                    <mml:cn>2</mml:cn>
 
674
                </mml:logbase>
 
675
                <mml:apply>
 
676
                    <mml:min/>
 
677
                    <mml:csymbol>
 
678
                        <mml:mi mathvariant="italic">width</mml:mi>
 
679
                    </mml:csymbol>
 
680
                    <mml:csymbol>
 
681
                        <mml:mi mathvariant="italic">height</mml:mi>
 
682
                    </mml:csymbol>
 
683
                </mml:apply>
 
684
            </mml:apply>
 
685
        </mml:apply>
 
686
    </mml:math>
 
687
</inlineequation>&nbsp;
 
688
@end docbook
518
689
levels.
519
690
 
520
691
If too few levels are used, ``halos'' around regions of strong local
530
701
this may or may not influence any pyramid.  Negative values of
531
702
@var{LEVELS} reduce the number of pyramid levels below the maximum no
532
703
matter what the actual maximum is and thus always influence all
533
 
pyramids.
 
704
pyramids.  Use @samp{auto} or @samp{automatic} as @var{LEVELS} to
 
705
restore the automatic calculation of the maximum number of levels.
534
706
 
535
707
The valid range of the absolute value of @var{LEVELS} is
536
708
@value{srcCOLONCOLONminimumDASHpyramidDASHlevels} to
548
720
If @option{--output} is not specified, the default is to put the
549
721
resulting image in @file{@value{srcCOLONCOLONdefaultDASHoutputDASHfilename}}.
550
722
 
 
723
@item --parameter=@var{KEY}[=@var{VALUE}]:@dots{}
 
724
Set a @var{KEY}-@var{VALUE} pair, where @var{VALUE} is optional.  This
 
725
option is cumulative.  Separate multiple pairs with the usual numeric
 
726
delimiters.
 
727
 
 
728
This option has the negated form @option{--no-parameter},
 
729
@opindex --no-parameter
 
730
which takes one or more @var{KEY}s and removes them from the list of
 
731
defined parameters.  The special key@tie{}@samp{*} deletes all
 
732
parameters at once.
 
733
 
 
734
Parameters allow the developers to change the internal
 
735
workings of Enfuse without the need to recompile.
 
736
 
551
737
@item -v
552
738
@itemx --verbose[=@var{LEVEL}]
553
739
@opindex -v
605
791
@cindex wrap around
606
792
Blend around the boundaries of the panorama.
607
793
 
 
794
As this option significantly increases memory usage and computation
 
795
time only use it, if the panorama will be
 
796
 
 
797
@itemize
 
798
@item
 
799
consulted for any kind measurement, this is, all boundaries must match
 
800
as accurately as possible, or
 
801
 
 
802
@item
 
803
printed out and the boundaries glued together, or
 
804
 
 
805
@item
 
806
@cindex virtual reality
 
807
fed into a virtual reality (@abbr{VR}) generator, which creates a
 
808
seamless environment.
 
809
@end itemize
 
810
 
 
811
Otherwise, always avoid this option!
 
812
 
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
612
 
reminded of the
 
816
pixels
 
817
@ifinfo
 
818
@math{S_P(x, y)}
 
819
@end ifinfo
 
820
@html
 
821
<mathinline xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
 
822
    <mrowinline>
 
823
        <msubinline>
 
824
            <mi>S</mi>
 
825
            <mi>P</mi>
 
826
        </msubinline>
 
827
        <mfencedinline>
 
828
            <mi>x</mi>
 
829
            <mi>y</mi>
 
830
        </mfencedinline>
 
831
    </mrowinline>
 
832
</mathinline>
 
833
@end html
 
834
@tex
 
835
$S_P(x, y)$
 
836
@end tex
 
837
@docbook
 
838
<inlineequation>
 
839
    <mml:math>
 
840
        <mml:apply>
 
841
            <mml:csymbol>
 
842
                <mml:msub>
 
843
                    <mml:mi>S</mml:mi>
 
844
                    <mml:mi>P</mml:mi>
 
845
                </mml:msub>
 
846
            </mml:csymbol>
 
847
            <mml:ci>x</mml:ci>
 
848
            <mml:ci>y</mml:ci>
 
849
        </mml:apply>
 
850
    </mml:math>
 
851
</inlineequation>
 
852
@end docbook
 
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}.}.
615
856
 
616
857
@var{MODE} takes the following values:
617
858
 
630
871
@end display
631
872
@end ifinfo
632
873
@html
633
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
874
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
634
875
    <mrow>
635
876
        <msub>
636
877
            <mi>S</mi>
673
914
    S_P(x, y) = \{P(x + m w, y): m \in Z\}.
674
915
$$
675
916
@end tex
 
917
@docbook
 
918
<informalequation>
 
919
    <mml:math>
 
920
        <mml:reln>
 
921
            <mml:eq/>
 
922
            <mml:apply>
 
923
                <mml:csymbol>
 
924
                    <mml:msub>
 
925
                        <mml:mi>S</mml:mi>
 
926
                        <mml:mi>P</mml:mi>
 
927
                    </mml:msub>
 
928
                </mml:csymbol>
 
929
                <mml:ci>x</mml:ci>
 
930
                <mml:ci>y</mml:ci>
 
931
            </mml:apply>
 
932
            <mml:set>
 
933
                <mml:bvar>
 
934
                    <mml:apply>
 
935
                        <mml:ci>P</mml:ci>
 
936
                        <mml:apply>
 
937
                            <mml:plus/>
 
938
                            <mml:ci>x</mml:ci>
 
939
                            <mml:apply>
 
940
                                <mml:times/>
 
941
                                <mml:ci>m</mml:ci>
 
942
                                <mml:ci>w</mml:ci>
 
943
                            </mml:apply>
 
944
                        </mml:apply>
 
945
                        <mml:ci>y</mml:ci>
 
946
                    </mml:apply>
 
947
                </mml:bvar>
 
948
                <mml:condition>
 
949
                    <mml:apply>
 
950
                        <mml:in/>
 
951
                        <mml:ci>m</mml:ci>
 
952
                        <mml:ci>Z</mml:ci>
 
953
                    </mml:apply>
 
954
                </mml:condition>
 
955
            </mml:set>
 
956
        </mml:reln>
 
957
    </mml:math>
 
958
</informalequation>
 
959
@end docbook
676
960
 
677
961
This is useful for 360@textdegree{} horizontal panoramas as it
678
962
eliminates the left and right borders.
685
969
@end display
686
970
@end ifinfo
687
971
@html
688
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
972
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
689
973
    <mrow>
690
974
        <msub>
691
975
            <mi>S</mi>
742
1026
@end display
743
1027
@end ifinfo
744
1028
@html
745
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
1029
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
746
1030
    <mrow>
747
1031
        <msub>
748
1032
            <mi>S</mi>
795
1079
    S_P(x, y) = \{P(x + m w, y + n h): m, n \in Z\}.
796
1080
$$
797
1081
@end tex
 
1082
@docbook
 
1083
<informalequation>
 
1084
    <mml:math>
 
1085
        <mml:reln>
 
1086
            <mml:eq/>
 
1087
            <mml:apply>
 
1088
                <mml:csymbol>
 
1089
                    <mml:msub>
 
1090
                        <mml:mi>S</mml:mi>
 
1091
                        <mml:mi>P</mml:mi>
 
1092
                    </mml:msub>
 
1093
                </mml:csymbol>
 
1094
                <mml:ci>x</mml:ci>
 
1095
                <mml:ci>y</mml:ci>
 
1096
            </mml:apply>
 
1097
            <mml:set>
 
1098
                <mml:bvar>
 
1099
                    <mml:apply>
 
1100
                        <mml:ci>P</mml:ci>
 
1101
                        <mml:apply>
 
1102
                            <mml:plus/>
 
1103
                            <mml:ci>x</mml:ci>
 
1104
                            <mml:apply>
 
1105
                                <mml:times/>
 
1106
                                <mml:ci>m</mml:ci>
 
1107
                                <mml:ci>w</mml:ci>
 
1108
                            </mml:apply>
 
1109
                        </mml:apply>
 
1110
                        <mml:apply>
 
1111
                            <mml:plus/>
 
1112
                            <mml:ci>y</mml:ci>
 
1113
                            <mml:apply>
 
1114
                                <mml:times/>
 
1115
                                <mml:ci>n</mml:ci>
 
1116
                                <mml:ci>h</mml:ci>
 
1117
                            </mml:apply>
 
1118
                        </mml:apply>
 
1119
                    </mml:apply>
 
1120
                </mml:bvar>
 
1121
                <mml:condition>
 
1122
                    <mml:apply>
 
1123
                        <mml:and/>
 
1124
                        <mml:apply>
 
1125
                            <mml:in/>
 
1126
                            <mml:ci>n</mml:ci>
 
1127
                            <mml:ci>Z</mml:ci>
 
1128
                        </mml:apply>
 
1129
                        <mml:apply>
 
1130
                            <mml:in/>
 
1131
                            <mml:ci>m</mml:ci>
 
1132
                            <mml:ci>Z</mml:ci>
 
1133
                        </mml:apply>
 
1134
                    </mml:apply>
 
1135
                </mml:condition>
 
1136
            </mml:set>
 
1137
        </mml:reln>
 
1138
    </mml:math>
 
1139
</informalequation>
 
1140
@end docbook
798
1141
 
799
1142
In this mode, both left and right borders, as well as top and bottom
800
1143
borders, are eliminated.
829
1172
@code{enfuse --version --verbose}.
830
1173
 
831
1174
@item -c
 
1175
@itemx --ciecam
832
1176
@opindex -c
 
1177
@opindex --ciecam
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
 
1182
cube.
836
1183
 
 
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}.
 
1193
 
 
1194
Please keep in mind that using @acronym{CIECAM02} blending may change
 
1195
the colors in the output image.
 
1196
 
 
1197
This option can be negated; see option@tie{}@option{--no-ciecam}
 
1198
below.
847
1199
 
848
1200
@item -d
849
1201
@itemx --depth=@var{DEPTH}
876
1228
@end itemize
877
1229
 
878
1230
All @var{DEPTH} specifications are valid in lowercase as well as
879
 
uppercase letters.  For integer format use
 
1231
uppercase letters.  For integer format, use
880
1232
 
881
1233
@table @asis
882
1234
@item @code{8}, @code{uint8}
891
1243
Unsigned 32@dmn{bit}; range: 0..4294967295
892
1244
@end table
893
1245
 
894
 
For floating-point format use
 
1246
For floating-point format, use
895
1247
 
896
1248
@c Minimum positive normalized value: 2^(2 - 2^k)
897
1249
@c Epsilon: 2^(1 - n)
907
1259
 
908
1260
@itemize
909
1261
@item
910
 
Minimal normalized value: 
 
1262
Minimum normalized value: 
911
1263
@semilog{1.2, -38}
912
1264
@item
913
1265
Epsilon: 
914
1266
@semilog{1.2, -7}
915
1267
@item
916
 
Maximal finite value: 
 
1268
Maximum finite value: 
917
1269
@semilog{3.4, 38}
918
1270
@end itemize
919
1271
 
926
1278
 
927
1279
@itemize
928
1280
@item
929
 
Minimal normalized value: 
 
1281
Minimum normalized value: 
930
1282
@semilog{2.2, -308}
931
1283
@item
932
1284
Epsilon: 
933
1285
@semilog{2.2, -16}
934
1286
@item
935
 
Maximal finite value: 
 
1287
Maximum finite value: 
936
1288
@semilog{1.8, 308}
937
1289
@end itemize
938
1290
@end table
966
1318
@end itemize
967
1319
 
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}
970
1322
@opindex -f
971
1323
@cindex output image, set size of
972
 
Set the size of the output image manually to
973
 
@var{WIDTH}@c
 
1324
@cindex canvas size
 
1325
@cindex size, canvas
 
1326
Ensure that the minimum ``canvas'' size of the output image is at
 
1327
least @var{WIDTH}@c
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.
977
1331
 
978
1332
@pindex nona @r{(Hugin)}
979
1333
@pindex 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}.}.
 
1338
 
 
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.
 
1342
 
 
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}.
 
1351
 
 
1352
This option only is effective if the input images come without color
 
1353
profiles and blending is performed in @acronym{CIECAM02} color
 
1354
appearance model.
983
1355
 
984
1356
@item -g
985
1357
@opindex -g
993
1365
Gimp (before version@tie{}2.0) and CinePaint (@pxref{Helpful
994
1366
Programs}) exhibit unusual behavior when loading images with
995
1367
unassociated alpha channels.  Use option @option{-g} to work around
996
 
this problem.  With this flag Enfuse will create the output image with
997
 
the associated alpha tag set, even though the image is really
 
1368
this problem.  With this flag Enfuse will create the output image
 
1369
with the associated alpha tag set, even though the image is really
998
1370
unassociated alpha.
999
1371
 
1000
1372
@item -m @var{CACHESIZE}
1012
1384
Note that Enfuse must have been compiled with the image-cache feature
1013
1385
for this option to be effective.  Find out about extra features with
1014
1386
@code{enfuse --version --verbose}.
 
1387
 
 
1388
@item --no-ciecam
 
1389
@opindex --no-ciecam
 
1390
@cindex color appearance model
 
1391
@cindex @acronym{CIECAM02}
 
1392
Disable the use of the @acronym{CIECAM02} color appearance model for
 
1393
blending colors.
 
1394
 
 
1395
See option@tie{}@option{--ciecam} for details.  Also see @ref{Color
 
1396
Profiles}.
1015
1397
@end table
1016
1398
 
1017
1399
 
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}.)
1032
1411
 
1033
1412
Sets the relative @var{WEIGHT} of high local-contrast pixels.
1034
 
Default: @value{srcCOLONCOLONdefaultDASHweightDASHcontrast}.  Valid range:
1035
 
@ifinfo
1036
 
@value{srcCOLONCOLONminimumDASHweightDASHcontrast} @leq{} @var{WEIGHT} @leq{}
1037
 
@value{srcCOLONCOLONmaximumDASHweightDASHcontrast}.
1038
 
@end ifinfo
1039
 
@html
1040
 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1041
 
    <mrow>
1042
 
        <mn>@value{srcCOLONCOLONminimumDASHweightDASHcontrast}</mn>
1043
 
        <mo>&le;</mo>
1044
 
        <mi mathvariant="italic">WEIGHT</mi>
1045
 
        <mo>&le;</mo>
1046
 
        <mn>@value{srcCOLONCOLONmaximumDASHweightDASHcontrast}</mn>
1047
 
        <mtext>.</mtext>
1048
 
    </mrow>
1049
 
</math>
1050
 
@end html
1051
 
@tex
1052
 
$@value{srcCOLONCOLONminimumDASHweightDASHcontrast} \le \mathit{WEIGHT} \le
1053
 
@value{srcCOLONCOLONmaximumDASHweightDASHcontrast}$.
1054
 
@end tex
 
1413
 
 
1414
Valid range: @value{srcCOLONCOLONminimumDASHweightDASHcontrast} @leq{} @var{WEIGHT}
 
1415
@leq{} @value{srcCOLONCOLONmaximumDASHweightDASHcontrast}.
 
1416
 
 
1417
Default: @value{srcCOLONCOLONdefaultDASHweightDASHcontrast}.
1055
1418
 
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}.)
1065
 
 
1066
 
Sets the relative @var{WEIGHT} of high local entropy pixels.  Default:
1067
 
@value{srcCOLONCOLONdefaultDASHweightDASHentropy}.  Valid range:
1068
 
@ifinfo
1069
 
@value{srcCOLONCOLONminimumDASHweightDASHentropy} @leq{} @var{WEIGHT} @leq{}
1070
 
@value{srcCOLONCOLONmaximumDASHweightDASHentropy}.
1071
 
@end ifinfo
1072
 
@html
1073
 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1074
 
    <mrow>
1075
 
        <mn>@value{srcCOLONCOLONminimumDASHweightDASHentropy}</mn>
1076
 
        <mo>&le;</mo>
1077
 
        <mi mathvariant="italic">WEIGHT</mi>
1078
 
        <mo>&le;</mo>
1079
 
        <mn>@value{srcCOLONCOLONmaximumDASHweightDASHentropy}</mn>
1080
 
        <mtext>.</mtext>
1081
 
    </mrow>
1082
 
</math>
1083
 
@end html
1084
 
@tex
1085
 
$@value{srcCOLONCOLONminimumDASHweightDASHentropy} \le \mathit{WEIGHT} \le
1086
 
@value{srcCOLONCOLONmaximumDASHweightDASHentropy}$.
1087
 
@end tex
 
1425
 
 
1426
Sets the relative @var{WEIGHT} of high local entropy pixels.
 
1427
 
 
1428
Valid range: @value{srcCOLONCOLONminimumDASHweightDASHentropy} @leq{} @var{WEIGHT}
 
1429
@leq{} @value{srcCOLONCOLONmaximumDASHweightDASHentropy}.
 
1430
 
 
1431
Default: @value{srcCOLONCOLONdefaultDASHweightDASHentropy}.
1088
1432
 
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}.)
1098
1439
 
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:
1103
 
@ifinfo
1104
 
@value{srcCOLONCOLONminimumDASHweightDASHexposure} @leq{} @var{WEIGHT} @leq{}
1105
 
@value{srcCOLONCOLONmaximumDASHweightDASHexposure}.
1106
 
@end ifinfo
1107
 
@html
1108
 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1109
 
    <mrow>
1110
 
        <mn>@value{srcCOLONCOLONminimumDASHweightDASHexposure}</mn>
1111
 
        <mo>&le;</mo>
1112
 
        <mi mathvariant="italic">WEIGHT</mi>
1113
 
        <mo>&le;</mo>
1114
 
        <mn>@value{srcCOLONCOLONmaximumDASHweightDASHexposure}</mn>
1115
 
        <mtext>.</mtext>
1116
 
    </mrow>
1117
 
</math>
1118
 
@end html
1119
 
@tex
1120
 
$@value{srcCOLONCOLONminimumDASHweightDASHexposure} \le \mathit{WEIGHT} \le
1121
 
@value{srcCOLONCOLONmaximumDASHweightDASHexposure}$.
1122
 
@end tex
 
1442
pixels contribute more to the final output.
 
1443
 
 
1444
Valid range: @value{srcCOLONCOLONminimumDASHweightDASHexposure} @leq{} @var{WEIGHT}
 
1445
@leq{} @value{srcCOLONCOLONmaximumDASHweightDASHexposure}.
 
1446
 
 
1447
Default: @value{srcCOLONCOLONdefaultDASHweightDASHexposure}.
1123
1448
 
1124
1449
@xref{Exposure Weighting}.
1125
1450
 
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}.)
1131
1453
 
1132
1454
Set the @var{MEAN} (this is, the center) of the Gaussian exposure
1133
 
weight curve.  Default: @value{srcCOLONCOLONdefaultDASHexposureDASHmu}.  Valid
1134
 
range:
1135
 
@ifinfo
1136
 
@value{srcCOLONCOLONminimumDASHexposureDASHmu} @leq{} @var{MEAN} @leq{}
1137
 
@value{srcCOLONCOLONmaximumDASHexposureDASHmu}.
1138
 
@end ifinfo
1139
 
@html
1140
 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1141
 
    <mrow>
1142
 
        <mn>@value{srcCOLONCOLONminimumDASHexposureDASHmu}</mn>
1143
 
        <mo>&le;</mo>
1144
 
        <mi mathvariant="italic">MEAN</mi>
1145
 
        <mo>&le;</mo>
1146
 
        <mn>@value{srcCOLONCOLONmaximumDASHexposureDASHmu}</mn>
1147
 
        <mtext>.</mtext>
1148
 
    </mrow>
1149
 
</math>
1150
 
@end html
1151
 
@tex
1152
 
$@value{srcCOLONCOLONminimumDASHexposureDASHmu} \le \mathit{MEAN} \le
1153
 
@value{srcCOLONCOLONmaximumDASHexposureDASHmu}$.
1154
 
@end tex
 
1455
weight curve.
 
1456
 
 
1457
Valid range: @value{srcCOLONCOLONminimumDASHexposureDASHmu} @leq{} @var{MEAN}
 
1458
@leq{} @value{srcCOLONCOLONmaximumDASHexposureDASHmu}.
 
1459
 
 
1460
Default: @value{srcCOLONCOLONdefaultDASHexposureDASHmu}.
1155
1461
 
1156
1462
Use this option to fine-tune exposure weighting (@pxref{Exposure
1157
1463
Weighting}).
1158
1464
 
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}.)
1164
1467
 
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
1168
 
versa.  Valid range:
1169
 
@ifinfo
1170
 
@value{srcCOLONCOLONminimumDASHexposureDASHsigma} @leq{} @var{STD-DEV}.
1171
 
@end ifinfo
1172
 
@html
1173
 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1174
 
    <mrow>
1175
 
        <mn>@value{srcCOLONCOLONminimumDASHexposureDASHsigma}</mn>
1176
 
        <mo>&le;</mo>
1177
 
        <mi mathvariant="italic">STD-DEV</mi>
1178
 
        <mtext>.</mtext>
1179
 
    </mrow>
1180
 
</math>
1181
 
@end html
1182
 
@tex
1183
 
$@value{srcCOLONCOLONminimumDASHexposureDASHsigma} \le \mathit{STD-DEV}$.
1184
 
@end tex
 
1469
curve.  Low numbers give less weight to pixels that are far from
 
1470
@option{--wMu} and vice versa.
 
1471
 
 
1472
Valid range: @var{STD-DEV} @geq{} @value{srcCOLONCOLONminimumDASHexposureDASHsigma}.
 
1473
 
 
1474
Default: @value{srcCOLONCOLONdefaultDASHexposureDASHsigma}.
1185
1475
 
1186
1476
Use this option to fine-tune exposure weighting (@pxref{Exposure
1187
1477
Weighting}).
1188
1478
 
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}.)
1194
1481
 
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
1198
 
range:
1199
 
@ifinfo
1200
 
@value{srcCOLONCOLONminimumDASHweightDASHsaturation} @leq{} @var{WEIGHT} @leq{}
1201
 
@value{srcCOLONCOLONmaximumDASHweightDASHsaturation}.
1202
 
@end ifinfo
1203
 
@html
1204
 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1205
 
    <mrow>
1206
 
        <mn>@value{srcCOLONCOLONminimumDASHweightDASHsaturation}</mn>
1207
 
        <mo>&le;</mo>
1208
 
        <mi mathvariant="italic">WEIGHT</mi>
1209
 
        <mo>&le;</mo>
1210
 
        <mn>@value{srcCOLONCOLONmaximumDASHweightDASHsaturation}</mn>
1211
 
        <mtext>.</mtext>
1212
 
    </mrow>
1213
 
</math>
1214
 
@end html
1215
 
@tex
1216
 
$@value{srcCOLONCOLONminimumDASHweightDASHsaturation} \le \mathit{WEIGHT} \le
1217
 
@value{srcCOLONCOLONmaximumDASHweightDASHsaturation}$.
1218
 
@end tex
 
1484
final output.
 
1485
 
 
1486
Valid range: @value{srcCOLONCOLONminimumDASHweightDASHsaturation}
 
1487
@leq{} @var{WEIGHT} @leq{} @value{srcCOLONCOLONmaximumDASHweightDASHsaturation}.
 
1488
 
 
1489
Default: @value{srcCOLONCOLONdefaultDASHweightDASHsaturation}.
1219
1490
 
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.
1231
1502
 
1232
1503
@table @code
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}.)
1238
 
 
1239
 
Set the window @var{SIZE} for local contrast analysis.  The window
1240
 
will be a square of @var{SIZE}@c
1241
 
@classictimes{}@c
1242
 
@var{SIZE} pixels.
1243
 
 
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
1246
 
on focus stacks.
1247
 
 
1248
 
Valid range:
1249
 
@ifinfo
1250
 
@var{SIZE} @geq{} @value{srcCOLONCOLONminimumDASHcontrastDASHwindowDASHsize}.
1251
 
@end ifinfo
1252
 
@html
1253
 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1254
 
    <mrow>
1255
 
        <mi mathvariant="italic">SIZE</mi>
1256
 
        <mo>&ge;</mo>
1257
 
        <mn>@value{srcCOLONCOLONminimumDASHcontrastDASHwindowDASHsize}</mn>
1258
 
        <mtext>.</mtext>
1259
 
    </mrow>
1260
 
</math>
1261
 
@end html
1262
 
@tex
1263
 
$\mathit{SIZE} \ge @value{srcCOLONCOLONminimumDASHcontrastDASHwindowDASHsize}$.
1264
 
@end tex
1265
 
 
1266
 
If given an even @var{SIZE}, Enfuse will automatically use the next
1267
 
odd number.
1268
 
 
1269
 
See also @ref{Fusion Options, Option --contrast-weight} and
1270
 
@option{--hard-mask} below.
1271
 
 
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}.)
1278
1507
 
 
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'').
1288
 
@ifinfo
1289
 
@display
1290
 
@math{enhanced =   (1 + LCE-FACTOR) * original
1291
 
           - LCE-FACTOR * GaussianSmooth(original, LCE-SCALE)}
1292
 
@end display
1293
 
@end ifinfo
1294
 
@html
1295
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
1296
 
    <mtable>
1297
 
        <mtr>
1298
 
            <mtd>
1299
 
                <mi mathvariant="italic">enhanced</mi>
1300
 
            </mtd>
1301
 
            <mtd>
1302
 
                <mo>=</mo>
1303
 
            </mtd>
1304
 
            <mtd>
1305
 
                <mrow>
1306
 
                    <mo>(</mo>
1307
 
                    <mn>1</mn>
1308
 
                    <mo>+</mo>
1309
 
                    <mi mathvariant="italic">LCE-FACTOR</mi>
1310
 
                    <mo>)</mo>
1311
 
                </mrow>
1312
 
                <mo>&times;</mo>
1313
 
                <mi mathvariant="italic">original</mi>
1314
 
            </mtd>
1315
 
        </mtr>
1316
 
        <mtr>
1317
 
            <mtd></mtd>
1318
 
            <mtd></mtd>
1319
 
            <mtd>
1320
 
                <mo>-</mo>
1321
 
                <mrow>
1322
 
                    <mi mathvariant="italic">LCE-FACTOR</mi>
1323
 
                    <mo>&times;</mo>
1324
 
                    <mrow>
1325
 
                        <mo>GaussianSmooth</mo>
1326
 
                        <mo>&ApplyFunction;</mo>
1327
 
                        <mfenced>
1328
 
                            <mi mathvariant="italic">original</mi>
1329
 
                            <mi mathvariant="italic">LCE-SCALE</mi>
1330
 
                        </mfenced>
1331
 
                    </mrow>
1332
 
                </mrow>
1333
 
            </mtd>
1334
 
        </mtr>
1335
 
    </mtable>
1336
 
</math>
1337
 
@end html
1338
 
@tex
1339
 
$$
1340
 
    \eqalign{enhanced & = (1 + \mathit{LCE-FACTOR}) \; \mathit{original}\cr
1341
 
                      & - \mathit{LCE-FACTOR} \;
1342
 
                          \mathrm{GaussianSmooth}(\mathit{original},
1343
 
                                                  \mathit{LCE-SCALE})\cr}
1344
 
$$
1345
 
@end tex
 
1518
 
 
1519
@var{enhanced} = (1 + @var{LCE-FACTOR}) @c
 
1520
@classictimes{}@c
 
1521
 @var{original}
 
1522
@minus{} @var{LCE-FACTOR} @c
 
1523
@classictimes{}@c
 
1524
 Gaussian@/Smooth(@var{original},
 
1525
@var{LCE-SCALE}).
1346
1526
 
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.
1352
1532
 
 
1533
@item --contrast-min-curvature=@var{CURVATURE}
 
1534
@opindex --contrast-min-curvature
 
1535
 
 
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).
 
1540
 
 
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.
 
1544
 
 
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.
 
1548
 
 
1549
@item --contrast-window-size=@var{SIZE}
 
1550
@opindex --contrast-window-size
 
1551
 
 
1552
Set the window @var{SIZE} for local contrast analysis.  The window
 
1553
will be a square of @var{SIZE}@c
 
1554
@classictimes{}@c
 
1555
@/@var{SIZE} pixels.  If
 
1556
given an even @var{SIZE}, Enfuse will automatically use the next odd
 
1557
number.
 
1558
 
 
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
 
1561
on focus stacks.
 
1562
 
 
1563
Valid range: @var{SIZE} @geq{} @value{srcCOLONCOLONminimumDASHcontrastDASHwindowDASHsize}.
 
1564
 
 
1565
Default: @value{srcCOLONCOLONdefaultDASHcontrastDASHwindowDASHsize}@dmn{pixels}.
 
1566
 
 
1567
See also @ref{Fusion Options, Option --contrast-weight} and
 
1568
@option{--hard-mask} below.
 
1569
 
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}.)
1359
1573
 
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
1373
1587
@ref{Figure:entropy-cutoff} shows an example.
1374
1588
 
1375
1589
@float Figure,Figure:entropy-cutoff
1376
 
@image{entropy-cutoff}
 
1590
@vimage{entropy-cutoff}
1377
1591
 
1378
 
@caption{Linear lightness@tie{}@var{Y} in comparison with an
1379
 
entropy-cutoff function for @var{LOWER-CUTOFF} = 5% and
1380
 
@var{UPPER-CUTOFF} = 90% which are rather extreme values.}
 
1592
@caption{Linear lightness@tie{}@var{Y} in comparison with an entropy-cutoff function for @var{LOWER-CUTOFF} = 5% and @var{UPPER-CUTOFF} = 90%, which are rather extreme values.  Please note that we have shifted the original lightness curve up and the cut-off curve down by a very small @var{Offset} to emphasize that the proportional part of @var{Y} remains unaltered under the cut-off operation.}
1381
1593
 
1382
1594
@shortcaption{Entropy cutoff function}
1383
1595
@end float
1392
1604
 
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}.)
1398
1607
 
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
1402
 
@var{SIZE} pixels.
 
1611
@/@var{SIZE} pixels.
1403
1612
 
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.
1407
1616
 
1408
 
Valid range:
1409
 
@ifinfo
1410
 
@var{SIZE} @geq{} @value{srcCOLONCOLONminimumDASHentropyDASHwindowDASHsize}.
1411
 
@end ifinfo
1412
 
@html
1413
 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1414
 
    <mrow>
1415
 
        <mi mathvariant="italic">SIZE</mi>
1416
 
        <mo>&ge;</mo>
1417
 
        <mn>@value{srcCOLONCOLONminimumDASHentropyDASHwindowDASHsize}</mn>
1418
 
        <mtext>.</mtext>
1419
 
    </mrow>
1420
 
</math>
1421
 
@end html
1422
 
@tex
1423
 
$\mathit{SIZE} \ge @value{srcCOLONCOLONminimumDASHentropyDASHwindowDASHsize}$.
1424
 
@end tex
 
1617
Valid range: @var{SIZE} @geq{} @value{srcCOLONCOLONminimumDASHentropyDASHwindowDASHsize}.
 
1618
 
 
1619
Default: @value{srcCOLONCOLONdefaultDASHentropyDASHwindowDASHsize}@dmn{pixels}.
1425
1620
 
1426
1621
If given an even @var{SIZE} Enfuse will automatically use the next odd
1427
1622
number.
1428
1623
 
 
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
 
1628
 
 
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}.
 
1634
 
 
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
 
1639
commands.
 
1640
 
 
1641
@example
 
1642
@group
 
1643
# First form
 
1644
convert IMAGE \
 
1645
        \( +clone -threshold LOWER-CUTOFF \) \
 
1646
        -compose copy_opacity -composite \
 
1647
        MASKED-IMAGE
 
1648
@end group
 
1649
 
 
1650
@group
 
1651
# Second form
 
1652
convert IMAGE \
 
1653
        \( \
 
1654
            \( IMAGE -threshold LOWER-CUTOFF \) \
 
1655
            \( IMAGE -threshold UPPER-CUTOFF -negate \) \
 
1656
            -compose multiply -composite \
 
1657
        \) \
 
1658
        -compose copy_opacity -composite \
 
1659
        MASKED-IMAGE
 
1660
@end group
 
1661
@end example
 
1662
 
 
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.)
 
1666
 
 
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.
 
1670
 
 
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.
 
1679
 
 
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.
 
1684
 
 
1685
Append a @samp{%} to specify the cutoff relative to the maximum pixel
 
1686
value in the source image (for example 255 or 65535).
 
1687
 
 
1688
@ref{Figure:exposure-cutoff} shows an example.
 
1689
 
 
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
 
1695
respective ends.
 
1696
 
 
1697
@float Figure,Figure:exposure-cutoff
 
1698
@vimage{exposure-cutoff}
 
1699
 
 
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%.}
 
1701
 
 
1702
@shortcaption{Exposure cutoff function}
 
1703
@end float
 
1704
 
 
1705
Note that the application of the respective cutoffs is completely
 
1706
independent of the actual shape of the exposure weight function.
 
1707
 
 
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,
 
1716
 
 
1717
@example
 
1718
@group
 
1719
convert -define histogram:unique-colors=false \
 
1720
        IMAGE histogram:- | \
 
1721
    display
 
1722
@end group
 
1723
@end example
 
1724
 
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}.)
1435
1728
 
1436
1729
Use gray projector@tie{}@var{PROJECTOR} for conversion of
1437
 
@acronym{RGB} images to grayscale masks:
 
1730
@acronym{RGB} images to grayscale:
1438
1731
@ifinfo
1439
1732
@math{(R, G, B) --> Y.}
1440
1733
@end ifinfo
1441
1734
@html
1442
 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
1443
 
    <mrow>
1444
 
        <mfenced>
 
1735
<mathinline xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
 
1736
    <mrowinline>
 
1737
        <mfencedinline>
1445
1738
            <mi>R</mi>
1446
1739
            <mi>G</mi>
1447
1740
            <mi>B</mi>
1448
 
        </mfenced>
 
1741
        </mfencedinline>
1449
1742
        <mo>&rightarrow;</mo>
1450
1743
        <mi>Y</mi>
1451
1744
        <mtext>.</mtext>
1452
 
    </mrow>
1453
 
</math>
 
1745
    </mrowinline>
 
1746
</mathinline>
1454
1747
@end html
1455
1748
@tex
1456
1749
$(R, G, B) \rightarrow Y.$
1457
1750
@end tex
 
1751
@docbook
 
1752
<informalequation>
 
1753
    <mml:math>
 
1754
        <mml:lambda>
 
1755
            <mml:bvar>
 
1756
                <mml:vector>
 
1757
                    <mml:ci>R</mml:ci>
 
1758
                    <mml:ci>G</mml:ci>
 
1759
                    <mml:ci>B</mml:ci>
 
1760
                </mml:vector>
 
1761
            </mml:bvar>
 
1762
            <mml:ci>Y</mml:ci>
 
1763
        </mml:lambda>
 
1764
    </mml:math>
 
1765
</informalequation>
 
1766
@end docbook
1458
1767
 
1459
1768
In version@tie{}@value{VERSION} of Enfuse, the option is effective for
1460
1769
exposure weighting and local contrast weighting.  Default:
1463
1772
Valid values for @var{PROJECTOR} are:
1464
1773
 
1465
1774
@table @code
 
1775
@item anti-value
 
1776
@cindex gray projector, @samp{anti-value}
 
1777
@cindex @samp{anti-value} gray projector
 
1778
Do the opposite of the @samp{value} projector: take the minimum of all
 
1779
color channels.
 
1780
@ifinfo
 
1781
@display
 
1782
@math{Y = min(R, G, B)}
 
1783
@end display
 
1784
@end ifinfo
 
1785
@html
 
1786
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
 
1787
    <mrow>
 
1788
        <mi>Y</mi>
 
1789
        <mo>=</mo>
 
1790
        <mrow>
 
1791
            <mo>min</mo>
 
1792
            <mo>&ApplyFunction;</mo>
 
1793
            <mfenced>
 
1794
                <mi>R</mi>
 
1795
                <mi>G</mi>
 
1796
                <mi>B</mi>
 
1797
            </mfenced>
 
1798
        </mrow>
 
1799
    </mrow>
 
1800
</math>
 
1801
@end html
 
1802
@tex
 
1803
$$
 
1804
    Y = \min(R, G, B)
 
1805
$$
 
1806
@end tex
 
1807
@docbook
 
1808
<informalequation>
 
1809
    <mml:math>
 
1810
        <mml:reln>
 
1811
            <mml:eq/>
 
1812
            <mml:ci>Y</mml:ci>
 
1813
            <mml:apply>
 
1814
                <mml:min/>
 
1815
                <mml:ci>R</mml:ci>
 
1816
                <mml:ci>G</mml:ci>
 
1817
                <mml:ci>B</mml:ci>
 
1818
            </mml:apply>
 
1819
        </mml:reln>
 
1820
    </mml:math>
 
1821
</informalequation>
 
1822
@end docbook
 
1823
 
 
1824
This projector can be useful when exposure weighing while employing a
 
1825
lower cutoff (see option@tie{}@option{--exposure-cutoff}) to reduce
 
1826
the noise in the fused image.
 
1827
 
1466
1828
@item average
1467
1829
@cindex gray projector, @samp{average}
 
1830
@cindex @samp{average} gray projector
1468
1831
Average red, green, and blue channel with equal weights.  This is the
1469
1832
default, and it often is a good projector for @math{gamma = 1} data.
1470
1833
@ifinfo
1473
1836
@end display
1474
1837
@end ifinfo
1475
1838
@html
1476
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
1839
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
1477
1840
    <mrow>
1478
1841
        <mi>Y</mi>
1479
1842
        <mo>=</mo>
1495
1858
    Y = {R + G + B \over 3}
1496
1859
$$
1497
1860
@end tex
 
1861
@docbook
 
1862
<informalequation>
 
1863
    <mml:math>
 
1864
        <mml:reln>
 
1865
            <mml:eq/>
 
1866
            <mml:ci>Y</mml:ci>
 
1867
            <mml:apply other='display="scriptstyle"'>
 
1868
                <mml:divide/>
 
1869
                <mml:apply>
 
1870
                    <mml:plus/>
 
1871
                    <mml:ci>R</mml:ci>
 
1872
                    <mml:ci>G</mml:ci>
 
1873
                    <mml:ci>B</mml:ci>
 
1874
                </mml:apply>
 
1875
                <mml:cn>3</mml:cn>
 
1876
            </mml:apply>
 
1877
        </mml:reln>
 
1878
    </mml:math>
 
1879
</informalequation>
 
1880
@end docbook
1498
1881
 
1499
1882
@item channel-mixer:@var{RED-WEIGHT}:@var{GREEN-WEIGHT}:@var{BLUE-WEIGHT}
1500
1883
@cindex gray projector, @samp{channel-mixer}
 
1884
@cindex @samp{channel-mixer} gray projector
1501
1885
Weight the channels as given.
1502
1886
@ifinfo
1503
1887
@display
1505
1889
@end display
1506
1890
@end ifinfo
1507
1891
@html
1508
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
1892
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
1509
1893
    <mrow>
1510
1894
        <mi>Y</mi>
1511
1895
        <mo>=</mo>
1537
1921
        & \mathit{BLUE-WEIGHT} \times B \cr}
1538
1922
$$
1539
1923
@end tex
 
1924
@docbook
 
1925
<informalequation>
 
1926
    <mml:math>
 
1927
        <mml:reln>
 
1928
            <mml:eq/>
 
1929
            <mml:ci>Y</mml:ci>
 
1930
            <mml:apply>
 
1931
                <mml:plus/>
 
1932
                <mml:apply>
 
1933
                    <mml:times/>
 
1934
                    <mml:csymbol>
 
1935
                        <mml:mi mathvariant="italic">RED-WEIGHT</mml:mi>
 
1936
                    </mml:csymbol>
 
1937
                    <mml:ci>R</mml:ci>
 
1938
                </mml:apply>
 
1939
                <mml:apply>
 
1940
                    <mml:times/>
 
1941
                    <mml:csymbol>
 
1942
                        <mml:mi mathvariant="italic">GREEN-WEIGHT</mml:mi>
 
1943
                    </mml:csymbol>
 
1944
                    <mml:ci>G</mml:ci>
 
1945
                </mml:apply>
 
1946
                <mml:apply>
 
1947
                    <mml:times/>
 
1948
                    <mml:csymbol>
 
1949
                        <mml:mi mathvariant="italic">BLUE-WEIGHT</mml:mi>
 
1950
                    </mml:csymbol>
 
1951
                    <mml:ci>B</mml:ci>
 
1952
                </mml:apply>
 
1953
            </mml:apply>
 
1954
        </mml:reln>
 
1955
    </mml:math>
 
1956
</informalequation>
 
1957
@end docbook
1540
1958
 
1541
1959
The weights are automatically normalized to one, so
1542
1960
 
1543
1961
@example
1544
 
    --gray-projector=channel-mixer:0.25:0.5:0.25
1545
 
    --gray-projector=channel-mixer:1:2:1
1546
 
    --gray-projector=channel-mixer:25:50:25
 
1962
--gray-projector=channel-mixer:0.25:0.5:0.25
 
1963
--gray-projector=channel-mixer:1:2:1
 
1964
--gray-projector=channel-mixer:25:50:25
1547
1965
@end example
1548
1966
 
1549
1967
all define the same mixer configuration.
1554
1972
 
1555
1973
@item l-star
1556
1974
@cindex gray projector, @samp{l-star}
1557
 
@cindex L*a*b* conversion
1558
 
@cindex conversion, L*a*b*
 
1975
@cindex @samp{l-star} gray projector
 
1976
@cindex RGB-L*a*b* conversion
 
1977
@cindex conversion, RGB-L*a*b*
1559
1978
Use the L-channel of the L*a*b*-conversion of the image as its
1560
1979
grayscale representation.  This is a useful projector for gamma = 1
1561
1980
data.  It reveals minute contrast variations even in the shadows and
1562
 
the highlights.  This projector is computationally expensive.
 
1981
the highlights.  This projector is computationally expensive.  Compare
 
1982
with @samp{pl-star}, which is intended for gamma-corrected images.
1563
1983
 
1564
1984
See @uref{http://@/en.wikipedia.org/@/wiki/@/Lab_@/color_@/space,
1565
1985
Wikipedia} for a detailed description of the @acronym{Lab}@tie{}color
1567
1987
 
1568
1988
@item lightness
1569
1989
@cindex gray projector, @samp{lightness}
 
1990
@cindex @samp{lightness} gray projector
1570
1991
Compute the lightness of each @acronym{RGB} pixel as in an
1571
1992
Hue-Saturation-Lightness (@acronym{HSL}) conversion of the image.
1572
1993
@ifinfo
1575
1996
@end display
1576
1997
@end ifinfo
1577
1998
@html
1578
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
1999
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
1579
2000
    <mrow>
1580
2001
        <mi>Y</mi>
1581
2002
        <mo>=</mo>
1611
2032
    Y = {\max(R, G, B) + \min(R, G, B) \over 2}
1612
2033
$$
1613
2034
@end tex
 
2035
@docbook
 
2036
<informalequation>
 
2037
    <mml:math>
 
2038
        <mml:reln>
 
2039
            <mml:eq/>
 
2040
            <mml:ci>Y</mml:ci>
 
2041
            <mml:apply>
 
2042
                <mml:divide/>
 
2043
                <mml:apply>
 
2044
                    <mml:plus/>
 
2045
                    <mml:apply>
 
2046
                        <mml:max/>
 
2047
                        <mml:ci>R</mml:ci>
 
2048
                        <mml:ci>G</mml:ci>
 
2049
                        <mml:ci>B</mml:ci>
 
2050
                    </mml:apply>
 
2051
                    <mml:apply>
 
2052
                        <mml:min/>
 
2053
                        <mml:ci>R</mml:ci>
 
2054
                        <mml:ci>G</mml:ci>
 
2055
                        <mml:ci>B</mml:ci>
 
2056
                    </mml:apply>
 
2057
                </mml:apply>
 
2058
                <mml:cn>2</mml:cn>
 
2059
            </mml:apply>
 
2060
        </mml:reln>
 
2061
    </mml:math>
 
2062
</informalequation>
 
2063
@end docbook
1614
2064
 
1615
2065
@item luminance
1616
2066
@cindex gray projector, @samp{luminance}
 
2067
@cindex @samp{luminance} gray projector
1617
2068
Use the weighted average of the @acronym{RGB} pixel's channels as
1618
2069
defined by @acronym{CIE} (``Commission Internationale de
1619
2070
l'@'Eclairage'') and the @acronym{JPEG} standard.
1623
2074
@end display
1624
2075
@end ifinfo
1625
2076
@html
1626
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
2077
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
1627
2078
    <mrow>
1628
2079
        <mi>Y</mi>
1629
2080
        <mo>=</mo>
1630
2081
        <mrow>
1631
2082
            <mn>0.30</mn>
1632
 
            <mo>&InvisibleTimes;</mo>
 
2083
            <mo>&times;</mo>
1633
2084
            <mi>R</mi>
1634
2085
        </mrow>
1635
2086
        <mo>+</mo>
1636
2087
        <mrow>
1637
2088
            <mn>0.59</mn>
1638
 
            <mo>&InvisibleTimes;</mo>
 
2089
            <mo>&times;</mo>
1639
2090
            <mi>G</mi>
1640
2091
        </mrow>
1641
2092
        <mo>+</mo>
1642
2093
        <mrow>
1643
2094
            <mn>0.11</mn>
1644
 
            <mo>&InvisibleTimes;</mo>
 
2095
            <mo>&times;</mo>
1645
2096
            <mi>B</mi>
1646
2097
        </mrow>
1647
2098
    </mrow>
1649
2100
@end html
1650
2101
@tex
1651
2102
$$
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
1653
2104
$$
1654
2105
@end tex
 
2106
@docbook
 
2107
<informalequation>
 
2108
    <mml:math>
 
2109
        <mml:reln>
 
2110
            <mml:eq/>
 
2111
            <mml:ci>Y</mml:ci>
 
2112
            <mml:apply>
 
2113
                <mml:plus/>
 
2114
                <mml:apply>
 
2115
                    <mml:times/>
 
2116
                    <mml:cn type="real">0.30</mml:cn>
 
2117
                    <mml:ci>R</mml:ci>
 
2118
                </mml:apply>
 
2119
                <mml:apply>
 
2120
                    <mml:times/>
 
2121
                    <mml:cn type="real">0.59</mml:cn>
 
2122
                    <mml:ci>G</mml:ci>
 
2123
                </mml:apply>
 
2124
                <mml:apply>
 
2125
                    <mml:times/>
 
2126
                    <mml:cn type="real">0.11</mml:cn>
 
2127
                    <mml:ci>B</mml:ci>
 
2128
                </mml:apply>
 
2129
            </mml:apply>
 
2130
        </mml:reln>
 
2131
    </mml:math>
 
2132
</informalequation>
 
2133
@end docbook
 
2134
 
 
2135
@item pl-star
 
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 =
 
2145
1 images.
 
2146
 
 
2147
See @uref{http://@/en.wikipedia.org/@/wiki/@/Lab_@/color_@/space,
 
2148
Wikipedia} for a detailed description of the @acronym{Lab}@tie{}color
 
2149
space.
1655
2150
 
1656
2151
@item value
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.
1660
2156
@ifinfo
1663
2159
@end display
1664
2160
@end ifinfo
1665
2161
@html
1666
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
2162
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
1667
2163
    <mrow>
1668
2164
        <mi>Y</mi>
1669
2165
        <mo>=</mo>
1684
2180
    Y = \max(R, G, B)
1685
2181
$$
1686
2182
@end tex
 
2183
@docbook
 
2184
<informalequation>
 
2185
    <mml:math>
 
2186
        <mml:reln>
 
2187
            <mml:eq/>
 
2188
            <mml:ci>Y</mml:ci>
 
2189
            <mml:apply>
 
2190
                <mml:max/>
 
2191
                <mml:ci>R</mml:ci>
 
2192
                <mml:ci>G</mml:ci>
 
2193
                <mml:ci>B</mml:ci>
 
2194
            </mml:apply>
 
2195
        </mml:reln>
 
2196
    </mml:math>
 
2197
</informalequation>
 
2198
@end docbook
1687
2199
@end table
1688
2200
 
1689
2201
@item --hard-mask
1690
2202
@opindex --hard-mask
1691
 
@opindex --HardMask @r{(deprecated)}
1692
 
(This option supersedes the deprecated
1693
 
option@tie{}@option{--HardMask}.)
1694
2203
 
1695
2204
Force hard blend masks on the finest scale.  This is the opposite flag
1696
2205
of @option{--soft-mask}.
1703
2212
See also @ref{Fusion Options, Option --contrast-weight} and
1704
2213
@option{--contrast-window-size} above.
1705
2214
 
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}.)
1711
 
 
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).
1716
 
 
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.
1720
 
 
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.
 
2215
@item --load-masks
 
2216
@itemx --load-masks=@var{SOFT-MASK-TEMPLATE}
 
2217
@itemx --load-masks=@var{SOFT-MASK-TEMPLATE}:@var{HARD-MASK-TEMPLATE}
 
2218
@opindex --load-masks
 
2219
 
 
2220
Load masks from images instead of computing them.
 
2221
 
 
2222
The masks have to be a grayscale images.
 
2223
 
 
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
 
2236
templates.
 
2237
 
 
2238
Options@tie{}@option{--load-masks} and @option{--save-masks} are
 
2239
mutually exclusive.
1724
2240
 
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}.)
 
2245
@cindex mask, save
 
2246
@cindex save mask
 
2247
Save the generated weight masks to image files.
1732
2248
 
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}}.
1742
2256
soft-mask files.  In the third form, @var{HARD-MASK-TEMPLATE}
1743
2257
additionally defines the names of the hard-mask files.
1744
2258
 
 
2259
@cindex save mask, only
 
2260
@cindex only save mask
 
2261
Enfuse will stop after saving all masks unless
 
2262
option@tie{}@option{--output} is given, too.  With both options given,
 
2263
this is, @option{--save-masks} and @option{--output}, Enfuse saves all
 
2264
masks and then proceeds to fuse the output image.
 
2265
 
1745
2266
Both @var{SOFT-MASK-TEMPLATE} and @var{HARD-MASK-TEMPLATE} define
1746
2267
templates that are expanded for each mask file.  In a template a
1747
2268
percent sign (@samp{%}) introduces a variable part.  All other
1763
2284
 
1764
2285
@item --soft-mask
1765
2286
@opindex --soft-mask
1766
 
@opindex --SoftMask @r{(deprecated)}
1767
 
(This option supersedes the deprecated
1768
 
option@tie{}@option{--SoftMask}.)
1769
2287
 
1770
2288
Consider all masks when fusing.  This is the default.
1771
2289
@end table
1772
2290
 
 
2291
@c The extra <para>s fix another stupid Texinfo problem with DocBook.
 
2292
@docbook
 
2293
<para>
 
2294
@end docbook
 
2295
Options@tie{}@option{--save-masks} and @option{--load-masks} are
 
2296
mutually exclusive.
 
2297
@docbook
 
2298
</para>
 
2299
@end docbook
 
2300
 
1773
2301
@page
1774
2302
 
1775
2303
@include mask-template-characters.texi
1835
2363
@end table
1836
2364
 
1837
2365
 
 
2366
@node Color Profiles
 
2367
@chapter Color Profiles
 
2368
@cindex profile, @acronym{ICC}
 
2369
@cindex @acronym{ICC} profile
 
2370
@cindex color profile
 
2371
 
 
2372
@include color-profiles.texi
 
2373
 
 
2374
 
1838
2375
@node Weighting Functions
1839
2376
@chapter Weighting Functions
1840
2377
@cindex weighting functions
1865
2402
@end display
1866
2403
@end ifinfo
1867
2404
@html
1868
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
2405
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
1869
2406
    <mrow>
1870
2407
        <mrow>
1871
2408
            <mi>P</mi>
1892
2429
    P(i, x, y) \rightarrow Q(x, y),
1893
2430
$$
1894
2431
@end tex
 
2432
@docbook
 
2433
<informalequation>
 
2434
    <mml:math>
 
2435
        <mml:lambda>
 
2436
            <mml:bvar>
 
2437
                <mml:apply>
 
2438
                    <mml:ci>P</mml:ci>
 
2439
                    <mml:ci>i</mml:ci>
 
2440
                    <mml:ci>x</mml:ci>
 
2441
                    <mml:ci>y</mml:ci>
 
2442
                </mml:apply>
 
2443
            </mml:bvar>
 
2444
            <mml:apply>
 
2445
                <mml:ci>Q</mml:ci>
 
2446
                <mml:ci>x</mml:ci>
 
2447
                <mml:ci>y</mml:ci>
 
2448
            </mml:apply>
 
2449
        </mml:lambda>
 
2450
    </mml:math>
 
2451
</informalequation>
 
2452
@end docbook
1895
2453
 
1896
2454
@noindent
1897
2455
where @math{x} runs from 1 to the common width of the images, @math{y}
1898
2456
from 1 to the common height, and @math{i} from 1 to the number of
1899
2457
input images@tie{}@math{n}.
1900
2458
 
 
2459
@macro equationW{}
 
2460
@ifnotdocbook
 
2461
@ifnottex
 
2462
(W)
 
2463
@end ifnottex
 
2464
@end ifnotdocbook
 
2465
@tex
 
2466
(W)%
 
2467
@end tex
 
2468
@docbook
 
2469
<xref linkend="equ:pixel-weighting-function"/>
 
2470
@end docbook
 
2471
@end macro
 
2472
 
1901
2473
Enfuse allows for weighting the contribution of each @math{P(i, x, y)}
1902
2474
to the final @math{Q(x, y)}:
1903
2475
@ifinfo
1905
2477
@math{w(P(1, x, y)) * P(1, x, y) +
1906
2478
... +
1907
2479
w(P(n, x, y)) * P(n, x, y)
1908
 
--> Q(x, y),}@w{                                                  }(W)
 
2480
--> Q(x, y),}@w{                                                  }@c
 
2481
@equationW{}
1909
2482
@end display
1910
2483
@end ifinfo
1911
2484
@html
1912
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
2485
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
1913
2486
    <mrow>
1914
2487
        <mrow>
1915
2488
            <mi>w</mi>
1973
2546
        </mrow>
1974
2547
        <mtext>,</mtext>
1975
2548
        <mspace width="4em"/>
1976
 
        <mtext>(W)</mtext>
 
2549
        <mtext>@c
 
2550
@equationW{}
 
2551
        </mtext>
1977
2552
    </mrow>
1978
2553
</math>
1979
2554
@end html
1981
2556
$$
1982
2557
    w(P(1, x, y)) P(1, x, y) + \ldots + w(P(n, x, y)) P(n, x, y)
1983
2558
    \rightarrow
1984
 
    Q(x, y),\hskip4em\hbox{(W)}
 
2559
    Q(x, y),\hskip4em\hbox{@c
 
2560
@equationW{}
 
2561
}
1985
2562
$$
1986
2563
@end tex
 
2564
@docbook
 
2565
<equation id="equ:pixel-weighting-function">
 
2566
    <title>Pixel Weighting Function</title>
 
2567
    <mml:math>
 
2568
        <mml:lambda>
 
2569
            <mml:bvar>
 
2570
                <mml:apply>
 
2571
                    <mml:plus/>
 
2572
                    <mml:apply>
 
2573
                        <mml:times/>
 
2574
                        <mml:apply>
 
2575
                            <mml:ci>w</mml:ci>
 
2576
                            <mml:apply>
 
2577
                                <mml:ci>P</mml:ci>
 
2578
                                <mml:cn>1</mml:cn>
 
2579
                                <mml:ci>x</mml:ci>
 
2580
                                <mml:ci>y</mml:ci>
 
2581
                            </mml:apply>
 
2582
                        </mml:apply>
 
2583
                        <mml:apply>
 
2584
                            <mml:ci>P</mml:ci>
 
2585
                            <mml:cn>1</mml:cn>
 
2586
                            <mml:ci>x</mml:ci>
 
2587
                            <mml:ci>y</mml:ci>
 
2588
                        </mml:apply>
 
2589
                    </mml:apply>
 
2590
                    <mml:mo>...</mml:mo>
 
2591
                    <mml:apply>
 
2592
                        <mml:times/>
 
2593
                        <mml:apply>
 
2594
                            <mml:ci>w</mml:ci>
 
2595
                            <mml:apply>
 
2596
                                <mml:ci>P</mml:ci>
 
2597
                                <mml:ci>n</mml:ci>
 
2598
                                <mml:ci>x</mml:ci>
 
2599
                                <mml:ci>y</mml:ci>
 
2600
                            </mml:apply>
 
2601
                        </mml:apply>
 
2602
                        <mml:apply>
 
2603
                            <mml:ci>P</mml:ci>
 
2604
                            <mml:ci>n</mml:ci>
 
2605
                            <mml:ci>x</mml:ci>
 
2606
                            <mml:ci>y</mml:ci>
 
2607
                        </mml:apply>
 
2608
                    </mml:apply>
 
2609
                </mml:apply>
 
2610
            </mml:bvar>
 
2611
            <mml:apply>
 
2612
                <mml:ci>Q</mml:ci>
 
2613
                <mml:ci>x</mml:ci>
 
2614
                <mml:ci>y</mml:ci>
 
2615
            </mml:apply>
 
2616
        </mml:lambda>
 
2617
    </mml:math>
 
2618
</equation>
 
2619
@end docbook
1987
2620
 
1988
2621
@noindent
1989
2622
where
2019
2652
@end ifinfo
2020
2653
@html
2021
2654
</p>
2022
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
2655
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
2023
2656
    <mtable>
2024
2657
        <mtr>
2025
2658
            <mtd>
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.
2184
2817
@end tex
 
2818
@docbook
 
2819
<informalequation>
 
2820
    <mml:math>
 
2821
        <mml:reln>
 
2822
            <mml:eq/>
 
2823
            <mml:apply>
 
2824
                <mml:ci>w</mml:ci>
 
2825
                <mml:ci>P</mml:ci>
 
2826
            </mml:apply>
 
2827
            <mml:apply>
 
2828
                <mml:plus/>
 
2829
                <mml:apply>
 
2830
                    <mml:times/>
 
2831
                    <mml:csymbol>
 
2832
                        <mml:msub>
 
2833
                            <mml:mi>w</mml:mi>
 
2834
                            <mml:mi mathvariant="normal">exp</mml:mi>
 
2835
                        </mml:msub>
 
2836
                    </mml:csymbol>
 
2837
                    <mml:apply>
 
2838
                        <mml:csymbol>
 
2839
                            <mml:msub>
 
2840
                                <mml:mi>f</mml:mi>
 
2841
                                <mml:mi mathvariant="normal">exp</mml:mi>
 
2842
                            </mml:msub>
 
2843
                        </mml:csymbol>
 
2844
                        <mml:ci>P</mml:ci>
 
2845
                    </mml:apply>
 
2846
                </mml:apply>
 
2847
                <mml:apply>
 
2848
                    <mml:times/>
 
2849
                    <mml:csymbol>
 
2850
                        <mml:msub>
 
2851
                            <mml:mi>w</mml:mi>
 
2852
                            <mml:mi mathvariant="normal">sat</mml:mi>
 
2853
                        </mml:msub>
 
2854
                    </mml:csymbol>
 
2855
                    <mml:apply>
 
2856
                        <mml:csymbol>
 
2857
                            <mml:msub>
 
2858
                                <mml:mi>f</mml:mi>
 
2859
                                <mml:mi mathvariant="normal">sat</mml:mi>
 
2860
                            </mml:msub>
 
2861
                        </mml:csymbol>
 
2862
                        <mml:ci>P</mml:ci>
 
2863
                    </mml:apply>
 
2864
                </mml:apply>
 
2865
                <mml:apply>
 
2866
                    <mml:times/>
 
2867
                    <mml:csymbol>
 
2868
                        <mml:msub>
 
2869
                            <mml:mi>w</mml:mi>
 
2870
                            <mml:mi mathvariant="normal">cont</mml:mi>
 
2871
                        </mml:msub>
 
2872
                    </mml:csymbol>
 
2873
                    <mml:apply>
 
2874
                        <mml:csymbol>
 
2875
                            <mml:msub>
 
2876
                                <mml:mi>f</mml:mi>
 
2877
                                <mml:mi mathvariant="normal">cont</mml:mi>
 
2878
                            </mml:msub>
 
2879
                        </mml:csymbol>
 
2880
                        <mml:ci>P</mml:ci>
 
2881
                        <mml:csymbol>
 
2882
                            <mml:msub>
 
2883
                                <mml:mi>r</mml:mi>
 
2884
                                <mml:mi mathvariant="normal">cont</mml:mi>
 
2885
                            </mml:msub>
 
2886
                        </mml:csymbol>
 
2887
                    </mml:apply>
 
2888
                </mml:apply>
 
2889
 
 
2890
                <mml:apply>
 
2891
                    <mml:times/>
 
2892
                    <mml:csymbol>
 
2893
                        <mml:msub>
 
2894
                            <mml:mi>w</mml:mi>
 
2895
                            <mml:mi mathvariant="normal">ent</mml:mi>
 
2896
                        </mml:msub>
 
2897
                    </mml:csymbol>
 
2898
                    <mml:apply>
 
2899
                        <mml:csymbol>
 
2900
                            <mml:msub>
 
2901
                                <mml:mi>f</mml:mi>
 
2902
                                <mml:mi mathvariant="normal">ent</mml:mi>
 
2903
                            </mml:msub>
 
2904
                        </mml:csymbol>
 
2905
                        <mml:ci>P</mml:ci>
 
2906
                        <mml:csymbol>
 
2907
                            <mml:msub>
 
2908
                                <mml:mi>r</mml:mi>
 
2909
                                <mml:mi mathvariant="normal">ent</mml:mi>
 
2910
                            </mml:msub>
 
2911
                        </mml:csymbol>
 
2912
                    </mml:apply>
 
2913
                </mml:apply>
 
2914
 
 
2915
            </mml:apply>
 
2916
        </mml:reln>
 
2917
    </mml:math>
 
2918
</informalequation>
 
2919
 
 
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&nbsp;<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&nbsp;<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&nbsp;<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.
 
2960
@end docbook
2185
2961
 
2186
2962
@menu
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
2189
2966
@end menu
2190
2967
 
2191
2968
 
2199
2976
be extreme, favoring only a few pixels or even only one pixel in the
2200
2977
input stack.  Extremes are not typical, however.
2201
2978
 
2202
 
Equal weights are another extreme that turns (W) into an arithmetic
2203
 
average.  This is why we sometimes speak of the ``averaging property''
2204
 
of this weighting algorithm, like smoothing out noise.
2205
 
 
 
2979
Equal weights are another extreme that turns
 
2980
@equationW{}
 
2981
into an
 
2982
arithmetic average.  This is why we sometimes speak of the ``averaging
 
2983
property'' of this weighting algorithm, like smoothing out noise.
2206
2984
 
2207
2985
 
2208
2986
@node Disabling Averaging
2221
2999
wins, this is, gets weight@tie{}one, and all other pixels get the
2222
3000
weight of zero
2223
3001
(@uref{http://@/en.wikipedia.org/@/wiki/@/The_@/Winner_@/Takes_@/It_@/All,,``The
2224
 
Winner Takes It All.''}).  With @option{--hard-mask} Equation@tie{}(W)
 
3002
Winner Takes It All.''}).  With @option{--hard-mask} Equation@tie{}@c
 
3003
@equationW{}
2225
3004
becomes
2226
3005
@ifinfo
2227
3006
@display
2235
3014
@end display
2236
3015
@end ifinfo
2237
3016
@html
2238
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
3017
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
2239
3018
    <mrow>
2240
3019
        <mrow>
2241
3020
            <mrow>
2303
3082
    \hbox{ for all } 1 \le j \le n.
2304
3083
$$
2305
3084
@end tex
 
3085
@docbook
 
3086
<informalequation>
 
3087
    <mml:math>
 
3088
        <mml:lambda>
 
3089
            <mml:bvar>
 
3090
                <mml:apply>
 
3091
                    <mml:ci>P</mml:ci>
 
3092
                    <mml:ci>i</mml:ci>
 
3093
                    <mml:ci>x</mml:ci>
 
3094
                    <mml:ci>y</mml:ci>
 
3095
                </mml:apply>
 
3096
            </mml:bvar>
 
3097
            <mml:apply>
 
3098
                <mml:ci>Q</mml:ci>
 
3099
                <mml:ci>x</mml:ci>
 
3100
                <mml:ci>y</mml:ci>
 
3101
            </mml:apply>
 
3102
        </mml:lambda>
 
3103
    </mml:math>
 
3104
</informalequation>
 
3105
where
 
3106
<informalequation>
 
3107
    <mml:math>
 
3108
        <mml:apply>
 
3109
            <mml:forall/>
 
3110
            <mml:bvar>
 
3111
                <mml:condition>
 
3112
                    <mml:reln>
 
3113
                        <mml:leq/>
 
3114
                        <mml:cn>1</mml:cn>
 
3115
                        <mml:ci>j</mml:ci>
 
3116
                        <mml:ci>n</mml:ci>
 
3117
                    </mml:reln>
 
3118
                </mml:condition>
 
3119
            </mml:bvar>
 
3120
            <mml:reln>
 
3121
                <mml:geq/>
 
3122
                <mml:apply>
 
3123
                    <mml:ci>w</mml:ci>
 
3124
                    <mml:apply>
 
3125
                        <mml:ci>P</mml:ci>
 
3126
                        <mml:ci>i</mml:ci>
 
3127
                        <mml:ci>x</mml:ci>
 
3128
                        <mml:ci>y</mml:ci>
 
3129
                    </mml:apply>
 
3130
                </mml:apply>
 
3131
                <mml:apply>
 
3132
                    <mml:ci>w</mml:ci>
 
3133
                    <mml:apply>
 
3134
                        <mml:ci>P</mml:ci>
 
3135
                        <mml:ci>j</mml:ci>
 
3136
                        <mml:ci>x</mml:ci>
 
3137
                        <mml:ci>y</mml:ci>
 
3138
                    </mml:apply>
 
3139
                </mml:apply>
 
3140
            </mml:reln>
 
3141
        </mml:apply>
 
3142
    </mml:math>
 
3143
</informalequation>
 
3144
@end docbook
2306
3145
 
2307
3146
@noindent
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
 
3149
@equationW{}
 
3150
, because only a
 
3151
single input pixel contributes to the output.
 
3152
 
 
3153
 
 
3154
@node Single Criterion Fusing
 
3155
@subsection Single Criterion Fusing
 
3156
@cindex single criterion fusing
 
3157
@cindex fusing, single criterion
 
3158
 
 
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.
 
3164
 
 
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}.
 
3171
 
 
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}
 
3179
@end multitable
 
3180
 
 
3181
@caption{Enfuse's default weights as compiled into version@tie{}@value{VERSION}.}
 
3182
 
 
3183
@shortcaption{Default weights}
 
3184
 
 
3185
@cindex default weights
 
3186
@cindex weights, default
 
3187
@end float
 
3188
 
 
3189
To disable a particular criterion set its weight to zero as for
 
3190
example
 
3191
@example
 
3192
enfuse \
 
3193
    --exposure-weight=1 --saturation-weight=0 \
 
3194
    --contrast-weight=0 --entropy-weight=0 \
 
3195
    img_[1-3].png
 
3196
@end example
 
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.
 
3200
 
 
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.
2311
3206
 
2312
3207
 
2313
3208
@node Exposure Weighting
2341
3236
@end display
2342
3237
@end ifinfo
2343
3238
@html
2344
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
3239
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
2345
3240
    <mrow>
2346
3241
        <mrow>
2347
3242
            <msub>
2395
3290
              \left(Y - \mathit{Mu} \over \mathit{Sigma} \right)^2\right),
2396
3291
$$
2397
3292
@end tex
 
3293
@docbook
 
3294
<informalequation>
 
3295
    <mml:math>
 
3296
        <mml:reln>
 
3297
            <mml:eq/>
 
3298
            <mml:apply>
 
3299
                <mml:csymbol>
 
3300
                    <mml:msub>
 
3301
                        <mml:mi>w</mml:mi>
 
3302
                        <mml:mi mathvariant="normal">exp</mml:mi>
 
3303
                    </mml:msub>
 
3304
                </mml:csymbol>
 
3305
                <mml:ci>Y</mml:ci>
 
3306
            </mml:apply>
 
3307
            <mml:apply>
 
3308
                <mml:exp/>
 
3309
                <mml:apply>
 
3310
                    <mml:times/>
 
3311
                    <mml:apply>
 
3312
                        <mml:minus/>
 
3313
                        <mml:apply>
 
3314
                            <mml:divide/>
 
3315
                            <mml:cn>1</mml:cn>
 
3316
                            <mml:cn>2</mml:cn>
 
3317
                        </mml:apply>
 
3318
                    </mml:apply>
 
3319
                    <mml:apply>
 
3320
                        <mml:power/>
 
3321
                        <mml:apply>
 
3322
                            <mml:divide/>
 
3323
                            <mml:apply>
 
3324
                                <mml:minus/>
 
3325
                                <mml:ci>Y</mml:ci>
 
3326
                                <mml:ci>Mu</mml:ci>
 
3327
                            </mml:apply>
 
3328
                            <mml:ci>Sigma</mml:ci>
 
3329
                        </mml:apply>
 
3330
                        <mml:cn>2</mml:cn>
 
3331
                    </mml:apply>
 
3332
                </mml:apply>
 
3333
            </mml:apply>
 
3334
        </mml:reln>
 
3335
    </mml:math>
 
3336
</informalequation>
 
3337
@end docbook
2398
3338
 
2399
3339
@noindent
2400
3340
whose center@tie{}@math{Mu} and width@tie{}@math{Sigma} are controlled
2404
3344
@ref{Figure:gaussian} shows a Gaussian.
2405
3345
 
2406
3346
@float Figure,Figure:gaussian
2407
 
@image{gaussian}
 
3347
@vimage{gaussian}
2408
3348
 
2409
 
@caption{Gaussian function with the parameters @var{Mu} = 0.5 and
2410
 
@var{Sigma} = 0.2.}
 
3349
@caption{Gaussian function with the parameters @var{Mu} = 0.5 and @var{Sigma} = 0.2.}
2411
3350
 
2412
3351
@shortcaption{Gaussian function}
2413
3352
@end float
2536
3475
sizes.
2537
3476
 
2538
3477
@float Figure,Figure:local-analysis-window
2539
 
@image{local-analysis-window}
 
3478
@vimage{local-analysis-window}
2540
3479
 
2541
 
@caption{Examples of local analysis windows for the sizes 3 and 5.
2542
 
``C'' marks the center where the pixel gets the weight.  ``N'' are
2543
 
neighboring pixels, which all contribute equally to the weight.}
 
3480
@caption{Examples of local analysis windows for the sizes 3 and 5.  ``C'' marks the center where the pixel gets the weight.  ``N'' are neighboring pixels, which all contribute equally to the weight.}
2544
3481
 
2545
3482
@shortcaption{Local analysis window}
2546
3483
@end float
2580
3517
@end display
2581
3518
@end ifinfo
2582
3519
@html
2583
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
3520
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
2584
3521
    <mrow>
2585
3522
        <mi>w</mi>
2586
3523
        <mo>:</mo>
2620
3557
    w: x \rightarrow p(\{\omega: X(\omega) = x\}).
2621
3558
$$
2622
3559
@end tex
 
3560
@docbook
 
3561
<informalequation>
 
3562
    <mml:math>
 
3563
        <mml:apply>
 
3564
            <mml:csymbol>
 
3565
                <mml:mo>:</mml:mo>
 
3566
            </mml:csymbol>
 
3567
            <mml:ci>w</mml:ci>
 
3568
            <mml:lambda>
 
3569
                <mml:bvar>
 
3570
                    <mml:ci>x</mml:ci>
 
3571
                </mml:bvar>
 
3572
                <mml:apply>
 
3573
                    <mml:ci>p</mml:ci>
 
3574
                    <mml:set>
 
3575
                        <mml:bvar>
 
3576
                            <mml:ci>&omega;</mml:ci>
 
3577
                        </mml:bvar>
 
3578
                        <mml:condition>
 
3579
                            <mml:reln>
 
3580
                                <mml:eq/>
 
3581
                                <mml:apply>
 
3582
                                    <mml:ci>X</mml:ci>
 
3583
                                    <mml:ci>&omega;</mml:ci>
 
3584
                                </mml:apply>
 
3585
                                <mml:ci>x</mml:ci>
 
3586
                            </mml:reln>
 
3587
                        </mml:condition>
 
3588
                    </mml:set>
 
3589
                </mml:apply>
 
3590
            </mml:lambda>
 
3591
        </mml:apply>
 
3592
    </mml:math>
 
3593
</informalequation>
 
3594
@end docbook
2623
3595
 
2624
3596
@noindent
2625
3597
It associates a probability@tie{}@math{p} with each of the @math{n}
2626
3598
different possible outcomes@tie{}@c
2627
3599
@inlineomega{}
2628
 
of the random
 
3600
 of the random
2629
3601
variable@tie{}@math{X}.
2630
3602
@cindex expectation value
2631
3603
Based on @math{w}, we define the @dfn{expectation value} or ``First
2636
3608
@end display
2637
3609
@end ifinfo
2638
3610
@html
2639
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
3611
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
2640
3612
    <mrow>
2641
3613
        <mrow>
2642
3614
            <mo mathvariant="sans-serif">Ex</mo>
2679
3651
    \hbox{\sf Ex } X := \sum_{i = 1}^n x_i w(x_i).
2680
3652
$$
2681
3653
@end tex
 
3654
@docbook
 
3655
<informalequation>
 
3656
    <mml:math>
 
3657
        <mml:reln>
 
3658
            <mml:eq/>
 
3659
            <mml:apply>
 
3660
                <mml:csymbol>
 
3661
                    <mml:mtext mathvariant="sans-serif">Ex</mml:mtext>
 
3662
                </mml:csymbol>
 
3663
                <mml:ci>X</mml:ci>
 
3664
            </mml:apply>
 
3665
            <mml:apply>
 
3666
                <mml:moment/>
 
3667
                <mml:degree>
 
3668
                    <mml:cn>1</mml:cn>
 
3669
                </mml:degree>
 
3670
                <mml:ci>X</mml:ci>
 
3671
            </mml:apply>
 
3672
            <mml:apply>
 
3673
                <mml:sum/>
 
3674
                <mml:bvar>
 
3675
                    <mml:ci>i</mml:ci>
 
3676
                </mml:bvar>
 
3677
                <mml:lowlimit>
 
3678
                    <mml:cn>1</mml:cn>
 
3679
                </mml:lowlimit>
 
3680
                <mml:uplimit>
 
3681
                    <mml:ci>n</mml:ci>
 
3682
                </mml:uplimit>
 
3683
                <mml:apply>
 
3684
                    <mml:times/>
 
3685
                    <mml:apply>
 
3686
                        <mml:selector/>
 
3687
                        <mml:ci>x</mml:ci>
 
3688
                        <mml:ci>i</mml:ci>
 
3689
                    </mml:apply>
 
3690
                    <mml:apply>
 
3691
                        <mml:ci>w</mml:ci>
 
3692
                        <mml:apply>
 
3693
                            <mml:selector/>
 
3694
                            <mml:ci>x</mml:ci>
 
3695
                            <mml:ci>i</mml:ci>
 
3696
                        </mml:apply>
 
3697
                    </mml:apply>
 
3698
                </mml:apply>
 
3699
            </mml:apply>
 
3700
        </mml:reln>
 
3701
    </mml:math>
 
3702
</informalequation>
 
3703
@end docbook
2682
3704
 
2683
3705
@cindex variance
2684
3706
@noindent
2690
3712
@end display
2691
3713
@end ifinfo
2692
3714
@html
2693
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
3715
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
2694
3716
    <mrow>
2695
3717
        <mo mathvariant="sans-serif">Var</mo>
2696
3718
        <mo>&ApplyFunction;</mo>
2726
3748
    \hbox{\sf Var } X := \hbox{\sf Ex}\left( (X - \hbox{\sf Ex } X)^2 \right),
2727
3749
$$
2728
3750
@end tex
 
3751
@docbook
 
3752
<informalequation>
 
3753
    <mml:math>
 
3754
        <mml:reln>
 
3755
            <mml:eq/>
 
3756
            <mml:apply>
 
3757
                <mml:csymbol>
 
3758
                    <mml:mtext mathvariant="sans-serif">Var</mml:mtext>
 
3759
                </mml:csymbol>
 
3760
                <mml:ci>X</mml:ci>
 
3761
            </mml:apply>
 
3762
            <mml:apply>
 
3763
                <mml:variance/>
 
3764
                <mml:ci>X</mml:ci>
 
3765
            </mml:apply>
 
3766
            <mml:apply>
 
3767
                <mml:moment/>
 
3768
                <mml:degree>
 
3769
                    <mml:cn>2</mml:cn>
 
3770
                </mml:degree>
 
3771
                <mml:ci>X</mml:ci>
 
3772
            </mml:apply>
 
3773
            <mml:apply>
 
3774
                <mml:csymbol>
 
3775
                    <mml:mtext mathvariant="sans-serif">Ex</mml:mtext>
 
3776
                </mml:csymbol>
 
3777
                <mml:apply>
 
3778
                    <mml:power/>
 
3779
                    <mml:apply>
 
3780
                        <mml:minus/>
 
3781
                        <mml:ci>X</mml:ci>
 
3782
                        <mml:apply>
 
3783
                            <mml:csymbol>
 
3784
                                <mml:mtext mathvariant="sans-serif">Ex</mml:mtext>
 
3785
                            </mml:csymbol>
 
3786
                            <mml:ci>X</mml:ci>
 
3787
                        </mml:apply>
 
3788
                    </mml:apply>
 
3789
                    <mml:cn>2</mml:cn>
 
3790
                </mml:apply>
 
3791
            </mml:apply>
 
3792
        </mml:reln>
 
3793
    </mml:math>
 
3794
</informalequation>
 
3795
@end docbook
2729
3796
 
2730
3797
@cindex standard deviation
2731
3798
@noindent
2736
3803
@end display
2737
3804
@end ifinfo
2738
3805
@html
2739
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
3806
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
2740
3807
    <mrow>
2741
3808
        <mrow>
2742
3809
            <mo>&sigma;</mo>
2758
3825
    \sigma X := \sqrt{\hbox{\sf Var } X}.
2759
3826
$$
2760
3827
@end tex
 
3828
@docbook
 
3829
<informalequation>
 
3830
    <mml:math>
 
3831
        <mml:reln>
 
3832
            <mml:eq/>
 
3833
            <mml:apply>
 
3834
                <mml:sdev/>
 
3835
                <mml:ci>X</mml:ci>
 
3836
            </mml:apply>
 
3837
            <mml:apply>
 
3838
                <mml:root/>
 
3839
                <mml:degree>
 
3840
                    <mml:cn>2</mml:cn>
 
3841
                </mml:degree>
 
3842
                <mml:apply>
 
3843
                    <mml:moment/>
 
3844
                    <mml:degree>
 
3845
                        <mml:cn>2</mml:cn>
 
3846
                    </mml:degree>
 
3847
                    <mml:ci>X</mml:ci>
 
3848
                </mml:apply>
 
3849
            </mml:apply>
 
3850
            <mml:apply>
 
3851
                <mml:root/>
 
3852
                <mml:degree>
 
3853
                    <mml:cn>2</mml:cn>
 
3854
                </mml:degree>
 
3855
                <mml:apply>
 
3856
                    <mml:csymbol>
 
3857
                        <mml:mtext mathvariant="sans-serif">Var</mml:mtext>
 
3858
                    </mml:csymbol>
 
3859
                    <mml:ci>X</mml:ci>
 
3860
                </mml:apply>
 
3861
            </mml:apply>
 
3862
        </mml:reln>
 
3863
    </mml:math>
 
3864
</informalequation>
 
3865
@end docbook
2761
3866
 
2762
3867
Obviously, the variance of @math{X} is the expectation value of the
2763
3868
squared deviation from the expectation value of @math{X} itself.  Note
2780
3885
@end display
2781
3886
@end ifinfo
2782
3887
@html
2783
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
3888
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
2784
3889
    <mrow>
2785
3890
        <mrow>
2786
3891
            <mo mathvariant="sans-serif">Ex</mo>
2819
3924
    \hbox{\sf Ex } X := {1 \over n} \sum_{i = 1}^n x_i.
2820
3925
$$
2821
3926
@end tex
 
3927
@docbook
 
3928
<informalequation>
 
3929
    <mml:math>
 
3930
        <mml:reln>
 
3931
            <mml:eq/>
 
3932
            <mml:apply>
 
3933
                <mml:csymbol>
 
3934
                    <mml:mtext mathvariant="sans-serif">Ex</mml:mtext>
 
3935
                </mml:csymbol>
 
3936
                <mml:ci>X</mml:ci>
 
3937
            </mml:apply>
 
3938
            <mml:apply>
 
3939
                <mml:times/>
 
3940
                <mml:apply>
 
3941
                    <mml:divide/>
 
3942
                    <mml:cn>1</mml:cn>
 
3943
                    <mml:ci>n</mml:ci>
 
3944
                </mml:apply>
 
3945
                <mml:apply>
 
3946
                    <mml:sum/>
 
3947
                    <mml:bvar>
 
3948
                        <mml:ci>i</mml:ci>
 
3949
                    </mml:bvar>
 
3950
                    <mml:lowlimit>
 
3951
                        <mml:cn>1</mml:cn>
 
3952
                    </mml:lowlimit>
 
3953
                    <mml:uplimit>
 
3954
                        <mml:ci>n</mml:ci>
 
3955
                    </mml:uplimit>
 
3956
                    <mml:apply>
 
3957
                        <mml:selector/>
 
3958
                        <mml:ci>x</mml:ci>
 
3959
                        <mml:ci>i</mml:ci>
 
3960
                    </mml:apply>
 
3961
                </mml:apply>
 
3962
            </mml:apply>
 
3963
        </mml:reln>
 
3964
    </mml:math>
 
3965
</informalequation>
 
3966
@end docbook
2822
3967
 
2823
3968
@noindent
2824
3969
In other words: the expectation value is the arithmetic mean of the
2830
3975
@end display
2831
3976
@end ifinfo
2832
3977
@html
2833
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
3978
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
2834
3979
    <mrow>
2835
3980
        <mrow>
2836
3981
            <mo mathvariant="sans-serif">Var</mo>
2879
4024
    {1 \over {n - 1}} \, \hbox{\sf Ex}\left( (X - \hbox{\sf Ex } X)^2 \right).
2880
4025
$$
2881
4026
@end tex
 
4027
@docbook
 
4028
<informalequation>
 
4029
    <mml:math>
 
4030
        <mml:reln>
 
4031
            <mml:eq/>
 
4032
            <mml:apply>
 
4033
                <mml:csymbol>
 
4034
                    <mml:mtext mathvariant="sans-serif">Var</mml:mtext>
 
4035
                </mml:csymbol>
 
4036
                <mml:ci>X</mml:ci>
 
4037
            </mml:apply>
 
4038
            <mml:apply>
 
4039
                <mml:times/>
 
4040
                <mml:apply>
 
4041
                    <mml:divide/>
 
4042
                    <mml:cn>1</mml:cn>
 
4043
                    <mml:apply>
 
4044
                        <mml:minus/>
 
4045
                        <mml:ci>n</mml:ci>
 
4046
                        <mml:cn>1</mml:cn>
 
4047
                    </mml:apply>
 
4048
                </mml:apply>
 
4049
                <mml:apply>
 
4050
                    <mml:csymbol>
 
4051
                        <mml:mtext mathvariant="sans-serif">Ex</mml:mtext>
 
4052
                    </mml:csymbol>
 
4053
                    <mml:apply>
 
4054
                        <mml:power/>
 
4055
                        <mml:apply>
 
4056
                            <mml:minus/>
 
4057
                            <mml:ci>X</mml:ci>
 
4058
                            <mml:apply>
 
4059
                                <mml:csymbol>
 
4060
                                    <mml:mtext mathvariant="sans-serif">Ex</mml:mtext>
 
4061
                                </mml:csymbol>
 
4062
                                <mml:ci>X</mml:ci>
 
4063
                            </mml:apply>
 
4064
                        </mml:apply>
 
4065
                        <mml:cn>2</mml:cn>
 
4066
                    </mml:apply>
 
4067
                </mml:apply>
 
4068
            </mml:apply>
 
4069
        </mml:reln>
 
4070
    </mml:math>
 
4071
</informalequation>
 
4072
@end docbook
2882
4073
 
2883
4074
 
2884
4075
@node Laplacian of Gaussian
2905
4096
@end display
2906
4097
@end ifinfo
2907
4098
@html
2908
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
4099
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
2909
4100
    <mrow>
2910
4101
        <mrow>
2911
4102
            <mi>g</mi>
2969
4160
    {\exp\left(-{{x^2 + y^2} \over {2 \sigma^2}}\right)}
2970
4161
$$
2971
4162
@end tex
 
4163
@docbook
 
4164
<informalequation>
 
4165
    <mml:math>
 
4166
        <mml:reln>
 
4167
            <mml:eq/>
 
4168
            <mml:apply>
 
4169
                <mml:ci>g</mml:ci>
 
4170
                <mml:ci>x</mml:ci>
 
4171
                <mml:ci>y</mml:ci>
 
4172
            </mml:apply>
 
4173
            <mml:apply>
 
4174
                <mml:times/>
 
4175
                <mml:apply>
 
4176
                    <mml:divide/>
 
4177
                    <mml:cn>1</mml:cn>
 
4178
                    <mml:apply>
 
4179
                        <mml:times/>
 
4180
                        <mml:cn>2</mml:cn>
 
4181
                        <mml:csymbol>&pi;</mml:csymbol>
 
4182
                        <mml:apply>
 
4183
                            <mml:power/>
 
4184
                            <mml:ci>&sigma;</mml:ci>
 
4185
                            <mml:cn>2</mml:cn>
 
4186
                        </mml:apply>
 
4187
                    </mml:apply>
 
4188
                </mml:apply>
 
4189
                <mml:apply>
 
4190
                    <mml:exp/>
 
4191
                    <mml:apply>
 
4192
                        <mml:minus/>
 
4193
                        <mml:apply>
 
4194
                            <mml:divide/>
 
4195
                            <mml:apply>
 
4196
                                <mml:plus/>
 
4197
                                <mml:apply>
 
4198
                                    <mml:power/>
 
4199
                                    <mml:ci>x</mml:ci>
 
4200
                                    <mml:cn>2</mml:cn>
 
4201
                                </mml:apply>
 
4202
                                <mml:apply>
 
4203
                                    <mml:power/>
 
4204
                                    <mml:ci>y</mml:ci>
 
4205
                                    <mml:cn>2</mml:cn>
 
4206
                                </mml:apply>
 
4207
                            </mml:apply>
 
4208
                            <mml:apply>
 
4209
                                <mml:times/>
 
4210
                                <mml:cn>2</mml:cn>
 
4211
                                <mml:apply>
 
4212
                                    <mml:power/>
 
4213
                                    <mml:ci>&sigma;</mml:ci>
 
4214
                                    <mml:cn>2</mml:cn>
 
4215
                                </mml:apply>
 
4216
                            </mml:apply>
 
4217
                        </mml:apply>
 
4218
                    </mml:apply>
 
4219
                </mml:apply>
 
4220
            </mml:apply>
 
4221
        </mml:reln>
 
4222
    </mml:math>
 
4223
</informalequation>
 
4224
@end docbook
2972
4225
 
2973
4226
@noindent
2974
4227
The parameter@tie{}@c
2983
4236
@end display
2984
4237
@end ifinfo
2985
4238
@html
2986
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
4239
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
2987
4240
    <mrow>
2988
4241
        <mrow>
2989
4242
            <mi>&Delta;</mi>
3033
4286
    {\partial^2 \over \partial x^2} + {\partial^2 \over \partial y^2}
3034
4287
$$
3035
4288
@end tex
 
4289
@docbook
 
4290
<informalequation>
 
4291
    <mml:math>
 
4292
        <mml:reln>
 
4293
            <mml:eq/>
 
4294
            <mml:apply>
 
4295
                <mml:laplacian/>
 
4296
            </mml:apply>
 
4297
            <mml:apply>
 
4298
                <mml:scalarproduct/>
 
4299
                <mml:apply>
 
4300
                    <mml:grad/>
 
4301
                </mml:apply>
 
4302
                <mml:apply>
 
4303
                    <mml:grad/>
 
4304
                </mml:apply>
 
4305
            </mml:apply>
 
4306
            <mml:apply>
 
4307
                <mml:plus/>
 
4308
                <mml:apply>
 
4309
                    <mml:partialdiff/>
 
4310
                    <mml:bvar>
 
4311
                        <mml:ci>x</mml:ci>
 
4312
                        <mml:degree>
 
4313
                            <mml:cn>2</mml:cn>
 
4314
                        </mml:degree>
 
4315
                    </mml:bvar>
 
4316
                </mml:apply>
 
4317
                <mml:apply>
 
4318
                    <mml:partialdiff/>
 
4319
                    <mml:bvar>
 
4320
                        <mml:ci>y</mml:ci>
 
4321
                        <mml:degree>
 
4322
                            <mml:cn>2</mml:cn>
 
4323
                        </mml:degree>
 
4324
                    </mml:bvar>
 
4325
                </mml:apply>
 
4326
            </mml:apply>
 
4327
        </mml:reln>
 
4328
    </mml:math>
 
4329
</informalequation>
 
4330
@end docbook
3036
4331
 
3037
4332
to @math{g(x, y)}, to arrive at a continuous representation of the
3038
4333
two-dimensional filter kernel
3042
4337
@end display
3043
4338
@end ifinfo
3044
4339
@html
3045
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
4340
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
3046
4341
    <mrow>
3047
4342
        <mrow>
3048
4343
            <mi>k</mi>
3093
4388
    k(x, y) = {{\xi^2 - 1} \over {\pi \sigma^4}} \exp(-\xi^2),
3094
4389
$$
3095
4390
@end tex
 
4391
@docbook
 
4392
<informalequation>
 
4393
    <mml:math>
 
4394
        <mml:reln>
 
4395
            <mml:eq/>
 
4396
            <mml:apply>
 
4397
                <mml:ci>k</mml:ci>
 
4398
                <mml:ci>x</mml:ci>
 
4399
                <mml:ci>y</mml:ci>
 
4400
            </mml:apply>
 
4401
            <mml:apply>
 
4402
                <mml:times/>
 
4403
                <mml:apply>
 
4404
                    <mml:divide/>
 
4405
                    <mml:apply>
 
4406
                        <mml:minus/>
 
4407
                        <mml:apply>
 
4408
                            <mml:power/>
 
4409
                            <mml:ci>&xi;</mml:ci>
 
4410
                            <mml:cn>2</mml:cn>
 
4411
                        </mml:apply>
 
4412
                        <mml:cn>1</mml:cn>
 
4413
                    </mml:apply>
 
4414
                    <mml:apply>
 
4415
                        <mml:times/>
 
4416
                        <mml:csymbol>&pi;</mml:csymbol>
 
4417
                        <mml:apply>
 
4418
                            <mml:power/>
 
4419
                            <mml:ci>&sigma;</mml:ci>
 
4420
                            <mml:cn>4</mml:cn>
 
4421
                        </mml:apply>
 
4422
                    </mml:apply>
 
4423
                </mml:apply>
 
4424
                <mml:apply>
 
4425
                    <mml:exp/>
 
4426
                    <mml:apply>
 
4427
                        <mml:minus/>
 
4428
                        <mml:apply>
 
4429
                            <mml:power/>
 
4430
                            <mml:ci>&xi;</mml:ci>
 
4431
                            <mml:cn>2</mml:cn>
 
4432
                        </mml:apply>
 
4433
                    </mml:apply>
 
4434
                </mml:apply>
 
4435
            </mml:apply>
 
4436
        </mml:reln>
 
4437
    </mml:math>
 
4438
</informalequation>
 
4439
@end docbook
3096
4440
 
3097
4441
where we have used the dimensionless distance@tie{}@c
3098
4442
@inlinexi{}
3099
 
from
 
4443
 from
3100
4444
the origin
3101
4445
@ifinfo
3102
4446
@display
3104
4448
@end display
3105
4449
@end ifinfo
3106
4450
@html
3107
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
4451
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
3108
4452
    <mrow>
3109
4453
        <mrow>
3110
4454
            <msup>
3145
4489
    \xi^2 = {{x^2 + y^2} \over {2 \sigma^2}}.
3146
4490
$$
3147
4491
@end tex
 
4492
@docbook
 
4493
<informalequation>
 
4494
    <mml:math>
 
4495
        <mml:reln>
 
4496
            <mml:eq/>
 
4497
            <mml:apply>
 
4498
                <mml:power/>
 
4499
                <mml:ci>&xi;</mml:ci>
 
4500
                <mml:cn>2</mml:cn>
 
4501
            </mml:apply>
 
4502
            <mml:apply>
 
4503
                <mml:divide/>
 
4504
                <mml:apply>
 
4505
                    <mml:plus/>
 
4506
                    <mml:apply>
 
4507
                        <mml:power/>
 
4508
                        <mml:ci>x</mml:ci>
 
4509
                        <mml:cn>2</mml:cn>
 
4510
                    </mml:apply>
 
4511
                    <mml:apply>
 
4512
                        <mml:power/>
 
4513
                        <mml:ci>y</mml:ci>
 
4514
                        <mml:cn>2</mml:cn>
 
4515
                    </mml:apply>
 
4516
                </mml:apply>
 
4517
                <mml:apply>
 
4518
                    <mml:times/>
 
4519
                    <mml:cn>2</mml:cn>
 
4520
                    <mml:apply>
 
4521
                        <mml:power/>
 
4522
                        <mml:ci>&sigma;</mml:ci>
 
4523
                        <mml:cn>2</mml:cn>
 
4524
                    </mml:apply>
 
4525
                </mml:apply>
 
4526
            </mml:apply>
 
4527
        </mml:reln>
 
4528
    </mml:math>
 
4529
</informalequation>
 
4530
@end docbook
3148
4531
 
3149
4532
@noindent
3150
4533
Enfuse uses a discrete approximation of @math{k} in the convolution
3155
4538
@math{R = sqrt(x^2 + y^2)}.
3156
4539
@end ifinfo
3157
4540
@html
3158
 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
3159
 
    <mrow>
 
4541
<mathinline xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
 
4542
    <mrowinline>
3160
4543
        <mi>R</mi>
3161
4544
        <mo>=</mo>
3162
 
        <mrow>
3163
 
            <msqrt>
3164
 
                <msup>
 
4545
        <mrowinline>
 
4546
            <msqrtinline>
 
4547
                <msupinline>
3165
4548
                    <mi>x</mi>
3166
4549
                    <mn>2</mn>
3167
 
                </msup>
 
4550
                </msupinline>
3168
4551
                <mo>+</mo>
3169
 
                <msup>
 
4552
                <msupinline>
3170
4553
                    <mi>y</mi>
3171
4554
                    <mn>2</mn>
3172
 
                </msup>
3173
 
            </msqrt>
3174
 
        </mrow>
 
4555
                </msupinline>
 
4556
            </msqrtinline>
 
4557
        </mrowinline>
3175
4558
        <mtext>.</mtext>
3176
 
    </mrow>
3177
 
</math>
 
4559
    </mrowinline>
 
4560
</mathinline>
3178
4561
@end html
3179
4562
@tex
3180
4563
$R = \sqrt{x^2 + y^2}$.
3181
4564
@end tex
 
4565
@docbook
 
4566
<inlineequation>
 
4567
    <mml:math>
 
4568
        <mml:reln>
 
4569
            <mml:eq/>
 
4570
            <mml:ci>R</mml:ci>
 
4571
            <mml:apply>
 
4572
                <mml:root/>
 
4573
                <mml:degree>
 
4574
                    <mml:cn>2</mml:cn>
 
4575
                </mml:degree>
 
4576
                <mml:apply>
 
4577
                    <mml:plus/>
 
4578
                    <mml:apply>
 
4579
                        <mml:power/>
 
4580
                        <mml:ci>x</mml:ci>
 
4581
                        <mml:cn>2</mml:cn>
 
4582
                    </mml:apply>
 
4583
                    <mml:apply>
 
4584
                        <mml:power/>
 
4585
                        <mml:ci>y</mml:ci>
 
4586
                        <mml:cn>2</mml:cn>
 
4587
                    </mml:apply>
 
4588
                </mml:apply>
 
4589
            </mml:apply>
 
4590
        </mml:reln>
 
4591
    </mml:math>
 
4592
</inlineequation>
 
4593
@end docbook
3182
4594
 
3183
4595
@float Figure,Figure:laplacian-of-gaussian
3184
 
@image{laplacian-of-gaussian}
 
4596
@vimage{laplacian-of-gaussian}
3185
4597
 
3186
 
@caption{Laplacian-of-Gaussian function for 
 
4598
@caption{Laplacian-of-Gaussian function for @c
3187
4599
@inlinesigma{}
3188
 
= 0.5.}
 
4600
 = 0.5.}
3189
4601
 
3190
4602
@shortcaption{Laplacian-of-Gaussian}
3191
4603
@end float
3314
4726
@end display
3315
4727
@end ifinfo
3316
4728
@html
3317
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
4729
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
3318
4730
    <mrow>
3319
4731
        <mrow>
3320
4732
            <msub>
3379
4791
    H_a(n) := \sum_{x \in S} p(x) \log_a(1 / p(x))
3380
4792
$$
3381
4793
@end tex
 
4794
@docbook
 
4795
<informalequation>
 
4796
    <mml:math>
 
4797
        <mml:reln>
 
4798
            <mml:eq/>
 
4799
            <mml:apply>
 
4800
                <mml:apply>
 
4801
                    <mml:selector/>
 
4802
                    <mml:ci>H</mml:ci>
 
4803
                    <mml:ci>a</mml:ci>
 
4804
                </mml:apply>
 
4805
                <mml:ci>n</mml:ci>
 
4806
            </mml:apply>
 
4807
            <mml:apply>
 
4808
                <mml:sum/>
 
4809
                <mml:bvar>
 
4810
                    <mml:ci>x</mml:ci>
 
4811
                </mml:bvar>
 
4812
                <mml:condition>
 
4813
                    <mml:apply>
 
4814
                        <mml:in/>
 
4815
                        <mml:ci>x</mml:ci>
 
4816
                        <mml:ci>S</mml:ci>
 
4817
                    </mml:apply>
 
4818
                </mml:condition>
 
4819
                <mml:apply>
 
4820
                    <mml:times/>
 
4821
                    <mml:apply>
 
4822
                        <mml:ci>p</mml:ci>
 
4823
                        <mml:ci>x</mml:ci>
 
4824
                    </mml:apply>
 
4825
                    <mml:apply>
 
4826
                        <mml:log/>
 
4827
                        <mml:logbase>
 
4828
                            <mml:ci>a</mml:ci>
 
4829
                        </mml:logbase>
 
4830
                        <mml:apply other='display="scriptstyle"'>
 
4831
                            <mml:divide/>
 
4832
                            <mml:cn>1</mml:cn>
 
4833
                            <mml:apply>
 
4834
                                <mml:ci>p</mml:ci>
 
4835
                                <mml:ci>x</mml:ci>
 
4836
                            </mml:apply>
 
4837
                        </mml:apply>
 
4838
                    </mml:apply>
 
4839
                </mml:apply>
 
4840
            </mml:apply>
 
4841
        </mml:reln>
 
4842
    </mml:math>
 
4843
</informalequation>
 
4844
@end docbook
3382
4845
 
3383
4846
@cindex entropy
3384
4847
@noindent
3394
4857
@end display
3395
4858
@end ifinfo
3396
4859
@html
3397
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
4860
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
3398
4861
    <mrow>
3399
4862
        <mrow>
3400
4863
            <msub>
3444
4907
    H_b(n) = H_a(n) / \log_a(b)
3445
4908
$$
3446
4909
@end tex
 
4910
@docbook
 
4911
<informalequation>
 
4912
    <mml:math>
 
4913
        <mml:reln>
 
4914
            <mml:eq/>
 
4915
            <mml:apply>
 
4916
                <mml:apply>
 
4917
                    <mml:selector/>
 
4918
                    <mml:ci>H</mml:ci>
 
4919
                    <mml:ci>b</mml:ci>
 
4920
                </mml:apply>
 
4921
                <mml:ci>n</mml:ci>
 
4922
            </mml:apply>
 
4923
             <mml:apply>
 
4924
                <mml:divide/>
 
4925
                <mml:apply>
 
4926
                    <mml:apply>
 
4927
                        <mml:selector/>
 
4928
                        <mml:ci>H</mml:ci>
 
4929
                        <mml:ci>a</mml:ci>
 
4930
                    </mml:apply>
 
4931
                    <mml:ci>n</mml:ci>
 
4932
                </mml:apply>
 
4933
                <mml:apply>
 
4934
                    <mml:log/>
 
4935
                    <mml:logbase>
 
4936
                        <mml:ci>a</mml:ci>
 
4937
                    </mml:logbase>
 
4938
                    <mml:ci>b</mml:ci>
 
4939
                </mml:apply>
 
4940
            </mml:apply>
 
4941
        </mml:reln>
 
4942
    </mml:math>
 
4943
</informalequation>
 
4944
@end docbook
3447
4945
 
3448
4946
@noindent
3449
4947
holds for all @math{b > 1}.  We use @math{a = 2} for entropy weighting
3454
4952
@end display
3455
4953
@end ifinfo
3456
4954
@html
3457
 
<math xmlns="http://www.w3.org/1998/Math/MathML">
 
4955
<math xmlns="http://www.w3.org/1998/Math/MathML" display="separate">
3458
4956
    <mrow>
3459
4957
        <mrow>
3460
4958
            <munder>
3495
4993
    \lim_{p \rightarrow 0} \, p \, \log_a(1 / p) = 0.
3496
4994
$$
3497
4995
@end tex
 
4996
@docbook
 
4997
<informalequation>
 
4998
    <mml:math>
 
4999
        <mml:reln>
 
5000
            <mml:eq/>
 
5001
            <mml:apply>
 
5002
                <mml:limit/>
 
5003
                <mml:bvar>
 
5004
                    <mml:ci>p</mml:ci>
 
5005
                </mml:bvar>
 
5006
                <mml:condition>
 
5007
                    <mml:apply>
 
5008
                        <mml:tendsto/>
 
5009
                        <mml:ci>p</mml:ci>
 
5010
                        <mml:ci>0</mml:ci>
 
5011
                    </mml:apply>
 
5012
                </mml:condition>
 
5013
                <mml:apply>
 
5014
                    <mml:times/>
 
5015
                    <mml:ci>p</mml:ci>
 
5016
                    <mml:apply>
 
5017
                        <mml:log/>
 
5018
                        <mml:logbase>
 
5019
                            <mml:ci>a</mml:ci>
 
5020
                        </mml:logbase>
 
5021
                        <mml:apply>
 
5022
                            <mml:divide/>
 
5023
                            <mml:cn>1</mml:cn>
 
5024
                            <mml:ci>p</mml:ci>
 
5025
                        </mml:apply>
 
5026
                    </mml:apply>
 
5027
                </mml:apply>
 
5028
            </mml:apply>
 
5029
            <mml:cn>0</mml:cn>
 
5030
        </mml:reln>
 
5031
    </mml:math>
 
5032
</informalequation>
 
5033
@end docbook
3498
5034
 
3499
5035
@noindent
3500
5036
@ref{Figure:entropy} shows an entropy function.
3501
5037
 
3502
5038
@float Figure,Figure:entropy
3503
 
@image{entropy}
 
5039
@vimage{entropy}
3504
5040
 
3505
 
@caption{Entropy function@tie{}H for an experiment with exactly two
3506
 
outcomes.}
 
5041
@caption{Entropy function@tie{}H for an experiment with exactly two outcomes.}
3507
5042
 
3508
5043
@shortcaption{Entropy function}
3509
5044
@end float
3734
5269
 
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
3751
 
whole pixel.
 
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.
 
5281
 
 
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.
3752
5290
 
3753
5291
Enfuse offers the photographer tremendous flexibility in fusing
3754
5292
differently exposed images.  Whether you combine only two pictures or
3864
5402
@mainpurpose Reflection suppression, saturation enhancement
3865
5403
 
3866
5404
In the current implementation of Enfuse, it is not possible in general
3867
 
to fuse a polarization series.  Na@"{@dotless{i}}vely abusing
 
5405
to fuse a polarization series.  Naively abusing
3868
5406
@option{--saturation-weight} will not work.
3869
5407
 
3870
5408
 
4084
5622
This is in fact @uref{http://@/www.gnu.org/@/software/@/octave/,
4085
5623
Octave} syntax.
4086
5624
 
4087
 
Images@tie{}@ref{Figure:sharp-edge} and @ref{Figure:smooth-edge} show
4088
 
plots of the matrices @code{sharp_edge} and @code{smooth_edge}.
 
5625
@ref{Figure:sharp-edge} and @ref{Figure:smooth-edge} show plots of the
 
5626
matrices @code{sharp_edge} and @code{smooth_edge}.
4089
5627
 
4090
5628
@float Figure,Figure:sharp-edge
4091
 
@image{sharp-edge}
 
5629
@vimage{sharp-edge}
4092
5630
 
4093
 
@caption{3D plot augmented by contour plot of the matrix
4094
 
@code{sharp_edge}.}
 
5631
@caption{3D plot augmented by contour plot of the matrix@tie{}@code{sharp_edge}.}
4095
5632
 
4096
5633
@shortcaption{Sharp edge}
4097
5634
@end float
4098
5635
 
4099
5636
@float Figure,Figure:smooth-edge
4100
 
@image{smooth-edge}
 
5637
@vimage{smooth-edge}
4101
5638
 
4102
 
@caption{3D plot augmented by contour plot of the matrix
4103
 
@code{smooth_edge}.}
 
5639
@caption{3D plot augmented by contour plot of the matrix@tie{}@code{smooth_edge}.}
4104
5640
 
4105
5641
@shortcaption{Smooth edge}
4106
5642
@end float
4152
5688
@cindex local contrast enhancement
4153
5689
@cindex contrast enhancement, local
4154
5690
 
4155
 
Sometimes Enfuse misses smoother edges with @option{--contrast-edge-scale} and a
4156
 
little local contrast enhancement (@acronym{LCE}) helps.  Set
 
5691
Sometimes Enfuse misses smoother edges with
 
5692
@option{--contrast-edge-scale} and a little local contrast enhancement
 
5693
(@acronym{LCE}) helps.  Set
4157
5694
@code{--contrast-edge-scale}=@/@var{SCALE}:@/@var{LCE-SCALE}:@/@var{LCE-FACTOR}.
4158
5695
where @var{LCE-SCALE} and @var{LCE-FACTOR} work like the
4159
5696
@uref{http://@/www.cambridgeincolour.com/@/tutorials/@/unsharp-@/mask.htm,
4192
5729
@end enumerate
4193
5730
 
4194
5731
@noindent
4195
 
The @option{--contrast-min-curvature} option helps to mitigate both flaws.
 
5732
The @option{--contrast-min-curvature} option helps to mitigate both
 
5733
flaws.
4196
5734
 
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%.
4201
5739
 
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.
4206
5744
 
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
4253
5791
@cindex focus stacking decision tree
4254
5792
@cindex decision tree, focus stacking
4255
5793
 
4256
 
Figure@tie{}@ref{Figure:focus-stacking-decision-tree} helps the user
4257
 
to arrive at a well-fused focus stack with as few steps as possible.
 
5794
@ref{Figure:focus-stacking-decision-tree} helps the user to arrive at
 
5795
a well-fused focus stack with as few steps as possible.
4258
5796
 
4259
5797
@float Figure,Figure:focus-stacking-decision-tree
4260
 
@image{focus-stack-decision-tree}
 
5798
@vimage{focus-stack-decision-tree}
4261
5799
 
4262
5800
@caption{Focus stacking decision tree.}
4263
5801
 
4270
5808
 
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}.
4278
5817
 
4279
5818
Carefully examining the masks (option@tie{}@option{--save-masks}) that
4280
5819
Enfuse uses helps to judge the effects of the parameters.
4366
5905
@c The List-of-Tables and List-of-Figures go right before the indices
4367
5906
@c in all formats but TeX.  For the TeX output they appear right after
4368
5907
@c the Table-of-Contents.
 
5908
@ifnotdocbook
4369
5909
@ifnottex
4370
5910
@node List of Tables
4371
5911
@unnumbered List of Tables
4408
5948
@cindex index, general
4409
5949
 
4410
5950
@printindex cp
 
5951
@end ifnotdocbook
4411
5952
 
4412
5953
@bye