fjenett commited on
Commit
e65e092
·
1 Parent(s): 71d2f0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -44,13 +44,13 @@ def detect_ellipses(img_path):
44
  for e in result:
45
  x, y, w, h, a, _ = e
46
  imgN = cv2.ellipse(imgN, (x, y), (w, h), -a, 0, 360, (0, 255, 0), 3) # image, center_coordinates, axesLength, angle, startAngle, endAngle, color, thickness
47
- """
48
- temp.center.x = detEllipses[i].center.y;
49
- temp.center.y = detEllipses[i].center.x;
50
- temp.size.height = detEllipses[i].size.width;
51
- temp.size.width = detEllipses[i].size.height;
52
- temp.angle = -detEllipses[i].angle;
53
- """
54
 
55
  return [Image.fromarray(imgN), json.dumps(result.tolist())]
56
 
 
44
  for e in result:
45
  x, y, w, h, a, _ = e
46
  imgN = cv2.ellipse(imgN, (x, y), (w, h), -a, 0, 360, (0, 255, 0), 3) # image, center_coordinates, axesLength, angle, startAngle, endAngle, color, thickness
47
+
48
+ # from CPP code:
49
+ # temp.center.x = detEllipses[i].center.y;
50
+ # temp.center.y = detEllipses[i].center.x;
51
+ # temp.size.height = detEllipses[i].size.width;
52
+ # temp.size.width = detEllipses[i].size.height;
53
+ # temp.angle = -detEllipses[i].angle;
54
 
55
  return [Image.fromarray(imgN), json.dumps(result.tolist())]
56