When cranes and other construction machinery works in the area where high voltage cables are erected,due to lacking of precise measuring device,there is a potential safety hazard caused by the inaccurate estimation and prediction of the distance between the top of the construction machinery and the high-voltage cables by the driver.As a branch of computer vision,binocular vision has large of application in recognition and ranging.Binocular vision through simulating human eyes,and finds the matching dots between the binocular images by comparing the two images,to acquire the parallax and measure the distance from one target to the camera.This paper designs a distance ranging visual system running on the embedded equipment for the high voltage cable which is on basis of the method of target identification,image processing,binocular stereo matching.Firstly,the pinhole imaging axiom of camera is researched,the position conversion of target in the four coordinate systems of camera is deeply studied,and try to calculate the camera parameters.contrasted to the characteristics of several traditional ways,calibration way of Zhang was selected from the aspects of accuracy and simplicity.The inherent parameter matrix,rotation translation matrix and distortion parameter of binocular camera are gaine by MATLAB’s toolbox.The above parameters were avaliable to adjust and remap the binocular image.Secondly,the recognition of high-voltage cable can accurately find the location of high-voltage cable in the binocular image.In this paper,the semantic division technique is avaliable to divide the high-voltage cable from image’s background.Img Lab software is used to make the image data set containing high-voltage cable labels,and the image data set is imported into the input layer of model network built by self.Have completed training,the gained parameters are loaded into the network.Then the images taken by camera is imported into the model,running netwok calculating,and outputing the predicted images.Furthermore,the subsequent image processing is implemented on the images.Apply the filtering technique to purge the existing noisy points in image,and the morphological operation is performed on the detected cables to obtain a more complete image.In the end,by the way of searching the target contour to discover the coordinate location of the high-voltage cable in image,and achieve to ascertain the precise location of the high-voltage cable in image.Thirdly,the principle of stereo matching and the constraints between the corresponding matching spots of the two images are studied.Have analysed the calculation principles of three algorithms which are local matching,global matching and semi-global matching.According to the operation characteristics of three methods and the laboratorial conclusions,SGBM is selected considering the runtime and matching presion.Adopting the sgbm algorithm to complete the three-dimensional reconstruction of the target,combined with the exact location of high-voltage cable in image,is to gain the exact distance between the target and the camera.Finally,the performance of different embedded motherboards is studied.Raspberry Pi 4b is selected as the running carrier of the ranging system.The software and hardware environment of the system is configured in raspbain system,and the distance measuring experiment of the high-voltage cable is finished.The distance measuring outcome displays that the error of the system could be constrainted in 7% in the distance of 0.5 ~ 2.4m,and the target cable can be clearly identified,which could completely satisfy the application standards in practical occasions. |