Intelligent transport and transportation systems are becoming indispensable systems of today. Continuous new investments and work are being carried out to ensure safety in all transport ways and to reduce accident rates. In this study, a simulation is designed to increase the safety of railways. Most of the railway accidents are caused by the obstacles on the rails. These obstacles means, trees, rocks and consists of similar structures. In this application, the railway has been developed on the detection of any obstacles on the rails, the introduction of the emergency system, and the transmission of information to the movement center. The camera and the laser distance meter installed on the train are used to scan the image with the image processing method, and the results are verified and the obstacle is detected. Emergency braking system, warning system is inserted into the circuit to prevent the obstacle from crashing. In addition to this, the main computer status message is sent to the movement center with the help of the created network. As a result, accident rates will be reduced, and intelligent train systems will be further developed.