Skip to content

Commit 0cc13ce

Browse files
committed
Added Output directory for ERRAngISO and ERRAndSfm
1 parent 8618e82 commit 0cc13ce

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

Modules/GroundTruth/GroundTruthKeyFrame.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ namespace defSLAM
5858
* pcl library to determinate the normals of the point cloud and compares them
5959
* with the estimated by the NRSfM and the SfN. NRSfM tends to be quite noisy.
6060
*/
61-
float GroundTruthKeyFrame::estimateAngleErrorAndScale()
61+
float GroundTruthKeyFrame::estimateAngleErrorAndScale(std::string output_path)
6262
{
6363
size_t nval = this->mvKeysUn.size();
6464
cv::Mat iLeft(this->imGray.clone());
@@ -197,9 +197,9 @@ namespace defSLAM
197197
std::ostringstream out;
198198
out << std::internal << std::setfill('0') << std::setw(5)
199199
<< (unsigned int)(this->mTimeStamp);
200-
std::string name("ErrorAngIso" + out.str() + "-" + std::to_string(is) +
200+
std::string name(output_path+"/ErrorAngIso" + out.str() + "-" + std::to_string(is) +
201201
".txt");
202-
std::string name2("ErrorAngSfN" + out.str() + "-" + std::to_string(is) +
202+
std::string name2(output_path+"/ErrorAngSfN" + out.str() + "-" + std::to_string(is) +
203203
".txt");
204204
is++;
205205
GroundTruthTools::saveResults(ErrorAngleIso, name);

Modules/GroundTruth/GroundTruthKeyFrame.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ namespace defSLAM
5555
* pcl library to determinate the normals of the point cloud and compares them
5656
* with the estimated by the NRSfM and the SfN. NRSfM tends to be quite noisy.
5757
*/
58-
float estimateAngleErrorAndScale();
58+
float estimateAngleErrorAndScale(std::string output_path);
5959

6060
// Drawer purposes. Not used now
6161
std::vector<cv::Point3f> mvLocalMapPoints, mvStereoMapPoints;

Modules/Mapping/DefLocalMapping.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ namespace defSLAM
5656
chiLimit_(0.07)
5757
{
5858
cv::FileStorage fSettings(strSettingPath, cv::FileStorage::READ);
59+
output_path = (std::string)fSettings["File.outputdir"];
5960
pointsToTemplate_ = fSettings["LocalMapping.pointsToTemplate"];
6061
chiLimit_ = fSettings["LocalMapping.chiLimit"];
6162
double reg_ = fSettings["LocalMapping.Schwarp.Regularizer"];
@@ -215,7 +216,7 @@ namespace defSLAM
215216
if (saveResults_)
216217
{
217218
float scale =
218-
static_cast<GroundTruthKeyFrame *>(kfForTemplate)->estimateAngleErrorAndScale();
219+
static_cast<GroundTruthKeyFrame *>(kfForTemplate)->estimateAngleErrorAndScale(output_path);
219220
std::cout << "Scale Error Keyframe : " << scale << " " << std::endl;
220221
}
221222
if (kfForTemplate != mpMap->GetAllKeyFrames()[0])

Modules/Mapping/DefLocalMapping.h

+2
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ namespace defSLAM
135135
double bendingReg_;
136136
// Save results
137137
bool saveResults_;
138+
private:
139+
string output_path;
138140
};
139141

140142
} // namespace defSLAM

Modules/Viewer/DefViewer.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace defSLAM
4444
RegLap = fSettings["Regularizer.laplacian"];
4545
RegInex = fSettings["Regularizer.Inextensibility"];
4646
RegTemp = fSettings["Regularizer.temporal"];
47-
output_path = (std::string) fSettings["File.outputdir"];
47+
output_path = (std::string)fSettings["File.outputdir"];
4848

4949
}
5050

Thirdparty/ORBSLAM_2/src/Tracking.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace ORB_SLAM2
6161

6262
cv::FileStorage fSettings(strSettingPath, cv::FileStorage::READ);
6363
// Load output dir
64-
output_path = (std::string) fSettings["File.outputdir"];
64+
output_path = (std::string) fSettings["File.outputdir"];
6565
// Load camera parameters from settings file
6666
float fx = fSettings["Camera.fx"];
6767
float fy = fSettings["Camera.fy"];

0 commit comments

Comments
 (0)