| 543 | } |
| 544 | |
| 545 | int |
| 546 | main(int argc, char** argv) |
| 547 | { |
| 548 | if (argc < 6) { |
| 549 | // clang-format off |
| 550 | pcl::console::print_info ("Syntax is: %s <source-pcd-file> <target-pcd-file> <keypoint-method> <descriptor-type> <surface-reconstruction-method>\n", argv[0]); |
| 551 | pcl::console::print_info("available <keypoint-methods>: 1 = Sift3D\n"); |
| 552 | pcl::console::print_info(" 2 = Harris3D\n"); |
| 553 | pcl::console::print_info(" 3 = Tomasi3D\n"); |
| 554 | pcl::console::print_info(" 4 = Noble3D\n"); |
| 555 | pcl::console::print_info(" 5 = Lowe3D\n"); |
| 556 | pcl::console::print_info(" 6 = Curvature3D\n\n"); |
| 557 | pcl::console::print_info("available <descriptor-types>: 1 = FPFH\n"); |
| 558 | pcl::console::print_info(" 2 = SHOTRGB\n"); |
| 559 | pcl::console::print_info(" 3 = PFH\n"); |
| 560 | pcl::console::print_info(" 4 = PFHRGB\n\n"); |
| 561 | pcl::console::print_info("available <surface-methods>: 1 = Greedy Projection\n"); |
| 562 | pcl::console::print_info(" 2 = Marching Cubes\n"); |
| 563 | // clang-format on |
| 564 | |
| 565 | return 1; |
| 566 | } |
| 567 | pcl::console::print_info("== MENU ==\n"); |
| 568 | pcl::console::print_info("1 - show/hide source point cloud\n"); |
| 569 | pcl::console::print_info("2 - show/hide target point cloud\n"); |
| 570 | pcl::console::print_info("3 - show/hide segmented source point cloud\n"); |
| 571 | pcl::console::print_info("4 - show/hide segmented target point cloud\n"); |
| 572 | pcl::console::print_info("5 - show/hide source key points\n"); |
| 573 | pcl::console::print_info("6 - show/hide target key points\n"); |
| 574 | pcl::console::print_info("7 - show/hide source2target correspondences\n"); |
| 575 | pcl::console::print_info("8 - show/hide target2source correspondences\n"); |
| 576 | pcl::console::print_info("9 - show/hide consistent correspondences\n"); |
| 577 | pcl::console::print_info("i - show/hide initial alignment\n"); |
| 578 | pcl::console::print_info("r - show/hide final registration\n"); |
| 579 | pcl::console::print_info("t - show/hide triangulation (surface reconstruction)\n"); |
| 580 | pcl::console::print_info("h - show visualizer options\n"); |
| 581 | pcl::console::print_info("q - quit\n"); |
| 582 | |
| 583 | pcl::PointCloud<pcl::PointXYZRGB>::Ptr source(new pcl::PointCloud<pcl::PointXYZRGB>); |
| 584 | pcl::io::loadPCDFile(argv[1], *source); |
| 585 | |
| 586 | pcl::PointCloud<pcl::PointXYZRGB>::Ptr target(new pcl::PointCloud<pcl::PointXYZRGB>); |
| 587 | pcl::io::loadPCDFile(argv[2], *target); |
| 588 | |
| 589 | int keypoint_type = atoi(argv[3]); |
| 590 | int descriptor_type = atoi(argv[4]); |
| 591 | int surface_type = atoi(argv[5]); |
| 592 | |
| 593 | pcl::Keypoint<pcl::PointXYZRGB, pcl::PointXYZI>::Ptr keypoint_detector; |
| 594 | |
| 595 | if (keypoint_type == 1) { |
| 596 | pcl::SIFTKeypoint<pcl::PointXYZRGB, pcl::PointXYZI>* sift3D = |
| 597 | new pcl::SIFTKeypoint<pcl::PointXYZRGB, pcl::PointXYZI>; |
| 598 | sift3D->setScales(0.01f, 3, 2); |
| 599 | sift3D->setMinimumContrast(0.0); |
| 600 | keypoint_detector.reset(sift3D); |
| 601 | } |
| 602 | else { |
nothing calls this directly
no test coverage detected