fjenett commited on
Commit
21f58f8
1 Parent(s): a0c0e90

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(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)
 
32
  imgG = cv2.resize(imgG, (int(iw), int(ih)))
33
 
34
  if is_landscape:
35
+ ipad = int((ammed_size - ih) / 2)
36
  imgG = cv2.copyMakeBorder(imgG, ipad, ipad, 0, 0, cv2.BORDER_REPLICATE)
37
  else:
38
+ ipad = int((ammed_size - iw) / 2)
39
  imgG = cv2.copyMakeBorder(imgG, 0, 0, ipad, ipad, cv2.BORDER_REPLICATE)
40
 
41
  aamed = pyAAMED(ammed_size, ammed_size)