Skip to content

Commit ff988e8

Browse files
committed
lidar: add theta/phi err images
1 parent 84d3ec6 commit ff988e8

File tree

4 files changed

+34
-3
lines changed

4 files changed

+34
-3
lines changed

MMVII/include/MMVII_StaticLidar.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ private :
3636
std::string mRasterX;
3737
std::string mRasterY;
3838
std::string mRasterZ;
39+
std::string mRasterTheta;
40+
std::string mRasterPhi;
41+
std::string mRasterThetaErr;
42+
std::string mRasterPhiErr;
43+
44+
3945

4046
tREAL8 mThetaStart, mThetaStep;
4147
tREAL8 mPhiStart, mPhiStep;

MMVII/src/BundleAdjustment/Bundle_LidarPhotogra.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace MMVII
1515

1616
cBA_LidarPhotogra::cBA_LidarPhotogra(cMMVII_BundleAdj& aBA,const std::vector<std::string>& aParam) :
1717
mBA (aBA), // memorize the bundel adj class itself (access to optimizer)
18-
mModeSim (Str2E<eImatchCrit>(aParam.at(0))), // mode of matching (int 4 now) 0 ponct, 1 Census
18+
mModeSim (Str2E<eImatchCrit>(aParam.at(0))), // mode of matching
1919
mTri (aParam.at(1)), // Lidar point themself, stored as a triangulation
2020
mInterp (nullptr), // interpolator see bellow
2121
mEqLidPhgr (nullptr), // equation of egalisation Lidar/Phgr

MMVII/src/ImportFormat/ImportStaticScan.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,11 @@ int cAppli_ImportStaticScan::Exe()
804804
mSL_data.mRasterY = mSL_data.mStationName + "_" + mSL_data.mScanName + "_Y.tif";
805805
mSL_data.mRasterZ = mSL_data.mStationName + "_" + mSL_data.mScanName + "_Z.tif";
806806

807+
mSL_data.mRasterTheta = mSL_data.mStationName + "_" + mSL_data.mScanName + "_Theta.tif";
808+
mSL_data.mRasterPhi = mSL_data.mStationName + "_" + mSL_data.mScanName + "_Phi.tif";
809+
mSL_data.mRasterThetaErr = mSL_data.mStationName + "_" + mSL_data.mScanName + "_ThetaErr.tif";
810+
mSL_data.mRasterPhiErr = mSL_data.mStationName + "_" + mSL_data.mScanName + "_PhiErr.tif";
811+
807812
fillRaster<tU_INT1>(mSL_data.mRasterMask, [this](int i){auto aPtAng = mVectPtsTPD[i];return (aPtAng.z()<mDistMinToExist)?0:255;} );
808813
if (mHasIntensity)
809814
fillRaster<tU_INT1>( mSL_data.mRasterIntensity, [this](int i){return mVectPtsIntens[i]*255;} );
@@ -813,9 +818,24 @@ int cAppli_ImportStaticScan::Exe()
813818
fillRaster<float>(mSL_data.mRasterY, [this](int i){auto aPtXYZ = mVectPtsXYZ[i];return aPtXYZ.y();} );
814819
fillRaster<float>(mSL_data.mRasterZ, [this](int i){auto aPtXYZ = mVectPtsXYZ[i];return aPtXYZ.z();} );
815820

821+
fillRaster<float>(mSL_data.mRasterTheta, [this](int i){auto aPtAng = mVectPtsTPD[i];return aPtAng.x();} );
822+
fillRaster<float>(mSL_data.mRasterPhi, [this](int i){auto aPtAng = mVectPtsTPD[i];return aPtAng.y();} );
823+
fillRaster<float>(mSL_data.mRasterThetaErr, [this](int i)
824+
{
825+
auto aPtAng = mVectPtsTPD[i];
826+
tREAL8 aThetaCol = mSL_data.mThetaStart + mSL_data.mThetaStep * mVectPtsCol[i];
827+
aThetaCol = toMinusPiPlusPi(aThetaCol);
828+
return aPtAng.x()-aThetaCol;
829+
} );
830+
fillRaster<float>(mSL_data.mRasterPhiErr, [this](int i)
831+
{
832+
auto aPtAng = mVectPtsTPD[i];
833+
tREAL8 aPhiLine = mSL_data.mPhiStart + mSL_data.mPhiStep * mVectPtsLine[i];
834+
aPhiLine = toMinusPiPlusPi(aPhiLine);
835+
return aPtAng.y()-aPhiLine;
836+
} );
837+
816838
fillRaster<tU_INT4>("titiIndex.png", [](int i){return i;} );
817-
fillRaster<float>("titiTheta.tif", [this](int i){auto aPtAng = mVectPtsTPD[i];return aPtAng.x();} );
818-
fillRaster<float>("titiPhi.tif", [this](int i){auto aPtAng = mVectPtsTPD[i];return aPtAng.y();} );
819839

820840
SaveInFile(mSL_data, mPhProj.DPStaticLidar().FullDirOut() + mSL_data.mStationName + "_" + mSL_data.mScanName + ".xml");
821841

MMVII/src/Mesh/cStaticLidar.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ void cStaticLidar::AddData(const cAuxAr2007 & anAux)
102102
MMVII::AddData(cAuxAr2007("RasterX",anAux),mRasterX);
103103
MMVII::AddData(cAuxAr2007("RasterY",anAux),mRasterY);
104104
MMVII::AddData(cAuxAr2007("RasterZ",anAux),mRasterZ);
105+
106+
MMVII::AddData(cAuxAr2007("RasterTheta",anAux),mRasterTheta);
107+
MMVII::AddData(cAuxAr2007("RasterPhi",anAux),mRasterPhi);
108+
MMVII::AddData(cAuxAr2007("RasterThetaErr",anAux),mRasterThetaErr);
109+
MMVII::AddData(cAuxAr2007("RasterPhiErr",anAux),mRasterPhiErr);
105110
}
106111

107112
void AddData(const cAuxAr2007 & anAux,cStaticLidar & aSL)

0 commit comments

Comments
 (0)