Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,12 @@ def convert_to_grayscale(image):
|
|
66 |
|
67 |
def convert_and_save(image, filter_type, intensity):
|
68 |
filtered_image = apply_filter(image, filter_type, intensity)
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
def get_filter_description(filter_type):
|
72 |
descriptions = {
|
|
|
66 |
|
67 |
def convert_and_save(image, filter_type, intensity):
|
68 |
filtered_image = apply_filter(image, filter_type, intensity)
|
69 |
+
|
70 |
+
# numpy array를 PIL 이미지로 변환
|
71 |
+
original_image_pil = Image.fromarray(cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR))
|
72 |
+
filtered_image_pil = Image.fromarray(cv2.cvtColor(filtered_image, cv2.COLOR_RGB2BGR))
|
73 |
+
|
74 |
+
return original_image_pil, filtered_image_pil # 원본과 필터 적용된 이미지를 반환
|
75 |
|
76 |
def get_filter_description(filter_type):
|
77 |
descriptions = {
|