MogensR commited on
Commit
038f648
·
1 Parent(s): f7db227

Update config/app_config.py

Browse files
Files changed (1) hide show
  1. config/app_config.py +14 -0
config/app_config.py CHANGED
@@ -101,6 +101,12 @@ class ProcessingConfig:
101
  close_px: int = int(os.getenv('CLOSE_PX', '0'))
102
  morph_iterations: int = int(os.getenv('MORPH_ITERATIONS', '1'))
103
 
 
 
 
 
 
 
104
  # Output settings
105
  output_dir: str = os.getenv('OUTPUT_DIR', 'outputs')
106
  output_format: str = os.getenv('OUTPUT_FORMAT', 'mp4')
@@ -229,6 +235,14 @@ def _validate_config(self):
229
  self.close_px = max(0, min(20, self.close_px))
230
  self.morph_iterations = max(1, min(10, self.morph_iterations))
231
 
 
 
 
 
 
 
 
 
232
  # Validate output settings
233
  valid_formats = ['mp4', 'avi', 'mov', 'webm', 'mkv']
234
  if self.output_format not in valid_formats:
 
101
  close_px: int = int(os.getenv('CLOSE_PX', '0'))
102
  morph_iterations: int = int(os.getenv('MORPH_ITERATIONS', '1'))
103
 
104
+ # Edge processing attributes (ADDED)
105
+ edge_blur_px: int = int(os.getenv('EDGE_BLUR_PX', '0'))
106
+ edge_feather_px: int = int(os.getenv('EDGE_FEATHER_PX', '2'))
107
+ edge_threshold: float = float(os.getenv('EDGE_THRESHOLD', '0.5'))
108
+ edge_detect_method: str = os.getenv('EDGE_DETECT_METHOD', 'canny')
109
+
110
  # Output settings
111
  output_dir: str = os.getenv('OUTPUT_DIR', 'outputs')
112
  output_format: str = os.getenv('OUTPUT_FORMAT', 'mp4')
 
235
  self.close_px = max(0, min(20, self.close_px))
236
  self.morph_iterations = max(1, min(10, self.morph_iterations))
237
 
238
+ # Validate edge processing (ADDED)
239
+ self.edge_blur_px = max(0, min(30, self.edge_blur_px))
240
+ self.edge_feather_px = max(0, min(20, self.edge_feather_px))
241
+ self.edge_threshold = max(0.0, min(1.0, self.edge_threshold))
242
+ valid_edge_methods = ['canny', 'sobel', 'laplacian', 'scharr']
243
+ if self.edge_detect_method not in valid_edge_methods:
244
+ self.edge_detect_method = 'canny'
245
+
246
  # Validate output settings
247
  valid_formats = ['mp4', 'avi', 'mov', 'webm', 'mkv']
248
  if self.output_format not in valid_formats: