-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.cpp
48 lines (39 loc) · 980 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "widget.h"
#include "map.h"
#include <QApplication>
#include <opencv2/opencv.hpp>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Widget w;
w.show();
return a.exec();
//return 0;
}
#ifdef this_function_is_for_simplifying_map_file
int main(int argc, char *argv[])
{
using namespace cv;
using namespace std;
Map* map = new Map();
map->loadFromFile("C:/Users/fzheng/Documents/QtProjects/MapViewer/odoslam_old_big_file.map");
FileStorage file("C:/Users/fzheng/Documents/QtProjects/MapViewer/odoslam.map", FileStorage::WRITE);
file << "KeyFrames" << "[";
for(Mat& pose: map->Poses) {
file << "{";
file << "Pose" << pose;
file << "}";
}
file << "]";
file << "MapPoints" << "[";
for(Point3f& pt : map->Points) {
file << "{";
file << "Pos" << pt;
file << "}";
}
file << "]";
file.release();
delete map;
return 0;
}
#endif