MCPcopy Create free account
hub / github.com/cdcseacave/openMVS / ParseScene

Function ParseScene

apps/InterfaceMVSNet/InterfaceMVSNet.cpp:646–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644}
645
646bool ParseScene(Scene& scene)
647{
648 #if defined(_SUPPORT_CPP17) && (!defined(__GNUC__) || (__GNUC__ > 7))
649 String strPath(MAKE_PATH_FULL(WORKING_FOLDER_FULL, OPT::strInputFileName));
650 Util::ensureValidFolderPath(strPath);
651 const std::filesystem::path path(static_cast<const std::string&>(strPath));
652 enum Type {
653 MVSNet = 0,
654 NERFSTUDIO,
655 RTMV,
656 } sceneType = MVSNet;
657 for (const std::filesystem::directory_entry& entry : std::filesystem::directory_iterator(path)) {
658 if (entry.path().extension() == RTMV_CAMERAS_EXT) {
659 if (entry.path().filename() == NERFSTUDIO_TRANSFORMS) {
660 sceneType = NERFSTUDIO;
661 break;
662 }
663 sceneType = RTMV;
664 }
665 }
666 switch (sceneType) {
667 case NERFSTUDIO: return ParseSceneNerfstudio(scene, strPath);
668 case RTMV: return ParseSceneRTMV(scene, strPath);
669 default: return ParseSceneMVSNet(scene, strPath);
670 }
671 #else
672 VERBOSE("error: C++17 is required to parse MVSNet format");
673 return false;
674 #endif // _SUPPORT_CPP17
675}
676
677} // unnamed namespace
678

Callers 1

mainFunction · 0.70

Calls 2

ParseSceneNerfstudioFunction · 0.85
ParseSceneMVSNetFunction · 0.85

Tested by

no test coverage detected