Skip to content

Commit b06eba9

Browse files
author
Fabien Servant
committed
PoseInjecting can be pass through
1 parent 94f67d9 commit b06eba9

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/software/utils/main_sfmPoseInjecting.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,24 +186,35 @@ int aliceVision_main(int argc, char** argv)
186186
"Input SfMData file.")
187187
("output,o", po::value<std::string>(&sfmDataOutputFilename)->required(),
188188
"SfMData output file with the injected poses.")
189-
("posesFilename,p", po::value<std::string>(&posesFilename)->required(),
190-
"JSON file containing the poses to inject.")
191189
("rotationFormat,r", po::value<ERotationFormat>(&format)->required(),
192190
"Rotation format for the input poses: EulerZXY.");
191+
192+
po::options_description optionalParams("Optional parameters");
193+
optionalParams.add_options()
194+
("posesFilename,p", po::value<std::string>(&posesFilename)->default_value(posesFilename),
195+
"JSON file containing the poses to inject.");
193196
// clang-format on
194197

195198
CmdLine cmdline("AliceVision SfM Pose injecting");
196199

197200
cmdline.add(requiredParams);
201+
cmdline.add(optionalParams);
198202
if (!cmdline.execute(argc, argv))
199203
{
200204
return EXIT_FAILURE;
201205
}
206+
202207

203208
// Set maxThreads
204209
HardwareContext hwc = cmdline.getHardwareContext();
205210
omp_set_num_threads(hwc.getMaxThreads());
206211

212+
if (posesFilename.empty())
213+
{
214+
ALICEVISION_LOG_INFO("Nothing to do.");
215+
return EXIT_SUCCESS;
216+
}
217+
207218
// Load input SfMData scene
208219
sfmData::SfMData sfmData;
209220
if (!sfmDataIO::load(sfmData, sfmDataFilename, sfmDataIO::ESfMData::ALL))

0 commit comments

Comments
 (0)