处理过亮过暗的问题

This commit is contained in:
hesuicong committed 2026-01-09 16:06:44 +08:00
1 parent 7baf59740f
commit 9c1b1c3944
2 files changed
+1056 -211

No files matched your search

+1050 -207
View File
File diff suppressed because it is too large. Load diff
+6 -4
View File
@@ -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:
# 保存 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:
# 保存 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:
# 保存 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:
# 保存 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)