Compare commits

...
13 Commits
Author SHA1 Message Date
hesuicong 94b3aee50a Merge branch 'master' of https://git.suwa3d.com/hesuicong/openMVS 2026-01-23 16:46:28 +08:00
hesuicong 53111c6275 染色问题处理 2026-01-23 16:45:56 +08:00
kehan 86627b5d24 将python缓存从库中忽略 2026-01-22 14:53:25 +08:00
kehan 7f14d73b13 修改了路径符合线上代码格式 2026-01-22 14:51:53 +08:00
hesuicong 3e6410b290 针对线上做进一步优化 2026-01-20 17:43:46 +08:00
hesuicong 9e3c78c92e 处理色彩斑驳的问题 2026-01-20 10:06:34 +08:00
hesuicong cb545049c2 修正路径问题 2026-01-19 09:49:32 +08:00
hesuicong b95b9ca27a 优化 2026-01-16 15:09:48 +08:00
hesuicong bccd31fea6 优化明暗问题 2026-01-13 14:09:48 +08:00
hesuicong f045aa534e 处理贴图问题 2026-01-12 17:01:19 +08:00
hesuicong 338243fa14 明亮问题处理 2026-01-12 16:01:03 +08:00
hesuicong 9c1b1c3944 处理过亮过暗的问题 2026-01-09 16:06:44 +08:00
hesuicong 7baf59740f ignore 2025-12-31 09:56:42 +08:00
3 changed files with 1143 additions and 215 deletions

No files matched your search

+38
View File
@@ -7,6 +7,7 @@
# Precompiled Headers
*.gch
*.pch
*.pyc
# Compiled Dynamic libraries
*.so
@@ -37,3 +38,40 @@ CMakeSettings.json
out/
bin*/
make*/
libs/MVS/texture_output/texture_0.png
libs/MVS/texture_output/texture_1.png
libs/MVS/texture_output/texture_2.png
libs/MVS/texture_output/texture_3.png
libs/MVS/texture_output/texture_4.png
libs/MVS/texture_output/texture_5.png
libs/MVS/texture_output/texture_6.png
libs/MVS/texture_output/texture_7.png
libs/MVS/texture_output/texture_8.png
libs/MVS/texture_output/texture_9.png
libs/MVS/texture_output/texture_10.png
libs/MVS/texture_output/texture_11.png
libs/MVS/texture_output/texture_12.png
libs/MVS/texture_output/texture_13.png
libs/MVS/texture_output/texture_14.png
libs/MVS/texture_output/texture_15.png
libs/MVS/texture_output/texture_16.png
libs/MVS/texture_output/texture_17.png
libs/MVS/texture_output/texture_18.png
libs/MVS/texture_output/texture_19.png
libs/MVS/texture_output/texture_20.png
libs/MVS/texture_output/texture_21.png
libs/MVS/texture_output/texture_22.png
libs/MVS/texture_output/texture_23.png
libs/MVS/texture_output/texture_24.png
libs/MVS/texture_output/texture_25.png
libs/MVS/texture_output/texture_26.png
libs/MVS/texture_output/texture_27.png
libs/MVS/texture_output/texture_28.png
libs/MVS/texture_output/texture_29.png
libs/MVS/texture_output/texture_30.png
libs/MVS/texture_output/texture_31.png
libs/MVS/texture_output/texture_32.png
libs/MVS/texture_output/texture_33.png
libs/MVS/texture_output/texture_34.png
libs/MVS/texture_output/texture_35.png
texture_output/texture_0.png
+1087 -210
View File
File diff suppressed because it is too large. Load diff
+18 -5
View File
@@ -4,7 +4,8 @@ import os
import numpy as np
from scipy.spatial.transform import Rotation
import sys
sys.path.append("/home/algo/Documents/openMVS/openMVS/libs/MVS/utils")
# sys.path.append("/home/algo/Documents/openMVS/openMVS/libs/MVS/utils")
sys.path.append("/root/code/openMVS/libs/MVS/utils")
from colmap_loader import read_cameras_text, read_images_text, read_int_text, write_int_text, read_indices_from_file
# from get_pose_matrix import get_w2c
import argparse
@@ -33,6 +34,7 @@ from typing import Dict, List, Set
import struct
import math
# import os
from pathlib import Path
CameraModel = collections.namedtuple(
"CameraModel", ["model_id", "model_name", "num_params"]
@@ -2175,6 +2177,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)}")
# 处理返回的可见面字典 - 转换为图像名到面编号集合的映射
@@ -2197,9 +2201,12 @@ class ModelProcessor:
for image_name, face_list in result3.items():
delete_edge_faces_map[image_name] = set(face_list)
# 保存 visible_faces_map
try:
with open(base_path + "/_visible_faces_map.txt", "w", encoding='utf-8') as map_file:
file_name = "_visible_faces_map.txt"
file_path = Path(base_path) / file_name
with open(file_path, "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 +2216,9 @@ class ModelProcessor:
# 保存 face_visible_relative
try:
with open(base_path + "/_face_visible_relative.txt", "w", encoding='utf-8') as relative_file:
file_name = "_face_visible_relative.txt"
file_path = Path(base_path) / file_name
with open(file_path, "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 +2226,9 @@ class ModelProcessor:
# 保存 edge_faces_map
try:
with open(base_path + "/_edge_faces_map.txt", "w", encoding='utf-8') as map_file2:
file_name = "_edge_faces_map.txt"
file_path = Path(base_path) / file_name
with open(file_path, "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 +2237,9 @@ class ModelProcessor:
# 保存 delete_edge_faces_map
try:
with open(base_path + "/_delete_edge_faces_map.txt", "w", encoding='utf-8') as map_file3:
file_name = "_delete_edge_faces_map.txt"
file_path = Path(base_path) / file_name
with open(file_path, "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)