Skip to content

Commit

Permalink
[software] ImageMatching: add comment and explicit log for scenes wit…
Browse files Browse the repository at this point in the history
…h non-pinhole cameras
  • Loading branch information
fabiencastan committed Sep 21, 2020
1 parent 82ee2e6 commit a95b2e1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/software/pipeline/main_imageMatching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,17 +739,24 @@ int aliceVision_main(int argc, char** argv)

if(method == EImageMatchingMethod::FRUSTUM_OR_VOCABULARYTREE)
{
// Frustum intersection is only implemented for pinhole cameras
bool onlyPinhole = true;
for (auto & cam : sfmDataA.getIntrinsics()) {
if (!camera::isPinhole(cam.second->getType())) {
onlyPinhole = false;
break;
}
}

const std::size_t reconstructedViews = sfmDataA.getValidViews().size();
if(reconstructedViews == 0 || (onlyPinhole == false))
if(reconstructedViews == 0)
{
ALICEVISION_LOG_INFO("FRUSTUM_OR_VOCABULARYTREE: Use VOCABULARYTREE matching (no known pose).");
ALICEVISION_LOG_INFO("FRUSTUM_OR_VOCABULARYTREE: Use VOCABULARYTREE matching, as there is no known pose.");
method = EImageMatchingMethod::VOCABULARYTREE;
}
else if(!onlyPinhole)
{
ALICEVISION_LOG_INFO("FRUSTUM_OR_VOCABULARYTREE: Use VOCABULARYTREE matching, as the scene contains non-pinhole cameras.");
method = EImageMatchingMethod::VOCABULARYTREE;
}
else if(reconstructedViews == sfmDataA.getViews().size())
Expand Down

0 comments on commit a95b2e1

Please sign in to comment.