未验证 提交 8029a9d4 编写于 作者: B Bin Long 提交者: GitHub

Update visualize.py

上级 a0ba64ee
...@@ -9,11 +9,11 @@ color_map = [[128, 64, 128], [244, 35, 231], [69, 69, 69], [102, 102, 156], ...@@ -9,11 +9,11 @@ color_map = [[128, 64, 128], [244, 35, 231], [69, 69, 69], [102, 102, 156],
[0, 0, 230], [119, 10, 32]] [0, 0, 230], [119, 10, 32]]
im = cv2.imread(sys.argv[1]) im = cv2.imread(sys.argv[1])
shape = im.shape
print("visualizing...") print("visualizing...")
for i in range(0, im.rows): for i in range(0, shape[0]):
for j in range(0, im.cols): for j in range(0, shape[1]):
im[i, j] = color_map[im[i, j, 0]] im[i, j] = color_map[im[i, j, 0]]
cv2.imwrite(sys.argv[1], im) cv2.imwrite(sys.argv[2], im)
print("visualizing done!") print("visualizing done!")
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册