Comments (7)
Run the cell where the global variable polygon is defined and make sure IMAGE = True.
from advanced-lane-detection.
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.
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.
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.
@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.
@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.
@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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advanced-lane-detection.