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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -32,14 +32,16 @@ def detect_ellipses(img_path):
32
  imgG = cv2.resize(imgG, (int(iw), int(ih)))
33
 
34
  if is_landscape:
35
- ipad = int((imax - iheight) / 2 * iscale)
36
  imgG = cv2.copyMakeBorder(imgG, ipad, ipad, 0, 0, cv2.BORDER_REPLICATE)
37
  else:
38
- ipad = int((imax - iwidth) / 2 * iscale)
39
  imgG = cv2.copyMakeBorder(imgG, 0, 0, ipad, ipad, cv2.BORDER_REPLICATE)
40
 
41
  aamed = pyAAMED(ammed_size, ammed_size)
42
  aamed.setParameters(3.1415926/3, 3.4, 0.77)
 
 
43
 
44
  result = aamed.run_AAMED(imgG)
45
  print(result)
 
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)
42
  aamed.setParameters(3.1415926/3, 3.4, 0.77)
43
+
44
+ print(ammed_size, iw, ih, imgG.shape)
45
 
46
  result = aamed.run_AAMED(imgG)
47
  print(result)