| 304 | } |
| 305 | |
| 306 | int RunSpatialMatcher(int argc, char** argv) { |
| 307 | OptionManager options; |
| 308 | options.AddDatabaseOptions(); |
| 309 | options.AddSpatialPairingOptions(); |
| 310 | if (!options.Parse(argc, argv)) { |
| 311 | return EXIT_FAILURE; |
| 312 | } |
| 313 | |
| 314 | std::unique_ptr<QApplication> app; |
| 315 | if (options.feature_matching->RequiresOpenGL()) { |
| 316 | app = std::make_unique<QApplication>(argc, argv); |
| 317 | } |
| 318 | |
| 319 | auto matcher = CreateSpatialFeatureMatcher(*options.spatial_pairing, |
| 320 | *options.feature_matching, |
| 321 | *options.two_view_geometry, |
| 322 | *options.database_path); |
| 323 | |
| 324 | if (app != nullptr) { |
| 325 | RunThreadWithOpenGLContext(matcher.get()); |
| 326 | } else { |
| 327 | matcher->Start(); |
| 328 | matcher->Wait(); |
| 329 | } |
| 330 | |
| 331 | return EXIT_SUCCESS; |
| 332 | } |
| 333 | |
| 334 | int RunTransitiveMatcher(int argc, char** argv) { |
| 335 | OptionManager options; |
nothing calls this directly
no test coverage detected