1pfshdrcalibrate(1)          General Commands Manual         pfshdrcalibrate(1)
2
3
4

NAME

6       pfshdrcalibrate  -  Create  an  HDR image or calibrate a response curve
7       from a set of differently exposed images supplied in PFS stream.
8
9

SYNOPSIS

11       pfshdrcalibrate [--response  <type>]  [--calibration  <type>]  [--gauss
12       <val>]  [--response-file  <filename.m>]  [--save-response <filename.m>]
13       [--multiplier <val>]  [--bpp  <val>]  [--luminance]  [--samples  <val>]
14       [--help] [--verbose]
15
16

DESCRIPTION

18       Create an HDR image or calibrate a response curve from a set of differ‐
19       ently exposed images supplied in PFS stream.
20
21       When used with 8bit images, luminance in the output  HDR  image  corre‐
22       sponds  to  real  world  values in [cd/m^2] provided that hdrgen script
23       contained correct information on exposure time, aperture and iso speed.
24       Note  that  sometimes ISO speed indicated by camera does not correspond
25       to standard (ISO-100 is in fact ISO-125).
26
27       The accuracy of absolute calibration has  not  been  thoroughly  tested
28       with  different camera models, however one can expect the relative mea‐
29       surement error below 8%. Use pfsabsolute in case of systematic error.
30
31

OPTIONS

33       --response <type>, -r <type>
34
35              Allows one to choose from predefined response curves.  This  can
36              be  used  either to apply this response or use it as an initial‐
37              ization  for  automatic  self-calibration.  Predefined  response
38              curves  are: "linear", "gamma", "log". Default is "linear". This
39              option can be used only with Robertson method.
40
41
42       --calibration <type>, -c <type>
43
44              Type of automatic self-calibration method used for  recovery  of
45              the  response  curve and/or type of method used for HDR merging.
46              Accepted types include: "robertson", "mitsunaga". "robertson" is
47              the  default and recommended algorithm (see commends in the Bugs
48              section below). More infomation on the algorithms can  be  found
49              in:
50
51              M.A. Robertson,  S. Borman and R.L. Stevenson
52              Dynamic range improvement through multiple exposures
53              In:  Proc.  of International Conference on Image Processing 1999
54              (ICIP 99), pp 159-163 vol.3
55
56              and
57
58              T. Mitsunaga and S. K. Nayar
59              Radiometric Self Calibration
60              In: Proc on IEEE Conf. on Computer Vision and  Pattern  Recogni‐
61              tion (CVPR'99). Volume 1, p. 1374
62
63       --gauss <val>, -g <val>
64
65              Sigma  value  for  the Gaussian used as a weighting function (in
66              the range 0-1). Applies to Robertson02 algorithm. Default value:
67              0.2
68
69
70       --response-file <filename.m>, -f <filename.m>
71
72              Use  response  curve  saved in the matlab format file. Turns off
73              automatic  self-calibration.  Uses  Robertson02  or  Mitsunaga99
74              model to apply the response curve (see -c option).
75
76
77       --save-response <filename.m>, -s <filename.m>
78
79              Saves  the response curve calculated during automatic self-cali‐
80              bration stage in a matlab format file. Can be later  reused  for
81              set  of  images  captured with given camera. Also works fine for
82              plotting with gnuplot.
83
84
85       --multiplier <val>, -m <val>
86
87              Input multiplier value. Can be used to manipulate the  range  of
88              source  exposures.  Default  value  for  Robertson method is 256
89              since LDR images are by default scaled to 0..1.  This  value  is
90              set to 1.0 for Mitsunaga method.
91
92
93       --bpp <val>, -b <val>
94
95              Number  of bits per pixel in input data from the camera. Default
96              value is 8.
97
98
99       --samples <val>, -p <val>
100
101              Number of samples used during the self-calibration in  Mitsunaga
102              algorithm. Default is 50000.
103
104
105       --deghosting, -d
106
107              EXPERIMENTAL.  Try to use a simple rejection criterion to reduce
108              ghosting artifacts due to movement in dynamic  scenes.  This  is
109              currently not well implemented to the results can be disappoint‐
110              ing.
111
112
113       --luminance, -Y
114
115              Recovery of response curve will be performed for luminance chan‐
116              nel only.
117
118
119       --verbose
120
121              Print additional information during program execution.
122
123       --help
124
125              Print list of command line options.
126
127

EXAMPLES

129       pfsinme *.JPG | pfshdrcalibrate -v -s response.m | pfsview
130
131              Recover  the  response  curve  from set of all JPEG files in the
132              current directory and save it to response.m file.  To  view  the
133              response curve, use pfsplotresponse command.
134
135       pfsinme  *.CR2  |  pfssize   --maxx 1200 | pfshdrcalibrate -r linear -v
136       --bpp 16 | pfsout result.exr
137
138              Read Camera RAW images (from Canon), resize  them  so  that  the
139              image width is equal or less 1200 pixels, merge them into an HDR
140              image using all 16 bits and save as an Open EXR image.
141
142       pfsinhdrgen sample.hdrgen | pfshdrcalibrate -x -f response.m | pfsview
143
144              Create an HDR image  from  exposures  defined  in  sample.hdrgen
145              using the response curve "response.m" and view it. Fix the prob‐
146              lem with black values given to overexposed pixels.
147
148       pfsinhdrgen sample.hdrgen | pfshdrcalibrate | pfsview
149
150              Create an HDR image  from  exposures  defined  in  sample.hdrgen
151              using the default self-calibration method and view it.
152
153       pfsinhdrgen  sample_dcraw.hdrgen  |  pfshdrcalibrate -b 16 -r linear -c
154       none | pfsview
155
156              Given that the script sample_dcraw.hdrgen refers to  camera  RAW
157              files  (see pfsindcraw), this example will generate an HDR image
158              assuming a linear response.
159
160       pfsinhdrgen sample.hdrgen | pfshdrcalibrate | pfsview
161
162              Create an HDR image  from  exposures  defined  in  sample.hdrgen
163              using the default self-calibration method and view it.
164
165       pfsinhdrgen  sample.hdrgen  |  pfshdrcalibrate  -c  mitsunaga  -samples
166       100000 -s resp_mitsunaga.m >/dev/null
167
168              Create an HDR image  from  exposures  defined  in  sample.hdrgen
169              using  the mitsunaga self-calibration method with 100000 samples
170              and save it to "resp_mitsunaga.m".
171

SEE ALSO

173       pfsplotresponse(1)  pfsinhdrgen(1)  jpeg2hdrgen(1)  pfsview(1)  pfsind‐
174       craw(1) pfsabsolute(1) pfsglview(1)
175

BUGS

177       Currently Mitsunaga and Nayar's method does not produce reliable camera
178       response curves. Robertson's method should be used instead.
179
180       Robertson's method may banding or wrong colors in  strongly  over-satu‐
181       rated  and  under-saturated  areas. For best results, there should be a
182       sufficient numbers of exposures in which no pixels is over-  or  under-
183       saturated in all the exposures. It is possible to fix these issues with
184       some heuristics (as most HDR merging software does),  but  it  is  cur‐
185       rently  not  done  in this release. pfscalibration was meant to be used
186       for research purposes and getting accurate  result  is  more  important
187       than generating good looking images. The heuristics could hide the well
188       visible artifacts, but would also introduce error to the measurements.
189
190       For any other issues please report bugs and comments on  implementation
191       to the discussion group http://groups.google.com/group/pfstools
192
193
194
195
196                                                            pfshdrcalibrate(1)
Impressum