ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/pinterp.1
Revision: 1.8
Committed: Thu Nov 7 23:20:28 2019 UTC (5 years, 6 months ago) by greg
Branch: MAIN
CVS Tags: rad5R4, rad5R3, HEAD
Changes since 1.7: +7 -2 lines
Log Message:
Added ability for pinterp, pmblur2, and vwrays to read 16-bit encoded depth

File Contents

# User Rev Content
1 greg 1.8 .\" RCSid "$Id: pinterp.1,v 1.7 2009/02/21 00:06:05 greg Exp $"
2 greg 1.1 .TH PINTERP 1 1/24/96 RADIANCE
3     .SH NAME
4     pinterp - interpolate/extrapolate view from pictures
5     .SH SYNOPSIS
6     .B pinterp
7     [
8     view options
9     ][
10     .B "\-t threshold"
11     ][
12     .B "\-z zout"
13     ][
14     .B \-f
15     .I type
16     ][
17     .B \-B
18     ][
19     .B \-a|q
20     ][
21     .B "\-e exposure"
22     ][
23     .B \-n
24     ]
25     .B "pictfile zspec .."
26     .SH DESCRIPTION
27     .I Pinterp
28     interpolates or extrapolates a new view from
29     one or more RADIANCE pictures and
30     sends the result to the standard output.
31     The input picture files must contain correct view specifications, as
32     maintained by
33     .I rpict(1),
34 greg 1.3 .I rvu(1),
35 greg 1.1 .I pfilt(1)
36     and
37     .I pinterp.
38     Specifically,
39     .I pinterp
40     will not work on pictures processed by
41     .I pcompos(1)
42     or
43     .I pcomb(1).
44     Each input file must be accompanied by a z specification, which
45     gives the distance to each pixel in the image.
46     If
47     .I zspec
48     is an existing file, it is assumed to contain a short floating point
49     number for each pixel, written in scanline order.
50     This file is usually generated by the
51     .I \-z
52     option of
53     .I rpict(1).
54 greg 1.8 .I Pinterp
55     also accepts an encoded depth buffer, as produced by
56     .I rtpict(1)
57     or
58     .I rcode_depth(1).
59 greg 1.1 If
60     .I zspec
61     is a positive number rather than a file, it will be used as a
62     constant value for the corresponding image.
63     This may be useful for certain transformations on "flat" images or
64     when the viewpoint remains constant.
65     .PP
66     The
67     .I \-n
68     option specifies that input and output
69     z distances are along the view direction,
70     rather than absolute distances to intersection points.
71     This option is usually appropriate with a constant z
72     specification, and should not be used with
73     .I rpict(1)
74     z files.
75     .PP
76     The
77     .I \-z
78     option writes out interpolated z values to the specified file.
79     Normally, this information is thrown away.
80     .PP
81     .I Pinterp
82     rearranges the pixels from the input pictures to produce a
83     reasonable estimate of the desired view.
84     Pixels that map within the
85     .I \-t
86     threshold of each other (.02 times the z distance
87     by default) are considered coincident.
88     With the
89     .I \-a
90     option, image points that coincide will be averaged together, giving
91     a smooth result.
92     The
93     .I \-q
94     option turns averaging off, which means that the first mapped pixel
95     for a given point will be used.
96     This makes the program run faster and
97     take less memory, but at the expense of image quality.
98     By default, two or more pictures are averaged together, and a single
99     picture is treated with the faster algorithm.
100     This may be undesirable when a quick result is desired from multiple
101     input pictures in the first case, or a single picture is being
102     reduced in size (anti-aliased) in the second case.
103     .PP
104     Portions which were hidden or missing in the input pictures must be
105     "filled in" somehow, and a number of methods are provided by the
106     .I \-f
107     option.
108     The default value for this option is
109     .I \-fa,
110     which results in both foreground and background filling.
111     The foreground fill algorithm spreads each input pixel to cover all
112     output pixels within a parallelogram corresponding to that pixel's
113     projection in the new view.
114     Without it, each input pixel contributes to at most one output
115     pixel.
116     The background algorithm fills in those areas in the final picture
117     that have not been filled with foreground pixels.
118     It does this by looking at the boundary surrounding each blank area
119     and picking the
120     farthest pixels to each side, assuming that this will make a suitable
121     background.
122     The
123     .I \-ff
124     option tells the program to use only the foreground fill, the
125     .I \-fb
126     option says use only background fill, and the
127     .I \-f0
128     option says not to use either fill algorithm.
129     .PP
130     Even when both fill algorithms are used, there may still be some unfilled
131     pixels.
132     By default, these pixels are painted black and assigned a z distance
133     of zero.
134     The
135     .I \-fc
136     option can be used to change the color used for unfilled pixels, and
137     the
138     .I \-fz
139     option can be used to set the z distance (always along the view direction).
140     Alternatively, the
141     .I \-fr
142     option can be used to compute these pixels using
143     .I rtrace(1).
144     The argument to this option is a quoted string containing arguments
145     for
146     .I rtrace.
147     It must contain the octree used to generate the input
148     pictures, along with any other options necessary to match the
149     calculation used for the input pictures.
150     The
151     .I \-fs
152     option can be used to place a limit on the distance (in pixels) over which
153     the background fill algorithm is used.
154     The default value for this option is 0, which is interpreted as no limit.
155     A value of 1 is equivalent to turning background fill off.
156     When combined with the
157     .I \-fr
158     option, this is roughly equivalent to the
159     .I \-ps
160     option of
161     .I rpict(1).
162     .PP
163     In order of increasing quality and cost, one can use the
164     .I \-fa
165     option alone, or the
166     .I \-fr
167     option paired with
168     .I \-fs
169     or
170     .I \-ff
171     or
172     .I \-f0.
173     The last combination will result in the recalculation of all pixels
174     not adequately accounted for in the input pictures, with an
175     associated computational expense.
176     It is rare that the
177     .I \-fs
178     option results in appreciable image degradation, so it is usually
179     the second combination that is used when the background fill
180     algorithm results in objectionable artifacts.
181     .PP
182     The
183     .I \-B
184     option may be used to average multiple views read from the standard
185     input into a single, blurred output picture.
186     This is similar to running
187     .I pinterp
188     multiple times and averaging the output together with a program like
189     .I pcomb(1).
190     This option is useful for simulating motion blur and depth of field.
191 greg 1.4 (See
192     .I pmdblur(1).)\0
193 greg 1.1 The input views are reported in the information header of the output
194     file, along with the averaged view.
195     The picture dimensions computed from the first view will be the
196     ones used, regardless whether or not the subsequent views agree.
197     (The reported pixel aspect ratio in the output is determined from
198     these original dimensions and the averaged view.)\0
199     Note that the expense of the
200     .I \-fr
201     option is proportional to the number of views computed, and the
202     .I \-z
203     output file will be the z-buffer of the last view interpolated
204     rather than an averaged distance map.
205     .PP
206     In general,
207     .I pinterp
208     performs well when the output view is flanked by two nearby input
209     views, such as might occur in a walk-through animation sequence.
210     The algorithms start to break down when there is a large difference
211     between the view desired and the view(s) provided.
212     Specifically, obscured objects may appear to have holes in them and
213     large areas at the image borders may not be filled by the
214     foreground or background algorithms.
215     Also, specular reflections and highlights will not be interpolated
216     very well, since their view-dependent appearance will be
217     incompletely compensated for by the program.
218     (The
219     .I \-a
220     option offers some benefit in this area.)\0
221     .PP
222     The
223     .I \-e
224     option may be used to adjust the output image exposure, with the
225     same specification given as for
226     .I pfilt.
227     The actual adjustment will be rounded to the nearest integer f-stop
228     if the
229     .I \-q
230     option is in effect (or there is only a single input picture).
231     .SH EXAMPLE
232     To interpolate two frames of a walk-through animation, anti-alias to
233     512x400 and increase the exposure by 2.5 f-stops:
234     .IP "" .2i
235 greg 1.6 pinterp \-vf 27.vf \-a \-x 512 \-y 400 \-e +2.5 30.hdr 30.z 20.hdr 20.z > 27.hdr
236 greg 1.1 .PP
237     To extrapolate a second eyepoint for a stereo pair and recalculate
238     background regions:
239     .IP "" .2i
240 greg 1.6 pinterp \-vf right.vf \-ff \-fr "\-av .1 .1 .1 scene.oct" left.hdr left.z > right.hdr
241 greg 1.7 .PP
242     To convert an angular fisheye to a hemispherical fisheye:
243     .IP "" .2i
244     pinterp \-vf fish.hdr \-vth -ff fish.hdr 1 > hemi.hdr
245 greg 1.1 .SH AUTHOR
246     Greg Ward
247     .SH "SEE ALSO"
248 greg 1.4 getinfo(1), pdfblur(1), pfilt(1), pmblur(1), pmdblur(1), rpict(1),
249 greg 1.8 ranimate(1), rcode_depth(1), rtpict(1), rtrace(1), rvu(1)