| Because the train runs fast and the braking distance is long,if a foreign object invades the railway limit,it may cause a major railway accident.This article studied the railway clearance intrusion detection method based on a large number of PTZ(Pan-Tilt-Zoom)cameras in the railway field,detected the foreign object by automatic identifying and marking of limited boundaries,and got the location and size of the foreign object by camera self-calibration,then,completed the alarm so as to facilitate the staff to carry out the targeted processing.This article consists of three parts as follow:automatic identifying and marking of limited boundary area,extracting background and detecting target,as well as estimating position and size of the foreign object.The article solved the problem of the limited boundary area will be changed if the attitude or focal length of PTZ camera had been changed,proposed a pole projection method based on the hidden point elimination,it can automatically identify and mark out the limit area in any state of the camera.First,a matching template is obtained by using the time-sharing image fusion method,then,two rails with the most distinctive features are detected in the matching template after a series of image preprocessing operations,according to the principle of camera projection,calculating the hidden points of all parallel rails,so the peak position of a polar projection to the hidden point are the position of the rails.In order to improve the real-time performance of the algorithm,when the camera attitude or focal length is changed,the paper used image matching algorithm to map the boundary area in the template image to the current image to be remarked.The article designed a background extraction and update algorithm based on frame difference and multi frame average,used the background frame difference and the region feature to extract and filter the moving target.In view of the characteristics of the jitter of the railway camera,this paper proposes a shakes algorithm based on the projection feature matching,it can quickly and accurately remove the image jitter.The article extracted the exact background image using the adjacent frame difference,the two value projection and the multi frame average,and updated the background in real time.The article used the foreground extraction algorithm based on the background frame difference to extract the foreground object,and designed denoising method according to the area and shape feature of the target,also deal with the shadow,light and other environment to get the accurate foreground target.In order to facilitate the staff to make rapid and effective targeted treatment according to the location and size of the foreign object,this paper proposed a target location.and size estimation algorithm based on camera self-calibration.The article used the rectangles formed by the rail and the sleeper to replace the checkerboard in the traditional camera calibration method,the camera is self-calibrated by changing the camera’s angles to shot the same rail,using the calibrated camera,the physical location and size information of the detected alien object can be easily obtained,so it can greatly improve the efficiency of railway personnel and prevent accidents.Through several railway field experiments,it is proved that the algorithm proposed in this paper has strong applicability and real time,it is of great significance to maximize the intelligentization of the existing equipment and ensure the safety of the railway. |