Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,10 +32,10 @@ def detect_ellipses(img_path):
|
|
32 |
imgG = cv2.resize(imgG, (int(iw), int(ih)))
|
33 |
|
34 |
if is_landscape:
|
35 |
-
ipad = int(
|
36 |
imgG = cv2.copyMakeBorder(imgG, ipad, ipad, 0, 0, cv2.BORDER_REPLICATE)
|
37 |
else:
|
38 |
-
ipad = int(
|
39 |
imgG = cv2.copyMakeBorder(imgG, 0, 0, ipad, ipad, cv2.BORDER_REPLICATE)
|
40 |
|
41 |
aamed = pyAAMED(ammed_size, ammed_size)
|
|
|
32 |
imgG = cv2.resize(imgG, (int(iw), int(ih)))
|
33 |
|
34 |
if is_landscape:
|
35 |
+
ipad = int(ammed_size - ih)
|
36 |
imgG = cv2.copyMakeBorder(imgG, ipad, ipad, 0, 0, cv2.BORDER_REPLICATE)
|
37 |
else:
|
38 |
+
ipad = int(ammed_size - iw)
|
39 |
imgG = cv2.copyMakeBorder(imgG, 0, 0, ipad, ipad, cv2.BORDER_REPLICATE)
|
40 |
|
41 |
aamed = pyAAMED(ammed_size, ammed_size)
|