| 335 | } // unnamed namespace |
| 336 | |
| 337 | int main(int argc, LPCTSTR* argv) |
| 338 | { |
| 339 | #ifdef _DEBUGINFO |
| 340 | // set _crtBreakAlloc index or use _CrtSetBreakAlloc() to stop in <dbgheap.c> at allocation |
| 341 | _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);// | _CRTDBG_CHECK_ALWAYS_DF); |
| 342 | #endif |
| 343 | |
| 344 | Application application; |
| 345 | if (!application.Initialize(argc, argv)) |
| 346 | return EXIT_FAILURE; |
| 347 | |
| 348 | TD_TIMER_START(); |
| 349 | |
| 350 | Scene scene(OPT::nMaxThreads); |
| 351 | |
| 352 | // convert data from Polycam format to OpenMVS |
| 353 | if (!ParseScene(scene, MAKE_PATH_FULL(WORKING_FOLDER_FULL, OPT::strInputFileName))) |
| 354 | return EXIT_FAILURE; |
| 355 | |
| 356 | // write OpenMVS input data |
| 357 | scene.Save(MAKE_PATH_SAFE(OPT::strOutputFileName), (ARCHIVE_TYPE)OPT::nArchiveType); |
| 358 | |
| 359 | VERBOSE("Exported data: %u platforms, %u cameras, %u poses, %u images (%s)", |
| 360 | scene.platforms.size(), scene.images.size(), scene.images.size(), scene.images.size(), |
| 361 | TD_TIMER_GET_FMT().c_str()); |
| 362 | return EXIT_SUCCESS; |
| 363 | } |
| 364 | /*----------------------------------------------------------------*/ |
nothing calls this directly
no test coverage detected