@@ -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