1pfstmo_mantiuk08(1)         General Commands Manual        pfstmo_mantiuk08(1)
2
3
4

NAME

6       pfstmo_mantiuk08 - Display adaptive tone mapping
7

SYNOPSIS

9       pfstmo_mantiuk08  [--display-function <df-spec>] [--display-size=<size-
10       spec>] [--color-saturation  <float>]  [--contrast-enhancement  <float>]
11       [--white-y=<float>]    [--temporal=<pass>]   [--output-tone-curve=<file
12       name>] [--verbose] [--help]
13

DESCRIPTION

15       This command applies the display adaptive tone mapping, which  attempts
16       to preserve contrast of an input (HDR) image as close as possible given
17       the characteristic of an output display. Use this tone mapping operator
18       if  you want to preserve original image appearance, or slightly enhance
19       contrast (-e option) while maintaining the natural look of images.  The
20       operator can also compensate for ambient light reflections on a screen,
21       and for varying dynamic range and brightness of a display.
22
23       More details can be found in:
24              Rafal Mantiuk, Scott Daly and Louis Kerofsky.
25              Display Adaptive Tone Mapping.
26              In: ACM Transactions on Graphics 27 (3), 2008.
27              http://www.mpi-inf.mpg.de/resources/hdr/datmo/
28
29       If you find this TMO useful in your research project, please  cite  the
30       paper above.
31
32       This operator also employs color correction mechanism from:
33              Radoslaw Mantiuk, Rafal Mantiuk, Anna Tomaszewska, Wolfgang Hei‐
34              drich.
35              Color Correction for Tone Mapping.
36              In: Computer Graphics Forum (Proc. of  EUROGRAPHICS'09),  28(2),
37              2009.
38              http://zgk.wi.ps.pl/color_correction/
39
40       The result of this TMO does not require gamma correction.
41

OPTIONS

43       --display-function <df-spec>, -d <df-spec>
44              To  adapt tone-mapping to different displays, this operator must
45              be provided a display function. The display  function  describes
46              how  output luminance of a display changes with pixel values. If
47              no parameter is given, the command assumes -df pd=lcd (see  Pre-
48              defined  display  below).  There are several ways to specify the
49              display function:
50
51       Gamma-gain-black-ambient display model
52
53              g=<float>:l=<float>:b=<float>:k=<float>:a=<float>[:n=<float>]
54
55              Gamma-gain-black-ambient model can approximate a range  of  dis‐
56              plays  and  is  a  compact way to specify a display function. It
57              assumes that a display function has the following form:
58
59              L_d(I) = (l-b)*I^gamma + b + k/pi*a
60
61              The parameters are as follows:
62              g -  gamma or exponent of a display function (default 2.2,  usu‐
63                   ally from 1.8 to 2.8)
64              l -  peak  luminance  of a display in cd/m^2  (default 100, from
65                   80 for CRTs to 500 or more for newer displays)
66              b -  black level, which is luminance of a black pixel  when  the
67                   display is on (default 1, usually from 0.3 to 1 cd/m^2)
68              k -  reflectivity  of  a  screen  (assuming  that it is diffuse)
69                   (default 0.01, usually about 0.01 (1%)  for  LCD  displays,
70                   more for CRTs)
71              a -  ambient illumination in lux. Typical values are:
72                   50 lux Family living room (dim, default)
73                   400 lux
74                          A brightly lit office
75                   32000 lux
76                          Sunlight on an average day (min.)
77                   100000 lux
78                          Sunlight on an average day (max.)
79
80       Pre-defined display
81
82              pd=<display_type>
83
84              Use  pre-defined  display type. This options are for convenience
85              only and they do not mean to accurately model the response of  a
86              particular display.  The following display types are recognized:
87
88              lcd_office (g=2.2, l=100, b=0.8, k=0.01, a=400 )
89                     lcd set to "office" mode seen in bright environment
90              lcd        (g=2.2, l=200, b=0.8, k=0.01, a=60  )
91                     typical lcd seen in dim environment (default)
92              lcd_bright (g=2.6, l=500, b=0.5, k=0.01, a=10  )
93                     newer LCD TV seen in dark environment
94              crt        (g=2.2, l=80,  b=1,   k=0.02, a=60  )
95                     CRT monitor seen in dim environment
96
97              The parameters in the parenthesis are the same as for the gamma-
98              gain-black-ambient model explained above.
99
100       Lookup-table
101
102              lut=<file>
103
104              This is the most accurate specification of the display  response
105              function,  but requires measuring it with a luminance meter. The
106              lookup table should account also for ambient light, so  that  it
107              is  recommended  to  use  the  luminance  meter that can measure
108              screen luminance from a distance, such  as  Minolta  LS-100  (as
109              opposed  to  those  that use rubber tube touching a display that
110              eliminates the influence of ambient light). The <file> must be a
111              comma-separated  text  file  in a format (CSV) with two columns:
112              first column represents pixel values (from 0.0 to 1.0)  and  the
113              second  physical  luminance  in cd/m^2. Both the pixel value and
114              the luminance should increase in each raw.
115
116       --display-size=<size-spec>, -s=<size_spec>
117              Specifies how large the image appears to a viewer  and  what  is
118              the  viewing  distance.   If no parameter is given, -s ppd=30 is
119              assumed. Since this tone-mapper is global, display size has mod‐
120              erate  effect  on  the  resulting  images and thus skipping this
121              parameter should not do much harm. There are two ways to specify
122              image size:
123              vres=<lines>:vd=<screen_heights>[:d=<meters>]
124                     vres   - screen's vertical resolution in lines, for exam‐
125                            ple 1024.
126                     vd     - viewing  distance  specified  as  multiplies  of
127                            screen  height. For example if the display is seen
128                            from 0.5m and the height of its  screen  is  25cm,
129                            vd=2.
130                     d      -  (optional)  viewing distance in meters. This is
131                            to account for lower eye's sensitivity for  larger
132                            viewing distances (although the effect is negligi‐
133                            ble). By default -d=0.5 is assumed.
134              ppd=<pixels_per_visual_degree>[:d=<meters>]
135                     ppd    - how many pixels spans one visual degree.
136                     d      - (optional) viewing distance in meters.  This  is
137                            to  account for lower eye's sensitivity for larger
138                            viewing distances (although the effect is negligi‐
139                            ble). By default -d=0.5 is assumed.
140
141       --color-saturation <float>, -c <float>
142              Decrease  or  increase  color  saturation  after  tone  mapping.
143              Default value -c=1 attempts to preserve color appearance of  the
144              original  image.  Use  values  >1 to increase and <1 to decrease
145              color saturation.
146
147       --contrast-enhancement <float>, -e <float>
148              By default this tone-mapper attempts to preserve contrast of  an
149              input image (-e=1). This parameter controls whether the contrast
150              of an input image should be enhanced  before  tone-mapping.  For
151              example  -e=1.15  boosts  contrast by 15%. Note that if a target
152              display does not offer sufficient dynamic range, contrast may be
153              enhanced  only  for selected tone-values (those that dominate in
154              an image) or not enhanced at all.
155
156       --white-y=<float>, -y=<float>
157              Tells the tone-mapper what luminance level in  the  input  image
158              should  be  mapped  to the maximum luminance of a display. Since
159              HDR images contain only relative  luminance  information,  tone-
160              mapper does not know how bright should be the scene. This option
161              is meant to fix this problem by providing tone-mapper  with  the
162              information  what  luminance  level  in an input image should be
163              perceived as a diffuse white surface.  Default  is  none,  which
164              means  that  no such mapping will be enforced and tone-mapper is
165              free to find an optimal brightness for a given image. This is  a
166              recommended  setting  for HDR images. Setting --white-y could be
167              necessary for dark scenes, which could be made too bright by the
168              tone-mapper.  The  value of this parameter can be also passed in
169              pfsstream as a tag WHITE_Y. pfstools 1.7 and newer sets set this
170              tag  automatically for LDR images. The command line option over‐
171              rides the value of the pfstream tag.
172
173       --temporal=<pass>, -t=<pass>
174              Use temporal filtering  of  the  tone-curve  to  tone-map  video
175              sequence.  This  option  should  be  used for video sequences to
176              avoid flickering. Since the temporal filter  requires  knowledge
177              of  at  least  25  frames in advance, the filtering must be per‐
178              formed in two passes, similar to MPEG  video  encoding.  In  the
179              first  pass  (pass=1)  tone-curves are calculated for each frame
180              and stored in a temporary  file  (datmo_tone_curves.tmp  in  the
181              current  directory). In the second pass (pass=2) the tone-curves
182              are read from that file, filtered and  used  to  tone-map  video
183              sequence.  The  tone-mapper does not produce any output (frames)
184              in the first pass. See below an example how to use two-pass fil‐
185              tering.  Note  that the same set of tone mapping options must be
186              provided for both passes.
187
188       --output-tone-curve=<file name>, -o=<file name>
189              Write tone-curves to a text file.  This  option  is  mainly  for
190              debugging  purposes, but can be used to visualize computed tone-
191              curves. The tone-curve data is stored in a comma separated  text
192              file  (CSV), consisting of three columns: frame number, log10 of
193              input luminance factor, log10 of  the  resulting  display  lumi‐
194              nance, and the pixel value (0-1).
195
196       --verbose, -v
197              Print additional information during program execution.
198
199       --quiet, -q
200              Do not display progress report.
201
202       --help, -h
203              Print list of commandline options.
204

EXAMPLES

206       pfsin memorial.hdr | pfstmo_mantiuk08 -d pd=crt | pfsout memorial.png
207
208              Tone  map  memorial image for a CRT display and store the result
209              in the PNG format.
210
211       pfsin memorial.hdr | pfstmo_mantiuk08 -d  g=2.6:l=500:b=0.5:k=0.01:a=10
212       | pfsview
213
214              Tone  map memorial image for a display that has a 2.2 gamma, the
215              peak luminance of 500 cd/m^2, the black level of 0.5 cd/m^2, the
216              panel  reflectivity of 1% (0.01) and is seen under the illumina‐
217              tion of 10 lux.
218
219       pfsin bridge.jpg --linear | pfsclamp --min 0.007 | pfstmo_mantiuk08  -v
220       | pfsview
221
222              Enhance  the  low-dynamic  range  image  'bridge'  and  view the
223              result. pfsclamp command reduces noise for low code values.
224
225       pfsin frame%05d.exr | pfstmo_mantiuk08 -d pd=lcd_bright -t 1
226       pfsin frame%05d.exr | pfstmo_mantiuk08 -d pd=lcd_bright -t 2  |  pfsout
227              out_frame%04d.png
228
229              Tone-map video sequence using 2-pass temporal filtering to avoid
230              flicker.
231
232       pfsin *.exr | pfstmo_mantiuk08 | pfsview
233
234              Tone-map and display *.exr HDR images in the current directory.
235
236       pfsin *.exr | pfstmo_mantiuk06 | pfsgamma -g 0.8 |  pfstmo_mantiuk08  |
237       pfsview
238
239              It  is possible to stack a TMO that sharpens images (pfstmo_man‐
240              tiuk06) with the contrast preserving TMO  (pfstmo_mantiuk08)  to
241              get new interesting results.
242

SEE ALSO

244       pfsin(1) pfsout(1) pfsview(1)
245

BUGS

247       Please  report  bugs  and  comments  to  the  pfstools discussion group
248       (http://groups.google.com/group/pfstools).
249
250
251
252                                                           pfstmo_mantiuk08(1)
Impressum