Skip to content

Commit 410fc07

Browse files
authored
fix: arg type for std::ceil and typo in glomap::EstimateRelativePoses (#94)
1 parent 7ab1ced commit 410fc07

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

glomap/estimators/relpose_estimation.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ void EstimateRelativePoses(ViewGraph& view_graph,
2020

2121
const int64_t num_image_pairs = valid_pair_ids.size();
2222
const int64_t kNumChunks = 10;
23-
const int64_t inverval = std::ceil(num_image_pairs / kNumChunks);
23+
const int64_t interval =
24+
std::ceil(static_cast<double>(num_image_pairs) / kNumChunks);
2425
LOG(INFO) << "Estimating relative pose for " << num_image_pairs << " pairs";
2526
for (int64_t chunk_id = 0; chunk_id < kNumChunks; chunk_id++) {
2627
std::cout << "\r Estimating relative pose: " << chunk_id * kNumChunks << "%"
2728
<< std::flush;
28-
const int64_t start = chunk_id * inverval;
29+
const int64_t start = chunk_id * interval;
2930
const int64_t end =
30-
std::min<int64_t>((chunk_id + 1) * inverval, num_image_pairs);
31+
std::min<int64_t>((chunk_id + 1) * interval, num_image_pairs);
3132

3233
#pragma omp parallel for schedule(dynamic) private( \
3334
points2D_1, points2D_2, inliers)

0 commit comments

Comments
 (0)