module for image processing More...
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... | |
GpivImageProcPar * | gpiv_imgproc_cp_parameters (const GpivImageProcPar *imgproc_par) |
Copies image processing parameters. More... | |
GpivImage * | gpiv_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... | |
module for image processing
SOURCE: lib/imgproc.c
LAST MODIFICATION DATE:
Definition in file gpiv-imgproc.h.
#define GPIV_IMGPROCPAR_KEY "IMGPROC" |
Key of image processing parameters.
Definition at line 70 of file gpiv-imgproc.h.
#define GPIV_IMGPROCPAR_MAX__THRESHOLD 255 |
Definition at line 67 of file gpiv-imgproc.h.
#define GPIV_IMGPROCPAR_MAX__WINDOW 50 |
Definition at line 68 of file gpiv-imgproc.h.
typedef struct __GpivImageProcPar GpivImageProcPar |
Definition at line 104 of file gpiv-imgproc.h.
enum GpivImgFilter |
Image filter type.
Definition at line 75 of file gpiv-imgproc.h.
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.
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.
[in] | image_proc_par_default | image processing parameters containing default values |
[out] | image_proc_par | structure of image processing parameters |
gchar* gpiv_imgproc_clip | ( | GpivImage * | image, |
const GpivImageProcPar * | image_proc_par | ||
) |
Sets all pixel values lower than threshold to zero.
[in] | image | image to be clipped in-place. |
[in] | image_proc_par | structure of image processing parameters |
gchar* gpiv_imgproc_convolve | ( | GpivImagePar | image_par, |
GpivImageProcPar | image_proc_par, | ||
guint16 ** | img1_in, | ||
guint16 ** | img2_in, | ||
guint16 *** | img_out | ||
) |
Convolves two images.
[in] | image_par | structure of image parameters |
[in] | image_proc_par | structure of image processing parameters |
[in] | img1_in | first input image. Needs to be allocated |
[in] | img2_in | second input image. Needs to be allocated |
[out] | img_out | pointer to output image. Not necessarily allocated |
gchar* gpiv_imgproc_correlate | ( | GpivImagePar | image_par, |
GpivImageProcPar | image_proc_par, | ||
guint16 ** | img1_in, | ||
guint16 ** | img2_in, | ||
guint16 *** | img_out | ||
) |
Correlates two images.
[in] | image_par | structure of image parameters |
[in] | image_proc_par | structure of image processing parameters |
[in] | img1_in | first input image. Needs to be allocated |
[in] | img2_in | second input image. Needs to be allocated |
[out] | img_out | pointer to output image. Not necessarily allocated |
GpivImageProcPar* gpiv_imgproc_cp_parameters | ( | const GpivImageProcPar * | imgproc_par | ) |
Copies image processing parameters.
[in] | imgproc_par | image processing parameters to be copied |
void gpiv_imgproc_default_parameters | ( | GpivImageProcPar * | imgproc_par_default, |
const gboolean | force | ||
) |
Sets default parameter values.
[in] | force | flag to enforce parameters set to defaults |
[out] | imgproc_par_default | structure of image processing parameters |
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.
[in] | piv_data | PIV data |
[in] | image | input image to be deformed in-place. Needs to be allocated |
gchar* gpiv_imgproc_fft | ( | GpivImage * | image, |
const GpivImageProcPar * | image_proc_par | ||
) |
Fast Fourier Transformation of image.
[in] | image | input image to be modified in-place. |
[in] | image_proc_par | structure of image processing parameters |
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.
[in] | image | image to be filtered in-place |
[in] | image_proc_par | structure of image processing parameters |
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.
[in] | image | image to be filtered in-place |
[in] | image_proc_par | structure of image processing parameters |
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.
[in] | image | image to be be high-passed in-place |
[in] | image_proc_par | structure of image processing parameters |
gchar* gpiv_imgproc_lowpass | ( | GpivImagePar | image_par, |
GpivImageProcPar | image_proc_par, | ||
guint16 ** | img | ||
) |
Lowpass filter on an image.
[in] | image_par | structure of image parameters |
[in] | image_proc_par | structure of image processing parameters |
[in] | img | input image to be filtered in-place. Needs to be allocated |
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!
[in] | image_par | structure of image parameters |
[in] | image_proc_par | structure of image processing parameters |
void gpiv_imgproc_parameters_set | ( | GpivImageProcPar * | image_proc_par, |
const gboolean | flag | ||
) |
Sets flag for image_proc_par__set.
[in] | flag | flag to enforce parameters set to defaults |
[out] | image_proc_par | image processing parameters |
void gpiv_imgproc_print_parameters | ( | FILE * | fp, |
const GpivImageProcPar * | image_proc_par | ||
) |
Prints image processing parameters to file.
[in] | fp | file pointer to which paraeters will be printed. If NULL, stdout will be used |
[in] | image_proc_par | structure of image processing parameters |
void gpiv_imgproc_read_parameters | ( | FILE * | fp_h, |
GpivImageProcPar * | image_proc_par, | ||
const gboolean | print_par | ||
) |
Reads image processing parameters.
[in] | fp_h | file to be read |
[in] | image_proc_par | pointer to structure of image processing parameters |
[in] | print_par | prints parameters to stdout during reading |
[out] | image_proc_par | pointer to structure of image processing parameters |
gchar* gpiv_imgproc_smooth | ( | GpivImage * | image, |
const GpivImageProcPar * | image_proc_par | ||
) |
Smoothing filter by taking mean value of surrounding window x window pixels.
[in] | image | image to be smoothed in-place |
[in] | image_proc_par | structure of image processing parameters |
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.
[in] | image_in | image containing the intensities to be subtracted |
[out] | image_out | modified image. will have to exist and allocated |
gchar* gpiv_imgproc_test_parameters | ( | const GpivImageProcPar * | image_proc_par | ) |
Tests image processing parameters on validity.
[in] | image_proc_par | structure of image processing parameters |