| With the further development and use of Marine resources, Marine ship collaborative demand has become more and more urgent. In collaborative work in the sea, for example: offshore platform building, sea cable-laying, which need to control the distance between the ship and the ship, in order to ensure its safe distance and the best relative location of collaborative work. Tracking of the target ship and calculating the relative position between them is the first thing to solve the problem. This paper designs the tracking and positioning system of the ship based on binocular vision, which can achieve the task of tracking and positioning of dynamic target, providing precise position sensing information for control section.The main work of this paper is as follows:(1) First introduces the developing situation of the vision measuring technology, and through the comparison of different measuring technology demonstrates the feasibility in the field of vision technology on measuring of the ship and application prospect.(2) Stereo vision and the related theory of binocular distance measurement is studied. According to the placement of the cameras, binocular distance measurement algorithm is divided into binary optical axis crossed mode and binary optical axis parallel mode. By comparing and connecting with the actual experimental platform, this paper adopted binary optical axis parallel mode, which is simple to calculate and easy to carry out.(3) By analyzing the current primary video camera calibration methods, among them, Zhang Zhengyou calibration method is a very stable, mature and widely used method,and it has made a major breakthrough in terms of the flexibility.In view of the practical application, this paper adopt Zhang Zhengyou calibration method. First this paper calibrate intrinsic parameters of the two cameras based on OpenCV,but its results is not stable.At last we adopt Halcon software to calibrate intrinsic parameters of the two cameras,and get relatively stable result.(4) TLD(Tracking-Learning-Detection) tracking algorithm, which was presented by Zdenek Kalal who was University of Surrey, was studied and researched, the method combining three parts:tracking, detection and study, which has advantages of good real-time performance, strong robustness and can achieve long-time tracking, so this paper adopts the algorithm in target tracking module. Add according to the specific application, this paper design relevant tests for the algorithm. The algorithm has strong immunity to high speed, small angle rotation and partial occlusion, but when the target exist large rotating angle, the stability of the algorithm will become worse.(5) In stereo matching module, this paper adopt high accuracy and adaptability NCC matching algorithm, but because of the large amount of calculation, the algorithm is in low efficiency of matching in the traditional application. In this paper, combining tracking module and matching module, in which tracking module to provide constraints for matching module, specific design is:tracking module provides tracking results in the form of the bounding box, the matching module finishes matching in the tracking results, at the same time matching objects--angular points, have been obtained in advance and the number is set within a certain range, this design makes the NCC algorithm greatly reduce amount of calculation and improve the real-time and accuracy of the match.(6)Finally, the positioning and tracking system of ship is developed based on Matlab R2010b, VC++6.0and OpenCV1.0, through the experiment proved that the study of ship positioning and tracking system is feasible, Compared with radar, GPS, ultrasonic, infrared and laser ranging method, this system can achieve dynamic target tracking, locating and provide rich information of3d image at the same time, which has a strong application value. |