eienmojiki commited on
Commit
064b099
·
verified ·
1 Parent(s): 38b98e3

Update filters.py

Browse files
Files changed (1) hide show
  1. filters.py +1 -1
filters.py CHANGED
@@ -41,7 +41,7 @@ def edge_enhance(image, intensity: float = 1.5):
41
  return cv2.filter2D(image, -1, kernel)
42
 
43
  @registry.register("Canny Edge", defaults={'lower_threshold': 100, 'upper_threshold': 200, 'convert_to_gray': True}, min_vals={'lower_threshold': 0, 'upper_threshold': 255}, max_vals={'lower_threshold': 255, 'upper_threshold': 255}, step_vals={'lower_threshold': 1, 'upper_threshold': 1})
44
- def canny_edge(image, lower_threshold=100, upper_threshold=200, convert_to_gray=True):
45
  if convert_to_gray and len(image.shape) == 3:
46
  gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
47
  else:
 
41
  return cv2.filter2D(image, -1, kernel)
42
 
43
  @registry.register("Canny Edge", defaults={'lower_threshold': 100, 'upper_threshold': 200, 'convert_to_gray': True}, min_vals={'lower_threshold': 0, 'upper_threshold': 255}, max_vals={'lower_threshold': 255, 'upper_threshold': 255}, step_vals={'lower_threshold': 1, 'upper_threshold': 1})
44
+ def canny_edge(image, lower_threshold: int=100, upper_threshold: int=200, convert_to_gray: bool=True):
45
  if convert_to_gray and len(image.shape) == 3:
46
  gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
47
  else: