From 79865d9a96201a11204cf82acbd43bc899e51576 Mon Sep 17 00:00:00 2001 From: zhh Date: Mon, 22 Sep 2025 11:17:59 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=88=E6=96=B0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=89:=20=20=20fix=EF=BC=88=E4=BF=AE=E5=A4=8Dbug=EF=BC=89:?= =?UTF-8?q?=20:=20refactor=EF=BC=88=E9=87=8D=E6=9E=84=EF=BC=89:=20test(?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/design_fast/pipeline/print_painting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/service/design_fast/pipeline/print_painting.py b/app/service/design_fast/pipeline/print_painting.py index c77867c..b9bebfc 100644 --- a/app/service/design_fast/pipeline/print_painting.py +++ b/app/service/design_fast/pipeline/print_painting.py @@ -151,8 +151,8 @@ class PrintPainting: img_bg = cv2.bitwise_and(result['pattern_image'], result['pattern_image'], mask=cv2.bitwise_not(print_mask)) mask_mo = np.expand_dims(print_mask, axis=2).repeat(3, axis=2) gray_mo = np.expand_dims(result['gray'], axis=2).repeat(3, axis=2) - # img_fg = (img_fg * (mask_mo / 255) * (gray_mo / 255)).astype(np.uint8) # 当sketch 图像为灰色时(非纯白) , 印花*灰度图像会导致印花在sketch上颜色变暗 - img_fg = (img_fg * (mask_mo / 255) ).astype(np.uint8) # 不过灰度图像 + img_fg = (img_fg * (mask_mo / 255) * (gray_mo / 255)).astype(np.uint8) # 当sketch 图像为灰色时(非纯白) , 印花*灰度图像会导致印花在sketch上颜色变暗 + # img_fg = (img_fg * (mask_mo / 255) ).astype(np.uint8) # 不过灰度图像 result['final_image'] = cv2.add(img_bg, img_fg) canvas = np.full_like(result['final_image'], 255)