Skip to content

Commit 542fca4

Browse files
author
deseilligny
committed
Chg ordi
1 parent 920c057 commit 542fca4

File tree

5 files changed

+38
-8
lines changed

5 files changed

+38
-8
lines changed

MMVII/src/BundleAdjustment/Adjust_InstrumentalBlock.cpp

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class cBA_BlockInstr : public cMemCheck
2424
cMMVII_BundleAdj& ,
2525
cIrbComp_Block*,
2626
const std::vector<std::string> & aVParamPair,
27-
const std::vector<std::string> & aVParamGauje
27+
const std::vector<std::string> & aVParamGauje,
28+
const std::vector<std::string> & aVParamCur
2829
);
2930
virtual ~cBA_BlockInstr();
3031

@@ -80,7 +81,8 @@ cBA_BlockInstr::cBA_BlockInstr
8081
cMMVII_BundleAdj& aBA,
8182
cIrbComp_Block * aCompBl,
8283
const std::vector<std::string> & aVParamsPair,
83-
const std::vector<std::string> & aVParamGauje
84+
const std::vector<std::string> & aVParamGauje,
85+
const std::vector<std::string> & aVParamCur
8486
) :
8587
mBA (aBA),
8688
mSys (nullptr),
@@ -95,10 +97,15 @@ cBA_BlockInstr::cBA_BlockInstr
9597
mModeSaveSigma(cStrIO<int>::FromStr(GetDef(aVParamsPair,3,std::string("1")))),
9698
mGaujeTr (cStrIO<double>::FromStr(GetDef(aVParamGauje,0,std::string("0.0")))),
9799
mGaujeRot (cStrIO<double>::FromStr(GetDef(aVParamGauje,1,std::string("0.0"))))
98-
99-
100100
{
101101

102+
if (! aVParamCur.empty())
103+
{
104+
for (auto & aCalC : mCalCams->VCams() )
105+
{
106+
mBA.SetIntervUK().AddOneObj(&aCalC.PoseUKInBlock());
107+
}
108+
}
102109
// Add all the pose to construct the Time-Stamp structure
103110
for (auto aPtrCam : mBA.VSCPC())
104111
mCompbBl->AddImagePose(aPtrCam,true);
@@ -298,18 +305,22 @@ void cMMVII_BundleAdj::AddBlockInstr(const std::vector<std::vector<std::string>>
298305
MMVII_UnclasseUsEr("Dir for bloc of instrument not init with parameter for BOI/Compensation");
299306
}
300307

301-
302-
303308
const std::vector<std::string> & aVParamPairCam = aVVParam.at(0);
304309
std::string aNameBlock = GetDef(aVParamPairCam,0,std::string(""));
305310
if (aNameBlock=="")
306311
aNameBlock = cIrbCal_Block::theDefaultName;
307312

308313
cIrbComp_Block * aBlock = new cIrbComp_Block(*mPhProj ,aNameBlock);
309314

315+
std::vector<std::string> aParamCur;
316+
if (aVVParam.size() >=3)
317+
{
318+
aParamCur = aVVParam.at(2);
319+
}
320+
310321
mVecBlockInstrAdj.push_back
311322
(
312-
new cBA_BlockInstr(*this,aBlock,aVParamPairCam,aVVParam.at(1))
323+
new cBA_BlockInstr(*this,aBlock,aVParamPairCam,aVVParam.at(1),aParamCur)
313324
);
314325

315326
}

MMVII/src/BundleAdjustment/cAppliBundAdj.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,13 @@ cCollecSpecArg2007 & cAppliBundlAdj::ArgOpt(cCollecSpecArg2007 & anArgOpt)
167167
<< AOpt2007(mPostFixReport,NameParamPostFixReport(),CommentParamPostFixReport())
168168
<< AOpt2007(mParamLine,"AdjLine3D","Parameter for line Adjustment [SigmaIm,NbPtsSampl]",{{eTA2007::ISizeV,"[2,2]"}})
169169

170-
<< AOpt2007(mParamBOI,"BOI","Bloc of Instr [[Bloc?,SigTr2?=1.0,SigRot2?=1.0,SaveSig?=1],[GjTr?,GjRot?]] ",{{eTA2007::ISizeV,"[2,2]"}})
170+
<< AOpt2007
171+
(
172+
mParamBOI,
173+
"BOI",
174+
"Bloc of Instr [[Bloc?,RelSigTrPair?=1.0,RelSigRotPair?=1.0,SaveSig?=1],[GjTr?,GjRot?],[RelSigTrCur,RelSigRotCur]?]",
175+
{{eTA2007::ISizeV,"[2,3]"}}
176+
)
171177
<< mPhProj.DPBlockInstr().ArgDirInOpt()
172178
<< mPhProj.DPBlockInstr().ArgDirOutOpt()
173179

MMVII/src/Instrumental/cAppli_BlockInstrInitClino.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ int cAppli_BlockInstrInitClino::Exe()
7979
// add all the camera
8080
for (const auto & aNameIm : VectMainSet(0))
8181
{
82+
// StdOut() << "IiIImmm=" << aNameIm << "\n";
8283
mBlock->AddImagePose(aNameIm);
8384
}
8485

MMVII/src/Instrumental/cInstrumentalBloc.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,14 @@ void cIrbComp_Block::AddImagePose(const std::string & aNameIm,bool okImNotInBlo
289289

290290
void cIrbComp_Block::SetClinoValues(const cSetMeasureClino& aSetM,bool OkNewTimeS)
291291
{
292+
/*
293+
StdOut() << "XXX-cIrbComp_Block::SetClinoValue\n";
294+
for (const auto& [anId,aData] : mDataTS)
295+
{
296+
StdOut() << "IIIIiiidddd " << anId << "\n";
297+
}
298+
*/
299+
292300
MMVII_INTERNAL_ASSERT_tiny(aSetM.NamesClino() == mCalBlock->SetClinos().VNames(),"Names differs in SetClinoValues");
293301
for (const auto & aMeasure : aSetM.SetMeasures())
294302
{

MMVII/src/Mappings/cManifold.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,12 @@ template<int DimE>
218218
typename cSphereManifold<DimE>::tResPOP
219219
cSphereManifold<DimE>::ParamOfPt(const tPtE & aPE) const
220220
{
221+
// 1 - Research the coordinates maximizing the absolute value
221222
cWhichMax<int,tREAL8> aMaxC;
222223
for (int aDim=0 ; aDim<DimE ; aDim++)
223224
aMaxC.Add(aDim,std::abs(aPE[aDim]));
224225

226+
// 2- compute a point of dimension DimE-1, whithout the maximal coordinate
225227
int aDimMax = aMaxC.IndexExtre();
226228
int aCpt=0;
227229
tPtM aProj;
@@ -231,6 +233,8 @@ template<int DimE>
231233
if (aDim!= aDimMax)
232234
aProj[aCpt++] = aPE[aDim];
233235
}
236+
237+
// 3- if the coordinate is negative incremente the num of the map
234238
if (aPE[aDimMax]<0)
235239
aDimMax += DimE;
236240

0 commit comments

Comments
 (0)