TypeError Traceback (most recent call last)
in
1 white_output = 'result.mp4'
2 clip1 = VideoFileClip("project_video.mp4")
----> 3 white_clip = clip1.fl_image(pipeline) #NOTE: this function expects color images!!
4 get_ipython().run_line_magic('time', 'white_clip.write_videofile(white_output, audio=False)')
~\AppData\Local\Continuum\ANACONDA3_NEW\lib\site-packages\moviepy\video\VideoClip.py in fl_image(self, image_func, apply_to)
516 if apply_to is None:
517 apply_to = []
--> 518 return self.fl(lambda gf, t: image_func(gf(t)), apply_to)
519
520 # --------------------------------------------------------------
~\AppData\Local\Continuum\ANACONDA3_NEW\lib\site-packages\moviepy\Clip.py in fl(self, fun, apply_to, keep_duration)
136
137 #mf = copy(self.make_frame)
--> 138 newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
139
140 if not keep_duration:
<C:\Users\AppData\Local\Continuum\ANACONDA3_NEW\lib\site-packages\decorator.py:decorator-gen-183> in set_make_frame(self, mf)
~\AppData\Local\Continuum\ANACONDA3_NEW\lib\site-packages\moviepy\decorators.py in outplace(f, clip, *a, **k)
12 """ Applies f(clip.copy(), *a, **k) and returns clip.copy()"""
13 newclip = clip.copy()
---> 14 f(newclip, *a, **k)
15 return newclip
16
~\AppData\Local\Continuum\ANACONDA3_NEW\lib\site-packages\moviepy\video\VideoClip.py in set_make_frame(self, mf)
671 """
672 self.make_frame = mf
--> 673 self.size = self.get_frame(0).shape[:2][::-1]
674
675 @outplace
<C:\Users\AppData\Local\Continuum\ANACONDA3_NEW\lib\site-packages\decorator.py:decorator-gen-136> in get_frame(self, t)
~\AppData\Local\Continuum\ANACONDA3_NEW\lib\site-packages\moviepy\decorators.py in wrapper(f, *a, **kw)
87 new_kw = {k: fun(v) if k in varnames else v
88 for (k,v) in kw.items()}
---> 89 return f(*new_a, **new_kw)
90 return decorator.decorator(wrapper)
91
~\AppData\Local\Continuum\ANACONDA3_NEW\lib\site-packages\moviepy\Clip.py in get_frame(self, t)
93 return frame
94 else:
---> 95 return self.make_frame(t)
96
97 def fl(self, fun, apply_to=None, keep_duration=True):
~\AppData\Local\Continuum\ANACONDA3_NEW\lib\site-packages\moviepy\Clip.py in (t)
136
137 #mf = copy(self.make_frame)
--> 138 newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
139
140 if not keep_duration:
~\AppData\Local\Continuum\ANACONDA3_NEW\lib\site-packages\moviepy\video\VideoClip.py in (gf, t)
516 if apply_to is None:
517 apply_to = []
--> 518 return self.fl(lambda gf, t: image_func(gf(t)), apply_to)
519
520 # --------------------------------------------------------------
in pipeline(img)
10 perspective = cv2.cvtColor(perspective, cv2.COLOR_RGB2GRAY).astype(np.uint8)
11 #pass the perspective image to the lane fitting stage
---> 12 slides_pers, left_fitx, right_fitx, ploty, avg_cur, dist_centre_val = for_sliding_window(perspective)
13 #draw the detected lanes on the original image
14 mapped_lane = draw_on_original(undist, left_fitx, right_fitx, ploty, Minv)
~\Downloads\Advanced-Lane-Detection-master (1)\Advanced-Lane-Detection-master\sliding_main.py in for_sliding_window(binary_warped)
8 # Assuming you have created a warped binary image called "binary_warped"
9 # Take a histogram of the bottom half of the image
---> 10 histogram = np.sum(binary_warped[binary_warped.shape[0]/2:,:], axis=0)
11 # Create an output image to draw on and visualize the result
12 out_img = np.dstack((binary_warped, binary_warped, binary_warped))*255
TypeError: slice indices must be integers or None or have an index method