Skip to content

Commit 589bdf0

Browse files
authored
Merge pull request #1818 from alicevision/dev/changeDefaultSfm
Output second sfm for visualisation
2 parents ef1affb + fd2e6cd commit 589bdf0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/software/pipeline/main_sfmExpanding.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ int aliceVision_main(int argc, char** argv)
8383
std::string sfmDataOutputFilename;
8484
std::string tracksFilename;
8585
std::string meshFilename;
86+
std::string outputSfMViewsAndPoses;
8687

8788
std::size_t localizerEstimatorMaxIterations = 50000;
8889
double localizerEstimatorError = 0.0;
@@ -112,6 +113,7 @@ int aliceVision_main(int argc, char** argv)
112113

113114
po::options_description optionalParams("Optional parameters");
114115
optionalParams.add_options()
116+
("outputViewsAndPoses", po::value<std::string>(&outputSfMViewsAndPoses)->default_value(outputSfMViewsAndPoses), "Path to the output SfMData file (with only views and poses).")
115117
("localizerEstimatorMaxIterations", po::value<std::size_t>(&localizerEstimatorMaxIterations)->default_value(localizerEstimatorMaxIterations), "Maximum number of RANSAC iterations.")
116118
("localizerEstimatorError", po::value<double>(&localizerEstimatorError)->default_value(0.0), "Reprojection error threshold (in pixels) for the localizer estimator (0 for default value according to the estimator).")
117119
("lockScenePreviouslyReconstructed", po::value<bool>(&lockScenePreviouslyReconstructed)->default_value(lockScenePreviouslyReconstructed),"Lock/Unlock scene previously reconstructed.")
@@ -278,7 +280,12 @@ int aliceVision_main(int argc, char** argv)
278280

279281
sfmDataIO::save(sfmData, sfmDataOutputFilename, sfmDataIO::ESfMData::ALL);
280282

281-
283+
if (!outputSfMViewsAndPoses.empty())
284+
{
285+
sfmDataIO::save(sfmData, outputSfMViewsAndPoses,
286+
sfmDataIO::ESfMData(sfmDataIO::VIEWS | sfmDataIO::EXTRINSICS | sfmDataIO::INTRINSICS)
287+
);
288+
}
282289

283290
return EXIT_SUCCESS;
284291
}

0 commit comments

Comments
 (0)