The traffic lights are pre-programmed to wait for a certain fixed time after every change in signal. The operation of the traffic lights does not depend on the traffic on the roads and remains constant during its operation. A simple way to ease road traffic is by allocating more time for the vehicles to pass on from heavy traffic roads than roads with relatively less traffic. The proposed system in this paper uses a camera to capture the images of the moving vehicles that connects the traffic signal. The pictures captured are then processed to determine the total number of vehicles present on each road at that instant. The system uses image acquisition, image scaling, image enhancement, followed by object detection in order to estimate the total number of vehicles on roads to regulate the traffic. The dynamic time allocation for traffic on each road is determined based on the actual traffic on the road, and this system will control traffic more effectively than a predetermined time for each road. The system is cost-efficient and does not require any installation of complex machinery to monitor the complete traffic.