The damage or lack of the noise barriers is one of the important hidden troubles endangering the safety of high-speed railway. In order to obtain the vibration information of the noise barriers, the online detection systems based on laser vision were proposed. The systems capture images of the laser stripe on the noise barriers and export data files containing distance information between the detection systems on the train and the noise barriers. The vibration status or damage of the noise barriers can be estimated depending on the distance information. In this paper, we focused on the method of separating the area of noise barrier from the background automatically. The test results showed that the proposed method is in good efficiency and accuracy.