Skip to content

Commit

Permalink
Frames with poses are keyframes
Browse files Browse the repository at this point in the history
  • Loading branch information
servantftechnicolor committed Jan 10, 2025
1 parent 5a90d46 commit a77ba95
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/aliceVision/keyframe/KeyframeSelector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,8 @@ bool KeyframeSelector::writeSfMData(const std::string& mediaPath,

bool KeyframeSelector::writeSfMDataFromSfMData(const std::string& mediaPath)
{
auto& keyframesPoses = _outputSfmKeyframes.getPoses();

auto& keyframesViews = _outputSfmKeyframes.getViews();
auto& framesViews = _outputSfmFrames.getViews();

Expand Down Expand Up @@ -1292,6 +1294,18 @@ bool KeyframeSelector::writeSfMDataFromSfMData(const std::string& mediaPath)
{
viewId = views[i]->getViewId();
intrinsicId = views[i]->getIntrinsicId();
IndexT poseId = views[i]->getPoseId();

bool hasPose = inputSfm.isPoseAndIntrinsicDefined(viewId);
if (hasPose)
{
ALICEVISION_LOG_INFO("A fully calibrated view (Id:" << viewId << ") is moved to keyframes");
_selectedFrames[i] = '1';

//Make sure to keep the pose
keyframesPoses.emplace(poseId, inputSfm.getPoses().at(poseId));
}

if (_selectedFrames[i] == '1')
{
keyframesViews.emplace(viewId, views[i]);
Expand Down

0 comments on commit a77ba95

Please sign in to comment.