zhigangjiang
commited on
Commit
•
f9e6ff7
1
Parent(s):
a5a934b
Update utils/visibility_polygon.py
Browse files
utils/visibility_polygon.py
CHANGED
@@ -230,13 +230,13 @@ def visualization(segments: np.array, output_polygon: np.array, center: np.array
|
|
230 |
board = np.zeros((side_l, side_l))
|
231 |
for segment in segments:
|
232 |
segment = (segment - origin) * scale + origin
|
233 |
-
segment = segment.astype(np.
|
234 |
cv2.line(board, tuple(segment[0]), tuple(segment[1]), 0.5, thickness=3)
|
235 |
-
board = cv2.drawMarker(board, tuple(origin.astype(np.
|
236 |
|
237 |
output_polygon = (output_polygon - origin) * scale + origin
|
238 |
-
board = cv2.drawContours(board, [output_polygon.astype(np.
|
239 |
-
board = cv2.drawMarker(board, tuple(origin.astype(np.
|
240 |
plt.axis('off')
|
241 |
plt.imshow(board)
|
242 |
plt.show()
|
|
|
230 |
board = np.zeros((side_l, side_l))
|
231 |
for segment in segments:
|
232 |
segment = (segment - origin) * scale + origin
|
233 |
+
segment = segment.astype(np.int32)
|
234 |
cv2.line(board, tuple(segment[0]), tuple(segment[1]), 0.5, thickness=3)
|
235 |
+
board = cv2.drawMarker(board, tuple(origin.astype(np.int32)), 1, thickness=3)
|
236 |
|
237 |
output_polygon = (output_polygon - origin) * scale + origin
|
238 |
+
board = cv2.drawContours(board, [output_polygon.astype(np.int32)], 0, 1, 3)
|
239 |
+
board = cv2.drawMarker(board, tuple(origin.astype(np.int32)), 1, thickness=3)
|
240 |
plt.axis('off')
|
241 |
plt.imshow(board)
|
242 |
plt.show()
|