With the continuous development of the national high-speed railway,the number of high-speed trains is also increasing,and the maintenance tasks of trains are becoming increasingly heavy.Among them,the distribution board,as the core component of power supply and electric control for electric vehicles,is the key area for maintenance.The current manual visual inspection and manual recording methods have disadvantages such as slow speed,empiricism and inability to trace back afterwards,which are increasingly dragging down the overall maintenance progress.With the development of machine vision and image processing technology,it is possible to quickly repair the defects of distribution boards.According to the actual testing requirements of the distribution board,through the scheme design,hardware system construction,image processing,software design and debugging,the paper finally completed a set of intelligent maintenance system of train distribution board based on machine vision,and realized the functions of using machine vision to assist manual testing of some defects of the distribution board and archiving and querying.Firstly,according to the actual situation of train maintenance,the design scheme and work flow of the system are determined.The hardware system is designed and built,including different types of cameras,comparative analysis and selection of light sources,lens analysis and focal length calculation,analysis and selection of wireless image transmission and other components,and the hardware circuit of WiFi voice prompt module is designed.Secondly,this paper preprocess the collected switchboard images.A binarization algorithm using Lab color space is proposed to evaluate the brightness of the image.The edge detection algorithm with Sobel operator as the core is used to detect the contour features of the image,and a gray deviation of Sobel edge image is proposed as the sharpness evaluation index of the whole image.The contrast of the image is enhanced by multi-segment gray scale linear transformation.The registration process of the image is completed by labeling the positioning points,template matching,affine transformation and other steps.In this paper,the principle,process and elements of template matching,the core algorithm of defect detection,are described,pyramid hierarchical search strategy is introduced,and the template matching algorithm based on gray scale and shape features is emphatically analyzed,including using normalized product correlation coefficient(NCC)algorithm to calculate the similarity of gray scale features between template image and image to be detected,and two parameters to improve matching speed are studied.This paper introduces two methods for measuring the similarity of shape features-mean square edge distance and Hausdorff distance.HALCON is used to study the recognition process of one-dimensional codes.This paper designs the software system and completes the overall operation and debugging.The main framework of the program uses MFC and HALCON joint programming method.Using HALCON’s powerful image processing algorithm package to complete the compilation of image processing programs,and using MFC(MicrosoftFoundation Class Library),a classic framework under C++ language,to complete the design of human-computer interaction interface.The MySQL database,WiFi voice prompt module and other peripheral software are written.Through the overall operation and debugging of the system,the defect detection of components,characters,wiring terminals,switches and other components of the distribution board has been realized with good results.Finally,this paper summarizes and looks forward to the problems existing in the research of this topic. |