neozhaoliang / surround-view-system-introduction

A full Python implementation for real car surround view system
MIT License
857 stars 303 forks source link

前面都正常运行,但是运行run_get_weight_matrices.py报错 #81

Closed lifei68 closed 5 months ago

lifei68 commented 5 months ago

Traceback (most recent call last): File "/home/lifei/Projects/surround-view-system-introduction-master/run_get_weight_matrices.py", line 36, in main() File "/home/lifei/Projects/surround-view-system-introduction-master/run_get_weight_matrices.py", line 24, in main Gmat, Mmat = birdview.get_weights_and_masks(projected) File "/home/lifei/Projects/surround-view-system-introduction-master/surround_view/birdview.py", line 301, in get_weights_and_masks G0, M0 = utils.get_weight_mask_matrix(FI(front), LI(left)) File "/home/lifei/Projects/surround-view-system-introduction-master/surround_view/utils.py", line 123, in get_weight_mask_matrix G[y, x] = distToB / (distToA + distToB) ZeroDivisionError: float division by zero

neozhaoliang commented 5 months ago

你那边能画一下 polyA 和 polyB 的图像吗?

lifei68 commented 5 months ago

谢谢,我解决了,是我参数设置和投影出现了问题

benwuming commented 4 months ago

我也报了这个错误"/home/lifei/Projects/surround-view-system-introduction-master/surround_view/utils.py", line 123, in get_weight_mask_matrix G[y, x] = distToB / (distToA + distToB) ZeroDivisionError: float division by zero 是不是前面做单面俯视图的时候,没有下面那两个角呀?

FunnyWii commented 4 months ago

我也报了这个错误"/home/lifei/Projects/surround-view-system-introduction-master/surround_view/utils.py", line 123, in get_weight_mask_matrix G[y, x] = distToB / (distToA + distToB) ZeroDivisionError: float division by zero 是不是前面做单面俯视图的时候,没有下面那两个角呀?

检查一下你设置的参数,主要是shift width/height那些 如果这些参数设置的不合适,可能会导致这个问题