ProbMultiReg.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00030
00031
00032
00033 #ifndef __PROB_MULTI_REG_H
00034 #define __PROB_MULTI_REG_H
00035
00036
00037 #ifdef MIP_HOST_APPLE
00038 #include <applePatch.h>
00039 #endif
00040
00041 #include <map>
00042
00043 #include <Spaces.h>
00044 #include <BiReg.h>
00045 #include <BiRegRANSAC.h>
00046 #include "MultiRegSol.h"
00047
00048 using namespace std;
00049
00050 namespace MipAlgorithms{
00051
00053
00054
00058 class ProbMultiRegPar {
00059 private:
00060 Decimal _linearTollerance;
00061 Decimal _angularTollerance;
00062 Decimal _maxVisuale;
00063 Decimal _discretization;
00064 Decimal _discretizationStep;
00065
00066 public:
00068 ProbMultiRegPar();
00069
00071 ProbMultiRegPar(Decimal lt, Decimal at, Decimal mV, Decimal di, Decimal ds);
00072
00074 ProbMultiRegPar(const ProbMultiRegPar &A);
00075
00077 ProbMultiRegPar operator= (ProbMultiRegPar A);
00078
00080 Decimal linearTollerance(){ return _linearTollerance; }
00081
00083 Decimal angularTollerance(){ return _angularTollerance; }
00084
00086 Decimal maxVisuale(){ return _maxVisuale; }
00087
00089 Decimal discretization(){ return _discretization; }
00090
00092 Decimal discretizationStep(){ return _discretizationStep; }
00093 };
00094
00095
00099 class ProbMultiRegStepInput {
00100
00101 public:
00103 int num;
00105 Observation obsLoc;
00107 vector< Observation >* obse;
00109 BiRegSol form;
00111 MultiRegSol *solution;
00113 DDubIntList *dubshortlist;
00115 int firstNewDot;
00116
00117
00119 ProbMultiRegStepInput();
00120
00122 ProbMultiRegStepInput(const ProbMultiRegStepInput &A);
00123
00125 ProbMultiRegStepInput(int n, Observation oL, vector< Observation >* o, BiRegSol f, MultiRegSol *so, DDubIntList *dsl, int fND);
00126
00128 ProbMultiRegStepInput operator= (ProbMultiRegStepInput A);
00129 };
00130
00131
00135 class ProbMultiReg {
00136
00137 public:
00139 ProbMultiRegPar par;
00141 BiReg *biReg;
00142
00143
00145 ProbMultiReg();
00146
00148 ProbMultiReg(ProbMultiRegPar p);
00149
00151 ProbMultiReg(ProbMultiRegPar p, BiRegPar pa);
00152
00154 ProbMultiReg(ProbMultiRegPar p, BiRegPar pa, BiRegType bType);
00155
00157 ~ProbMultiReg();
00158
00163 void registration(vector <Observation> observ, MultiRegSol *mrsols, int localizator = 0);
00164
00166 void verboseOn(){ verbose = true; }
00167
00169 void verboseOff(){ verbose = false; }
00170
00175 void setLikelihood(vector<int>& ids, map <int, vector<Pose> >* lik);
00176
00177 private:
00178
00179 map <int, vector<Pose> > *likelihood;
00180 vector <int> activeLikelihoods;
00181
00182 bool verbose;
00183
00184
00185 void step(ProbMultiRegStepInput &in);
00186
00187
00188 public:
00189 void leastMeanSquare(Observation obs0, Observation obs1, BiRegOut* sol);
00190
00191 private:
00192
00193 Decimal computeProbability(Pose measure, int id);
00194 };
00195
00196
00197
00198
00199 };
00200
00201
00202
00203 #endif
00204
00205
00206
00207
00208
00209
00210
00211