Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtyZiff35 authored Feb 17, 2019
1 parent 42eda2e commit c07508f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,28 @@ The adopted approach consists of feeding Optical Flows calculated from pairs of

### Image preprocessing
The aim is to modify the image in a way such that the optical flow can be calculated with a great precision. Considering that the original frames are very dark, the first thing to do is to increase illumination and contrast:

![Illumination and Contrast adjustment](https://github.com/ArtyZiff35/CNN_Dashcam_Speed_Detector/blob/master/images/AdjustedIlluminationContrast.PNG)

While the road lane the car is in and its immediate surroundings are ideally moving at a uniform speed, the other cars, opposing lanes and sky are moving in a way that is not helping us in determining the camera's speed. For this reason, the image is cut in a way to maintain only the road and its shoulders:

![Image cut](https://github.com/ArtyZiff35/CNN_Dashcam_Speed_Detector/blob/master/images/FIlledShape.PNG)

The current image could already be fed to the Optical Flow algorithm, but in order to highline some features (such as the lane markings) that are often too dark and homogeneous with the road because of the video's quality, we can try to detect the markings themselves.
Assuming that lane markings can only be either white or yellow, first of all we need to apply some color thresholding to extract only those two: yellow is extracted from the HSV version of the image, while white from the standard RGB to greyscale conversion.

![Color thresholding](https://github.com/ArtyZiff35/CNN_Dashcam_Speed_Detector/blob/master/images/colorThreshold.PNG)

Then, the Canny Edge Detection algorithm is applied in order to remove too much uniformity in the markings, which might confuse the Optical Flow:

![Canny Edge](https://github.com/ArtyZiff35/CNN_Dashcam_Speed_Detector/blob/master/images/cannyEdge.PNG)

Again, we cut the image in order to keep only our lane:

![Canny Edge_Masked](https://github.com/ArtyZiff35/CNN_Dashcam_Speed_Detector/blob/master/images/CannyEdgeMasked.PNG)

Finally, we add the outlined version of the image to our previous result in order to highlight our lane markings:

![Combined](https://github.com/ArtyZiff35/CNN_Dashcam_Speed_Detector/blob/master/images/Combined.PNG)


Expand Down

0 comments on commit c07508f

Please sign in to comment.