Spaces:
Running
Running
Update black.py
Browse files
black.py
CHANGED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
def to_black(image, transfer_style):
|
2 |
+
if transfer_style == "Hayao":
|
3 |
+
output = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)# 转换为灰度图像
|
4 |
+
return output
|
5 |
+
elif transfer_style == "Shinkai":
|
6 |
+
return image
|
7 |
+
elif transfer_style == "Kon Satoshi":
|
8 |
+
return image
|
9 |
+
else:
|
10 |
+
return image
|