Vela commited on
Commit
750d172
·
1 Parent(s): 0dee8e8
src/app/image_conversion.py CHANGED
@@ -30,4 +30,7 @@ def display_converted_image(st, option, file_path):
30
  brightness_factor = st.slider("Select Brightness Factor", min_value=0.5, max_value=3.0, value=1.2, step=0.1)
31
  file = home_page.change_image_color_format(file_path,"increase_brightness",factor=brightness_factor)
32
  st.image(file, caption="Brightened Image", width=500)
 
 
 
33
 
 
30
  brightness_factor = st.slider("Select Brightness Factor", min_value=0.5, max_value=3.0, value=1.2, step=0.1)
31
  file = home_page.change_image_color_format(file_path,"increase_brightness",factor=brightness_factor)
32
  st.image(file, caption="Brightened Image", width=500)
33
+ elif option == "blur_image":
34
+ file = home_page.change_image_color_format(file_path,"Blur_Image")
35
+ st.image(file, width=500)
36
 
src/modules/home_page.py CHANGED
@@ -20,6 +20,9 @@ def change_image_color_format(file_path, format_type, angle=0,factor=1.5):
20
  elif format_type == "increase_brightness":
21
  brightened_img = increase_brightness(img, factor)
22
  return brightened_img
 
 
 
23
 
24
 
25
  # Function to rotate an OpenCV image (numpy.ndarray)
 
20
  elif format_type == "increase_brightness":
21
  brightened_img = increase_brightness(img, factor)
22
  return brightened_img
23
+ elif format_type.lower() == "blur_image":
24
+ imgBlur = cv2.GaussianBlur(img,(7,7),0)
25
+ return imgBlur
26
 
27
 
28
  # Function to rotate an OpenCV image (numpy.ndarray)