| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | #include "exe/gui.h" |
| |
|
| | #include "util/opengl_utils.h" |
| | #include "util/option_manager.h" |
| |
|
| | namespace colmap { |
| |
|
| | int RunGraphicalUserInterface(int argc, char** argv) { |
| | #ifndef GUI_ENABLED |
| | std::cerr << "ERROR: Cannot start colmap GUI; colmap was built without GUI " |
| | "support or QT dependency is missing." |
| | << std::endl; |
| | return EXIT_FAILURE; |
| | #else |
| | using namespace colmap; |
| |
|
| | OptionManager options; |
| |
|
| | std::string import_path; |
| |
|
| | if (argc > 1) { |
| | options.AddDefaultOption("import_path", &import_path); |
| | options.AddAllOptions(); |
| | options.Parse(argc, argv); |
| | } |
| |
|
| | #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) |
| | QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); |
| | QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); |
| | #endif |
| |
|
| | QApplication app(argc, argv); |
| |
|
| | MainWindow main_window(options); |
| | main_window.show(); |
| |
|
| | if (!import_path.empty()) { |
| | main_window.ImportReconstruction(import_path); |
| | } |
| |
|
| | return app.exec(); |
| | #endif |
| | } |
| |
|
| | int RunProjectGenerator(int argc, char** argv) { |
| | std::string output_path; |
| | std::string quality = "high"; |
| |
|
| | OptionManager options; |
| | options.AddRequiredOption("output_path", &output_path); |
| | options.AddDefaultOption("quality", &quality, "{low, medium, high, extreme}"); |
| | options.Parse(argc, argv); |
| |
|
| | OptionManager output_options; |
| | output_options.AddAllOptions(); |
| |
|
| | StringToLower(&quality); |
| | if (quality == "low") { |
| | output_options.ModifyForLowQuality(); |
| | } else if (quality == "medium") { |
| | output_options.ModifyForMediumQuality(); |
| | } else if (quality == "high") { |
| | output_options.ModifyForHighQuality(); |
| | } else if (quality == "extreme") { |
| | output_options.ModifyForExtremeQuality(); |
| | } else { |
| | LOG(FATAL) << "Invalid quality provided"; |
| | } |
| |
|
| | output_options.Write(output_path); |
| |
|
| | return EXIT_SUCCESS; |
| | } |
| |
|
| | } |
| |
|