fjenett commited on
Commit
0089432
1 Parent(s): 01763a3

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 - iheight) / 2 * iscale)
36
  imgG = cv2.copyMakeBorder(imgG, ipad, ipad, 0, 0, cv2.BORDER_REPLICATE)
37
  else:
38
- ipad = int((ammed_size - iwidth) / 2 * iscale)
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)