From 095512e0d7684864543c46f062ba1ca4b8bb8849 Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Thu, 30 Jan 2020 22:08:02 +0100 Subject: [PATCH] [mvsUtils] min/maxDepth metadata in depth maps should be optional --- src/aliceVision/mvsUtils/MultiViewParams.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/aliceVision/mvsUtils/MultiViewParams.cpp b/src/aliceVision/mvsUtils/MultiViewParams.cpp index 9900f32003..6175c85b11 100644 --- a/src/aliceVision/mvsUtils/MultiViewParams.cpp +++ b/src/aliceVision/mvsUtils/MultiViewParams.cpp @@ -648,8 +648,11 @@ StaticVector MultiViewParams::findCamsWhichIntersectsHexahedron(const Point const float maxDepth = metadata.get_float("AliceVision:maxDepth", -1); if(minDepth == -1 && maxDepth == -1) - throw std::runtime_error(std::string("Cannot find min / max depth metadata in image: ") + getImagePath(rc)); - + { + ALICEVISION_LOG_WARNING("Cannot find min / max depth metadata in image: " << getImagePath(rc) << ". Assumes that all images should be used."); + tcams.push_back(rc); + } + else { Point3d rchex[8]; getCamHexahedron(CArr.at(rc), iCamArr.at(rc), getWidth(rc), getHeight(rc), minDepth, maxDepth, rchex);