added 'Substitute all FNAME occurrences' option
[gpivtools.git] / man / gpiv_rr.1
blob22a7870f669d9ca2ed650f3eeed67d0b27975b9a
1 .TH GPIV_RR 1 "3 November 2006"
2 .SH NAME
3 gpiv_rr \- interrogates an image (pair) in order to obtain displacements of particles 
4 for (Digital) Particle Image Velocimetry (PIV)
5 .SH SYNOPSIS
7 \fBgpiv_rr\fP 
8 [\fB--cf \fIint\fR] 
9 [\fB--cl \fIint\fR] 
10 [\fB--cp \fIint\fR] 
11 [\fB-g\fR] 
12 [\fB--gauss\fR] 
13 [\fB-h\fR | \fB--help\fR]
14 [\fB--ifit \fI0/1/2/3\fR] 
15 [\fB--ischeme \fIint\fR] 
16 [\fB--ia_size_i \fIint\fR] 
17 [\fB--ia_size_f \fIint\fR] 
18 [\fB--ia_shift \fIint\fR]
19 [\fB--linec \fIint\fR \fIint\fR \fIint\fR] 
20 [\fB--liner \fIint\fR \fIint\fR \fIint\fR] 
21 [\fB-o\fR]
22 [\fB-p\fR | \fB--print\fR] 
23 [\fB--peak \fIint\fR]
24 [\fB--p_piv\fR] \
25 [\fB--point \fIint int\fR] 
26 [\fB--rf \fIint\fR]
27 [\fB--rl \fIint\fR] 
28 [\fB--rp \fIint\fR] 
29 [\fB-s \fIfloat\fR] 
30 [\fB--spof\fR]
31 [\fB-v\fR | \fB--version\fR] 
32 [\fB--val_r \fIint\fR] 
33 [\fB--val_s \fIint\fR] 
34 [\fB--val_t \fIfloat\fR] 
35 [\fIfilename\fR] 
36 < \fIstdin\fR > \fIstdout\fR
38 .SH DESCRIPTION
40 \fBgpiv_rr\fR inte\fIrr\fRogates an image or image pair that is
41 obtained from a fluid flow by the so-called Digital Particle Image
42 Velocimetry (DPIV) technique. Therefore, image(s) are sub-divided into
43 interrogation areas on a rectangular grid.  At each interrogation area
44 the mean (or most probable) particle displacement is estimated. This
45 is done by correlating the belonging interrogation areas of an
46 image-pair by means of the Fast Fourier Transformation (FFT)
47 technique, resulting into a two-dimensional correlation function. The
48 location of the highest function peak, then, represents the mean or
49 most probable displacement of the particle images that have been
50 resident within the interrogation areas. Estimation of the correlation
51 peak at sub-pixel level may be calculated by different interpolation
52 schemes. The program allows cross-correlation of single-exposed images
53 on different frames or auto-correlation of a multi-exposed
54 single-frame image. Interrogation areas of arbitrary sizes may be used
55 in order to obtain an optimum spatial resolution. Adaptive sizes of
56 interrogation areas allow for large dynamic ranges of the particle
57 displacements. Zero offsetting of the interrogation areas by an
58 iterative interrogation process results into higher accuracy/lower
59 biases of the particle image displacements. A central differential
60 interrogation scheme than might be applied. This may result into
61 improved estimators, compared with the 'classical' forward
62 interrogation scheme, especially in case of strong shear strain and
63 vorticity of the flow. Most accurate results, however, are obtained by
64 deforming the images towards each other by using the PIV
65 estimators. As a convergence criterium for these iterative procedures,
66 the cumulative difference (defined by GPIV_CUM_RESIDU_MIN = 0.25)
67 between the PIV estimators from the current and the previous iteration
68 is used. After each interrogation the PIV estimators are validated. Before
69 outliers are substituted as defined by the \fBVALID\fR parameters, it
70 will be tried if the PIV estimator from the second or third highest
71 correlation peak will be valid.
73 \fBgpiv_rr\fR is fed with images of the following formats: Portable
74 Network Graphics (\fIfilename\fB.png\fR), raw binary data
75 (\fIfilename\fB.r\fR) that is accompanied by an ASCII header file
76 (\fIfilename\fB.h\fR), HDF5 (\fIfilename\fB.hdf\fR), \fBtif\fR,
77 \fBgif\fR, \fBpgm\fR, \fBbmp \fRand LaVision's (tm) uncompressed image
78 format (\fIfilename\fB.img\fR). For cross-correlation the second image
79 frame has to be concatenated after the first one into a single image
80 file. This might be performed by \fBgpiv_combing\fR. Image parameters
81 are read from the header or from other parameter resources (containing
82 the key \fBIMG\fR) in case they are absent in the image header.
84 The configuration parameters (containing the \fBEVAL\fR or
85 \fBVALID\fR) key may be overruled by the command line options, as
86 explained below.
89 .SH Options 
91 .TP 
92 \fB--cf \fIN\fR 
93 Specify the first column \fIN\fR in the image to interrogate. If --ad_int 
94 has been used, the first column has to be equal or larger than 
95 (int_size_2  - int_size_1)/2.
97 .TP 
98 \fB--cl \fIN\fR
99 Specify the last column \fIN\fR in the image to interrogate.  
102 \fB--cp \fIN\fR
103 Pre-shift of \fIN\fR columns. This can be used if
104 there is a common mean flow in x-direction in the area of
105 observation. Relative small interrogation areas (allowing a high spatial
106 resolution) may be used in that case with conservation of a high
107 probability in finding the correct displacement peaks.
109 .TP 
110 \fB-g\fR 
111 Graphic visualisation of the output with gnuplot. Can only be used in 
112 combination with \fIfilename\fR).
114 .TP 
115 \fB--gauss\fR
116 Gauss weighting of interrogation area to reduce high spatial frequency
117 signal generated by the boundaries.
120 \fB-h\fR | \fB--help\fR 
121 Print a help message on standard output and exit successfully.
123 .TP 
124 \fB--ifit \fI0/1/2/3\fR
125 Three-point interpolation model for peak maximum estimation at sub-pixel
126 level. \fI0\fR: none, \fI1\fR: Gauss, \fI2\fR: Parabolic or \fI3\fR Center of
127 Gravity.
130 \fB--ischeme \fI0/1/2/3/4\fR
131 Interrogation scheme: no correction (0), 
133 linear kernel weighting (1);
134 This is applied to the calculation of the correlation function; the
135 weighting of the image data decreases towards the edges of the
136 interrogation region. Kernel weighting compensates this effect. Will
137 be disabled if interrogation area size of image 2 differs from image
140 zero offset (2);
141 Searches (iteratively) the correlation peak by zero offsetting the
142 interrogation area's, until the peak maximum lies between (-1,-1) and
143 (1,1). The images are interrogated by the 'classic' forward
144 differential scheme.  During the last iteration step, sub-pixel
145 displacement will be calculated as defined with \fB-ifit\fR.
147 Zero offset with central differential (3);
148 The images are interrogated by the central differential
149 scheme. This is done by displacing the interrogation area of the first
150 image with half the (integer) magnitude of the pre-shift value in negative
151 direction and displacing the interrogation area of the second image in
152 positive direction (of identic magnitude).
154 Image deformation (4); The images of a pair are deformed following the
155 particle displacements obtained from the initial PIV estimators or
156 from the previous iteration step. The first image is deformed in
157 positive direction with half the (float) magnitudes of the estimators
158 and the second image in negative direction. In this way, both deformed
159 images will show the particle positions at the moment in-between the
160 recordings. After the iteration has been converged and -p option has
161 been used, the deformed images are stored (defined by
162 GPIV_DEFORMED_IMG_NAME = gpiv_defimg) in TMPDIR (/tmp for UNIX-like
163 systems), which may be used as a check.
166 \fB--ia_size_i \fIN\fR 
167 Initial size of the interrogation area's \fIN\fR. \fIN\fR must be
168 equal or larger than \fBia_size_f\fR. 
170 The sizes must be choosen in such a way that the particle
171 displacements remain within 1/4th of the interrogation area's in order
172 to keep the in-plane errors at minimum.
174 Choosing larger sizes of the initial interrogation area's allows high
175 dynamic ranges of the estimators. In that case, the largest particle
176 displacements may contribute adequately to the calculation of the
177 estimators, while the estimators of the smallest flow scales are not
178 smoothed by the large, initial, dimensions of the interrogation
179 area's. The dimensions of the interrogation area's of the first and
180 second image start with \fBia_size_i\fR. For each next image
181 interrogation, the sizes will be halved until they will be equal to
182 the final \fBia_size_f\fR value. The estimator will be used as a local
183 pre-shift (zero offsetting, as defined by \fB--ischeme\fR). In case
184 \fBia_size_f\fR and/or \fBia_size_i\fR is not a power of two, the
185 sizes of the interrogation area's will be reduced with the appropriate
186 factor during the last (iterative) interrogation in order to set them
187 equal to \fBia_size_f\fR. During the last interrogation, the estimator
188 will be between (-1,-1) and (1,1).  Then, sub-pixel displacement will
189 be calculated as defined by \fB--ifit\fR.
192 \fB--ia_size_f \fIN\fR
193 Final size of the interrogation area's \fIN\fR, expressed in
194 pixels. May be chosen arbitrarily.
197 \fB--ia_shift \fIN\fR
198 Shift of adjacent interrogation areas \fIN\fR, expressed in pixels.
201 \fB--linec \fICOL RF RL\fR 
202 selects a vertical line at column \fICOL\fR to interrogate from the first
203 row \fIRF\fR to the last row \fIRL\fR
206 \fB--liner \fIROW CF CL\fR 
207 selects an horizontal line at row \fIROW\fR to interrogate from the first
208 column \fICF\fR to the last column \fICL\fR
211 \fB-p\fR | \fB--print\fR
212 Print parameters, command line options, progress of calculation and 
213 eventually used input and output filenames to stdout. The output is 
214 identic of \fIfilename\fB.par\fR, in case \fB-f\fR is used.
217 \fB--peak \fIN\fR
218 Find the \fIN\fR-th maximum of the correlation peak. In case of
219 auto-correlation, the second peak is taken by default, as the first peak
220 denotes the zero-shift of the particle displacements.
223 \fB--p_piv\fR
224 Print the piv results to stdout, even if \fB-f\fR has been specified.
227 \fB--point \fICOL ROW\fR
228 Select a single area in the image to interrogate at location \fICOL
229 ROW\fR. This option might be useful for substitution of erroneous
230 displacement vectors. A new estimation of the particle displacement
231 with \fR--peak\fR, then, may give a correct result. Mind to use \fB--p_piv\fR
232 if \fB-f\fR is used; else the original data file will be overwritten
233 with a single point analyses.
236 \fB--rf  \fIN\fR
237 Specify the first row \fIN\fR in the image to interrogate. If \fB-ad_int\fR has been used, the first row has to be equal or larger than 
238 (\fBint_size_2\fR - \fBint_size_1\fR)/2.
241 \fB--rl \fIN\fR
242 Specify the last row \fIN\fR in the image to interrogate.
245 \fB--rp \fIN\fR
246 Pre-shift of \fIN\fR rows. This can be used if there is a common mean
247 flow in y-direction. Relative small interrogation areas (allowing a
248 high spatial resolution) may be used in that case with conservation of
249 a high probability in finding the correct displacement peaks.
252 \fB-s \fIS\fR
253 Scale factor for graphical output with gnuplot. This will only affect
254 the length of the vectors that represent the particle image
255 displacement magnitude, but not the PIV data itself. In order to adapt
256 the scaling of the data, see gpiv_scale.
259 \fB--spof\fR
260 Applies symmetric phase only filtering. This option may drasticly
261 improve the SNR with higher and thinner covariance peak. Especially
262 usefull when there is flare or high reflections (from boundaries, for
263 example) in one of the two image frames from a PIV image
264 pair. (Werner, Meas. Sci. Technol., 16, 601-618).
267 \fB-v\fR | \fB--version\fR
268 Print version information on standard output then exit successfully.
271 \fB--val_r \fIN\fR
272 Validation parameter to define residue type: Signal to Noise Ratio
273 (\fIN\fR = 0), median value from surroundings (\fIN\fR = 1) or
274 normalised median (\fIN\fR = 2).
277 \fB--val_s \fIN\fR
278 Validation parameter to substitute an erroneous vector by: nothing
279 (\fIN\fR = 0), local mean from the surroundings (\fIN\fR = 1), the
280 median of the surroundings (\fIN\fR = 2) or the estimation from the
281 next highest correlation peak (\fIN\fR = 3).
284 \fB--val_t \fIF\fR
285 Validation parameter representing the threshold value (float number)
286 of residues to be accepted.
289 \fIfilename\fR 
290 Using the full \fIfilename\fR of the input image overrides \fIstdin\fR
291 and \fIstdout\fR. Output will be written to
292 \fIfilename\fB.piv\fR. Parameters are stored in \fIfilename\fB.par\fR
293 and may be used for future use by including them in \fI./gpivrc\fR.
294 If \fIstdin\fR and \fIstdout\fR are used, the input is expected to be
295 a PNG formatted image.
299 .SH SEE ALSO
300 gpivtools
302 .SH NOTES
304 \fBgpiv_rr\fR has been tested with artificial images and with PIV images
305 from gas and liquid flows. Comparison with PIV data, obtained from
306 different algorithms, and with literature results that similar data
307 reliability and accuracy may be obtained with this program.
309 .SH AUTHOR
310 Gerber Van der Graaf
312 .SH BUGS
313 The program seems to work fine. Though as the PIV technology itself is
314 subject of research, this program is constantly under development.