Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -117,11 +117,11 @@ def process_video_for_canny(video, width, height):
|
|
117 |
"""
|
118 |
print("Processing video for canny control...")
|
119 |
canny_video = []
|
120 |
-
detect_resolution = video[0].size
|
|
|
121 |
|
122 |
for frame in video:
|
123 |
-
|
124 |
-
canny_video.append(canny_processor(frame, low_threshold=50, high_threshold=200, detect_resolution=detect_resolution, image_resolution=(width, height)))
|
125 |
|
126 |
return canny_video
|
127 |
|
|
|
117 |
"""
|
118 |
print("Processing video for canny control...")
|
119 |
canny_video = []
|
120 |
+
detect_resolution = max(video[0].size[0],video[0].size[1])
|
121 |
+
image_resolution = max(width, height)
|
122 |
|
123 |
for frame in video:
|
124 |
+
canny_video.append(canny_processor(frame, low_threshold=50, high_threshold=200, detect_resolution=detect_resolution, image_resolution=image_resolution))
|
|
|
125 |
|
126 |
return canny_video
|
127 |
|