Skip to content

Commit 5627404

Browse files
committed
Update utils.py
1 parent 28559fe commit 5627404

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

surround_view/utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,13 @@ def get_weight_mask_matrix(imA, imB, dist_threshold=5):
111111
polyB = get_outmost_polygon_boundary(imB_diff)
112112

113113
for y, x in zip(*indices):
114-
distToB = cv2.pointPolygonTest(polyB, (x, y), True)
114+
115+
#convert this x,y int an INT tuple
116+
xy_tuple = tuple([int(x), int(y)])
117+
distToB = cv2.pointPolygonTest(polyB, xy_tuple, True)
118+
115119
if distToB < dist_threshold:
116-
distToA = cv2.pointPolygonTest(polyA, (x, y), True)
120+
distToA = cv2.pointPolygonTest(polyA, xy_tuple, True)
117121
distToB *= distToB
118122
distToA *= distToA
119123
G[y, x] = distToB / (distToA + distToB)

0 commit comments

Comments
 (0)