Main Page | Files | Data Structures | Functions | Global Variables |
gpiv-piv.h File Reference

module for PIV image evaluation More...

Include dependency graph for gpiv-piv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  __GpivCovariance
 Covariance data. More...
 

Macros

#define __LIBGPIV_PIVL_H__
 
#define GPIV_ZEROPAD_FACT   2
 magnification factor of zero-padded int. area More...
 
#define GPIV_DIFF_ISI   0
 difference between interrogation sizes of first and second image if zero offset has been used More...
 
#define GPIV_CUM_RESIDU_MIN   0.25
 minimum cumulative residu for convergence More...
 
#define GPIV_MAX_PIV_SWEEP   10
 maximum number of PIV evaluation sweeps, starting from zero More...
 
#define GPIV_SNR_DISABLE   88.0
 snr value for manually disabled estimator More...
 
#define GPIV_DEFORMED_IMG_NAME   "gpiv_defimg"
 Deformed image to be stored in TMP_DIR. More...
 
#define GPIV_LOGFILE   "gpiv.log"
 Log file to be stored in TMP_DIR. More...
 
#define CMPR_FACT   2
 Image compression factor for speeding up the evaluation. More...
 
#define GPIV_SHIFT_FACTOR   3
 For initial grid, apply int_shift = int_size_i / GPIV_SHIFT_FACTOR. More...
 

Typedefs

typedef struct __GpivCovariance GpivCov
 

Enumerations

enum  GpivIFit { GPIV_NONE = 0, GPIV_GAUSS = 1, GPIV_POWER = 2, GPIV_GRAVITY = 3 }
 Type of sub-pixel estimation. More...
 
enum  GpivIntGeo { GPIV_AOI = 0, GPIV_LINE_C = 1, GPIV_LINE_R = 2, GPIV_POINT = 3 }
 Interrogation geometry. More...
 

Functions

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. More...
 
GpivPivDatagpiv_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. More...
 
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. More...
 
void gpiv_piv_isizadapt (const GpivPivPar *piv_par_src, GpivPivPar *piv_par_dest, gboolean *isiz_last)
 Adjusts interrogation area sizes. More...
 
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. More...
 
void gpiv_fread_fftw_wisdom (const gint dir)
 Reads fftw wisdoms from file and stores into a (public) string. More...
 
void gpiv_fwrite_fftw_wisdom (const gint dir)
 Writes fftw wisdoms to a file. More...
 
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 shifted knots or extrapolation of outer lying points. More...
 
gchar * gpiv_piv_shift_grid (GpivPivData *piv_data)
 Shifts the knots of a 2-dimensional grid containing PIV data for improved (bi-linear) interpolation. More...
 
GpivPivDatagpiv_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. More...
 
GpivPivDatagpiv_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. More...
 

Detailed Description

module for PIV image evaluation

SOURCES: lib/piv.c

LAST MODIFICATION DATE:

Id
gpiv-piv.h,v 1.2 2008-04-09 06:10:28 gerber Exp

Definition in file gpiv-piv.h.

Macro Definition Documentation

◆ __LIBGPIV_PIVL_H__

#define __LIBGPIV_PIVL_H__

Definition at line 56 of file gpiv-piv.h.

◆ CMPR_FACT

#define CMPR_FACT   2

Image compression factor for speeding up the evaluation.

Definition at line 79 of file gpiv-piv.h.

◆ GPIV_CUM_RESIDU_MIN

#define GPIV_CUM_RESIDU_MIN   0.25

minimum cumulative residu for convergence

Definition at line 70 of file gpiv-piv.h.

◆ GPIV_DEFORMED_IMG_NAME

#define GPIV_DEFORMED_IMG_NAME   "gpiv_defimg"

Deformed image to be stored in TMP_DIR.

Definition at line 75 of file gpiv-piv.h.

◆ GPIV_DIFF_ISI

#define GPIV_DIFF_ISI   0

difference between interrogation sizes of first and second image if zero offset has been used

Definition at line 65 of file gpiv-piv.h.

◆ GPIV_LOGFILE

#define GPIV_LOGFILE   "gpiv.log"

Log file to be stored in TMP_DIR.

Definition at line 76 of file gpiv-piv.h.

◆ GPIV_MAX_PIV_SWEEP

#define GPIV_MAX_PIV_SWEEP   10

maximum number of PIV evaluation sweeps, starting from zero

Definition at line 71 of file gpiv-piv.h.

◆ GPIV_SHIFT_FACTOR

#define GPIV_SHIFT_FACTOR   3

For initial grid, apply int_shift = int_size_i / GPIV_SHIFT_FACTOR.

Definition at line 82 of file gpiv-piv.h.

◆ GPIV_SNR_DISABLE

#define GPIV_SNR_DISABLE   88.0

snr value for manually disabled estimator

Definition at line 74 of file gpiv-piv.h.

◆ GPIV_ZEROPAD_FACT

#define GPIV_ZEROPAD_FACT   2

magnification factor of zero-padded int. area

Definition at line 64 of file gpiv-piv.h.

Typedef Documentation

◆ GpivCov

typedef struct __GpivCovariance GpivCov

Definition at line 112 of file gpiv-piv.h.

Enumeration Type Documentation

◆ GpivIFit

enum GpivIFit

Type of sub-pixel estimation.

Enumerator
GPIV_NONE 

No fitting.

GPIV_GAUSS 

Gauss fitting.

GPIV_POWER 

Power fitting.

GPIV_GRAVITY 

Plain gravity fitting.

Definition at line 91 of file gpiv-piv.h.

◆ GpivIntGeo

enum GpivIntGeo

Interrogation geometry.

Enumerator
GPIV_AOI 

Area of interst.

GPIV_LINE_C 

Along column line.

GPIV_LINE_R 

Along row line.

GPIV_POINT 

At single point.

Definition at line 103 of file gpiv-piv.h.

Function Documentation

◆ gpiv_fread_fftw_wisdom()

void gpiv_fread_fftw_wisdom ( const gint  dir)

Reads fftw wisdoms from file and stores into a (public) string.

Parameters
[in]dirdirection of fft; forward (+1) or inverse (-1)
Returns
void

◆ gpiv_fwrite_fftw_wisdom()

void gpiv_fwrite_fftw_wisdom ( const gint  dir)

Writes fftw wisdoms to a file.

Parameters
[in]dirdirection of fft; forward (+1) or inverse (-1)
Returns
void

◆ gpiv_piv_count_pivdata_fromimage()

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.

Parameters
[in]image_parstructure of image parameters
[in]piv_parstructure of piv evaluation parameters
[out]nxnumber of columns (second array index)
[out]nynumber of rows (first array index)
Returns
NULL on success or error message on failure

◆ gpiv_piv_dxdy_at_new_grid()

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 shifted knots or extrapolation of outer lying points.

Parameters
[in]piv_data_srcinput piv data
[out]piv_data_destoutput piv data
Returns
NULL on success or *err_msg on failure

◆ gpiv_piv_gridadapt()

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.

This is performed by modifying int_shift equal to int_shift / GPIV_SHIFT_FACTOR, until it reaches (src) int_shift. Then, grid_last is set TRUE, which will avoid changing the interrogation shift in next calls and signal the (while loop in) the calling function.

Parameters
[in]image_parimage parameters
[in]piv_par_srcpiv evaluation parameters
[in]piv_datainput PIV data
[in]sweepinterrogation sweep step
[out]piv_par_destmodified piv evaluation parameters
[out]grid_lastflag if final grid refinement has been
Returns
piv_data or NULL on failure

◆ gpiv_piv_gridgen()

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.

Parameters
[in]nxnumber of horizontal grid points
[in]nynumber of vertical grid points
[in]image_parstructure of image parameters
[in]piv_parstructure of piv evaluation parameters
Returns
piv_data or NULL on failure

◆ gpiv_piv_interrogate_ia()

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.

Parameters
[in]index_yy-index of interrogation area position
[in]index_xx-index of interrogation area position
[in]imagestructure of image
[in]piv_parstructure of piv evaluation parameters
[in]sweepsweep number of iterative process
[in]last_sweepflag for last sweep
[in]int_area_1first interrogation area
[in]int_area_2second interrogation area
[out]covstructure containing covariance data
[out]piv_datamodified piv data at [index_y][index_x] from interrogation
Returns
NULL on success or error message on failure

◆ gpiv_piv_interrogate_img()

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.

Parameters
[in]imageimage containing data and header info
[in]piv_parimage interrogation parameters
[in]valid_parPIV data validation parameters
[out]verboseprints progress of interrogation to stdout
Returns
GpivPivData containing PIV estimators on success or NULL on failure

◆ gpiv_piv_isizadapt()

void gpiv_piv_isizadapt ( const GpivPivPar piv_par_src,
GpivPivPar piv_par_dest,
gboolean *  isiz_last 
)

Adjusts interrogation area sizes.

For each interrogation sweep, (dest) int_size_i is halved, until it reaches (src) int_size_f. Then, isiz_last is set TRUE, which will avoid changing the interrogation sizes in next calls.

Parameters
[in]piv_par_srcoriginal parameters
[out]piv_par_destactual parameters, to be modified during sweeps
[out]isiz_lastflag for last interrogation sweep
Returns
void

◆ gpiv_piv_shift_grid()

gchar* gpiv_piv_shift_grid ( GpivPivData piv_data)

Shifts the knots of a 2-dimensional grid containing PIV data for improved (bi-linear) interpolation.

See: T. Blu, P. Thevenaz, "Linear Interpolation Revitalized", IEEE Trans. in Image Processing, vol13, no 5, May 2004

Parameters
[in]piv_datapiv data that will be shifted in-place
Returns
NULL on success or error message on failure

◆ gpiv_piv_write_deformed_image()

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.

Parameters
[in]imageimage containing header and image data frames
Returns
NULL on success or error message on failure

Generated for libgpiv-0.6.1 by doxygen 1.8.13