Skip to content

Commit

Permalink
Add minInliers to relative pose
Browse files Browse the repository at this point in the history
  • Loading branch information
servantftechnicolor committed Jan 17, 2025
1 parent 11139c5 commit c32b8b9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/software/pipeline/main_relativePoseEstimating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ int aliceVision_main(int argc, char** argv)
std::string outputDirectory;
int rangeStart = -1;
int rangeSize = 1;
const size_t minInliers = 35;
size_t minInliers = 35;
bool enforcePureRotation = false;
size_t countIterations = 1024;

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

if (vecInliers.size() < minInliers)
{
continue;
}

reconstructed.pose = geometry::Pose3(T);
}

Expand Down

0 comments on commit c32b8b9

Please sign in to comment.