In today’s world the self driving car industry is booming and is expected to reach a global revenue of 175 billion dollars by the end of 2025. The self driving car employs various combinations of sensors to navigate the car autonomously. The cars in present times are equipped with driver assistance features like positioning the car within the particular lane. This requires a proper lane detection technique which is robust to errors and gives an accurate output. There are several algorithms being used currently in the industry for detecting the lanes so as to direct the driverless-car not to deviate from it. Researchers use traditional computer vision algorithms or also come up with deep learning models which are trained on huge annotated datasets to precisely predict the lanes. This article describes an approach to lane detection specifically used by automated bots participating in the Intelligent Ground Vehicle Challenge (IGVC). The algorithm uses openCV functions mostly and follows an image pipeline to properly segment and return the direction vector in terms of magnitude so that it can be sent to the bot as steering messages. We verified the results by performing navigation. © The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021.