Git Product home page Git Product logo

Comments (7)

kylesf avatar kylesf commented on July 28, 2024

Run the cell where the global variable polygon is defined and make sure IMAGE = True.

from advanced-lane-detection.

herleeyandi avatar herleeyandi commented on July 28, 2024

I just run the cell which contains function 'pipeline' it define polygons as global, but not initialize it.
What you mean by IMAGE= true? Is it means I must check whether the image successfully loaded?

from advanced-lane-detection.

kylesf avatar kylesf commented on July 28, 2024

Once the global is defined it will stay active in your python kernel. IMAGE = True is a flag for processing the images and not the video. Makes a difference as you track frames for a video.

from advanced-lane-detection.

frankzl avatar frankzl commented on July 28, 2024

I had the same problem as you heyleeyandi! I think Jupyter was not able to understand the list comprehension.

I replaced these lines in the function lane_curve:
y = [x * (30/720.) for x in left_line[1]]
Instead:
y = []
for item in left_line[1]:
y.append(item*(30/720.))

There were some other errors after I replaced those lines, but I managed to get it running. It's really nice!

from advanced-lane-detection.

kanishk-nd avatar kanishk-nd commented on July 28, 2024

@frankzl I am running into same issue, even after making the fix you suggested:

Traceback (most recent call last):
  File "kylesf_lane_detect.py", line 519, in <module>
    Image_1 = pipeline(image_1, mtx, dist, dash)
  File "kylesf_lane_detect.py", line 272, in pipeline
    polygon = polygon
NameError: global name 'polygon' is not defined

In function impose_Lane_Area(), you might have to update
_unwarped = cv2.warpPerspective(**overlay**, M, img_size)_
since cv2.fillPoly doesn't returns None

Also, After making these 2 fixes, I am running into some new issue:
OpenCV Error: Assertion failed (contour1.checkVector(2) >= 0 && contour2.checkVector(2) >= 0 && (contour1.depth() == CV_32F || contour1.depth() == CV_32S) && contour1.depth() == contour2.depth()) in matchShapes

Any suggestion?

from advanced-lane-detection.

frankzl avatar frankzl commented on July 28, 2024

@kanishk-nd
It's been a while since I last looked at the code..
I just forked the repository and commited my modifications to the ipynb file for you. I only changed very little in the code. I tried running it again and the algorithm works on given the pictures.
Try it out and see if it works on your machine :)

from advanced-lane-detection.

kanishk-nd avatar kanishk-nd commented on July 28, 2024

@frankzl Thanks !! ^_^

I dumped the code in to a .py script, and realised that issue is with the Exception block (main exception block in pipeline() )which doesn't receive the 'polygon' variable. So I tweaked the code to not hit the last exception block for now.
You fixes work, as they also don't hit this Exception handler

from advanced-lane-detection.

Related Issues (2)

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.