Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

coregistration.hh

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1999-2003 Bert Kampes
00003  * Copyright (c) 1999-2003 Delft University of Technology, The Netherlands
00004  *
00005  * This file is part of Doris, the Delft o-o radar interferometric software.
00006  *
00007  * Doris program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * Doris is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  * Publications that contain results produced by the Doris software should
00022  * contain an acknowledgment. (For example: The interferometric processing
00023  * was performed using the freely available Doris software package developed
00024  * by the Delft Institute for Earth-Oriented Space Research (DEOS), Delft
00025  * University of Technology, or include a reference to: Bert Kampes and
00026  * Stefania Usai. \"Doris: The Delft Object-oriented Radar Interferometric
00027  * software.\" In: proceedings 2nd ITC ORS symposium, August 1999. (cdrom)).
00028  *
00029  */
00030 /****************************************************************
00031  * $Source: /users/kampes/DEVELOP/DORIS/doris/src/RCS/coregistration.hh,v $
00032  * $Revision: 3.10 $
00033  * $Date: 2005/04/06 15:29:03 $
00034  * $Author: kampes $
00035  *
00036  * Routines for coregistration.
00037  ****************************************************************/
00038 
00039 
00040 #ifndef COREGISTRATION_H
00041 #define COREGISTRATION_H
00042 
00043 #include "constants.hh"                 // typedefs
00044 #include "readinput.hh"                 // input structs
00045 #include "orbitbk.hh"                   // my orbit class, includes my matrix class
00046 #include "slcimage.hh"                  // my slc image class
00047 #include "productinfo.hh"               // my 'products' class
00048 #include "bk_baseline.hh"               // my 'baseline' class
00049 
00050 
00051 
00052 // ______ Prototypes ______
00053 #ifdef __USE_VECLIB_LIBRARY__
00054 // ______This typedef is needed for output of veclib routine cdot?______
00055 typedef struct {real4 re,im;} STUPID_cr4;
00056 
00057 extern "C" { void  cgemv (char*, int32*, int32*, complr4*, complr4*,  int32*,
00058                          complr4*, int32*,
00059                          complr4*, complr4*, int32*, int32); }
00060 
00061 extern "C" { STUPID_cr4 cdotu (int32*, complr4*, int32*, complr4*, int32*); }
00062 #endif
00063 
00064 //  // ====== Inline functions ======
00065 //  // ______ For resampling output ci2, this might be slow, make function
00066 //  //        i16 myround(real4) to avoid overhead real() ______
00067 //  inline compli16 cr4toci2(complr4 x)
00068 //    { return compli16((x.real() > 0) ? short(x.real()+.5) : short(x.real()-.5),
00069 //                  (x.imag() > 0) ? short(x.imag()+.5) : short(x.imag()-.5));}
00070 
00071 
00072 // ====== Prototypes ======
00073 // ______ Compute coarse coregistration ______
00074 void coarseporbit(
00075         const input_ell         &ell,
00076         const slcimage  &master,
00077         const slcimage  &slave,
00078         orbit           &masterorbit,
00079         orbit           &slaveorbit,
00080         const BASELINE  &baseline);
00081 
00082 
00083 // ______ Coarse coregistration ______
00084 void coarsecorrel(
00085         const input_coarsecorr  &input, 
00086         const slcimage  &minfo,
00087         const slcimage  &sinfo);
00088 
00089 
00090 // ______ Corr by fft ______
00091 void coarsecorrelfft(
00092         const input_coarsecorr  &input, 
00093         const slcimage  &minfo,
00094         const slcimage  &sinfo);
00095 
00096 
00097 // ______ Corr by fft ______
00098 real4 corrfft( 
00099         const matrix<real4>     &magnitudeMaster,
00100         const matrix<real4>     &magnitudeMask,
00101         real4                   &offsetL,
00102         real4                   &offsetP);
00103 
00104 
00105 // ______ Distribute nW windows over win ______
00106 matrix<uint> distributepoints(
00107         real4                     numberofpoints,
00108         const window             &win);
00109 
00110 
00111 // ______ Estimate offset based on consistency ______
00112 void getoffset(
00113         const matrix<real4>     &Result,
00114         int32                   &offsetLines,
00115         int32                   &offsetPixels);
00116 
00117 
00118 
00119 // ______ Fine coregistration ______
00120 void finecoreg(
00121         const input_fine        &fineinput,
00122         const slcimage  &minfo,
00123         const slcimage  &sinfo);
00124 
00125 
00126 // ______ Correlation with FFT ______
00127 real4 coherencefft(
00128         const input_fine        &fineinput, 
00129         const matrix<complr4>   &Master,
00130         const matrix<complr4>   &Mask,
00131         real4                   &offsetL,
00132         real4                   &offsetP);
00133 
00134 
00135 // ______ Correlation in space domain ______
00136 real4 coherencespace(
00137         const input_fine        &fineinput, 
00138         const matrix<complr4>   &Master,
00139         const matrix<complr4>   &Mask,
00140         real4                   &offsetL,
00141         real4                   &offsetP);
00142 
00143 
00144 // ______ Compute coregistration parameters ______
00145 void coregpm(
00146         const window            &originalmaster,
00147         const char              *i_resfile,
00148         const input_coregpm     &coregpminput,
00149         uint                    oversamplingsfactor);
00150 
00151 
00152 // ______ Read observations from file ______
00153 matrix<real4> getofffile(
00154         const char              *file,
00155         real4                    threshold);
00156 
00157 
00158 // ______ Resample slave ______
00159 void resample(
00160         //const window            &originalmaster,
00161         const input_gen         &generalinput,
00162         const input_resample    &resampleinput,
00163         const slcimage          &master,
00164         const slcimage          &slave,
00165         //const productinfo     &interferogram,
00166         const matrix<real8>     &cpmL,
00167         const matrix<real8>     &cpmP);
00168 
00169 
00170 // ______Interpolation kernals______
00171 matrix<real4> cc4(const  matrix<real4> &x);
00172 matrix<real4> cc6(const  matrix<real4> &x);
00173 matrix<real4> ts6(const  matrix<real4> &x);
00174 matrix<real4> ts8(const  matrix<real4> &x);
00175 matrix<real4> ts16(const matrix<real4> &x);
00176 matrix<real4> rect(const matrix<real4> &x);
00177 matrix<real4> tri(const  matrix<real4> &x);
00178 // ___ knab: oversampling factor of signal CHI, number of points N ___
00179 matrix<real4> knab(const matrix<real4> &x, const real4 CHI, const int32 N);
00180 
00181 
00182 
00183 #endif // COREGISTRATION_H
00184 
00185 
00186 

Generated on Fri Apr 22 15:57:50 2005 for Doris by doxygen 1.3.6