MultiReg.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 //
00003 // $Id$
00004 //
00005 // Copyright 2008, 2009, 2010, 2011, 2012  Antonio Franchi and Paolo Stegagno    
00006 //
00007 // This file is part of MIP.
00008 //
00009 // MIP is free software: you can redistribute it and/or modify
00010 // it under the terms of the GNU General Public License as published by
00011 // the Free Software Foundation, either version 3 of the License, or
00012 // (at your option) any later version.
00013 //
00014 // MIP is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 // You should have received a copy of the GNU General Public License
00020 // along with MIP. If not, see <http://www.gnu.org/licenses/>.
00021 //
00022 // Contact info: antonio.franchi@tuebingen.mpg.de stegagno@diag.uniroma1.it
00023 //
00024 // ----------------------------------------------------------------------------
00025 
00026 
00030 
00031 
00035 
00036 
00037 #ifndef __MULTI_REG_H
00038 #define __MULTI_REG_H
00039 
00040 #include <stdlib.h>
00041 
00042 #include <Spaces.h>
00043 #include <BiReg.h>
00044 #include <BiRegRANSAC.h>
00045 #include "MultiRegSol.h"
00046 
00047 namespace MipAlgorithms{
00048  
00050  /* @{ */
00051  
00055  class MultiRegPar {
00056   private:
00057    Decimal _linearTollerance;
00058    Decimal _angularTollerance;
00059    Decimal _maxVisuale;    // 8
00060    Decimal _discretization;// 5
00061    Decimal _discretizationStep;
00062   
00063   public:
00065    MultiRegPar();
00066    
00068    MultiRegPar(Decimal lt, Decimal at, Decimal mV, Decimal di, Decimal ds);
00069    
00071    MultiRegPar(const MultiRegPar &A);
00072    
00074    MultiRegPar operator= (MultiRegPar A);
00075    
00077    Decimal linearTollerance(){ return _linearTollerance; }
00078    
00080    Decimal angularTollerance(){ return _angularTollerance; }
00081    
00083    Decimal maxVisuale(){ return _maxVisuale; }
00084    
00086    Decimal discretization(){ return _discretization; }
00087    
00089    Decimal discretizationStep(){ return _discretizationStep; }
00090  };
00091  
00092  
00096  class MultiRegStepInput {
00097   
00098   public:
00100    int num;
00102    Observation obsLoc;
00104    vector< Observation >* obse;
00106    BiRegSol form;
00108    MultiRegSol *solution;
00110    DDubIntList *dubshortlist;
00112    int firstNewDot;
00113   
00114   
00116    MultiRegStepInput();
00117    
00119    MultiRegStepInput(const MultiRegStepInput &A);
00120    
00122    MultiRegStepInput(int n, Observation oL, vector< Observation >* o, BiRegSol f, MultiRegSol *so, DDubIntList *dsl, int fND);
00123    
00125    MultiRegStepInput  operator= (MultiRegStepInput A);
00126  };
00127  
00128  
00132  class MultiReg {
00133   
00134   public:
00136    MultiRegPar par;
00138    BiReg *biReg;
00139    
00140    
00142    MultiReg();
00143    
00145    MultiReg(MultiRegPar p);
00146    
00148    MultiReg(MultiRegPar p, BiRegPar pa);
00149    
00151    MultiReg(MultiRegPar p, BiRegPar pa, BiRegType bType);
00152    
00154    ~MultiReg();
00155    
00160    void registration(vector <Observation> observ, MultiRegSol *mrsols, int localizator = 0);
00161    
00163    void verboseOn(){ verbose = true; }
00164    
00166    void verboseOff(){ verbose = false; }
00167    
00168   private:
00169    
00170    bool verbose;
00171    
00172    // a step of the multiple registration algorithm
00173    void step(MultiRegStepInput &in);
00174    void leastMeanSquare(Observation obs0, Observation obs1, BiRegOut* sol);  // TODO DA MODIFICARE IL CALCOLO DELLA SVD
00175  };
00176  
00177  /* @} */
00178  
00179 };// end namespace MipAlgorithms
00180 
00181 
00182 
00183 #endif
00184 
00185 
00186 
00187 
00188 
00189 
00190 
00191 

Generated on Mon Feb 20 07:01:06 2017 for MIP by  doxygen 1.5.6