Skip to content

Commit ab7835d

Browse files
author
deseilligny
committed
Bloc Clino/Cam , Ok with compensation
1 parent ca70779 commit ab7835d

19 files changed

+702
-104
lines changed

MMVII/include/MMVII_InstrumentalBlock.h

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "MMVII_Clino.h"
88
#include "MMVII_Matrix.h"
99
#include <tuple>
10+
//#include <memory>
1011

1112

1213
namespace MMVII
@@ -111,7 +112,7 @@ class cIrbCal_Cam1 : public cMemCheck
111112
bool mSelIsPat; ///< indicate if selector is pattern/file
112113
std::string mImSelect; ///< selector, indicate if an image belongs to the block
113114
bool mIsInit; ///< was the pose in the block computed ?
114-
cPoseWithUK* mPoseInBlock; ///< Position in the block +- boresight
115+
std::shared_ptr<cPoseWithUK> mPoseInBlock; ///< Position in the block +- boresight
115116
};
116117
/// public interface to serialization
117118
void AddData(const cAuxAr2007 & anAux,cIrbCal_Cam1 & aCam);
@@ -145,6 +146,8 @@ class cIrbCal_CamSet : public cMemCheck
145146
void SetNumPoseInstr (const std::vector<int> & aVNums);
146147
// Correct -1 => master
147148
std::vector<int> NumPoseInstr() const;
149+
/// fails if several NumPoseInstr
150+
cIrbCal_Cam1 * SingleCamPoseInstr(bool OkNot1=false) ;
148151
private :
149152
void AddCam
150153
(
@@ -171,19 +174,24 @@ class cIrbCal_Clino1 : public cMemCheck
171174
public :
172175
cIrbCal_Clino1(); //< required for serialisation
173176
cIrbCal_Clino1(const std::string & aName); //< "Real" constructor
177+
~cIrbCal_Clino1();
178+
174179
const std::string & Name() const; //< accessor
175180
void AddData(const cAuxAr2007 & anAux); //< serializer
176181

177182
void SetPNorm(const cPt3dr & aTr);
178183

179184
cP3dNormWithUK& CurPNorm();
185+
cVectorUK & PolCorr();
180186
bool IsInit() const;
181187
void UnInit();
182188
private :
183-
std::string mName; //< name of the clino
184-
bool mIsInit; //< was values computed ?
185-
cP3dNormWithUK * mTrInBlock; //< Position in the block
186-
std::vector<tREAL8> mPolCorr; //< Polynomial correction 2 angles, def [0,1,0]
189+
std::string mName; //< name of the clino
190+
bool mIsInit; //< was values computed ?
191+
std::shared_ptr<cP3dNormWithUK> mTrInBlock; //< Position in the block
192+
std::shared_ptr<cVectorUK> mPolCorr;
193+
//cVectorUK * mPolCorr; //< Polynomial correction 2 angles, def [0,1,0,0]
194+
// std::vector<tREAL8> mPolCorr; //< Polynomial correction 2 angles, def [0,1,0]
187195
// tREAL8 mSigmaR; //< sigma a priori on orientation
188196
};
189197
void AddData(const cAuxAr2007 & anAux,cIrbCal_Clino1 & aClino);
@@ -200,11 +208,13 @@ class cIrbCal_ClinoSet : public cMemCheck
200208
std::vector<std::string> VNames() const;
201209
size_t NbClino() const;
202210

203-
int IndexClinoFromName(const std::string& aName) const;
211+
int IndexClinoFromName(const std::string& aName,bool OkNone=false) const;
204212
cIrbCal_Clino1 & KthClino(int aK);
205213

214+
215+
cIrbCal_Clino1 * ClinoFromName(const std::string& aName,bool OkNone=false);
206216
private :
207-
cIrbCal_Clino1 * ClinoFromName(const std::string& aName);
217+
208218
void AddClino(const std::string &,tREAL8 aSigma,bool SVP=false);
209219

210220
std::vector<cIrbCal_Clino1> mVClinos; //< set of clinos
@@ -235,6 +245,7 @@ class cIrb_CstrOrthog
235245
cIrb_CstrOrthog(const tREAL8 & aSigma);
236246
cIrb_CstrOrthog();
237247
void AddData(const cAuxAr2007 & anAux);
248+
tREAL8 Sigma() const;
238249
private :
239250
tREAL8 mSigma;
240251
};
@@ -350,7 +361,7 @@ class cIrbCal_Block : public cMemCheck
350361
cIrbCal_CamSet mSetCams; //< Cameras used in the bloc
351362
cIrbCal_ClinoSet mSetClinos; //< Clinos used in the bloc
352363

353-
// A priori external constraint
364+
// Sigma
354365
std::map<tNamePair,cIrb_SigmaInstr> mSigmaPair; //< Sigmas between pair of instr
355366
std::map<std::string,cIrb_Desc1Intsr> mDescrIndiv; //< Sigmas of each instrument
356367

@@ -380,11 +391,11 @@ class cIrbComp_Cam1 : public cMemCheck
380391
tPoseR PosBInSysA(const cIrbComp_Cam1 & aCamB) const;
381392

382393
bool IsInit() const ; //< Is mCamPC set ?
383-
const cSensorCamPC * CamPC() const; //< Accessor
384-
cSensorCamPC * CamPC() ; //< Accessor
394+
cSensorCamPC * CamPC() const; //< Accessor
385395
tPoseR Pose() const; //< Accessor 2 mCamPC
386396
std::string NameIm() const; //< Accessor 2 mCamPC
387397

398+
388399
private :
389400
/* bool mIsInit;
390401
tPoseR mPoseInW; /// C2W
@@ -407,6 +418,8 @@ class cIrbComp_CamSet : public cMemCheck
407418
const std::vector<cIrbComp_Cam1> & VCompPoses() const; ///< Accessor
408419
cIrbComp_Cam1 & KthCam(int aK) ;
409420

421+
cSensorCamPC * SingleCamPoseInstr(bool OkNot1=false) const ;
422+
410423
private :
411424
cIrbComp_CamSet(const cIrbComp_CamSet &) = delete;
412425

@@ -458,7 +471,6 @@ class cIrbComp_TimeS : public cMemCheck
458471

459472
tREAL8 ScoreDirClino(const cPt3dr& aDir,size_t aKClino) const;
460473

461-
462474
private :
463475
cIrbComp_TimeS(const cIrbComp_TimeS&) = delete;
464476
const cIrbComp_Block & mCompBlock;
@@ -494,6 +506,7 @@ class cIrbComp_Block : public cMemCheck
494506
size_t NbCams() const ; //< Accessor of Accessor of ...
495507
const cIrbCal_Block & CalBlock() const ; //< Accessor
496508
cIrbCal_Block & CalBlock() ; //< Accessor
509+
497510
const tContTimeS & DataTS() const ; //< Accessor
498511
tContTimeS & DataTS(); //< Accessor
499512

@@ -523,6 +536,9 @@ class cIrbComp_Block : public cMemCheck
523536

524537
/** return the data for time stamps (cams, clino ...) corresponding to TS, possibly init it*/
525538
cIrbComp_TimeS & DataOfTimeS(const std::string & aTS);
539+
// return
540+
///cIrbComp_TimeS * PtrDataOfTimeS(const std::string & aTS);
541+
526542

527543
cIrbCal_Block * mCalBlock;
528544
bool mCalIsAdopted;

MMVII/include/MMVII_PCSens.h

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ void AddData(const cAuxAr2007 & anAux,cPerspCamIntrCalib &);
437437
/** Class for modelising a pose when it is used as unknwon in non linear system
438438
*/
439439

440-
class cRotWithUK : public cObjWithUnkowns<tREAL8>
440+
class cRotWithUK : public cObjWithUnkowns<tREAL8>,
441+
public cMemCheck
441442
{
442443
public :
443444
cRotWithUK();
@@ -464,14 +465,17 @@ class cRotWithUK : public cObjWithUnkowns<tREAL8>
464465
// Val axiator should have to "equal" fix rot
465466
cPt3dr ValAxiatorFixRot(const tRotR & aRotFix) const;
466467

467-
private :
468+
void AddIdexesAndObs(std::vector<int> &, std::vector<double>&,bool TransMatr=false);
469+
468470
void PutUknowsInSetInterval() override ; // add the interval on udpate
471+
private :
469472

470473
tRotR mRot; ///< transformation Cam to Word
471474
cPt3dr mOmega; ///< vector for tiny rotation when used in unknown, mW in code gene ...
472475
};
473476

474-
class cPoseWithUK : public cObjWithUnkowns<tREAL8>
477+
class cPoseWithUK : public cObjWithUnkowns<tREAL8>,
478+
public cMemCheck
475479
{
476480
public :
477481
/// Fill with dummy value for case where default constructor is required
@@ -485,6 +489,8 @@ class cPoseWithUK : public cObjWithUnkowns<tREAL8>
485489
void PushObs(std::vector<double> &,bool TransposeMatr);
486490

487491
cPoseWithUK(const tPoseR & aPose);
492+
void AddIdexesAndObs(std::vector<int> &, std::vector<double>&,bool TransMatr=false);
493+
488494

489495
// different accessor to the pose
490496
tPoseR Pose() const;
@@ -516,6 +522,8 @@ class cPoseWithUK : public cObjWithUnkowns<tREAL8>
516522
cPt3dr ValAxiatorFixRot(const tRotR & aRotFix) const;
517523

518524

525+
cRotWithUK & RUK();
526+
519527
private :
520528
cPoseWithUK(const cPoseWithUK&) = delete;
521529
void PutUknowsInSetInterval() override ; // add the interval on udpate
@@ -530,7 +538,8 @@ class cPoseWithUK : public cObjWithUnkowns<tREAL8>
530538
void AddData(const cAuxAr2007 & anAux,cPoseWithUK & aPUK);
531539

532540
/// class for modelizing a normaliezd 3D-Vect when used as unknown in non linear system
533-
class cP3dNormWithUK : public cObjWithUnkowns<tREAL8>
541+
class cP3dNormWithUK : public cObjWithUnkowns<tREAL8>,
542+
public cMemCheck
534543
{
535544
public :
536545
cP3dNormWithUK(const cPt3dr &aPt,const std::string& aNameType,const std::string & aNameGrp);
@@ -540,6 +549,9 @@ class cP3dNormWithUK : public cObjWithUnkowns<tREAL8>
540549

541550
void SetPNorm(const cPt3dr & aTr);
542551
cPt3dr GetPNorm () const;
552+
cPt2dr & DuDv();
553+
554+
void AddIdexesAndObs(std::vector<int> &, std::vector<double>&);
543555
private :
544556
// normalize , compute U & V, set mDuDv to 0
545557
void Init();
@@ -551,6 +563,7 @@ class cP3dNormWithUK : public cObjWithUnkowns<tREAL8>
551563
cPt2dr mDuDv; //
552564

553565
};
566+
void AddData(const cAuxAr2007 & anAux,cP3dNormWithUK & aPUK);
554567

555568

556569
/** Class for modelizing the geometry of perspective-central image, contain essentially a pose (Centre+rotation)

MMVII/include/MMVII_PhgrDist.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ class cRandInvertibleDist
9696
std::vector<std::string> NamesP3(const std::string& aPref) ; /// x y z
9797
std::vector<std::string> NamesP2(const std::string& aPref) ; /// x y z
9898
std::vector<std::string> NamesMatr(const std::string& aPref,const cPt2di & aSz); /// m00 m10 m20 m01 ...
99+
std::vector<std::string> NamesObsP3Norm(const std::string& aPref) ; /// x y z
100+
99101

100102
// aPref+aK0 .... aPref+aK0-1
101103
std::vector<std::string> VectNames(const std::string& aPref,int aK0,int aK1) ; /// x y z
@@ -159,8 +161,12 @@ NS_SymbolicDerivative::cCalculator<double> * EqRadiomStabilization(int aDegSens,
159161
// ............. Equation on rigid bloc .............
160162
NS_SymbolicDerivative::cCalculator<double> * EqBlocRig(bool WithDerive,int aSzBuf,bool Reuse); // RIGIDBLOC
161163
NS_SymbolicDerivative::cCalculator<double> * EqBlocRig_RatE(bool WithDerive,int aSzBuf,bool Reuse); // RIGIDBLOC
162-
NS_SymbolicDerivative::cCalculator<double> * EqClinoBloc(bool WithDerive,int aSzBuf,bool Reuse); // CLINOBLOC
163-
NS_SymbolicDerivative::cCalculator<double> * EqClinoRot(bool WithDerive,int aSzBuf,bool Reuse); // CLINOBLOC
164+
NS_SymbolicDerivative::cCalculator<double> * EqBlocRig_Clino(bool WithDerive,int aSzBuf,bool ReUse); // RIGIDBLOC
165+
NS_SymbolicDerivative::cCalculator<double> * EqBlocRig_Orthog(bool WithDerive,int aSzBuf,bool ReUse); // RIGIDBLOC
166+
167+
168+
NS_SymbolicDerivative::cCalculator<double> * Old_EqClinoBloc(bool WithDerive,int aSzBuf,bool Reuse); // CLINOBLOC
169+
NS_SymbolicDerivative::cCalculator<double> * Old_EqClinoRot(bool WithDerive,int aSzBuf,bool Reuse); // CLINOBLOC
164170

165171

166172

MMVII/include/MMVII_SysSurR.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,7 @@ class cVectorUK : public cObjWithUnkowns<tREAL8>,
10821082
~cVectorUK();
10831083
void PutUknowsInSetInterval() override;
10841084
const tVect & Vect() const ; ///< Accessor
1085+
tVect & Vect() ; ///< Accessor
10851086
void FillGetAdrInfoParam(cGetAdrInfoParam<tREAL8> &) override;
10861087

10871088
private :

MMVII/src/Bench/BenchClino.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace MMVII
1414
//Check Formulas_ClinoBloc
1515

1616
cCalculator<double> * aEqClinoBloc;
17-
aEqClinoBloc = EqClinoBloc(false, 1, true);
17+
aEqClinoBloc = Old_EqClinoBloc(false, 1, true);
1818

1919
// Value of axiator
2020
std::vector<tREAL8> aVUK = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};

0 commit comments

Comments
 (0)