Skip to content

Commit 7dc0a97

Browse files
committed
More "code cleaning" in Difodo class and apps
1 parent 075a21b commit 7dc0a97

File tree

5 files changed

+4
-15
lines changed

5 files changed

+4
-15
lines changed

apps/DifOdometry-Camera/DifOdometry_Camera.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ void CDifodoCamera::loadFrame()
147147
const openni::DepthPixel* pDepthRow = (const openni::DepthPixel*)framed.getData();
148148
int rowSize = framed.getStrideInBytes() / sizeof(openni::DepthPixel);
149149

150-
//float x, y, z;
151-
//const float inv_f = float(640/width)/525.0f; //********************mirar esto**********************
152-
153150
for (int yc = height-1; yc >= 0; --yc)
154151
{
155152
const openni::DepthPixel* pDepth = pDepthRow;
@@ -284,7 +281,6 @@ void CDifodoCamera::initializeScene()
284281
//User-interface information
285282
utils::CImage img_legend;
286283
img_legend.loadFromXPM(legend_xpm);
287-
//img_legend.loadFromFile("C:/Users/Mariano/Desktop/legend.jpg");
288284
COpenGLViewportPtr legend = scene->createViewport("legend");
289285
legend->setViewportPosition(20, 20, 348, 200);
290286
legend->setImageView(img_legend);

apps/DifOdometry-Camera/DifOdometry_Camera_main.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ int main(int num_arg, char *argv[])
137137
odo.filterSpeedAndPoseUpdate();
138138
cout << endl << "Difodo execution time(ms): " << odo.execution_time;
139139
odo.updateScene();
140-
141140
break;
142141

143142
//Start and stop continous odometry

apps/DifOdometry-Datasets/DifOdometry_Datasets.cpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
+---------------------------------------------------------------------------+ */
99

1010
#include "DifOdometry_Datasets.h"
11-
#include <mrpt/opengl.h>
12-
#include <mrpt/gui.h>
1311

1412
using namespace mrpt;
1513
using namespace mrpt::opengl;
@@ -50,7 +48,6 @@ void CDifodoDatasets::loadConfiguration(const utils::CConfigFileBase &ini )
5048
if (f_gt.fail())
5149
throw std::runtime_error("\nError finding the groundtruth file: it should be contained in the same folder than the rawlog file");
5250

53-
5451
char aux[100];
5552
f_gt.getline(aux, 100);
5653
f_gt.getline(aux, 100);
@@ -94,7 +91,7 @@ void CDifodoDatasets::loadConfiguration(const utils::CConfigFileBase &ini )
9491
const int dz = floor(float(resv)/float(rows));
9592
const int dy = floor(float(resh)/float(cols));
9693

97-
duv_threshold = 0.001*(dz + dy)*(cam_mode*downsample); //Faster with cam_mode=4, the filter should be adjusted if it changes
94+
duv_threshold = 0.001*(dz + dy)*(cam_mode*downsample);
9895
dt_threshold = 0.2*fps;
9996
dif_threshold = 0.001*(dz + dy)*(cam_mode*downsample);
10097
difuv_surroundings = 0.005*(dz + dy)*(cam_mode*downsample);
@@ -241,7 +238,6 @@ void CDifodoDatasets::initializeScene()
241238
//User-interface information
242239
utils::CImage img_legend;
243240
img_legend.loadFromXPM(legend_xpm);
244-
//img_legend.loadFromFile("C:/Users/Mariano/Desktop/legend.jpg");
245241
COpenGLViewportPtr legend = scene->createViewport("legend");
246242
legend->setViewportPosition(20, 20, 348, 200);
247243
legend->setImageView(img_legend);
@@ -635,11 +631,8 @@ void CDifodoDatasets::writeToLogFile()
635631

636632
f_res << abs_error_tras << " ";
637633
f_res << abs_error_rot << " ";
638-
639634
f_res << execution_time << " ";
640-
641635
f_res << num_valid_points << " ";
642-
643636
f_res << "\n";
644637
}
645638

apps/DifOdometry-Datasets/DifOdometry_Datasets.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <mrpt/slam/CRawlog.h>
1515
#include <mrpt/slam/CObservation3DRangeScan.h>
1616
#include <mrpt/opengl.h>
17-
#include <mrpt/gui/CDisplayWindow3D.h>
17+
#include <mrpt/gui.h>
1818
#include <iostream>
1919
#include "legend.xpm"
2020

libs/vision/src/CDifodo.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void CDifodo::filterAndDownsample()
227227
yy(y,x) = (iniy+y*dy - disp_y)*depth_wf(iniy+y*dy,inix+x*dx)*inv_f;
228228
}
229229

230-
//cout << endl << "Tiempo del filtro + downsample (ms): " << 1000*clock.Tac();
230+
//cout << endl << "Execution time - filter + downsample (ms): " << 1000*clock.Tac();
231231
}
232232

233233
void CDifodo::findBorders()
@@ -324,6 +324,7 @@ void CDifodo::findValidPoints()
324324
num_valid_points++;
325325
}
326326

327+
327328
void CDifodo::solveDepthSystem()
328329
{
329330
utils::CTicTac clock;

0 commit comments

Comments
 (0)