Due to the shortcomings of the traditional gates sensor recognition systems in detecting jumped-out of gates,this paper proposes detection method based on image processing. Firstly, by using a template matching method to preprocess, the image matching rate of the gate can be obtained;Secondly, according to the continuity of the jumping out of gates, the feature vector extracted in this paper is time series of matching rate of the gate. Followed by is to classify the extracted feature vector by adopting the minimum error rate Bayesian classification. Experimental results show that the algorithm can effectively detect the jumping out of gates with the advantages of good real-time performance, no additional sensors and low costs. Therefore, this technology has a good prospect in engineering application.