Skip to content

Commit

Permalink
Merge pull request #899 from alicevision/dev/debugDebevec
Browse files Browse the repository at this point in the history
[HDR] Update the scale constraint
  • Loading branch information
fabiencastan authored Sep 21, 2020
2 parents f8a7263 + a95b2e1 commit 7e4b00a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/aliceVision/hdr/DebevecCalibrate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ bool DebevecCalibrate::process(const std::vector<std::vector<ImageSample>>& ldrS
// Enforce f(0.5) = 0.0
//
const size_t pos_middle = std::floor(channelQuantization / 2);
A(channelQuantization - 1, channelQuantization - 1) += 1.0f;
A(pos_middle, pos_middle) += 1.0f;

// M is
//
Expand Down
1 change: 1 addition & 0 deletions src/software/pipeline/main_LdrToHdrCalibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ int aliceVision_main(int argc, char** argv)
}

response.exponential();
response.scale();
break;
}
case ECalibrationMethod::GROSSBERG:
Expand Down
16 changes: 15 additions & 1 deletion src/software/pipeline/main_imageMatching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,10 +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)
{
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 7e4b00a

Please sign in to comment.