fffiloni commited on
Commit
8fd94b4
1 Parent(s): 2516acd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -40,11 +40,11 @@ def find_tip(points, convex_hull):
40
 
41
  def find_tail(points, tip):
42
  # Convert the tip and points to numpy arrays
43
- tip = np.array([tip], dtype=np.float32)
44
  points = np.array(points, dtype=np.int32)
45
 
46
  # Find the index of the farthest point
47
- distances = cv2.pointPolygonTest(points, tip, True)
48
 
49
  if distances is not None:
50
  farthest_index = np.argmax(distances)
 
40
 
41
  def find_tail(points, tip):
42
  # Convert the tip and points to numpy arrays
43
+ tip = np.array(tip, dtype=np.float32)
44
  points = np.array(points, dtype=np.int32)
45
 
46
  # Find the index of the farthest point
47
+ distances = cv2.pointPolygonTest(points, tuple(tip), True)
48
 
49
  if distances is not None:
50
  farthest_index = np.argmax(distances)