| 519 | } |
| 520 | |
| 521 | GeometricVerifierController::GeometricVerifierController( |
| 522 | const GeometricVerifierOptions& options, |
| 523 | const TwoViewGeometryOptions& geometry_options, |
| 524 | std::shared_ptr<FeatureMatcherCache> cache) |
| 525 | : geometry_options_(geometry_options), |
| 526 | cache_(std::move(cache)), |
| 527 | options_(options), |
| 528 | is_setup_(false) { |
| 529 | THROW_CHECK(geometry_options_.Check()); |
| 530 | |
| 531 | const int num_threads = GetEffectiveNumThreads(options_.num_threads); |
| 532 | |
| 533 | // Run geometric verification |
| 534 | for (int i = 0; i < num_threads; ++i) { |
| 535 | verifiers_.emplace_back( |
| 536 | std::make_unique<VerifierWorker>(geometry_options_, |
| 537 | cache_, |
| 538 | &verifier_queue_, |
| 539 | &output_queue_, |
| 540 | options_.use_existing_relative_pose)); |
| 541 | } |
| 542 | } |
| 543 | |
| 544 | GeometricVerifierController::~GeometricVerifierController() { |
| 545 | verifier_queue_.Wait(); |
nothing calls this directly
no test coverage detected