00001 00002 /*---------------------------------------------------------------------------- 00003 00004 File name : function_1d.h 00005 Author : Nicolas Devillard 00006 Created on : Tue, Sept 23 1997 00007 Description : 1d signal processing related routines 00008 00009 ---------------------------------------------------------------------------*/ 00010 /* 00011 $Id: function_1d.h,v 1.2 2004/06/23 09:53:27 amodigli Exp $ 00012 $Author: amodigli $ 00013 $Date: 2004/06/23 09:53:27 $ 00014 $Revision: 1.2 $ 00015 */ 00016 00017 #ifndef _FUNCTION_1D_H_ 00018 #define _FUNCTION_1D_H_ 00019 00020 /*---------------------------------------------------------------------------- 00021 Includes 00022 ---------------------------------------------------------------------------*/ 00023 00024 #include <math.h> 00025 00026 #include "memory.h" 00027 #include "local_types.h" 00028 #include "pixel_handling.h" 00029 #include "median.h" 00030 00031 /*---------------------------------------------------------------------------- 00032 Defines 00033 ---------------------------------------------------------------------------*/ 00034 00035 /* Low pass filter types: */ 00036 00037 #define LOW_PASS_LINEAR 100 00038 #define LOW_PASS_GAUSSIAN 101 00039 00040 00041 00042 /*---------------------------------------------------------------------------- 00043 Function ANSI C prototypes 00044 ---------------------------------------------------------------------------*/ 00045 00046 /*-------------------------------------------------------------------------*/ 00061 /*--------------------------------------------------------------------------*/ 00062 00063 pixelvalue * function1d_new(int nsamples); 00064 00065 00066 /*-------------------------------------------------------------------------*/ 00076 /*--------------------------------------------------------------------------*/ 00077 00078 void function1d_del(pixelvalue * s); 00079 00080 00081 /*-------------------------------------------------------------------------*/ 00097 /*--------------------------------------------------------------------------*/ 00098 00099 pixelvalue * function1d_dup(pixelvalue * arr, int ns); 00100 00101 00102 00103 /*-------------------------------------------------------------------------*/ 00119 /*--------------------------------------------------------------------------*/ 00120 00121 double 00122 function1d_find_centroid( 00123 pixelvalue * line, /* the input line */ 00124 int npix /* number of pixels in this line */ 00125 ); 00126 00127 00128 /*-------------------------------------------------------------------------*/ 00150 /*--------------------------------------------------------------------------*/ 00151 00152 double 00153 function1d_find_locmax( 00154 pixelvalue * line, 00155 int npix, 00156 int where, 00157 int hs 00158 ) ; 00159 00160 00161 /*-------------------------------------------------------------------------*/ 00185 /*--------------------------------------------------------------------------*/ 00186 00187 pixelvalue * 00188 function1d_filter_lowpass( 00189 pixelvalue * input_sig, 00190 int samples, 00191 int filter_type, 00192 int hw 00193 ) ; 00194 00195 00196 /*-------------------------------------------------------------------------*/ 00214 /*--------------------------------------------------------------------------*/ 00215 00216 pixelvalue * function1d_median_smooth( 00217 pixelvalue * list, 00218 int np, 00219 int hw); 00220 00221 00222 /*-------------------------------------------------------------------------*/ 00238 /*--------------------------------------------------------------------------*/ 00239 00240 pixelvalue * function1d_remove_lowfreq( 00241 pixelvalue * signal, 00242 int ns); 00243 00244 00245 00246 /*-------------------------------------------------------------------------*/ 00267 /*--------------------------------------------------------------------------*/ 00268 00269 pixelvalue * function1d_remove_thermalbg( 00270 pixelvalue * signal, 00271 int ns); 00272 00273 00274 00275 /*-------------------------------------------------------------------------*/ 00296 /*--------------------------------------------------------------------------*/ 00297 00298 void function1d_interpolate_linear( 00299 pixelvalue * x, 00300 pixelvalue * y, 00301 int len, 00302 pixelvalue * spl_x, 00303 pixelvalue * spl_y, 00304 int spl_len 00305 ); 00306 00307 00308 /*-------------------------------------------------------------------------*/ 00333 /*--------------------------------------------------------------------------*/ 00334 00335 int 00336 function1d_natural_spline( 00337 pixelvalue * x, 00338 pixelvalue * y, 00339 int len, 00340 pixelvalue * splX, 00341 pixelvalue * splY, 00342 int splLen 00343 ) ; 00344 00345 00346 /*-------------------------------------------------------------------------*/ 00364 /*--------------------------------------------------------------------------*/ 00365 00366 00367 pixelvalue 00368 function1d_average_reject( 00369 pixelvalue * line, 00370 int npix, 00371 int pix_low, 00372 int pix_high); 00373 00374 00375 00376 /*-------------------------------------------------------------------------*/ 00400 /*--------------------------------------------------------------------------*/ 00401 00402 double function1d_xcorrelate( 00403 pixelvalue * line_i, 00404 int width_i, 00405 pixelvalue * line_t, 00406 int width_t, 00407 int half_search, 00408 double * delta); 00409 00410 00411 00412 #endif
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001