Skip to content

Commit cf282a0

Browse files
author
deseilligny
committed
Export Affinity in det
1 parent c42dfbb commit cf282a0

File tree

6 files changed

+32
-2
lines changed

6 files changed

+32
-2
lines changed

MMVII/include/MMVII_Geom2D.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,8 @@ template <class Type> class cAffin2D
505505
/// Basic 1.0
506506
Type Divisor(const tPt & aPInt) const;
507507

508+
void AddData(const cAuxAr2007 & anAux);
509+
508510
private :
509511
tPt mTr;
510512
tPt mVX;
@@ -516,6 +518,7 @@ template <class Type> class cAffin2D
516518
typedef cAffin2D<tREAL8> cAff2D_r;
517519
cBox2dr ImageOfBox(const cAff2D_r & aAff,const cBox2dr & aBox);
518520

521+
void AddData(const cAuxAr2007 & anAux,cAff2D_r&);
519522

520523
template <class Type> class cHomogr2D
521524
{
@@ -724,7 +727,7 @@ class cEllipse
724727
cPt2dr Tgt(const cPt2dr &) const;
725728
cPt2dr NormalInt(const cPt2dr &) const;
726729

727-
cPt2dr InterSemiLine(tREAL8 aTeta) const; /// compute the intesection of 1/2 line of direction teta with the ellipse
730+
cPt2dr InterSemiLine(tREAL8 aTetacAff2D_r) const; /// compute the intesection of 1/2 line of direction teta with the ellipse
728731

729732
/// get points on ellipse that are +- less regularly sampled at a given step
730733
void GetTetasRegularSample(std::vector<tREAL8> & aVTetas,const tREAL8 & aDist);
@@ -851,7 +854,8 @@ struct cSaveExtrEllipe
851854
cSaveExtrEllipe ();
852855
static std::string NameFile(const cPhotogrammetricProject & ,const cSetMesPtOf1Im &,bool Input);
853856

854-
cEllipse mEllipse;
857+
cAff2D_r mAffIm2Ref;
858+
cEllipse mEllipse;
855859
std::string mNameCode;
856860
tREAL4 mBlack;
857861
tREAL4 mWhite;

MMVII/src/CodedTarget/cCdts_CheckBoardTarget.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
namespace MMVII
55
{
6+
/*
7+
return mAffIm2Mod.Inverse(aPMod);
8+
*/
9+
610

711
/* ********************************************* */
812
/* */
@@ -598,6 +602,7 @@ void cCdEllipse::EstimateAffinity()
598602

599603
bool cCdEllipse::BOutCB() const {return mBOutCB;}
600604
bool cCdEllipse::IsCircle() const {return mIsCircle;}
605+
const cAff2D_r & cCdEllipse::AffIm2Mod() const {return mAffIm2Mod;}
601606

602607
bool cCdEllipse::IsOk() const {return mIsOk;}
603608
void cCdEllipse::AssertOk() const

MMVII/src/CodedTarget/cCheckBoardTargetExtract.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,7 @@ void cAppliCheckBoardTargetExtract::DoExport()
569569

570570
cEllipse anEl = aCdtM.Ell().Scale(aCdtM.mScale);
571571
cSaveExtrEllipe aSEE(anEl,aCdtM.mBlack,aCdtM.mWhite,aCode);
572+
aSEE.mAffIm2Ref = aCdtM.AffIm2Mod();
572573
aVSavE.push_back(aSEE);
573574
// cSaveExtrEllipe anESave(*anEE,aCode);
574575
}

MMVII/src/CodedTarget/cCheckBoardTargetExtract.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ class cCdEllipse : public cCdRadiom
138138
cPt2dr I2M(const cPt2dr & aPIM) const;
139139
bool IsCircle() const;
140140

141+
const cAff2D_r & AffIm2Mod() const;
142+
143+
141144

142145
/** compute the "normalized" length to encoding part*/
143146
std::pair<tREAL8,cPt2dr> Length2CodingPart(tREAL8 aPropGray,const cPt2dr & aModCenterBit) const;

MMVII/src/CodedTarget/cCircTargetExtract.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,15 @@ cSaveExtrEllipe::cSaveExtrEllipe(const cCircTargExtr & aCTE,const std::string &
187187

188188

189189
cSaveExtrEllipe::cSaveExtrEllipe() :
190+
mAffIm2Ref (cAff2D_r::Translation(cPt2dr(0,0))),
190191
mEllipse (cEllipse(cDenseVect<tREAL8>(std::vector<tREAL8>{1,0,1,0,0}) ,cPt2dr(0,0)))
191192
{
192193
}
193194

194195

195196
void AddData(const cAuxAr2007 & anAux, cSaveExtrEllipe & aCTE)
196197
{
198+
AddData(cAuxAr2007("AffinIm2Ref",anAux) , aCTE.mAffIm2Ref);
197199
AddData(cAuxAr2007("Ellipse",anAux) , aCTE.mEllipse);
198200
AddData(cAuxAr2007("NameCode",anAux) , aCTE.mNameCode);
199201
AddData(cAuxAr2007("Black",anAux) , aCTE.mBlack);

MMVII/src/Geom2D/GeomsMappings2D.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,21 @@ template <class Type> cAffin2D<Type> cAffin2D<Type>::MapInverse() const
299299
}
300300

301301

302+
template <class Type> void cAffin2D<Type>::AddData(const cAuxAr2007 & anAux)
303+
{
304+
MMVII::AddData(cAuxAr2007("Tr",anAux),mTr);
305+
MMVII::AddData(cAuxAr2007("Vx",anAux),mVX);
306+
MMVII::AddData(cAuxAr2007("Vx",anAux),mVY);
307+
308+
if (anAux.Ar().Input())
309+
*this = cAffin2D<Type>(mTr,mVX,mVY);
310+
}
311+
312+
void AddData(const cAuxAr2007 & anAux,cAff2D_r& anAff)
313+
{
314+
anAff.AddData(anAux);
315+
}
316+
302317

303318

304319
template <class Type> cPtxd<Type,2> cAffin2D<Type>::VecValue(const tPt & aP) const

0 commit comments

Comments
 (0)