Development of Lane Marker Detection & Warning system.

Project by:- Gadre Nayan A (B3073016) Awachat Prasanna K(B3073002) External Guide
Prof. H.K.Sawant HKS systems. Near Karishma apts. Kothrud. Pune.

Internal Guide
Prof. Mrs. M.P.Atre PVG s COET.


To design a system which can detect the lanes on the road from the images taken through a camera mounted on the moving vehicle and give a warning signal corresponding to its safety level with respect to the current position.



Introduction Literature Survey Specifications  Hardware  Software

IV. V. VI.

Block Diagram Present status References

Financial Damage 15% of World GDP Road Accidents
In INDIA approx 270 People die each day

Expected Rise : 60% by 2020

Lane Departure

40 % of all fatalities

1. Types: Rear end collisions, Side swipes, Head on collisions, Accidents while Merging or Changing Lanes, Driving off the road.

2. Most occurrences result from Distraction , Inattention and Driving Fatigue of driver. 3. A lane departure warning is a safety system in a car which alerts the driver when the car drifts out of its lane.


‡ Image Acquisition using Camera (320x240). Intex 300k CMOS sensor. ‡ Indication using Buzzer. ‡ USB interface . ‡ Rechargeable SMF Battery (12V) powered systems. ‡ Driving 9V DC 2kg-cm motors.(to demonstrate tracking).

‡ 8 bit uc for control of alarm, Led indication and motors. ‡ Image processing and control of hardware using VB 6.0/MATLAB.


LANE Power Supply



Sensor selection
‡ Lesser response time. ‡ Cheaper ‡ CMOS imagers offer superior integration, ‡ Most suitable for medium quality video applications ‡ Avoids Vertical smear.

‡ More. Shifting of charge from each pixel takes time. ‡ CCDs offer slightly better image quality and flexibility at the expense of system size. ‡ They remain the most suitable technology for high-end imaging applications such as space photography. ‡ Anti blooming arrangement needed.

Color Models

‡ An 24bit-RGB image, also referred to as a "true colour" image. ‡ HSI (Hue saturation intensity) format suited for machine vision applications(robotics) gives perceptually equivalent image. ‡ CYMK (cyan yellow magenta black) format used in printers, coloured Xerox etc.


Steps involved in lane detection are
‡ Conversion of RGB image to an HSI image ‡ Thresholding ‡ Image Filtering ‡ Detection of appropriate lines corresponding to the lane


The system may not work under the conditions mentioned below ‡ Very bad weather conditions like heavy fog which reduce visibility.

‡ Yet to decide the practicality of this system in Automatic tracking. Although demonstration for tracking as a mock is possible.


‡ This concept can be implemented as a subsystem of a futuristic fully automated vehicle. ‡ It can be linked to the Electronic(Engine)Control Unit of the vehicle which will take the output of the system and perform the control action

Completion Status
‡ Serial communication program tested on AT89C51. ‡ Image Display, pixel data extraction, grayscale conversion algorithms complete in VB 6.0. ‡ A test program for RGB to HSI conversion and grayscale conversion tested in Matlab.

‡ Visual Basic 6.0 The Black Book. By Steven Holzner. ‡ Visual basic game programming:- by Jonathan harbour. ‡ Image Processing Analysis and Machine Vision :- by MILAN SONKA , ROGER BOYLE. ‡ Kristijan Macek , Brian Williams :- A lane detection vision module for Driver assistance ‡ Image processing using Matlab :- Gonzalez, Woods, eddins. ‡ ‡ ‡ ‡ ‡ forums like:edaboard,xtremeVBtalk.



‡ An RGB image, also referred to as a "true colour" image. ‡ It is stored as an RxGxBx8bit data array that defines red, green, and blue colour components for each individual pixel. ‡ The colour of each pixel is determined by the combination of the red, green, and blue intensities stored in each colour plane at the pixel's location.

‡ An intensity image (or grayscale image) is a two dimensional data matrix. ‡ The values of the matrix represent intensities within the range 0 to 255. ‡ Each element of the matrix represents an image pixel. The intensity 0 represents black and the intensity 255 represents complete white. ‡ There are many ways to convert an RGB image to grayscale. Averaging:- G= (R+G+B)/3. Luminance:- G= 0.3xR + 0.6xG +0.1xB.


RGB images can be converted to grayscale by eliminating the hue and saturation information while retaining the luminance.  rgb2gray command in MATLAB converts RGB values to grayscale values by forming a weighted sum of the R, G, and B components.

A Gray scale Image 

We use Y= 0.3R+0.6G+0.1B.


‡ Thresholding is carried out on the grayscale image to enhance its contrast. ‡ A certain threshold level is decided and pixels having intensity above that level are treated as white(255) while pixels below the level are treated as black(0). ‡ This method will help in extracting the lane data easily. ‡ However, not only lane markers but certain surrounding objects whose intensity levels lie above the threshold, may also get emphasised. Hence the next process is applied.

A Grayscale Image after Thresholding


‡ Filtering is a technique for modifying or enhancing an

image. It is a neighbourhood operation, in which the value of any given pixel in the output image is determined by applying some algorithm to the values of the pixels in the neighbourhood of the corresponding input pixel. This has the effect of smoothing out local highlights and blur edges in an image.

‡ The basic idea behind edge detection is to find places in an image where the intensity changes rapidly. ‡ Edge detection is process of generating a binary image from a grayscale image with pixel values as 1 where there are edges and 0 elsewhere. ‡ Weaker edges in the image are ignored by specifying a threshold of gradient.