Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modified '/' operator to '//' #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lane.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def warper(img, M):
## fit the lane line
def full_search(binary_warped, visualization=False):

histogram = np.sum(binary_warped[binary_warped.shape[0]/2:,:], axis=0)
histogram = np.sum(binary_warped[binary_warped.shape[0]//2:,:], axis=0)
# Create an output image to draw on and visualize the result
out_img = np.dstack((binary_warped, binary_warped, binary_warped))*255
out_img = out_img.astype('uint8')
Expand Down Expand Up @@ -484,10 +484,10 @@ def create_output_frame(offcenter, pts, undist_ori, fps, curvature, curve_direct
############## generate the combined output frame only for visualization purpose ################
whole_frame[40:40+h, 20:20+w, :] = undist_ori
whole_frame[40:40+h, 60+w:60+2*w, :] = output
whole_frame[220+h/2:220+2*h/2, 20:20+w/2, :] = undist_birdview
whole_frame[220+h/2:220+2*h/2, 40+w/2:40+w, 0] = cv2.resize((binary_sub*255).astype(np.uint8), (0,0), fx=1/2, fy=1/2)
whole_frame[220+h/2:220+2*h/2, 40+w/2:40+w, 1] = cv2.resize((binary_sub*255).astype(np.uint8), (0,0), fx=1/2, fy=1/2)
whole_frame[220+h/2:220+2*h/2, 40+w/2:40+w, 2] = cv2.resize((binary_sub*255).astype(np.uint8), (0,0), fx=1/2, fy=1/2)
whole_frame[220+h//2:220+2*h//2, 20:20+w//2, :] = undist_birdview
whole_frame[220+h//2:220+2*h//2, 40+w//2:40+w, 0] = cv2.resize((binary_sub*255).astype(np.uint8), (0,0), fx=1/2, fy=1/2)
whole_frame[220+h//2:220+2*h//2, 40+w//2:40+w, 1] = cv2.resize((binary_sub*255).astype(np.uint8), (0,0), fx=1/2, fy=1/2)
whole_frame[220+h//2:220+2*h//2, 40+w//2:40+w, 2] = cv2.resize((binary_sub*255).astype(np.uint8), (0,0), fx=1/2, fy=1/2)

font = cv2.FONT_HERSHEY_SIMPLEX
if offcenter >= 0:
Expand Down