feat(新功能):

fix(修复bug):  印花部分,修改no_seg_sketch_print 丢失overall 印花问题
docs(文档变更):
refactor(重构):
test(增加测试):
This commit is contained in:
zchengrong
2025-11-04 16:53:27 +08:00
parent 8ccbbe41b1
commit 0e7ef80eed

View File

@@ -142,7 +142,7 @@ class NoSegPrintPainting:
print_mask = cv2.bitwise_and(result['mask'], cv2.cvtColor(mask_background, cv2.COLOR_BGR2GRAY))
img_fg = cv2.bitwise_or(print_background, print_background, mask=print_mask)
three_channel_image = cv2.merge([cv2.bitwise_not(print_mask), cv2.bitwise_not(print_mask), cv2.bitwise_not(print_mask)])
img_bg = cv2.bitwise_and(result['final_image'], three_channel_image)
img_bg = cv2.bitwise_and(result['no_seg_sketch_print'], three_channel_image)
result['final_image'] = cv2.add(img_bg, img_fg)
canvas = np.full_like(result['final_image'], 255)
temp_bg = np.expand_dims(cv2.bitwise_not(result['mask']), axis=2).repeat(3, axis=2)