1pfstmo_mantiuk08(1) General Commands Manual pfstmo_mantiuk08(1)
2
3
4
6 pfstmo_mantiuk08 - Display adaptive tone mapping
7
9 pfstmo_mantiuk08 [--display-function <df-spec>] [--display-size=<size-
10 spec>] [--color-saturation <float>] [--contrast-enhancement <float>]
11 [--white-y=<float>] [--fps=<frames-per-second>] [--output-tone-
12 curve=<file name>] [--verbose] [--help]
13
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. The operator
22 is suitable for video sequences as it prevents high-frequency changes
23 in tone-curve between consecutive frames, which would result in flick‐
24 ering. Note that the temporal filtering is always active and there is
25 no need to specify an argument to switch it on.
26
27 More details can be found in:
28 Rafal Mantiuk, Scott Daly and Louis Kerofsky.
29 Display Adaptive Tone Mapping.
30 In: ACM Transactions on Graphics 27 (3), 2008.
31 http://www.mpi-inf.mpg.de/resources/hdr/datmo/
32
33 If you find this TMO useful in your research project, please cite the
34 paper above.
35
36 This operator also employs color correction mechanism from:
37 Radoslaw Mantiuk, Rafal Mantiuk, Anna Tomaszewska, Wolfgang Hei‐
38 drich.
39 Color Correction for Tone Mapping.
40 In: Computer Graphics Forum (Proc. of EUROGRAPHICS'09), 28(2),
41 2009.
42 http://zgk.wi.ps.pl/color_correction/
43
44 The result of this TMO does not require gamma correction.
45
47 --display-function <df-spec>, -d <df-spec>
48 To adapt tone-mapping to different displays, this operator must
49 be provided a display function. The display function describes
50 how output luminance of a display changes with pixel values. If
51 no parameter is given, the command assumes -df pd=lcd (see Pre-
52 defined display below). There are several ways to specify the
53 display function:
54
55 Gamma-gain-black-ambient display model
56
57 g=<float>:l=<float>:b=<float>:k=<float>:a=<float>[:n=<float>]
58
59 Gamma-gain-black-ambient model can approximate a range of dis‐
60 plays and is a compact way to specify a display function. It
61 assumes that a display function has the following form:
62
63 L_d(I) = (l-b)*I^gamma + b + k/pi*a
64
65 The parameters are as follows:
66 g - gamma or exponent of a display function (default 2.2, usu‐
67 ally from 1.8 to 2.8)
68 l - peak luminance of a display in cd/m^2 (default 100, from
69 80 for CRTs to 500 or more for newer displays)
70 b - black level, which is luminance of a black pixel when the
71 display is on (default 1, usually from 0.3 to 1 cd/m^2)
72 k - reflectivity of a screen (assuming that it is diffuse)
73 (default 0.01, usually about 0.01 (1%) for LCD displays,
74 more for CRTs)
75 a - ambient illumination in lux. Typical values are:
76 50 lux Family living room (dim, default)
77 400 lux
78 A brightly lit office
79 32000 lux
80 Sunlight on an average day (min.)
81 100000 lux
82 Sunlight on an average day (max.)
83
84 Pre-defined display
85
86 pd=<display_type>
87
88 Use pre-defined display type. This options are for convenience
89 only and they do not mean to accurately model the response of a
90 particular display. The following display types are recognized:
91
92 lcd_office (g=2.2, l=100, b=0.8, k=0.01, a=400 )
93 lcd set to "office" mode seen in bright environment
94 lcd (g=2.2, l=200, b=0.8, k=0.01, a=60 )
95 typical lcd seen in dim environment (default)
96 lcd_bright (g=2.6, l=500, b=0.5, k=0.01, a=10 )
97 newer LCD TV seen in dark environment
98 crt (g=2.2, l=80, b=1, k=0.02, a=60 )
99 CRT monitor seen in dim environment
100
101 The parameters in the parenthesis are the same as for the gamma-
102 gain-black-ambient model explained above.
103
104 Lookup-table
105
106 lut=<file>
107
108 This is the most accurate specification of the display response
109 function, but requires measuring it with a luminance meter. The
110 lookup table should account also for ambient light, so that it
111 is recommended to use the luminance meter that can measure
112 screen luminance from a distance, such as Minolta LS-100 (as
113 opposed to those that use rubber tube touching a display that
114 eliminates the influence of ambient light). The <file> must be a
115 comma-separated text file in a format (CSV) with two columns:
116 first column represents pixel values (from 0.0 to 1.0) and the
117 second physical luminance in cd/m^2. Both the pixel value and
118 the luminance should increase in each raw.
119
120 --display-size=<size-spec>, -s=<size_spec>
121 Specifies how large the image appears to a viewer and what is
122 the viewing distance. If no parameter is given, -s ppd=30 is
123 assumed. Since this tone-mapper is global, display size has mod‐
124 erate effect on the resulting images and thus skipping this
125 parameter should not do much harm. There are two ways to specify
126 image size:
127 vres=<lines>:vd=<screen_heights>[:d=<meters>]
128 vres - screen's vertical resolution in lines, for exam‐
129 ple 1024.
130 vd - viewing distance specified as multiplies of
131 screen height. For example if the display is seen
132 from 0.5m and the height of its screen is 25cm,
133 vd=2.
134 d - (optional) viewing distance in meters. This is
135 to account for lower eye's sensitivity for larger
136 viewing distances (although the effect is negligi‐
137 ble). By default -d=0.5 is assumed.
138 ppd=<pixels_per_visual_degree>[:d=<meters>]
139 ppd - how many pixels spans one visual degree.
140 d - (optional) viewing distance in meters. This is
141 to account for lower eye's sensitivity for larger
142 viewing distances (although the effect is negligi‐
143 ble). By default -d=0.5 is assumed.
144
145 --color-saturation <float>, -c <float>
146 Decrease or increase color saturation after tone mapping.
147 Default value -c=1 attempts to preserve color appearance of the
148 original image. Use values >1 to increase and <1 to decrease
149 color saturation.
150
151 --contrast-enhancement <float>, -e <float>
152 By default this tone-mapper attempts to preserve contrast of an
153 input image (-e=1). This parameter controls whether the contrast
154 of an input image should be enhanced before tone-mapping. For
155 example -e=1.15 boosts contrast by 15%. Note that if a target
156 display does not offer sufficient dynamic range, contrast may be
157 enhanced only for selected tone-values (those that dominate in
158 an image) or not enhanced at all.
159
160 --white-y=<float>, -y=<float>
161 Tells the tone-mapper what luminance level in the input image
162 should be mapped to the maximum luminance of a display. Since
163 HDR images contain only relative luminance information, tone-
164 mapper does not know how bright should be the scene. This option
165 is meant to fix this problem by providing tone-mapper with the
166 information what luminance level in an input image should be
167 perceived as a diffuse white surface. Default is none, which
168 means that no such mapping will be enforced and tone-mapper is
169 free to find an optimal brightness for a given image. This is a
170 recommended setting for HDR images. Setting --white-y could be
171 necessary for dark scenes, which could be made too bright by the
172 tone-mapper. The value of this parameter can be also passed in
173 pfsstream as a tag WHITE_Y. pfstools 1.7 and newer sets set this
174 tag automatically for LDR images. The command line option over‐
175 rides the value of the pfstream tag.
176
177 --fps=<frames-per-second>, -f=<frames-per-second>
178 Set the frame rate of the input sequence. Default is 25. Cur‐
179 rently only 3 values are supported: 25, 30 and 60. This parame‐
180 ter controls temporal filter that makes sure the resulting
181 sequence is coherent in time. This reduces the likelihood of a
182 visible flicker.
183
184 --output-tone-curve=<file name>, -o=<file name>
185 Write tone-curves to a text file. This option is mainly for
186 debugging purposes, but can be used to visualize computed tone-
187 curves. The tone-curve data is stored in a comma separated text
188 file (CSV), consisting of three columns: frame number, log10 of
189 input luminance factor, log10 of the resulting display lumi‐
190 nance, and the pixel value (0-1).
191
192 --verbose, -v
193 Print additional information during program execution.
194
195 --quiet, -q
196 Do not display progress report.
197
198 --help, -h
199 Print list of commandline options.
200
202 pfsin memorial.hdr | pfstmo_mantiuk08 -d pd=crt | pfsout memorial.png
203
204 Tone map memorial image for a CRT display and store the result
205 in the PNG format.
206
207 pfsin memorial.hdr | pfstmo_mantiuk08 -d g=2.6:l=500:b=0.5:k=0.01:a=10
208 | pfsview
209
210 Tone map memorial image for a display that has a 2.2 gamma, the
211 peak luminance of 500 cd/m^2, the black level of 0.5 cd/m^2, the
212 panel reflectivity of 1% (0.01) and is seen under the illumina‐
213 tion of 10 lux.
214
215 pfsin bridge.jpg --linear | pfsclamp --min 0.007 | pfstmo_mantiuk08 -v
216 | pfsview
217
218 Enhance the low-dynamic range image 'bridge' and view the
219 result. pfsclamp command reduces noise for low code values.
220
221 pfsin frame%05d.exr | pfstmo_mantiuk08 -d pd=lcd_bright --fps 30 |
222 pfsout out_frame%04d.png
223
224 Tone-map video sequence at 30 frame-per-second frame rate.
225
226 pfsin *.exr | pfstmo_mantiuk08 | pfsview
227
228 Tone-map and display *.exr HDR images in the current directory.
229
230 pfsin *.exr | pfstmo_mantiuk06 | pfsgamma -g 0.8 | pfstmo_mantiuk08 |
231 pfsview
232
233 It is possible to stack a TMO that sharpens images (pfstmo_man‐
234 tiuk06) with the contrast preserving TMO (pfstmo_mantiuk08) to
235 get new interesting results.
236
238 pfsin(1) pfsout(1) pfsview(1)
239
241 Please report bugs and comments to the pfstools discussion group
242 (http://groups.google.com/group/pfstools).
243
244
245
246 pfstmo_mantiuk08(1)