Skip to content

Commit

Permalink
Add command argument process
Browse files Browse the repository at this point in the history
  • Loading branch information
P-Chao committed Aug 11, 2017
1 parent ff746b6 commit 478cfc8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
13 changes: 11 additions & 2 deletions PointCloudRegistration/main.cpp
Expand Up @@ -39,6 +39,15 @@ const double SAC_MAX_CORRESPONDENCE_DIST = 1000; // 2000
const double SAC_MIN_CORRESPONDENCE_DIST = 3;

int main(int argc, char *argv[]){
string filename1, filename2;
if (argc == 3){
filename1 = argv[1];
filename2 = argv[2];
} else{
filename1 = "pcd/a3.pcd";
filename2 = "pcd/a4.pcd";
}

time_t starttime = time(NULL);
cout << "Loading clouds...\n";
cout.flush();
Expand All @@ -47,8 +56,8 @@ int main(int argc, char *argv[]){
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud1(new pcl::PointCloud<pcl::PointXYZ>);
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud2(new pcl::PointCloud<pcl::PointXYZ>);

pcl::io::loadPCDFile("pcd/a3.pcd", *cloud1);
pcl::io::loadPCDFile("pcd/a4.pcd", *cloud2);
pcl::io::loadPCDFile(filename1, *cloud1);
pcl::io::loadPCDFile(filename2, *cloud2);

// downsample the clouds
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud1ds(new pcl::PointCloud<pcl::PointXYZ>);
Expand Down
11 changes: 9 additions & 2 deletions Readme.md
@@ -1,4 +1,11 @@
SCA-IA
===
SCA-IA point cloud registration
Developed By VS2013update5 and PCL(Point Cloud Library)
SCA-IA point cloud registration and ICP to solve RT matrix
Developed By VS2013update5 and PCL(Point Cloud Library)

use program in cmd:

```
PointCloudRegistration.exe source.pcd target.pcd
```

0 comments on commit 478cfc8

Please sign in to comment.