-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.cpp
52 lines (39 loc) · 1.64 KB
/
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
49
50
51
52
//
// create by tiezheng yu on 2019-2-21
//----- useage: ./main /home/icey/Desktop/project/KITTI/2011_09_26_drive_0005_sync/velodyne_points/data/0000000100.bin /home/icey/Desktop/project/KITTI/2011_09_26_drive_0005_sync/image_02/data/0000000100.png
//
#include "common_include.h"
#include "data_loader.h"
#include "mrf.h"
int main(int argc, char **argv)
{
string data_file = "/home/icey/Desktop/project/KITTI/2011_09_26_drive_0005_sync";
PointCloudLoader::Ptr point_cloud_loader (new PointCloudLoader(data_file));
ImageLoader::Ptr image_loader (new ImageLoader(data_file));
Calibration::Ptr calibration (new Calibration);
// pcl::visualization::PCLVisualizer viewer("result");//pcl viewer
for(int i = 130; i < 153; i++)
{
cout << "========== fram number :" << i << "=============================" << endl;
boost::timer timer;
point_cloud_loader->readKittiPclBinData(i);
image_loader->readKittiImage(i);
MRF::Ptr mrf (new MRF);
mrf->calibration_ = calibration;
mrf->raw_cloud_ = point_cloud_loader->raw_cloud_;
mrf->raw_image_ = image_loader->image_;
mrf->MRFProcess();
cout<<"total cost time: "<<timer.elapsed() <<endl;
// cv::waitKey(10);
// cv::imshow("image", mrf->raw_image_);
// cv::waitKey(0);
// cv::destroyWindow("image");
// viewer.addPointCloud(mrf->result_cloud_,to_string(i));
// viewer.setBackgroundColor(0,0,0);
// viewer.addCoordinateSystem();
// viewer.spin();
// viewer.removeCoordinateSystem();
// viewer.removeAllPointClouds();
}
return 0;
}