Xiangjiaba hydropower station is an important navigation hub from the lower reaches of Jinsha River to the upper reaches of the Yangtze River.The establishment of Xiangjiaba Hydropower Station has improved the shipping conditions in the downstream area of Jinsha River,and the shipping industry in the lower reaches of Jinsha River has become more and more prosperous.At the same time,the development trend of large-scale ships leads to the frequent occurrence of water traffic accidents in Xiangjiaba Dam area where super-high ships collide with the main buildings,which poses a great threat to the navigation of the dam area and the life safety of the people on board.At present,there are mainly two methods of ship height measurement,among which the monocular vision method has the problem of low measurement accuracy,and the laser array method is mainly used for height limitation rather than height measurement.Therefore,in view of the shortcomings of the existing measurement methods,this paper proposes a ship height measurement scheme based on binocular stereo vision,which automatically measures the ship height before the ship enters the Xiangjiaba control area to ensure the safety of the main building in Xiangjiaba area.The main work of this paper is as follows.(1)A ship height measurement scheme based on binocular stereo vision is proposed.In view of the phenomenon that the optical axes of the left and right cameras are not parallel in the actual installation process,Zhang Zhengyou calibration method is used for single target and binocular calibration,and the calibration parameters are used for distortion correction and stereo correction to eliminate image distortion and establish polar constraint,so that the left and right images are in coplanar alignment state.By studying the relationship between the measurement accuracy and the baseline length of binocular camera,a more appropriate baseline length is selected.(2)The detection of moving target ship from the background is the premise of ship height measurement.After analyzing and comparing the existing target detection technologies,vibe modeling method has the advantages of fast detection speed,but it also has the phenomenon of shadowing.In view of this phenomenon,this paper uses the method based on vibe modeling and three frame difference to eliminate the dragging shadow of moving ships.Combined with morphological filtering,redundant points are eliminated and small areas are connected to make the extracted moving target ship more clean and complete.(3)The accuracy of the highest point matching directly affects the accuracy of ship height measurement.Aiming at the problem that the highest point captured by the left and right cameras at different angles may be mismatched,this paper adopts the block based local matching algorithm,establishes a 3 * 3 block with the highest point of the ship as the center,searches along the epipolar constraint direction,and judges whether it is the same name point through the gray similarity of the pixels in the block,so as to improve the accuracy of the highest point matching.(4)The system developed in this paper is installed on the 90 meter floating dike upstream of Xiangjiaba,and through the water level gauge installed at the bottom of the floating dike,the system can adapt to the change of water level.Then,in the MFC application framework,with the use of Open CV library and hcnetsdkcom library,the development of PC software is completed.Finally,the feasibility and effectiveness of the ship height measurement scheme based on binocular stereo vision are verified through the campus simulation experiment and Xiangjiaba field experiment.A large number of experimental data show that the measurement error of the ship height measurement system developed in this paper is small,which provides a strong technical support for the navigation safety of Xiangjiaba. |