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

module for image processing More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  __GpivImageProcPar
 Image processing parameters. More...
 

Macros

#define GPIV_IMGPROCPAR_MAX__THRESHOLD   255
 
#define GPIV_IMGPROCPAR_MAX__WINDOW   50
 
#define GPIV_IMGPROCPAR_KEY   "IMGPROC"
 Key of image processing parameters. More...
 

Typedefs

typedef struct __GpivImageProcPar GpivImageProcPar
 

Enumerations

enum  GpivImgFilter {
  GPIV_IMGFI_MKTESTIMG, GPIV_IMGFI_SUBACK, GPIV_IMGFI_SMOOTH, GPIV_IMGFI_HILO,
  GPIV_IMGFI_CLIP, GPIV_IMGFI_FFT, GPIV_IMGFI_INVFFT, GPIV_IMGFI_CORR,
  GPIV_IMGFI_CONV, GPIV_IMGFI_LOWPASS, GPIV_IMGFI_HIGHPASS, GPIV_IMGFI_GETBIT
}
 Image filter type. More...
 
enum  GpivImgSmoothOperator {
  GPIV_IMGOP_EQUAL, GPIV_IMGOP_SUBTRACT, GPIV_IMGOP_ADD, GPIV_IMGOP_MULTIPLY,
  GPIV_IMGOP_DIVIDE
}
 Operator type when smoothing is performed. More...
 

Functions

void gpiv_imgproc_parameters_set (GpivImageProcPar *image_proc_par, const gboolean flag)
 Sets flag for image_proc_par__set. More...
 
void gpiv_imgproc_default_parameters (GpivImageProcPar *imgproc_par_default, const gboolean force)
 Sets default parameter values. More...
 
void gpiv_imgproc_read_parameters (FILE *fp_h, GpivImageProcPar *image_proc_par, const gboolean print_par)
 Reads image processing parameters. More...
 
gchar * gpiv_imgproc_check_parameters_read (GpivImageProcPar *image_proc_par, const GpivImageProcPar *image_proc_par_default)
 Checks if all necessary image processing parameters have been read. More...
 
gchar * gpiv_imgproc_test_parameters (const GpivImageProcPar *image_proc_par)
 Tests image processing parameters on validity. More...
 
void gpiv_imgproc_print_parameters (FILE *fp, const GpivImageProcPar *image_proc_par)
 Prints image processing parameters to file. More...
 
GpivImageProcPargpiv_imgproc_cp_parameters (const GpivImageProcPar *imgproc_par)
 Copies image processing parameters. More...
 
GpivImagegpiv_imgproc_mktestimg (const GpivImagePar *image_par, const GpivImageProcPar *image_proc_par)
 Genarates test image for image processing. More...
 
gchar * gpiv_imgproc_subtractimg (const GpivImage *image_in, GpivImage *image_out)
 Subtracts image intensities of img_in from img_out. More...
 
gchar * gpiv_imgproc_smooth (GpivImage *image, const GpivImageProcPar *image_proc_par)
 Smoothing filter by taking mean value of surrounding window x window pixels. More...
 
gchar * gpiv_imgproc_highpass (GpivImage *image, const GpivImageProcPar *image_proc_par)
 Highpass filter on an image passing data from M - window,..,M/2, N - window,..,N/2. More...
 
gchar * gpiv_imgproc_highlow (GpivImage *image, const GpivImageProcPar *image_proc_par)
 High-low filter to maximize contrast by stretching pixel values to local max and min within window x window area. More...
 
gchar * gpiv_imgproc_clip (GpivImage *image, const GpivImageProcPar *image_proc_par)
 Sets all pixel values lower than threshold to zero. More...
 
gchar * gpiv_imgproc_getbit (GpivImage *image, const GpivImageProcPar *image_proc_par)
 Pointer operation to get the N least significant bits and moves them to most the significant bits. More...
 
gchar * gpiv_imgproc_fft (GpivImage *image, const GpivImageProcPar *image_proc_par)
 Fast Fourier Transformation of image. More...
 
gchar * gpiv_imgproc_lowpass (GpivImagePar image_par, GpivImageProcPar image_proc_par, guint16 **img)
 Lowpass filter on an image. More...
 
gchar * gpiv_imgproc_correlate (GpivImagePar image_par, GpivImageProcPar image_proc_par, guint16 **img1_in, guint16 **img2_in, guint16 ***img_out)
 Correlates two images. More...
 
gchar * gpiv_imgproc_convolve (GpivImagePar image_par, GpivImageProcPar image_proc_par, guint16 **img1_in, guint16 **img2_in, guint16 ***img_out)
 Convolves two images. More...
 
gchar * gpiv_imgproc_deform (GpivImage *image, const GpivPivData *piv_data)
 Image shifting and deformation routine for a single exposed, double frame PIV image pair with magnitude of PIV estimations at each pixel. More...
 

Detailed Description

module for image processing

SOURCE: lib/imgproc.c

LAST MODIFICATION DATE:

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

Definition in file gpiv-imgproc.h.

Macro Definition Documentation

◆ GPIV_IMGPROCPAR_KEY

#define GPIV_IMGPROCPAR_KEY   "IMGPROC"

Key of image processing parameters.

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

◆ GPIV_IMGPROCPAR_MAX__THRESHOLD

#define GPIV_IMGPROCPAR_MAX__THRESHOLD   255

Definition at line 67 of file gpiv-imgproc.h.

◆ GPIV_IMGPROCPAR_MAX__WINDOW

#define GPIV_IMGPROCPAR_MAX__WINDOW   50

Definition at line 68 of file gpiv-imgproc.h.

Typedef Documentation

◆ GpivImageProcPar

Definition at line 104 of file gpiv-imgproc.h.

Enumeration Type Documentation

◆ GpivImgFilter

Image filter type.

Enumerator
GPIV_IMGFI_MKTESTIMG 

Generate test image.

GPIV_IMGFI_SUBACK 

Subtract background image.

GPIV_IMGFI_SMOOTH 

Smooth filter.

GPIV_IMGFI_HILO 

High-low filter.

GPIV_IMGFI_CLIP 

Clipping.

GPIV_IMGFI_FFT 

FFT image.

GPIV_IMGFI_INVFFT 

Inverse FFT image.

GPIV_IMGFI_CORR 

Correlate.

GPIV_IMGFI_CONV 

Convolve.

GPIV_IMGFI_LOWPASS 

Low pass filter.

GPIV_IMGFI_HIGHPASS 

High pass filter.

GPIV_IMGFI_GETBIT 

Pointer operation to get the N least significant bits.

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

◆ GpivImgSmoothOperator

Operator type when smoothing is performed.

Enumerator
GPIV_IMGOP_EQUAL 

No action.

GPIV_IMGOP_SUBTRACT 

Subtract avarage.

GPIV_IMGOP_ADD 

Add avarage.

GPIV_IMGOP_MULTIPLY 

Multiply with avarage.

GPIV_IMGOP_DIVIDE 

Divide by avarage.

Definition at line 95 of file gpiv-imgproc.h.

Function Documentation

◆ gpiv_imgproc_check_parameters_read()

gchar* gpiv_imgproc_check_parameters_read ( GpivImageProcPar image_proc_par,
const GpivImageProcPar image_proc_par_default 
)

Checks if all necessary image processing parameters have been read.

If a parameter has not been read, it will be set to image_proc_par_default or to its hard-coded default value in case image_proc_par_default is NULL.

Parameters
[in]image_proc_par_defaultimage processing parameters containing default values
[out]image_proc_parstructure of image processing parameters
Returns
NULL on success or error message on failure

◆ gpiv_imgproc_clip()

gchar* gpiv_imgproc_clip ( GpivImage image,
const GpivImageProcPar image_proc_par 
)

Sets all pixel values lower than threshold to zero.

Parameters
[in]imageimage to be clipped in-place.
[in]image_proc_parstructure of image processing parameters
Returns
NULL on success or error message on failure

◆ gpiv_imgproc_convolve()

gchar* gpiv_imgproc_convolve ( GpivImagePar  image_par,
GpivImageProcPar  image_proc_par,
guint16 **  img1_in,
guint16 **  img2_in,
guint16 ***  img_out 
)

Convolves two images.

Parameters
[in]image_parstructure of image parameters
[in]image_proc_parstructure of image processing parameters
[in]img1_infirst input image. Needs to be allocated
[in]img2_insecond input image. Needs to be allocated
[out]img_outpointer to output image. Not necessarily allocated
Returns
NULL on success or error message on failure

◆ gpiv_imgproc_correlate()

gchar* gpiv_imgproc_correlate ( GpivImagePar  image_par,
GpivImageProcPar  image_proc_par,
guint16 **  img1_in,
guint16 **  img2_in,
guint16 ***  img_out 
)

Correlates two images.

Parameters
[in]image_parstructure of image parameters
[in]image_proc_parstructure of image processing parameters
[in]img1_infirst input image. Needs to be allocated
[in]img2_insecond input image. Needs to be allocated
[out]img_outpointer to output image. Not necessarily allocated
Returns
NULL on success or error message on failure

◆ gpiv_imgproc_cp_parameters()

GpivImageProcPar* gpiv_imgproc_cp_parameters ( const GpivImageProcPar imgproc_par)

Copies image processing parameters.

Parameters
[in]imgproc_parimage processing parameters to be copied
Returns
GpivImageProcPar or NULL on failure

◆ gpiv_imgproc_default_parameters()

void gpiv_imgproc_default_parameters ( GpivImageProcPar imgproc_par_default,
const gboolean  force 
)

Sets default parameter values.

Parameters
[in]forceflag to enforce parameters set to defaults
[out]imgproc_par_defaultstructure of image processing parameters
Returns
void

◆ gpiv_imgproc_deform()

gchar* gpiv_imgproc_deform ( GpivImage image,
const GpivPivData piv_data 
)

Image shifting and deformation routine for a single exposed, double frame PIV image pair with magnitude of PIV estimations at each pixel.

Deforms first frame halfway forward and second frame halfway backward.

Parameters
[in]piv_dataPIV data
[in]imageinput image to be deformed in-place. Needs to be allocated
Returns
NULL on success or error message on failure

◆ gpiv_imgproc_fft()

gchar* gpiv_imgproc_fft ( GpivImage image,
const GpivImageProcPar image_proc_par 
)

Fast Fourier Transformation of image.

Parameters
[in]imageinput image to be modified in-place.
[in]image_proc_parstructure of image processing parameters
Returns
NULL on success or error message on failure

◆ gpiv_imgproc_getbit()

gchar* gpiv_imgproc_getbit ( GpivImage image,
const GpivImageProcPar image_proc_par 
)

Pointer operation to get the N least significant bits and moves them to most the significant bits.

Parameters
[in]imageimage to be filtered in-place
[in]image_proc_parstructure of image processing parameters
Returns
NULL on success or error message on failure

◆ gpiv_imgproc_highlow()

gchar* gpiv_imgproc_highlow ( GpivImage image,
const GpivImageProcPar image_proc_par 
)

High-low filter to maximize contrast by stretching pixel values to local max and min within window x window area.

Parameters
[in]imageimage to be filtered in-place
[in]image_proc_parstructure of image processing parameters
Returns
NULL on success or error message on failure

◆ gpiv_imgproc_highpass()

gchar* gpiv_imgproc_highpass ( GpivImage image,
const GpivImageProcPar image_proc_par 
)

Highpass filter on an image passing data from M - window,..,M/2, N - window,..,N/2.

Parameters
[in]imageimage to be be high-passed in-place
[in]image_proc_parstructure of image processing parameters
Returns
NULL on success or error message on failure

◆ gpiv_imgproc_lowpass()

gchar* gpiv_imgproc_lowpass ( GpivImagePar  image_par,
GpivImageProcPar  image_proc_par,
guint16 **  img 
)

Lowpass filter on an image.

Parameters
[in]image_parstructure of image parameters
[in]image_proc_parstructure of image processing parameters
[in]imginput image to be filtered in-place. Needs to be allocated
Returns
NULL on success or error message on failure

◆ gpiv_imgproc_mktestimg()

GpivImage* gpiv_imgproc_mktestimg ( const GpivImagePar image_par,
const GpivImageProcPar image_proc_par 
)

Genarates test image for image processing.

This is not an image for testing on PIV interrogation!

Parameters
[in]image_parstructure of image parameters
[in]image_proc_parstructure of image processing parameters
Returns
GpivImage or NULL on failure

◆ gpiv_imgproc_parameters_set()

void gpiv_imgproc_parameters_set ( GpivImageProcPar image_proc_par,
const gboolean  flag 
)

Sets flag for image_proc_par__set.

Parameters
[in]flagflag to enforce parameters set to defaults
[out]image_proc_parimage processing parameters
Returns
void

◆ gpiv_imgproc_print_parameters()

void gpiv_imgproc_print_parameters ( FILE *  fp,
const GpivImageProcPar image_proc_par 
)

Prints image processing parameters to file.

Parameters
[in]fpfile pointer to which paraeters will be printed. If NULL, stdout will be used
[in]image_proc_parstructure of image processing parameters
Returns
void

◆ gpiv_imgproc_read_parameters()

void gpiv_imgproc_read_parameters ( FILE *  fp_h,
GpivImageProcPar image_proc_par,
const gboolean  print_par 
)

Reads image processing parameters.

Parameters
[in]fp_hfile to be read
[in]image_proc_parpointer to structure of image processing parameters
[in]print_parprints parameters to stdout during reading
[out]image_proc_parpointer to structure of image processing parameters
Returns
void

◆ gpiv_imgproc_smooth()

gchar* gpiv_imgproc_smooth ( GpivImage image,
const GpivImageProcPar image_proc_par 
)

Smoothing filter by taking mean value of surrounding window x window pixels.

Parameters
[in]imageimage to be smoothed in-place
[in]image_proc_parstructure of image processing parameters
Returns
NULL on success or error message on failure

◆ gpiv_imgproc_subtractimg()

gchar* gpiv_imgproc_subtractimg ( const GpivImage image_in,
GpivImage image_out 
)

Subtracts image intensities of img_in from img_out.

To avoid swapping of intensities, output values are set to zero if img_in is larger than img_out. Images will have to be of identic dimensions.

Parameters
[in]image_inimage containing the intensities to be subtracted
[out]image_outmodified image. will have to exist and allocated
Returns
NULL on success or error message on failure

◆ gpiv_imgproc_test_parameters()

gchar* gpiv_imgproc_test_parameters ( const GpivImageProcPar image_proc_par)

Tests image processing parameters on validity.

Parameters
[in]image_proc_parstructure of image processing parameters
Returns
NULL on success or error message on failure

Generated for libgpiv-0.6.1 by doxygen 1.8.13