Skip to content

Commit

Permalink
Merge pull request #1450 from alicevision/mug/applyCalibrationPassInput
Browse files Browse the repository at this point in the history
[software] applyCalibration: simply copy input data when calibrated data filename is empty
  • Loading branch information
fabiencastan authored Jun 5, 2023
2 parents 2ba55b3 + e0718fe commit e8d138e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/software/utils/main_applyCalibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ int aliceVision_main(int argc, char **argv)
return EXIT_FAILURE;
}

// Special case to handle:
// If calibrated SfMData filename is an empty string
// simply copy the input SfMData
if (sfmDataCalibratedFilename.empty())
{
// Save sfmData to disk
if (!sfmDataIO::Save(sfmData, outSfMDataFilename, sfmDataIO::ESfMData(sfmDataIO::ALL)))
{
ALICEVISION_LOG_ERROR("The output SfMData file '" << outSfMDataFilename << "' cannot be written.");
return EXIT_FAILURE;
}

return EXIT_SUCCESS;
}

// Load calibrated scene
sfmData::SfMData sfmDataCalibrated;
if (!sfmDataIO::Load(sfmDataCalibrated, sfmDataCalibratedFilename, sfmDataIO::ESfMData::INTRINSICS))
Expand Down

0 comments on commit e8d138e

Please sign in to comment.