• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

cmake/H03-May-2022-609498

doc/H03-May-2022-4,0003,950

src/H03-May-2022-50,45833,347

AUTHORSH A D13-Nov-2017589 2015

COPYINGH A D13-Nov-201725.8 KiB505418

ChangeLogH A D13-Nov-201715.6 KiB277249

DoxyfileH A D13-Nov-201744.5 KiB1,118787

READMEH A D13-Nov-20177.6 KiB198148

README.CygwinH A D13-Nov-2017615 1611

README.OSXH A D13-Nov-2017735 2314

README.UbuntuH A D13-Nov-2017645 2816

README.VisualStudioH A D13-Nov-20171.3 KiB4022

README.matlabH A D13-Nov-20174.3 KiB11874

cmake_config.h.inH A D13-Nov-20171.2 KiB6143

ubuntu-packages-depH A D13-Nov-2017136 1211

README

1pfstools 2.1.0 <13.11.2017>
2
3This release adds support for .yuv video files encoded as PQ2020 or
4HLG2020 (used by the reference implementation of h265). pfsview was
5updated to used Qt5 instead of Qt4. Several compilation issues on
6Ubuntu have been resolved.
7
8	* Added: pfsinyuv/pfsoutyuv to handle uncompressed video .yuy
9	* Added: Support for PQ2020 and HLG2020 color spaces (in pfs*yuv)
10	* Added: pfsview now builds with Qt5 instead of Qt4
11	* Fixed: pfsglview crashing on OSX (thanks to Michael)
12	* Fixed: issues with compiling matlab MEX functions on Ubuntu
13	* Added: installation instruction for Ubuntu (README.Ubuntu)
14	* Added: experimemtal version of deghosting in pfshdrcalibrate (poor performance)
15
16
17pfstools - README
18-------------------------------------------------------------------
19
20For issues related to Mac OSX installation - see README.OSX
21
22For issues related to Windows installation - see README.Cygwin
23
24For specific notes on Matlab installation - see README.matlab
25
26For compilation with Visual Studio (experimental) - see README.VisualStudio
27
28pfstools is a set of command line (and two GUI) programs for reading,
29writing, manipulating and viewing high-dynamic range (HDR) images and
30video frames. All programs in the package exchange data using unix
31pipes and a simple generic HDR image format (pfs). The concept of the
32pfstools is similar to netpbm package for low-dynamic range images.
33
34pfstools offers also a good integration with GNU Octave and
35matlab. pfstools can serve as a matlab or Octave toolbox for reading
36and writing HDR images.
37
38pfs in not just another format for storing HDR images. It is more an attempt to
39integrate the existing HDR image formats by providing a simple data format that can
40be used to exchange data between applications.
41
42If you use the software for your research work, please consider citing
43the paper:
44
45Rafal Mantiuk, Grzegorz Krawczyk, Radoslaw Mantiuk and Hans-Peter Seidel.
46High Dynamic Range Imaging Pipeline: Perception-motivated Representation
47of Visual Content.
48In: Proc. of Human Vision and Electronic Imaging XII. 649212.
49
50@inproceedings{mantiuk:2007:hvei,
51 author = {Mantiuk, Rafa{\l} and Krawczyk, Grzegorz and Mantiuk, Rados{\l}aw and Seidel, Hans-Peter},
52 editor = {Rogowitz, Bernice E. and Pappas, Thrasyvoulos N. and Daly, Scott J.},
53 title = {High Dynamic Range Imaging Pipeline: Perception-motivated Representation of Visual Content},
54 booktitle = {Human Vision and Electronic Imaging XII},
55 publisher = {SPIE},
56 year = {2007},
57 volume = {6492},
58 number = {649212},
59 series = {Proceedings of SPIE},
60 address = {San Jose, USA},
61 month = {February},
62}
63
64The paper is an introduction to both pfstools and HDR imaging in
65general. It can be downloaded from:
66
67http://pfstools.sourceforge.net/papers/mantiuk07hdr_pipeline.pdf
68
691. Compilation
70-------------------------------------------------------------------
71Is is strongly recommended to compile into an out-of-source directory:
72
73cd <pfstools_dir>
74mkdir build
75cd build
76cmake ../
77make
78
79If the compilation fails because of a missing library, you can disable the offending component by setting WITH_<component_name> to false. For example:
80
81cmake -DWITH_MATLAB=false ../
82
83to disable matlab support.
84
85If you encounter any problems during compilation, run the make again with the option:
86
87make VERBOSE=1
88
89or, if you use nmake on Windows:
90
91nmake /S
92
93and report the problem with the complete error message to the google discussion group:
94
95https://groups.google.com/forum/#!forum/pfstools
96
972. Directory Layout
98-------------------------------------------------------------------
99
100doc - documentation
101src - all sources go there
102  pfs          - pfs library (used by all tools)
103  fileformat   - readers and writters for various file formats
104  filter       - a range of "filters" from resize to changing color space
105  octave       - GNU Octave scripts and libraries
106  matlab       - matlab mex sources and functions
107  pfsview      - qt application for viewing hdr images and other data
108                 that can be stored in the pfs stream
109  pfsglview    - similar as pfsview, but uses OpenGL & GLUT instead of Qt
110  tmo          - contains tone-mapping operators (formerly pfstmo package)
111  camera       - contains HDR merging and camera calibration tools
112                 (formerly pfscalibration)
113  hdrhtml      - makes HTML5 web-pages with viewable HDR images
114  getopt       - used on Windows to compile using Visual Studio
115  debian       - scripts to create Debian distro package. The scripts has not been updated and currently is not
116                 working.
117
118
1193. Dependencies
120-------------------------------------------------------------------
121
122pfstools relies on a large number of libraries and other dependencies. However, the build script was designed to succeed even if some dependencies are missing. In that case, the tools that rely on those dependencies will not be compiled. If building with a certain dependency causes problems, it is possible to manually switch off that component by passing -DWITH_??=false to cmake.
123
124Note that the development packages must be installed for all dependencies. They usually have '-dev' suffix.
125
126Below is the list of all dependencies requires for pfstools. They are more or less given on an order of importance.
127
128OpenEXR
129	CMake switch: WITH_OpenEXR
130	Tools: pfsinexr, pfsoutexr
131
132ImageMagick
133	CMake switch: WITH_ImageMagick
134	Tools: pfsinimgmagick, pfsoutimgmagick
135	Used to read/write most LDR files. Required for 16-bit file support. "pfsin"/"pfsout" will use NetPBM if ImageMagick is not available
136
137NetPBM
138	CMake switch: WITH_NetPBM
139	Tools: pfsinppm, pfsoutppm, (pfsindcraw)
140	Alternative method of reading/writing LDR images. Note that this package is also required for pfsindcraw as ImageMagick cannot handle files read from unix pipes.
141
142TIFF
143	CMake switch: WITH_TIFF
144	Tools: pfsintiff, pfsouttiff
145	TIFF images can also be read with pfsinimgmagick. This is a custom reader/writer, which supports LogLuv TIFF HDR image format.
146
147QT 5
148	CMake switch: WITH_QT
149	Tools: pfsview
150	"pfsview" is a primary HDR image viewer.
151	If Qt library is not found, you need to specify the path to its cmake configuration files:
152
153		cmake -D "CMAKE_PREFIX_PATH=~/Qt5location/qt5/5.7/gcc_64/" ../
154
155OpenGL, GLUT (or FreeGLUT)
156	CMake switch: WITH_pfsglview
157	Tools: pfsglview
158	pfsglview is a "backup" or alternative viewer. It is missing some features of pfsview, but offers faster zooming.
159
160Matlab (mex)
161	CMake switch: WITH_MATLAB
162	Tools: all matlab scripts in src/matlab
163	Note that you need to set matlab path to <install_dir>/share/pfstools/matlab
164
165Octave
166	CMake switch: WITH_Octave
167	Tools: All Octave scripts in src/octave
168	There are still some unresolved issues running Octave scripts under cygwin.
169
170FFTW
171	CMake switch: WITH_FFTW
172	Tools: acceleration in pfstmo_durand02 (the TMO will be *very* slow otherwise)
173
174GSL
175	CMake switch: WITH_GSL
176	Tools: pfstmo_mantiuk08
177	The GSL math library is required for this TMO.
178
179OpenCV
180	CMake switch: WITH_OpenCV
181	Tools: pfsalign
182	Note that pfsalign requires SURF features, which are available on "nonfree" part of the library. Since part of the library is currently not included in most Linux distributions, so you will need to compile OpenCV from sources.
183
184dcraw
185	CMake switch: none
186	Tools: pfsindcraw
187	Download code from: http://www.cybercom.net/~dcoffin/dcraw/
188
1893. Documentation
190-------------------------------------------------------------------
191
192First check the list of frequently asked questions in
193./doc/faq.txt. Then browse relevant manual pages, which accompany each
194program. The documentation for the pfs library API can be generated
195with DoxyGen or found in the header files. If you want to include
196reading or writing of pfs streams in your applications, refer to
197./doc/pfs_format_spec.pdf.
198

README.Cygwin

1pfstools can be compiled under Windows from the cygwin
2environment. You can download cygwin from: http://www.cygwin.com/
3
4You may need to install X window client to use pfsview or
5pfsglview. Possibly a better alternative is to use a natively compiled
6version of pfsview:
7https://sourceforge.net/projects/pfstools/files/pfstools_visual_studio_incomplete/
8
9Check README file for the complete list of dependencies.
10
11OpenEXR library must be build from sources since no cygwin development
12package is available. Sources can be downloaded from
13http://www.openexr.com/. It is recommended to use cmake to compile
14OpenEXR.
15
16

README.OSX

1To compile pfstools from sources on OSX, you need:
21. XCode
32. Any of:
4   Homebrew - http://brew.sh/ (recommended)
5   Fink - http://www.finkproject.org/
6   MacPorts - https://www.macports.org/
7
8Refer to REAME file for the instruction on how to compile with cmake.
9
10The build was tested to work on maxOS Sierra 10.12.6 on 13 Nov 2017 with Homebrew. The following notes can help get all dependencies recognized:
11
12* Qt5: You need to add "-D CMAKE_PREFIX_PATH=/usr/local/opt/qt5" to cmake. The path should be pointing where the Qt5 is installed.
13
14
15===== Image Magick =====
16
17In case of problems with ImageMagick on Mountain Lion:
18
19brew install libtool --universal
20brew link libtool --force
21brew install imagemagick --with-magick-plus-plus
22
23

README.Ubuntu

1
2pfstools is in the first order supported on Ubuntu as this is the OS we use on everyday basis.
3
4The procedure below has been tested on Ubuntu 16.04 LTS
5
6To compile pfstools on Ubuntu follow the steps:
7
81. Execute:
9
10sudo apt-get install `cat ubuntu-packages-deps | tr '\n' ' '`
11
122. Install OpenCV with the "nonfree" modules
13
14sudo add-apt-repository --yes ppa:xqms/opencv-nonfree
15sudo apt-get update
16sudo apt-get install libopencv-dev libopencv-nonfree-dev
17
183. If you want to install pfstools with Matlab support, follow the steps in README.Matlab
19
204. From the pfstools directory, execute:
21
22mkdir build
23cd build
24cmake ../
25make
26sudo make install
27
28

README.VisualStudio

1pfstools can be compiled with Visual Studio using CMake build system. This file contains some troubleshooting hints.
2
3Refer to README for details on building pfstools using CMake.
4
5The compilation was tested with Visual Studio Express 2013.
6
7Note that this compilation procedure is an alternative to using cygwin (refer to README.Cygwin).
8
9=== QT ===
10Download and install Qt4 (not Qt5) for Visual Studio from: http://qt-project.org/downloads
11
12Then add entry to CMake variables:
13QT_QMAKE_EXECUTABLE:FILEPATH=E:\Qt\4.8.5\bin\qmake
14where E:\Qt\4.8.5\bin\qmake should be replaced with the path to qmake on your computer.
15
16You may need to compile in Release mode. Otherwise some DLLs might be missing.
17
18=== OpenEXR ===
19
20Compiling OpenEXR on Windows with Visual Studio is not a task for faint hearted. Be prepared to fix quite a few issues with the code.
21
22* If the compiler complains about missing "__builtin_trap()", add
23
24#define PLATFORM_WINDOWS 1
25
26to config/IlmBaseConfig.h
27
28see
29
30https://lists.nongnu.org/archive/html/openexr-devel/2013-12/msg00001.html
31
32* If the compiler complains about "std::max", add missing include in all offending files:
33
34#include <algorithm>
35
36Other useful web pages:
37
38http://buildopenexr.blogspot.co.uk/
39http://blog.gmane.org/gmane.comp.video.openexr.devel
40

README.matlab

1
2Matlab interface to pfstools can be found in src/matlab. It contains
3both .m and mex functions, which need to be compiled before can be
4used. Once pfstools is properly installed, you can browse help:
5
6doc pfstools_matlab
7or
8cd <dir_with_m_and_mex_files>
9doc ./Contents.m
10
11If you have problems running some functions, you can execute (from matlab):
12
13pfs_test_shell
14
15to diagnose for common problems.
16
17Follow the instructions below to install matlab interface to pfstools.
18
19Linux, OSX and cygwin
20=====================
21cmake will search for matlab's mex scripts in typical locations. If it cannot be found, you need to pass the matlab directory to cmake:
22	cmake -DMATLAB_ROOT=<path> ../
23
24Matlab's MEX compiler commonly uses different version of gcc than is installed on the system. If this is the case, you may see messages, such as:
25
26  Warning: You are using gcc version '5.4.0'. The version of gcc is not supported. The version currently supported with MEX is '4.7.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release.
27
28Sometimes those warning can be ignored, other times mex commands will fail with "Invalid MEX-file". In the latter case, you need to install the correct version of the compiler:
29
30sudo apt-get install g++-4.7
31
32and then specify it when invoking cmake, for example:
33
34cmake -DMEXGCC=/usr/bin/gcc-4.7 ../
35
36After successfully compiling the code, add the directory INSTALLDIR/share/pfstools/pfstools_matlab to matlab path
37  (File->Set Path).
38
39
40Windows installation
41====================
42
43Note that matlab support on Windows has not been tested in 2.0.0. The notes below refer to 1.9.x version.
44
45Under Windows you have to invoke NMAKE file manually. From ordinary DOS
46shell (not cygwin), cd to src/matlab, then execute:
47
48(path to your matlab instalation)/matlab/R2006b/bin/mex.bat -setup
49
50mex.bat will ask to choose a configuration. Choose the one compatible
51with your Visual Studio installation.
52
53then execute:
54
55NMAKE -f Makefile.win32
56
57We tested compilation on Win32 with VS C++ compiler. cygwin and
58pfstools must be installed. Then include this directory in matlab's
59path (File/SetPath in maltab IDE menu). You may need to modify
60pfs_shell() function that should return the command line for executing
61'bash' from DOS shell.
62
63Many matlab pfs_* functions need to execute shell functions, for
64example pfsin. To make sure that they can be executed from matlab, all
65environmental variables must be set. Currently this is done by the
66pfs_shell function, which extends command line so that pfs* commands
67are executed from bash (assuming that bash sets all necessary
68environmental variables in .bashrc). If bash is not your default
69shell, you may need to change this.
70
71
72If no good-luck, then below is a loosely written trouble shooting:
73
741. From matlab, execute 'pfs_test_shell'. The function will perform a few tests
75for the most common pfstools/matlab setup problems and will suggest the most likely
76solution.
77
782. You can select a compiler for mex files using "mex -setup"
79
80If you have more than one compiler, for instance you owe a Visual
81Studio, then try various compilers. Sometimes things work with VC 8.0,
82but not with VC 6.0, and sometimes the other way around.
83
843. If you want to compile with Visual Studio, use the "Visual Studio
85200X Command Prompt" DOS shell.
86
87Especially if "nmake" doesn't seem to be on your system.
88
894. All supplied Mex files do not depend on any library. So if you have
90a problem within Matlab which looks like "The specified module could
91not be found." it's not related to shared libraries. But it maybe
92related to incompatible Visual Studio libraries, see point 1.
93
945. If you got everything running and type "pfsview(my_image)" and nothing shows up:
95
96Check if X-Win32 or other X server is running, type "pfs_shell" in
97Matlab and check if path is correct (and possibly adjust the path in
98pfs_shell.m). Add a line to $HOME/.bash_login containing
99
100"export DISPLAY=127.0.0.1:0"
101
1026. Under Windows, if your Cygwin installation is not in c:\cygwin set Windows global variable:
103
104CYGWIN_HOME='c:\MyDirectory\cygwin'
105
106Of course, c:\MyDirectory should be replaced with a right path.
107
108
109Known problems:
110
111* Under Windows shell window flashes each time pfsput / pfsget command
112  is executed
113
114* pfs channel tags are not written to pfs-streams. No channel
115  specific tags are written properly.
116
117* Some file handles may not be closed properly.
118