OnWorks favicon

pfstmo_mantiuk08 - Online in the Cloud

Run pfstmo_mantiuk08 in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command pfstmo_mantiuk08 that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



pfstmo_mantiuk08 - Display adaptive tone mapping


pfstmo_mantiuk08 [--display-function <df-spec>] [--display-size=<size-spec>] [--color-
saturation <float>] [--contrast-enhancement <float>] [--white-y=<float>] [--fps=<frames-
per-second>] [--output-tone-curve=<file name>] [--verbose] [--help]


This command applies the display adaptive tone mapping, which attempts to preserve
contrast of an input (HDR) image as close as possible given the characteristic of an
output display. Use this tone mapping operator if you want to preserve original image
appearance, or slightly enhance contrast (-e option) while maintaining the natural look of
images. The operator can also compensate for ambient light reflections on a screen, and
for varying dynamic range and brightness of a display. The operator is suitable for video
sequences as it prevents high-frequency changes in tone-curve between consecutive frames,
which would result in flickering. Note that the temporal filtering is always active and
there is no need to specify an argument to switch it on.

More details can be found in:
Rafal Mantiuk, Scott Daly and Louis Kerofsky.
Display Adaptive Tone Mapping.
In: ACM Transactions on Graphics 27 (3), 2008.

If you find this TMO useful in your research project, please cite the paper above.

This operator also employs color correction mechanism from:
Radoslaw Mantiuk, Rafal Mantiuk, Anna Tomaszewska, Wolfgang Heidrich.
Color Correction for Tone Mapping.
In: Computer Graphics Forum (Proc. of EUROGRAPHICS'09), 28(2), 2009.

The result of this TMO does not require gamma correction.


--display-function <df-spec>, -d <df-spec>
To adapt tone-mapping to different displays, this operator must be provided a
display function. The display function describes how output luminance of a display
changes with pixel values. If no parameter is given, the command assumes -df pd=lcd
(see Pre-defined display below). There are several ways to specify the display

Gamma-gain-black-ambient display model


Gamma-gain-black-ambient model can approximate a range of displays and is a compact
way to specify a display function. It assumes that a display function has the
following form:

L_d(I) = (l-b)*I^gamma + b + k/pi*a

The parameters are as follows:
g - gamma or exponent of a display function (default 2.2, usually from 1.8 to 2.8)
l - peak luminance of a display in cd/m^2 (default 100, from 80 for CRTs to 500
or more for newer displays)
b - black level, which is luminance of a black pixel when the display is on
(default 1, usually from 0.3 to 1 cd/m^2)
k - reflectivity of a screen (assuming that it is diffuse) (default 0.01, usually
about 0.01 (1%) for LCD displays, more for CRTs)
a - ambient illumination in lux. Typical values are:
50 lux Family living room (dim, default)
400 lux
A brightly lit office
32000 lux
Sunlight on an average day (min.)
100000 lux
Sunlight on an average day (max.)

Pre-defined display


Use pre-defined display type. This options are for convenience only and they do not
mean to accurately model the response of a particular display. The following
display types are recognized:

lcd_office (g=2.2, l=100, b=0.8, k=0.01, a=400 )
lcd set to "office" mode seen in bright environment
lcd (g=2.2, l=200, b=0.8, k=0.01, a=60 )
typical lcd seen in dim environment (default)
lcd_bright (g=2.6, l=500, b=0.5, k=0.01, a=10 )
newer LCD TV seen in dark environment
crt (g=2.2, l=80, b=1, k=0.02, a=60 )
CRT monitor seen in dim environment

The parameters in the parenthesis are the same as for the gamma-gain-black-ambient
model explained above.



This is the most accurate specification of the display response function, but
requires measuring it with a luminance meter. The lookup table should account also
for ambient light, so that it is recommended to use the luminance meter that can
measure screen luminance from a distance, such as Minolta LS-100 (as opposed to
those that use rubber tube touching a display that eliminates the influence of
ambient light). The <file> must be a comma-separated text file in a format (CSV)
with two columns: first column represents pixel values (from 0.0 to 1.0) and the
second physical luminance in cd/m^2. Both the pixel value and the luminance should
increase in each raw.

--display-size=<size-spec>, -s=<size_spec>
Specifies how large the image appears to a viewer and what is the viewing distance.
If no parameter is given, -s ppd=30 is assumed. Since this tone-mapper is global,
display size has moderate effect on the resulting images and thus skipping this
parameter should not do much harm. There are two ways to specify image size:
vres - screen's vertical resolution in lines, for example 1024.
vd - viewing distance specified as multiplies of screen height. For
example if the display is seen from 0.5m and the height of its screen
is 25cm, vd=2.
d - (optional) viewing distance in meters. This is to account for lower
eye's sensitivity for larger viewing distances (although the effect
is negligible). By default -d=0.5 is assumed.
ppd - how many pixels spans one visual degree.
d - (optional) viewing distance in meters. This is to account for lower
eye's sensitivity for larger viewing distances (although the effect
is negligible). By default -d=0.5 is assumed.

--color-saturation <float>, -c <float>
Decrease or increase color saturation after tone mapping. Default value -c=1
attempts to preserve color appearance of the original image. Use values >1 to
increase and <1 to decrease color saturation.

--contrast-enhancement <float>, -e <float>
By default this tone-mapper attempts to preserve contrast of an input image (-e=1).
This parameter controls whether the contrast of an input image should be enhanced
before tone-mapping. For example -e=1.15 boosts contrast by 15%. Note that if a
target display does not offer sufficient dynamic range, contrast may be enhanced
only for selected tone-values (those that dominate in an image) or not enhanced at

--white-y=<float>, -y=<float>
Tells the tone-mapper what luminance level in the input image should be mapped to
the maximum luminance of a display. Since HDR images contain only relative
luminance information, tone-mapper does not know how bright should be the scene.
This option is meant to fix this problem by providing tone-mapper with the
information what luminance level in an input image should be perceived as a diffuse
white surface. Default is none, which means that no such mapping will be enforced
and tone-mapper is free to find an optimal brightness for a given image. This is a
recommended setting for HDR images. Setting --white-y could be necessary for dark
scenes, which could be made too bright by the tone-mapper. The value of this
parameter can be also passed in pfsstream as a tag WHITE_Y. pfstools 1.7 and newer
sets set this tag automatically for LDR images. The command line option overrides
the value of the pfstream tag.

--fps=<frames-per-second>, -f=<frames-per-second>
Set the frame rate of the input sequence. Default is 25. Currently only 3 values
are supported: 25, 30 and 60. This parameter controls temporal filter that makes
sure the resulting sequence is coherent in time. This reduces the likelihood of a
visible flicker.

--output-tone-curve=<file name>, -o=<file name>
Write tone-curves to a text file. This option is mainly for debugging purposes, but
can be used to visualize computed tone-curves. The tone-curve data is stored in a
comma separated text file (CSV), consisting of three columns: frame number, log10
of input luminance factor, log10 of the resulting display luminance, and the pixel
value (0-1).

--verbose, -v
Print additional information during program execution.

--quiet, -q
Do not display progress report.

--help, -h
Print list of commandline options.


pfsin memorial.hdr | pfstmo_mantiuk08 -d pd=crt | pfsout memorial.png

Tone map memorial image for a CRT display and store the result in the PNG format.

pfsin memorial.hdr | pfstmo_mantiuk08 -d g=2.6:l=500:b=0.5:k=0.01:a=10 | pfsview

Tone map memorial image for a display that has a 2.2 gamma, the peak luminance of
500 cd/m^2, the black level of 0.5 cd/m^2, the panel reflectivity of 1% (0.01) and
is seen under the illumination of 10 lux.

pfsin bridge.jpg --linear | pfsclamp --min 0.007 | pfstmo_mantiuk08 -v | pfsview

Enhance the low-dynamic range image 'bridge' and view the result. pfsclamp command
reduces noise for low code values.

pfsin frame%05d.exr | pfstmo_mantiuk08 -d pd=lcd_bright --fps 30 | pfsout

Tone-map video sequence at 30 frame-per-second frame rate.

pfsin *.exr | pfstmo_mantiuk08 | pfsview

Tone-map and display *.exr HDR images in the current directory.

pfsin *.exr | pfstmo_mantiuk06 | pfsgamma -g 0.8 | pfstmo_mantiuk08 | pfsview

It is possible to stack a TMO that sharpens images (pfstmo_mantiuk06) with the
contrast preserving TMO (pfstmo_mantiuk08) to get new interesting results.

Use pfstmo_mantiuk08 online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Zephyr Project
    Zephyr Project
    The Zephyr Project is a new generation
    real-time operating system (RTOS) that
    supports multiple hardware
    architectures. It is based on a
    small-footprint kernel...
    Download Zephyr Project
  • 2
    SCons is a software construction tool
    that is a superior alternative to the
    classic "Make" build tool that
    we all know and love. SCons is
    implemented a...
    Download SCons
  • 3
    PSeInt is a pseudo-code interpreter for
    spanish-speaking programming students.
    Its main purpose is to be a tool for
    learning and understanding the basic
    Download PSeInt
  • 4
    oStorybook l'outil privil�gi� des
    �crivains. ATTENTION : voir sur
    --en_EN oStorybook the right tool for
    writers. WARNIN...
    Download oStorybook
  • 5
    Asuswrt-Merlin is a third party
    firmware for select Asus wireless
    routers. Based on the Asuswrt firmware
    developed by Asus, it brings tweaks, new
    features and ...
    Download Asuswrt-Merlin
  • 6
    Atom is a text editor that's
    modern, approachable and full-featured.
    It's also easily customizable- you
    can customize it to do anything and be
    able to ...
    Download Atom
  • 7
    Osu! is a simple rhythm game with a well
    thought out learning curve for players
    of all skill levels. One of the great
    aspects of Osu! is that it is
    Download Osu!
  • More »

Linux commands