Skip to content

Commit

Permalink
[App] Image Matching check that we only have pinhole camera for frustum
Browse files Browse the repository at this point in the history
  • Loading branch information
servantftechnicolor committed Sep 21, 2020
1 parent e1fe269 commit 82ee2e6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/software/pipeline/main_imageMatching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,15 @@ int aliceVision_main(int argc, char** argv)

if(method == EImageMatchingMethod::FRUSTUM_OR_VOCABULARYTREE)
{
bool onlyPinhole = true;
for (auto & cam : sfmDataA.getIntrinsics()) {
if (!camera::isPinhole(cam.second->getType())) {
onlyPinhole = false;
}
}

const std::size_t reconstructedViews = sfmDataA.getValidViews().size();
if(reconstructedViews == 0)
if(reconstructedViews == 0 || (onlyPinhole == false))
{
ALICEVISION_LOG_INFO("FRUSTUM_OR_VOCABULARYTREE: Use VOCABULARYTREE matching (no known pose).");
method = EImageMatchingMethod::VOCABULARYTREE;
Expand Down

0 comments on commit 82ee2e6

Please sign in to comment.