| At present,the number of domestic ferries is decreasing year by year.But the waters still cover a large part in Guangdong Province.So the ferries still play a very important role in Guangdong Province which provide very convenient transportation for the local people.The article takes a certain ferry in Foshan as an example to solve the current security problems like a large number of people,loose and unitary regulatory pattern,illegal ferrying,overloading and so on.What’s more,it also aims at solving the problem that traditional detection can’t meet the current rigid demand of the ferry.The article proposes a Ferry Detection System which is based on the features of people’s head and shoulders and Optical Flow method.With lower cost,the system ensures accuracy and instantaneity.It meets realistic requirements with an important significance.And it is beneficial to the practical application of the ferry site.This article mainly includes the following aspects:(1)Aiming at solving the problem of the impact of human occlusion which is caused by dense crowd in the ferry detection area,this article proposes a method to identify the target pedestrians at the ferry which uses the features of people’s head and shoulders.This method uses a vertical camera to capture people’s head and shoulders.It uses the Histogram of Oriented Gradient(HOG)to extract the features of people’s head and shoulders.In order to identify human’s characteristics,it combines the Support Vector Machine(SVM)to train the head and shoulders classifier.The Experiments verify that this method can effectively identify pedestrians and facilitate to detect the statistics of pedestrian flow in the later period.(2)Aiming at solving the problem of "ghost image" which often exists in the traditional target detection algorithms,this article improves Visual Background Extractor(VIBE)algorithm.This method replaces the traditional single-frame image with continuous multi-frame images.It also performs “AND” or “OR” operation on consecutive frames to obtain the background model.What’s more,it uses the maximum inter-class variance method(OSTU)to make a second discrimination to calculate the foreground reliability between the two methods.It contrasts and judges the optimal segmentation threshold of the image to separate the target pedestrians from the ferry.The Experiments have verified that this method can reduce the problems of false detection and leaking detection in the subsequent detection of pedestrians at the ferry.(3)Aiming at solving the problem that the detection effect of the traditional optical flow method is easily affected by the moving speed of the target,this method applys a pyramid Lucas-Kanada optical flow method which can shrink and magnify the image and change the relative speed of the moving target to detect the flow of people.This method can carry the information of the moving target.It can also quickly and accurately detect targets without knowing the information of the scene.This method significantly improves the detection effect when the video with large motion scale is shrinked to meet the constraints of the optical flow method.The experimental results also show that the method can achieve effective detection of both single target and multiple targets.(4)Finally,this method uses the integrated development environment of Visual Studio 2015 and the underlying code of the Open CV vision to design this system.The system includes real-time display of pedestrians flow statistics at the ferry,querying the number of ferry records in historical ferry trips,the function of counting the number of ferries,and the function of limiting the number of ferries. |