3bb6450 b4e2354
1
2
3
4
5
6
7
8
9
10
11
12
import cv2 def to_black(image, transfer_style): if transfer_style == "Hayao": output = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)# 转换为灰度图像 return output elif transfer_style == "Shinkai": return image elif transfer_style == "Kon Satoshi": return image else: return image