From e966ed5aa5e0dfeb8b952399b3881dd345340c31 Mon Sep 17 00:00:00 2001 From: zhh Date: Fri, 26 Sep 2025 10:44:29 +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:=201=E3=80=81design-print=E4=B8=BA=E8=A7=A3=E5=86=B3s?= =?UTF-8?q?ketch=E5=8E=9F=E5=9B=BE=E5=A4=AA=E7=81=B0=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=8D=B0=E8=8A=B1=E9=A2=9C=E8=89=B2=E4=BE=BF=E6=9A=97=20=20?= =?UTF-8?q?=E4=B8=8A=E8=89=B2=E9=83=A8=E5=88=86=E4=BD=BF=E7=94=A8=E5=8E=9F?= =?UTF-8?q?=E5=A7=8B=E6=96=B9=E6=A1=88=202=E3=80=81cv2.resize=20=20?= =?UTF-8?q?=E6=8F=92=E5=80=BC=E7=AE=97=E6=B3=95=E6=9B=B4=E6=8D=A2=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E5=8D=87resize=E5=90=8E=E5=9B=BE=E7=89=87=E8=B4=A8?= =?UTF-8?q?=E9=87=8F=20fix=EF=BC=88=E4=BF=AE=E5=A4=8Dbug=EF=BC=89:=20refac?= =?UTF-8?q?tor=EF=BC=88=E9=87=8D=E6=9E=84=EF=BC=89:=20test(=E5=A2=9E?= =?UTF-8?q?=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/color.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/service/design_fast/pipeline/color.py b/app/service/design_fast/pipeline/color.py index 32e550b..99ba8eb 100644 --- a/app/service/design_fast/pipeline/color.py +++ b/app/service/design_fast/pipeline/color.py @@ -48,7 +48,7 @@ class Color: resize_pattern[mask_3ch] = png_rgb[mask_3ch] resize_pattern = cv2.resize(resize_pattern, (dim_image_w, dim_image_h), interpolation=cv2.INTER_AREA) closed_mo = np.expand_dims(result['mask'], axis=2).repeat(3, axis=2) - gray_mo = np.expand_dims(result['gray'], axis=2).repeat(3, axis=2) + gray_mo = np.expand_dims(cv2.cvtColor(result['image'], cv2.COLOR_BGR2GRAY), axis=2).repeat(3, axis=2) get_image_fir = resize_pattern * (closed_mo / 255) * (gray_mo / 255) result['pattern_image'] = get_image_fir.astype(np.uint8) result['final_image'] = result['pattern_image']