The development of smart cities demands automation in various things, including traffic engineering management. Intelligent Transportation System, usually abbreviated as ITS, is one of the supporting components of a smart city. One of the automation that can be handled in ITS is the detection of road marking violations. Road marking violations (especially in Indonesia) often occur at road intersections. Therefore, in this research, the detection and counting of the number of road marking violators at road intersections will be carried out. We propose user-defined markings to detect road marking violations at traffic lights. In this method, the user draws markers to visualize visible features. Next, the system will identify vehicles that violate user-defined markings. This user-defined marking method compares favorably with the classical approach, namely the Hough transform. The authors have compared these two methods and obtained significant advantages, especially regarding computing time. Our main contribution lies in developing a real-time system that identifies vehicles violating road markings. The increase in computing time can be seen in the frames per second resulting from the user-defined tagging method. Although we have improved the performance of the Hough transform method by including morphological operations, its performance still needs improvement when compared with user-defined markers. In addition, we highlight various challenges in the discussion section, which can become material for further research. Therefore, this research contributes significantly to the progress of efficient Intelligent Transportation Systems in monitoring traffic violations at traffic lights.