feat(新功能): 1、design-print为解决sketch原图太灰导致印花颜色便暗 上色部分使用原始方案 2、cv2.resize 插值算法更换,提升resize后图片质量 fix(修复bug): refactor(重构): test(增加测试):
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user