From fd637f9defa7f8863397db0a79065e2fd597a596 Mon Sep 17 00:00:00 2001 From: hesuicong Date: Mon, 16 Nov 2026 09:52:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cartoon_texture/fuse_textures.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/cartoon_texture/fuse_textures.py b/cartoon_texture/fuse_textures.py index 5b02dfe..1fdc542 100644 --- a/cartoon_texture/fuse_textures.py +++ b/cartoon_texture/fuse_textures.py @@ -103,12 +103,12 @@ def post_process_clahe(img, clip_limit=1.5, grid_size=(8, 8), mix_ratio=0.3): def main(): # === 参数配置 === - img1_path = "/home/algo/Documents/openMVS/openMVS/cartoon_texture/data/642713/642713.o.jpg" # 图1:模糊但纯净 + img1_path = "/home/algo/Documents/openMVS/openMVS/cartoon_texture/data/642713/642713.qz.jpg" # 图1:模糊但纯净 img2_path = "/home/algo/Documents/openMVS/openMVS/cartoon_texture/data/642713/642713.mesh7.png" # 图2:清晰但有印染 output_path = "/home/algo/Documents/openMVS/openMVS/cartoon_texture/data/642713/642713.jpg" # 印染检测参数(可按实际效果微调) - DIFF_THRESH = 0.12 # 差异阈值 + DIFF_THRESH = 0.05 # 差异阈值 GRAD_THRESH = 0.03 # 梯度阈值 VAR_THRESH = 0.005 # 局部方差阈值 @@ -159,14 +159,13 @@ def main(): print(f"Done! Result saved to {output_path}") print(f"Debug mask saved to stain_mask_debug.png") - # 显示结果 - cv2.imshow("Original (mesh7.1)", img2) - cv2.imshow("Reference (n1)", img1) - cv2.imshow("Stain Mask", mask_viz) - cv2.imshow("Fused Result", fused_bgr) - cv2.waitKey(0) - cv2.destroyAllWindows() - + # # 显示结果 + # cv2.imshow("Original (mesh7.1)", img2) + # cv2.imshow("Reference (n1)", img1) + # cv2.imshow("Stain Mask", mask_viz) + # cv2.imshow("Fused Result", fused_bgr) + # cv2.waitKey(0) + # cv2.destroyAllWindows() if __name__ == "__main__": main() \ No newline at end of file