pfstools package is a set of command line programs for reading, writing and manipulating high-dynamic range (HDR) images and video frames. It includes also Qt and OpenGL HDR image viewers. pfstools can be integrated with GNU Octave or matlab, so that it can serve as a toolbox for reading and writing HDR images.
All programs in the package exchange image data using unix pipes and a simple generic HDR image format - pfs. pfs in not just another format for storing HDR images (and there are already quite a few of them), but is rather an attempt to integrate the existing HDR image formats by providing a simple interface for exchanging data between applications.
pfstools is a base set of tools and more advanced functionality can be found in related packages, such as pfstmo (tone-mapping) or pfscalibration (recovery of camera response curve and merging multi-exposure LDR image). If you are not comfortable with a command line interface or you want to save yourself compilation problems, you may want to check Qtpfsgui, which packages some functionality of pfstmo and pfscalibration in a nice GUI interface.
Stable version: pfstools 1.8.1
Documentation
- A general paper on HDR, introducing pfstools:
Rafał Mantiuk, Grzegorz Krawczyk, Radosław Mantiuk and Hans-Peter Seidel
High Dynamic Range Imaging Pipeline: Perception-motivated Representation of Visual Content
In: Proc of SPIE (6492-212). Human Vision and Electronic Imaging XII. 2007. (bib) - Frequently Asked Questions
- Manual pages
- Matlab interface
- libpfs API documentation
- Specification of the pfs format
- Discussion group (Google groups)
Examples
Quick-start guide and some interesting things you can do with pfstools.
Shell
View all HDR images (Radiance format) in a directory:
pfsv *.hdr
Convert all HDR files to the OpenEXR format:
for img in *.hdr; do pfsin ${img} | pfsout ${img%%.hdr}.exr; done
View all OpenEXR images, resize if larger than 512x512:
pfsin *.exr | pfssize --maxx 512 --maxy 512 | pfsview
View every 10th frame of the video sequence 0000.exr, 0001.exr, ...:
pfsin %04d.exr --frames 0:10:
View every 10th frame of the video sequence 0000.exr, 0001.exr, ...:
pfsin %04d.exr --frames 0:10:
Convert LDR image to the linear luminance values shown on a display with a gamma 2.6 and the peak luminance 200 cd/m^2:
pfsin img/tab_pfstools.png | pfsdisplayfunction --to-luminance -d g=2.6:l=200 | pfsview
See manual pages for more information on pfstools commands.
Matlab
Read color image into a (height x width x 3) matrix (pfstools >=1.8):
img = pfs_read_image( 'memorial.hdr' );
Read color image into a (height x width x 3) matrix (pfstools <=1.7):
img = pfs_read_rgb( 'memorial.hdr' );
View matrix using pfsview:
pfsview( img );
Save matrix as a luminance image:
pfs_write_luminance( 'new_image.exr', L );
If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:
0 comments:
Post a Comment