| As of December 31,2020,China has 47 metro cities with about 7,000 km of subway tunnels.With the increase of tunnel service time,the hidden danger is also increasing.Tunnel crack is one of the tunnel diseases.The tunnel collapse caused by the disease brings great loss to people’s life and property.Based on OpenCV,this paper designs and implements a tunnel crack detection system for maintenance personnel to deal with it in time.At present,most existing tunnel detection methods adopt manual detection,which is inefficient and its accuracy is easily affected by subjective factors of surveyors.Long time measurement in dark tunnels will also affect the health of surveyors.The tunnel crack detection system based on OpenCV can greatly improve the detection efficiency and detect the tunnel crack disease.The main achievements of this paper are as follows:(1)A set of tunnel crack detection system is designed and implemented,which mainly includes crack image preprocessing module,crack splicing module across multiple cameras,crack edge detection module,connected domain marking module,skeleton extraction module,and crack parameter calculation module.(2)The improved MSRCR algorithm is used to enhance the crack image,and the median filter of 5*5 template is selected to filter the noise of the acquired image.Finally,the improved Canny operator is used to detect the crack edge.The camera calibration was completed for the convenience of crack image parameter analysis.(3)The image of the same crack shot by multiple cameras was matched,the homography matrix of the image was calculated,and the effect of the collected images from multiple cameras was patched by using the normalized improved homography matrix,and the crack images across 4 cameras and 9 cameras were patched.(4)Select maximum entropy threshold for segmentation of images taken by single camera and Mosaic images taken by multiple cameras.A connected domain labeling method combined with morphological processing is designed and implemented to mark the fractured connected domain.Based on the improved Zhang-Suen skeleton extraction method,the four connected domain extraction method is used to extract the fracture skeleton.The crack length,width,rectangularity,circularity and other attributes were extracted,and the crack width detection result reached 0.1mm to meet the practical application requirements.(5)Combined with crack properties,the design algorithm filters out the common interference of the tunnel,which enhances the ability of the algorithm to adapt to environmental interference.(6)Combine the crack coordinate design algorithm and the SVM support vector machine method to classify the crack types,and combine with OpenCV to design the area measurement algorithm of the crack mass abscission. |