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       --fix-saturated, -x
106
107              Use  this  option if you see black pixels in overexposed / satu‐
108              rated areas. The black pixels are visible if all exposures  con‐
109              tain pixel values that are outside reliable range (are under- or
110              over-exposed). This flag gives non-zero weight for the brightest
111              and the darkest pixels, thus avoiding zero-weighted pixels. Note
112              that the calculated luminance values for these  pixels  are  not
113              reliable.
114
115
116       --luminance, -Y
117
118              Recovery of response curve will be performed for luminance chan‐
119              nel only.
120
121
122       --verbose
123
124              Print additional information during program execution.
125
126       --help
127
128              Print list of command line options.
129
130

EXAMPLES

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

SEE ALSO

176       pfsplotresponse(1)  pfsinhdrgen(1)  jpeg2hdrgen(1)  pfsview(1)  pfsind‐
177       craw(1) pfsabsolute(1) pfsglview(1)
178

BUGS

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