NAMEhtpp - High-Tune: Post-Process
htpp [option] ... [input]
htpp post-processes a htrdr-image(5) and converts it to a PPM image  or to a gnuplot(1) script. If input is not defined, the htrdr-image(5) is read from standard input. Two post-processing procedures are provided: the post-processing of the image colors (option -i), and the mapping of a given pixel component onto a color ramp (option "-m). By default, htpp post-processes the image color.
To post-process the image colors (option -i) htpp assumes that the first, the third and the fifth components of each htrdr-image(5) pixel encode a color with respect to the CIE 1931 XYZ color space. htpp first tone maps these colors with the following filmic tone mapping operator :
out-color = f(in-color * exposure) / f(white-value * exposure)
f(x) = (x * (A*x + C*B) + D*E) / (x*(A*x + B + D*F)) - E/F
A = 0.15 B = 0.50 C = 0.10 D = 0.20 E = 0.02 F = 0.30
The exposure term is an user-defined parameter provided as the exposure image option. If not defined, a default exposure of 1 is used. The white-value is either defined by the user through the white image option or automatically computed as the radiance that is such that 99.5% of pixel radiances are less than _white-value. Once tone mapped, the pixels are transformed from the CIE 1931 XYZ color space into the sRGB linear color space before being gamma corrected. Finally, the resulting pixel components are clamped to [0, 1] and encoded on 8-bits.
The mapping of a pixel component onto a color ramp is controlled by the -m option. The pixel component to post-process is defined by the pixcpnt mapping option. htpp normalizes this component according to its range onto the whole image or with respect to the range mapping option if it is defined. The resuling value is then mapped to a built-in color ramp whose name is defined by the palette mapping option.
- Force overwrite of the output file.
- List short help and exit.
-i <sub-option>[:<sub-option> ...]
Post-process the color of the
htrdr-image(5). The first, the third and the fifth pixel components are assumed to store the pixel color encoded into the CIE 1931 XYZ color space. Available sub-options are:
- Use the default values of the sub-options.
- Pixel exposure. By default its value is 1.
- Radiance in the input image that will represent the white color in output. If not defined, the white value is automatically computed from the radiance of the input image.
-m <sub-option>[:<sub-option> ...]
Map a pixel component to a regular color. Available sub options are:
- Use the default values of the sub-options.
- Color palette to use. Available palettes are the ones supported by the Star-ColorMap library . The default palette is inferno.
- Index in [0, 7] of the pixel component to map. The default pixel component is the first one, i.e. pixcpnt=0.
- Range of the values to map. A degenerated range (i.e. min >= max) means that this range is automatically computed from the boundaries of the selected pixel component over the whole image. This is the default comportment.
- The output image is formatted as a gnuplot script rather than a PPM image. Once executed, the script generates a PNG image with an embedded color ramp. Note that this script can be edited in order to adjust the generated image to any requirements.
- File where the result is written. If not defined, write output to standard output.
- Hint on the number of threads to use. By default use as many threads as CPU cores.
- Make htpp verbose. When used in post-processing of the pixel color (-i option), this option displays the radiance corresponding to the white color in the output image. In pixel component mapping mode (-m option), this option displays the color ramp and its associated values.
- Display version information and exit.
Post-process the htrdr-image(5) saved in img.htrdr and write the resulting PPM image in img.ppm. Use the -f option to overwrite img.ppm if it already exists:
$ htpp -f -o img.ppm img.htrdr
Convert img.htrdr and visualise the resulting image by redirecting the standard output to the feh(1) image viewer. Use an exposure of 0.2 and explicitly define the white color to 31.2 W/sr/m^2:
$ htpp -i exposure=0.2:white=31.2 img.htrdr | feh -
Use the -m option to map the values of the second pixel component clamped in [0, 2] to the color ramp magma.
$ htpp -v -m pixcpnt=1:palette=magma:range=0,2 img.htrdr | feh -
Use the -m option to map the values of the sixth pixel component and write it as a gnuplot script. Run gnuplot(1) to generate a PNG of the result and visualise the resulting image with feh(1).
$ htpp -m pixcpnt=6:gnuplot -o img.gp img.htrdr $ gnuplot img.gp | feh -
- 1. Portable PixMap - http://netpbm.sourceforge.net/doc/ppm.html
- 2. Filmic tone mapping operator - http://filmicworlds.com/blog/filmic-tonemapping-operators/
- 3. Star-ColorMap - https://gitlab.com/meso-star/star-cmap
Copyright © 2018, 2019, 2020 |Meso|Star> <email@example.com>. Copyright © 2018, 2019 CNRS, Université Paul Sabatier <firstname.lastname@example.org>. htpp is free software released under the GPLv3+ license: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html. You are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
feh(1), gnuplot(1) htrdr-image(5)