Browse Source

处理过亮过暗的问题

master
hesuicong 1 month ago
parent
commit
9c1b1c3944
  1. 1271
      libs/MVS/SceneTexture.cpp
  2. 10
      libs/MVS/mask_face_occlusion.py

1271
libs/MVS/SceneTexture.cpp

File diff suppressed because it is too large Load Diff

10
libs/MVS/mask_face_occlusion.py

@ -2175,6 +2175,8 @@ class ModelProcessor: @@ -2175,6 +2175,8 @@ class ModelProcessor:
base_path: 基础文件路径
"""
os.makedirs(base_path, exist_ok = True)
print(f"save_occlusion_data {base_path}, {len(result1)}, {len(result2)}, {len(result3)}")
# 处理返回的可见面字典 - 转换为图像名到面编号集合的映射
@ -2199,7 +2201,7 @@ class ModelProcessor: @@ -2199,7 +2201,7 @@ class ModelProcessor:
# 保存 visible_faces_map
try:
with open(base_path + "/_visible_faces_map.txt", "w", encoding='utf-8') as map_file:
with open(base_path + "_visible_faces_map.txt", "w", encoding='utf-8') as map_file:
for image_name, face_set in visible_faces_map.items():
# 写入图像名称和所有面ID,用空格分隔
line = image_name + " " + " ".join(str(face) for face in face_set) + "\n"
@ -2209,7 +2211,7 @@ class ModelProcessor: @@ -2209,7 +2211,7 @@ class ModelProcessor:
# 保存 face_visible_relative
try:
with open(base_path + "/_face_visible_relative.txt", "w", encoding='utf-8') as relative_file:
with open(base_path + "_face_visible_relative.txt", "w", encoding='utf-8') as relative_file:
for face in face_visible_relative:
relative_file.write(str(face) + "\n")
except IOError as e:
@ -2217,7 +2219,7 @@ class ModelProcessor: @@ -2217,7 +2219,7 @@ class ModelProcessor:
# 保存 edge_faces_map
try:
with open(base_path + "/_edge_faces_map.txt", "w", encoding='utf-8') as map_file2:
with open(base_path + "_edge_faces_map.txt", "w", encoding='utf-8') as map_file2:
for image_name, face_set in edge_faces_map.items():
line = image_name + " " + " ".join(str(face) for face in face_set) + "\n"
map_file2.write(line)
@ -2226,7 +2228,7 @@ class ModelProcessor: @@ -2226,7 +2228,7 @@ class ModelProcessor:
# 保存 delete_edge_faces_map
try:
with open(base_path + "/_delete_edge_faces_map.txt", "w", encoding='utf-8') as map_file3:
with open(base_path + "_delete_edge_faces_map.txt", "w", encoding='utf-8') as map_file3:
for image_name, face_set in delete_edge_faces_map.items():
line = image_name + " " + " ".join(str(face) for face in face_set) + "\n"
map_file3.write(line)

Loading…
Cancel
Save