Main Page | Files | Data Structures | Functions | Global Variables |

gpiv-imgproc.h

Go to the documentation of this file.
00001 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
00002 
00003 /*-----------------------------------------------------------------------------
00004 
00005    libgpiv - library for Particle Image Velocimetry
00006 
00007    Copyright (C) 2002, 2003, 2004 Gerber van der Graaf
00008 
00009    This file is part of libgpiv.
00010 
00011    Libgpiv is free software; you can redistribute it and/or modify
00012    it under the terms of the GNU General Public License as published by
00013    the Free Software Foundation; either version 2, or (at your option)
00014    any later version.
00015 
00016    This program is distributed in the hope that it will be useful,
00017    but WITHOUT ANY WARRANTY; without even the implied warranty of
00018    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019    GNU General Public License for more details.
00020 
00021    You should have received a copy of the GNU General Public License
00022    along with this program; if not, write to the Free Software Foundation,
00023    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
00024 
00025 -------------------------------------------------------------------------------
00026 FILENAME:               imgproc.h
00027 LIBRARY:                libgpiv:
00028 EXTERNAL FUNCTIONS:
00029 SOURCE:                 imgproc_par.c
00030                         gpiv_imgproc_default_parameters
00031                         gpiv_imgproc_fscan_parameters
00032                         gpiv_imgproc_read_parameters 
00033                         gpiv_imgproc_check_parameters
00034                         gpiv_imgproc_test_parameters
00035                         gpiv_imgproc_print_parameters
00036                         gpiv_imgproc_fprint_parameters
00037                         gpiv_imgproc_cp_parameters
00038 
00039 SOURCE:                 imgproc.c
00040                         gpiv_imgproc_mktestimg
00041                         gpiv_imgproc_subtractimg
00042                         gpiv_imgproc_smooth
00043                         gpiv_imgproc_highlow
00044                         gpiv_imgproc_clip
00045                         gpiv_imgproc_getbit
00046                         gpiv_imgproc_fft
00047                         gpiv_imgproc_lowpass
00048                         gpiv_imgproc_highpass
00049                         gpiv_imgproc_correlate
00050                         gpiv_imgproc_convolve
00051 
00052 -----------------------------------------------------------------------------*/
00063 #ifndef __LIBGPIV_IMGPROC_H__
00064 #define __LIBGPIV_IMGPROC_H__
00065 
00066 #define GPIV_IMGPROCPAR_MAX__THRESHOLD 255
00067 #define GPIV_IMGPROCPAR_MAX__WINDOW 50
00068 
00069 #define GPIV_IMGPROCPAR_KEY "IMGPROC"       
00074 enum GpivImgFilter {
00075     GPIV_IMGFI_MKTESTIMG,       
00076     GPIV_IMGFI_SUBACK,          
00077     GPIV_IMGFI_SMOOTH,          
00078     GPIV_IMGFI_HILO,            
00079     GPIV_IMGFI_CLIP,            
00081     GPIV_IMGFI_FFT,             
00082     GPIV_IMGFI_INVFFT,          
00083     GPIV_IMGFI_CORR,            
00084     GPIV_IMGFI_CONV,            
00085     GPIV_IMGFI_LOWPASS,         
00086     GPIV_IMGFI_HIGHPASS,        
00088     GPIV_IMGFI_GETBIT,  
00089 };
00090 
00094 enum GpivImgSmoothOperator {
00095     GPIV_IMGOP_EQUAL,    
00096     GPIV_IMGOP_SUBTRACT, 
00097     GPIV_IMGOP_ADD,      
00098     GPIV_IMGOP_MULTIPLY, 
00099     GPIV_IMGOP_DIVIDE    
00100 };
00101 
00102 
00103 typedef struct __GpivImageProcPar GpivImageProcPar;
00104 
00117 struct __GpivImageProcPar {
00118     guint bit;                  
00119     gboolean bit__set;          
00121     guint first_dir;            
00122     gboolean first_dir__set;    
00124     guint last_dir;             
00125     gboolean last_dir__set;     
00127     gboolean  dir_prefix;       
00128     gboolean dir_prefix__set;   
00130     guint first_file;           
00131     gboolean first_file__set;   
00133     guint last_file;            
00134     gboolean last_file__set;    
00136     gboolean file_prefix;       
00137     gboolean file_prefix__set;  
00139     enum GpivImgFilter filter;  
00140     gboolean filter__set;       
00142     enum GpivImgSmoothOperator smooth_operator; 
00143     gboolean smooth_operator__set;              
00145     guint window;               
00146     gboolean window__set;       
00148     guint threshold;            
00149     gboolean threshold__set;    
00150 };
00151 
00152 
00153 
00154 /*
00155  * image processing parameters
00156  */
00157 
00158 
00159 
00167 void
00168 gpiv_imgproc_default_parameters         (GpivImageProcPar       *imgproc_par_default,
00169                                         const gboolean         force
00170                                         );
00171 
00172 
00173 
00183 void
00184 gpiv_imgproc_read_parameters            (FILE                   *fp_h, 
00185                                         GpivImageProcPar        *image_proc_par, 
00186                                         const gboolean          print_par
00187                                         );
00188 
00189 
00190 
00199 gchar *
00200 gpiv_imgproc_check_parameters_read      (GpivImageProcPar       *image_proc_par,
00201                                         const GpivImageProcPar  *image_proc_par_default
00202                                         );
00203 
00204 
00205 
00212 gchar *
00213 gpiv_imgproc_test_parameters            (const GpivImageProcPar *image_proc_par
00214                                         );
00215 
00216 
00217 
00226 void
00227 gpiv_imgproc_print_parameters           (FILE                   *fp, 
00228                                         const GpivImageProcPar  *image_proc_par
00229                                         );
00230 
00231 
00238 GpivImageProcPar *
00239 gpiv_imgproc_cp_parameters              (const GpivImageProcPar *imgproc_par
00240                                         );
00241 
00242 
00250 GpivImage *
00251 gpiv_imgproc_mktestimg          (const GpivImagePar             *image_par,
00252                                 const GpivImageProcPar          *image_proc_par
00253                                 );
00254 
00255 
00265 gchar *
00266 gpiv_imgproc_subtractimg        (const GpivImage                *image_in,
00267                                  GpivImage                      *image_out
00268                                  );
00269 
00270 
00279 gchar *
00280 gpiv_imgproc_smooth             (GpivImage                      *image, 
00281                                 const GpivImageProcPar          *image_proc_par
00282                                 );
00283 
00284 
00293 gchar *
00294 gpiv_imgproc_highpass           (GpivImage                      *image, 
00295                                 const GpivImageProcPar          *image_proc_par
00296                                 );
00297 
00298 
00307 gchar *
00308 gpiv_imgproc_highlow            (GpivImage                      *image,
00309                                 const GpivImageProcPar          *image_proc_par
00310                                 );
00311 
00312 
00320 gchar *
00321 gpiv_imgproc_clip               (GpivImage                      *image,
00322                                 const GpivImageProcPar          *image_proc_par
00323                                 );
00324 
00325 
00334 gchar *
00335 gpiv_imgproc_getbit             (GpivImage                      *image,
00336                                 const GpivImageProcPar          *image_proc_par
00337                                 );
00338 
00339 
00347 gchar *
00348 gpiv_imgproc_fft                        (GpivImage              *image,
00349                                         const GpivImageProcPar  *image_proc_par
00350                                         );
00351 
00352 
00353 #ifndef USE_FFTW3
00354 
00363 gchar *
00364 gpiv_imgproc_lowpass                    (GpivImagePar           image_par, 
00365                                         GpivImageProcPar        image_proc_par,
00366                                         guint16                 **img
00367                                         );
00368 
00369 
00370 
00381 gchar *
00382 gpiv_imgproc_correlate                  (GpivImagePar           image_par, 
00383                                         GpivImageProcPar        image_proc_par,
00384                                         guint16                 **img1_in, 
00385                                         guint16                 **img2_in, 
00386                                         guint16*                **img_out
00387                                         );
00388 
00389 
00390 
00402 gchar *
00403 gpiv_imgproc_convolve           (GpivImagePar                   image_par, 
00404                                 GpivImageProcPar                image_proc_par,
00405                                  guint16                        **img1_in, 
00406                                  guint16                        **img2_in, 
00407                                  guint16*                       **img_out
00408                                  );
00409 
00410 #endif /* USE_FFTW3 */
00411 
00412 
00422 gchar *
00423 gpiv_imgproc_deform             (GpivImage                      *image,
00424                                 const GpivPivData               *piv_data
00425                                 );
00426 
00427 
00428 #endif /* __LIBGPIV_IMGPROC_H__ */
00429 

Generated on Tue Nov 20 19:46:20 2007 for Libgpiv by doxygen 1.5.1