In recent years, there have been rise in the number of problems in the existing traffic management system particularly in the developing countries. Due to this, many agonizing accidents are occurring every now and then. Over speeding and violating the traffic rules such as unnecessary change of lanes are the two main reasons for the rise in the number of accidents. This problem needs to be solved immediately to reduce the number of unexpected deaths. In this paper, an attempt is made to solve the problem addressed using Raspberry-pi and OpenCV contour detection technology. We have developed a prototype device to solve this problem. The device will be installed in traffic surveillance camera near the traffic signal position, which will be connected to the metropolitan traffic servers. If any of the vehicle crosses the device violating the mentioned traffic rule, they will be detected and the data will be sent to the server immediately. Thus, the proposed traffic monitoring system will help to reduce the manual collection of data, resulting less time wastage and this will further reduce the cost. Furthermore, it will help to find the person responsible for traffic rule violation and will assist the traffic management department to apply the laws strictly. The proposed model has about 78.83% accuracy, which will help to reduce the number of accidents that are taking place every day.