Skip to content

Commit 91e0769

Browse files
author
Fabien Servant
committed
Add minInliers to relative pose
1 parent 6e2cdf2 commit 91e0769

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/software/pipeline/main_relativePoseEstimating.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ int aliceVision_main(int argc, char** argv)
140140
std::string outputDirectory;
141141
int rangeStart = -1;
142142
int rangeSize = 1;
143-
const size_t minInliers = 35;
143+
size_t minInliers = 35;
144144
bool enforcePureRotation = false;
145145
size_t countIterations = 1024;
146146

@@ -160,6 +160,7 @@ int aliceVision_main(int argc, char** argv)
160160
optionalParams.add_options()
161161
("enforcePureRotation,e", po::value<bool>(&enforcePureRotation)->default_value(enforcePureRotation), "Enforce pure rotation in estimation.")
162162
("countIterations", po::value<size_t>(&countIterations)->default_value(countIterations), "Maximal number of iterations.")
163+
("minInliers", po::value<size_t>(&minInliers)->default_value(minInliers), "Minimal number of inliers for a valid ransac.")
163164
("rangeStart", po::value<int>(&rangeStart)->default_value(rangeStart), "Range image index start.")
164165
("rangeSize", po::value<int>(&rangeSize)->default_value(rangeSize), "Range size.");
165166
// clang-format on
@@ -329,6 +330,11 @@ int aliceVision_main(int argc, char** argv)
329330
continue;
330331
}
331332

333+
if (vecInliers.size() < minInliers)
334+
{
335+
continue;
336+
}
337+
332338
reconstructed.pose = geometry::Pose3(T);
333339
}
334340

0 commit comments

Comments
 (0)