MCPcopy Create free account
hub / github.com/city-super/Octree-GS / getParsedColmapData

Method getParsedColmapData

SIBR_viewers/src/core/scene/ParseData.cpp:406–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404
405
406 void ParseData::getParsedColmapData(const std::string& dataset_path, const int fovXfovY_flag, const bool capreal_flag)
407 {
408 _basePathName = dataset_path + "/colmap/stereo";
409
410 _camInfos = sibr::InputCamera::loadColmap(_basePathName + "/sparse", 0.01f, 1000.0f, fovXfovY_flag);
411
412 if (_camInfos.empty()) {
413 SIBR_ERR << "Colmap camera calibration file does not exist at /" + _basePathName + "/sparse/." << std::endl;
414 }
415
416 _imgPath = _basePathName + "/images/";
417
418 std::string blackListFile = dataset_path + "/colmap/database.blacklist";
419
420 if (sibr::fileExists(blackListFile)) {
421 std::string line;
422 std::vector<std::string> splitS;
423 std::ifstream blackListFileF(blackListFile);
424 if (blackListFileF.is_open()) {
425 while (safeGetline(blackListFileF, line)) {
426
427 split(splitS, line, is_any_of(" "));
428 //std::cout << splitS.size() << std::endl;
429 if (splitS.size() > 0) {
430 for (uint cam_id = 0; cam_id < _camInfos.size(); cam_id++) {
431 if (find_any(splitS, _camInfos[cam_id]->name())) {
432 _camInfos[cam_id]->setActive(false);
433 }
434 }
435 splitS.clear();
436 }
437 else
438 break;
439 }
440 }
441 }
442
443 populateFromCamInfos();
444
445 if (capreal_flag) {
446 _meshPath = dataset_path + "/capreal/mesh.obj";
447 _meshPath = (sibr::fileExists(_meshPath)) ? _meshPath : dataset_path + "/capreal/mesh.ply";
448 }
449 else {
450 _meshPath = dataset_path + "/colmap/stereo/meshed-delaunay.ply";
451 }
452
453 }
454
455 void ParseData::getParsedNVMData(const std::string& dataset_path, const std::string& customPath, const std::string& nvm_path)
456 {

Callers

nothing calls this directly

Calls 7

fileExistsFunction · 0.85
find_anyFunction · 0.85
splitFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45
nameMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected