In the first part, we saw how to select the color of the lanes using thresholding, and how to use perspective correction to get a bird’s eye view or the road. We will now see how to locate the lanes.

The following content is mostly an extract from the book Hands-On Vision and Behavior for Self-Driving Cars, that I wrote for Packt Publishing, with the help of Krishtof Korda.

Edge detection

The code requires Python 3.7, OpenCV and NumPy.

The next step is detecting the edges, and we will use the green channel for that, as during our experiments, it gave good…


Let’s admit it: some technologies are just more interesting and fashionable than other. One field that is at the same time technologically very interesting and potentially able to radially change our lives is the one related to self driving cars. They are coming. In a way, they are already here. They are attracting massive investments. Even Apple seems to be considering making an iCar. They are, simply, in our future.

The first time that I saw a self driving car, it was in 2010(!), in Tokyo, in the Toyota show room. You could try it as a passenger, for around…


Popularity comes at a price. Java is and has been a very popular language, attracting praise and critiques. While it would be fair to expect a decline, after so many years and such a big legacy, Java is actually in a pretty good shape, and has a very strong technical road-map. Basically a new Java is coming, and a few years from now things might be very different in JVM-land. The OpenJDK has some technically impressive projects that we will hopefully be able to use soonish, and that have the potential to affect not only Java but even other languages.

Luca Venturi

With more than 20 years of software development experience, in several industries, including Formula 1, Internet Browsers, Smart Homes and AdTech

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store