Git Product home page Git Product logo

advanced-lane-detection's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

advanced-lane-detection's Issues

Global Name "Polygon"

Hello after running in part test I got this error, how you solve that?
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-18-6e0650b9d07c> in <module>()
35 # Run pipline on images
36
---> 37 Image_1 = pipeline(image_1, mtx, dist, dash)
38 Image_2 = pipeline(image_2, mtx, dist, dash)
39 Image_3 = pipeline(image_3, mtx, dist, dash)
`<ipython-input-15-c8608f53ad44> in pipeline(image, mtx, dist, dash)` ` 199 print ("Error in something?")` ` 200 ` `--> 201 result = cv2.addWeighted(undist, 1, polygon, 0.3, 0)` ` 202 ` ` 203 original = undist.copy()`
NameError: global name 'polygon' is not defined

How do I resolve this issue?

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.