This paper presents the intruder detection system for rapid transit using CCTV surveillance based on the histogram shapes. In this paper, researchers proposed intruder detection algorithm of yellow line located on the ground next to rapid transit railway for preventing passengers from any harmful train incidents by using CCTV surveillance system based histogram shape that is incredibly convenient technique for image analysis. The histogram shapes of trespass and non-trespass are different. Therefore, it can be used to alarm as a warning system to the passengers who invade the yellow line. The good advantages of the histogram shapes method are; flexibility in use and stability in light changing. This research is suitable for CCTV surveillance system used in observation mode for intruder detection. The system can be worked both on real time and offline mode. The experimental results show the error of the system that is less than 5%.