From ca9de47023ea40be5b5d55cdcfb2ebad889b5771 Mon Sep 17 00:00:00 2001 From: hesuicong Date: Mon, 8 Dec 2025 10:48:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E5=BE=84bug=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/MVS/SceneTexture.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libs/MVS/SceneTexture.cpp b/libs/MVS/SceneTexture.cpp index 02935e1..e2013d3 100644 --- a/libs/MVS/SceneTexture.cpp +++ b/libs/MVS/SceneTexture.cpp @@ -840,8 +840,9 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr // if (strName!="74_8" && strName!="13_8" && strName!="61_8" && // strName!="92_8" && strName!="101_8" && strName!="102_8" && // strName!="103_8" && strName!="112_8" && strName!="113_8" && - // strName!="122_8" && strName!="123_8" && strName!="132_8") - if (strName!="76_8") + // strName!="122_2" && strName!="123_2" && strName!="121_2") + // if (strName!="122_2") + if (strName!="122_2" && strName!="123_2" && strName!="121_2") { continue; } @@ -9447,6 +9448,7 @@ bool Scene::LoadVisibleFacesData(std::map>& std::map>& edge_faces_map, std::map>& delete_edge_faces_map, std::string& basePath) { + printf("LoadVisibleFacesData %s\n", basePath.c_str()); std::ifstream mapFile(basePath + "_visible_faces_map.txt"); if (!mapFile.is_open()) { return false; @@ -9592,13 +9594,20 @@ bool Scene::TextureMesh(unsigned nResolutionLevel, unsigned nMinResolution, unsi printf("id=%s\n", id.c_str()); #ifdef MASK_FACE_OCCLUSION + /* fs::path p(baseFileName.c_str()); // 2. 获取父路径 (e.g., /path/to/data/scene) fs::path parent = p.parent_path(); - // 4. 转换为字符串,并附加一个路径分隔符 // ( / "" 会自动处理,确保 /path/to/data 变为 /path/to/data/ ) std::string basePath = (parent / "").string(); + */ + std::string basePath = ""; + size_t lastSlash = baseFileName.find_last_of('/'); + size_t secondLastSlash = baseFileName.find_last_of('/', lastSlash - 1); + if (secondLastSlash == std::string::npos) + basePath = baseFileName; + basePath = baseFileName.substr(0, secondLastSlash + 1); // printf("basePath=%s\n", basePath.c_str());