JunshengFu / driving-lane-departure-warning

Built a real-time lane departure warning system with a monocular camera, using OpenCV.
GNU General Public License v3.0
220 stars 103 forks source link

TypeError: 'float' object cannot be interpreted as an integer #4

Closed Ayysh closed 6 years ago

Ayysh commented 6 years ago

I am getting this error..can you please tell me how to fix it with exact code. /usr/bin/python3.4 /home/PycharmProjects/Lanedect/driving-lane-departure-warning-master/main.py Traceback (most recent call last): File "/home/PycharmProjects/Lanedect/driving-lane-departure-warning-master/main.py", line 19, in img_aug = process_frame(img) File "/home/PycharmProjects/Lanedect/driving-lane-departure-warning-master/lane.py", line 616, in process_frame output = create_output_frame(offcenter, pts, imgundist, fps, curvature, curve_direction, binary_sub) File "/home/PycharmProjects/Lanedect/driving-lane-departure-warning-master/lane.py", line 468, in create_output_frame whole_frame = np.zeros((h2.5,w2.34, 3), dtype=np.uint8) TypeError: 'float' object cannot be interpreted as an integer

Process finished with exit code 1

Ayysh commented 6 years ago

Change the line to whole_frame = np.zeros((h3,w3, 3), dtype=np.uint8). It works!!