Main Page | Files | Data Structures | Functions | Global Variables |
gpiv-piv.h
Go to the documentation of this file.
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
2 
3 /*-----------------------------------------------------------------------------
4 
5  libgpiv - library for Particle Image Velocimetry
6 
7  Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Gerber van der Graaf
8 
9  This file is part of libgpiv.
10 
11  Libgpiv is free software; you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 2, or (at your option)
14  any later version.
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, write to the Free Software Foundation,
23  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 
25 -------------------------------------------------------------------------------
26 LIBRARY: libgpiv
27 
28 SOURCE: piv.c
29 
30 EXTERNAL FUNCTIONS:
31  gpiv_piv_count_pivdata_fromimage
32  gpiv_piv_select_int_point
33  gpiv_piv_interrogate_img
34  gpiv_piv_interrogate_ia
35  gpiv_piv_isizadapt
36  gpiv_piv_write_deformed_image
37  gpiv_piv_weight_kernel_lin
38  gpiv_fread_fftw_wisdom
39  gpiv_fwrite_fftw_wisdom
40 
41 
42 ------------------------------------------------------------------------------*/
43 
55 #ifndef __LIBGPIV_PIV_H__
56 #define __LIBGPIV_PIVL_H__
57 
58 
59 #include <gpiv/gpiv-piv_par.h>
60 #include <gpiv/gpiv-valid_par.h>
61 
62 
63 
64 #define GPIV_ZEROPAD_FACT 2
65 #define GPIV_DIFF_ISI 0
68 #define GPIV_CUM_RESIDU_MIN 0.25
69 #define GPIV_MAX_PIV_SWEEP 10
71 #define GPIV_SNR_DISABLE 88.0
72 #define GPIV_DEFORMED_IMG_NAME "gpiv_defimg"
73 #define GPIV_LOGFILE "gpiv.log"
76 #define CMPR_FACT 2
78 #define GPIV_SHIFT_FACTOR 3
86 enum GpivIFit {
87  GPIV_NONE = 0,
88  GPIV_GAUSS = 1,
89  GPIV_POWER = 2,
90  GPIV_GRAVITY = 3
91 };
92 
93 
94 
98 enum GpivIntGeo {
99  GPIV_AOI = 0,
100  GPIV_LINE_C = 1,
101  GPIV_LINE_R = 2,
102  GPIV_POINT = 3
103 };
107 typedef struct __GpivCovariance GpivCov;
114 struct __GpivCovariance {
115  float **z;
116  float min;
117  float max;
119  long top_x;
120  long top_y;
121  float subtop_x;
122  float subtop_y;
123  float snr;
126  int z_rnl;
127  int z_rnh;
128  int z_rpl;
129  int z_rph;
131  int z_cnl;
132  int z_cnh;
133  int z_cpl;
134  int z_cph;
136  int z_rl;
137  int z_rh;
138  int z_cl;
139  int z_ch;
140 };
144 /*-----------------------------------------------------------------------------
145  * Function prototypes
146  */
147 
148 
149 
160 gchar *
162  const GpivPivPar *piv_par,
163  guint *nx,
164  guint *ny
165  );
166 
167 
178 GpivPivData *
179 gpiv_piv_interrogate_img (const GpivImage *image,
180  const GpivPivPar *piv_par,
181  const GpivValidPar *valid_par,
182  const gboolean verbose
183  );
184 
185 
202 gchar *
203 gpiv_piv_interrogate_ia (const guint index_y,
204  const guint index_x,
205  const GpivImage *image,
206  const GpivPivPar *piv_par,
207  const guint sweep,
208  const guint last_sweep,
209  gfloat **int_area_1,
210  gfloat **int_area_2,
211  GpivCov *cov,
212  GpivPivData *piv_data
213  );
214 
215 
216 
229 void
230 gpiv_piv_isizadapt (const GpivPivPar *piv_par_src,
231  GpivPivPar *piv_par_dest,
232  gboolean *isiz_last
233  );
234 
235 
236 
244 gchar *
246  );
247 
248 
249 
250 
257 void
258 gpiv_fread_fftw_wisdom (const gint dir
259  );
260 
261 
262 
270 void
271 gpiv_fwrite_fftw_wisdom (const gint dir
272  );
273 
274 
284 gchar *
285 gpiv_piv_dxdy_at_new_grid (const GpivPivData *piv_data_src,
286  GpivPivData *piv_data_dest
287  );
288 
289 
290 
301 gchar *
303  );
304 
305 
306 
316 GpivPivData *
317 gpiv_piv_gridgen (const guint nx,
318  const guint ny,
319  const GpivImagePar *image_par,
320  const GpivPivPar *piv_par
321  );
322 
323 
324 
341 GpivPivData *
342 gpiv_piv_gridadapt (const GpivImagePar *image_par,
343  const GpivPivPar *piv_par_src,
344  GpivPivPar *piv_par_dest,
345  const GpivPivData *piv_data,
346  const guint sweep,
347  gboolean *grid_last
348  );
349 
350 
351 #endif /* __LIBGPIV_PIV_H__ */
void gpiv_fwrite_fftw_wisdom(const gint dir)
Writes fftw wisdoms to a file.
No fitting.
Definition: gpiv-piv.h:92
int z_rh
general highest row index
Definition: gpiv-piv.h:142
gchar * gpiv_piv_count_pivdata_fromimage(const GpivImagePar *image_par, const GpivPivPar *piv_par, guint *nx, guint *ny)
Calculates the number of interrogation areas from the image sizes, pre-shift and area of interest...
Piv validation parameters.
GpivPivData * gpiv_piv_gridadapt(const GpivImagePar *image_par, const GpivPivPar *piv_par_src, GpivPivPar *piv_par_dest, const GpivPivData *piv_data, const guint sweep, gboolean *grid_last)
Adjust grid nodes if zero_off or adaptive interrogation area has been used.
int z_rpl
lowest positive row index
Definition: gpiv-piv.h:133
gchar * gpiv_piv_interrogate_ia(const guint index_y, const guint index_x, const GpivImage *image, const GpivPivPar *piv_par, const guint sweep, const guint last_sweep, gfloat **int_area_1, gfloat **int_area_2, GpivCov *cov, GpivPivData *piv_data)
Interrogates a single Interrogation Area.
int z_ch
general highest column index
Definition: gpiv-piv.h:144
Area of interst.
Definition: gpiv-piv.h:104
Piv image header and data.
Definition: gpiv-img.h:194
long top_y
y-position of maximum at pixel level
Definition: gpiv-piv.h:125
gchar * gpiv_piv_dxdy_at_new_grid(const GpivPivData *piv_data_src, GpivPivData *piv_data_dest)
Calculates dx, dy of piv_data_dest from piv_data_src by bi-linear interpolation of inner points with ...
int z_cph
highest positive index
Definition: gpiv-piv.h:139
Holds the variables of PIV data.
Definition: gpiv.h:267
Along row line.
Definition: gpiv-piv.h:106
int z_rph
highest positive row index
Definition: gpiv-piv.h:134
GpivIntGeo
Interrogation geometry.
Definition: gpiv-piv.h:103
long top_x
x-position of maximum at pixel level
Definition: gpiv-piv.h:124
Image parameters or header info.
Definition: gpiv-img.h:122
int z_cnl
lowest negative column index
Definition: gpiv-piv.h:136
gchar * gpiv_piv_write_deformed_image(GpivImage *image)
Stores deformed image to file system with pre defined name to TMPDIR and prints message to stdout...
float subtop_y
y-position of maximum at sub-pixel level
Definition: gpiv-piv.h:127
void gpiv_piv_isizadapt(const GpivPivPar *piv_par_src, GpivPivPar *piv_par_dest, gboolean *isiz_last)
Adjusts interrogation area sizes.
void gpiv_fread_fftw_wisdom(const gint dir)
Reads fftw wisdoms from file and stores into a (public) string.
Power fitting.
Definition: gpiv-piv.h:94
float subtop_x
x-position of maximum at sub-pixel level
Definition: gpiv-piv.h:126
Parameters for PIV evaluation (interrogation) of images.
Definition: gpiv-piv_par.h:91
int z_cl
general lowest column index
Definition: gpiv-piv.h:143
module for parameters for validating PIV data
Along column line.
Definition: gpiv-piv.h:105
GpivPivData * gpiv_piv_gridgen(const guint nx, const guint ny, const GpivImagePar *image_par, const GpivPivPar *piv_par)
Generates grid by Calculating the positions of interrogation areas.
int z_rl
general lowest row index
Definition: gpiv-piv.h:141
float min
minimum covariance value
Definition: gpiv-piv.h:121
module for parameters for image evaluation
float snr
Signal to Noice defined by quotient of first and second highest peaks.
Definition: gpiv-piv.h:128
gchar * gpiv_piv_shift_grid(GpivPivData *piv_data)
Shifts the knots of a 2-dimensional grid containing PIV data for improved (bi-linear) interpolation...
Covariance data.
Definition: gpiv-piv.h:119
Plain gravity fitting.
Definition: gpiv-piv.h:95
int z_rnh
highest negative row index
Definition: gpiv-piv.h:132
At single point.
Definition: gpiv-piv.h:107
Gauss fitting.
Definition: gpiv-piv.h:93
float max
maximum covariance value
Definition: gpiv-piv.h:122
int z_rnl
lowest negative row index
Definition: gpiv-piv.h:131
int z_cpl
lowest positive column index
Definition: gpiv-piv.h:138
int z_cnh
highest negative column index
Definition: gpiv-piv.h:137
float ** z
< data structure of covariance data
Definition: gpiv-piv.h:120
GpivPivData * gpiv_piv_interrogate_img(const GpivImage *image, const GpivPivPar *piv_par, const GpivValidPar *valid_par, const gboolean verbose)
PIV interrogation of an image pair at an entire grid.

Generated for libgpiv-0.6.1 by doxygen 1.8.13