处理过亮过暗的问题
This commit is contained in:
1 parent
7baf59740f
commit
9c1b1c3944
2 files changed
+1057
-212
No files matched your search
+1051
-208
File diff suppressed because it is too large.
Load diff
@@ -2174,6 +2174,8 @@ class ModelProcessor:
|
||||
result3: 删除边面字典,包含图像名称和对应的删除边面列表
|
||||
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)
|
||||
|
||||
Reference in new issue
Block a user