| 50 | } |
| 51 | |
| 52 | void ShowHelp( |
| 53 | const std::vector<std::pair<std::string, command_func_t>>& commands) { |
| 54 | ShowVersion(); |
| 55 | |
| 56 | std::cout << "Usage:\n"; |
| 57 | std::cout << " colmap [command] [options]\n"; |
| 58 | |
| 59 | std::cout << "Documentation:\n"; |
| 60 | std::cout << " https://colmap.github.io/\n"; |
| 61 | |
| 62 | std::cout << "Example usage:\n"; |
| 63 | std::cout << " colmap help [ -h, --help ]\n"; |
| 64 | std::cout << " colmap gui\n"; |
| 65 | std::cout << " colmap gui -h [ --help ]\n"; |
| 66 | std::cout << " colmap automatic_reconstructor -h [ --help ]\n"; |
| 67 | std::cout << " colmap automatic_reconstructor --image_path IMAGES " |
| 68 | "--workspace_path WORKSPACE\n"; |
| 69 | std::cout << " colmap feature_extractor --image_path IMAGES --database_path " |
| 70 | "DATABASE\n"; |
| 71 | std::cout << " colmap exhaustive_matcher --database_path DATABASE\n"; |
| 72 | std::cout << " colmap mapper --image_path IMAGES --database_path DATABASE " |
| 73 | "--output_path MODEL\n"; |
| 74 | std::cout << " ...\n"; |
| 75 | |
| 76 | std::cout << "Available commands:\n"; |
| 77 | std::cout << " help\n"; |
| 78 | std::cout << " version\n"; |
| 79 | for (const auto& command : commands) { |
| 80 | std::cout << " " << command.first << '\n'; |
| 81 | } |
| 82 | std::cout << '\n'; |
| 83 | } |
| 84 | |
| 85 | } // namespace |
| 86 | |