cartoonize / black.py
YANGYYYY's picture
Update black.py
3bb6450 verified
raw
history blame
No virus
339 Bytes
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