Ancient bridge detection method based on machine vision

By applying multi-angle image acquisition, deep learning object detection model and attention mechanism in ancient bridge detection, problems such as difficult shooting angle selection, large background interference, and difficulty in defect identification in ancient bridge detection are solved, and efficient and accurate detection of ancient bridge structure defects is achieved, which improves detection efficiency and accuracy.

CN120147277APending Publication Date: 2025-06-13GUANGZHOU CITY POLYTECHNIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510241347.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In ancient bridge detection, machine vision technology faced technical problems such as difficulty in selecting shooting angles, large background interference, difficulty in identifying defects, difficulty in achieving refined detection, and difficulty in rapid analysis of large-scale data, resulting in difficulty in meeting the requirements of detection efficiency and accuracy.

Method used

Ancient bridge detection method based on machine vision is adopted to obtain panoramic data through multi-angle image acquisition equipment, and pre-processing is performed by combining adaptive light compensation and background separation technology. Defect recognition network is trained using deep learning object detection model, an attention mechanism is introduced to improve recognition accuracy, and refined analysis is carried out through super-resolution reconstruction and edge detection technology.

Benefits of technology

It realizes intelligent and precise detection of structural defects of ancient bridges, improves detection efficiency and accuracy, provides a scientific basis for the maintenance and protection of ancient bridges, and effectively improves the accuracy and efficiency of structural safety assessment of ancient bridges.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147277A_ABST
    Figure CN120147277A_ABST
Patent Text Reader

Abstract

The invention discloses an ancient bridge detection method based on machine vision, and the method comprises the steps: obtaining an image data set of an ancient bridge, and carrying out the preprocessing of the image data set, and obtaining a second image data set; performing defect identification on the second image data through a defect identification model, extracting feature information according to a defect identification result, and identifying the feature information through a defect classification model to obtain a preliminary classification result; the feature information is judged according to the preliminary classification result, and fine defects are obtained based on the judgment result; classifying the fine defects through the classification model to obtain a final defect detection result; and obtaining a visual result according to the final defect detection result, and analyzing the visual result to obtain an ancient bridge health detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of bridge detection, and particularly relates to an ancient bridge detection method based on machine vision. Background Art

[0002] In the detection of ancient bridges, machine vision technology faces many challenges. First, the structures of ancient bridges are complex and diverse, with large spans and unique shapes. The structural differences between different bridges are significant, which brings difficulties to image acquisition and analysis. Second, after years of erosion by wind, frost, rain and snow, the surfaces of ancient bridges are mottled, the materials are severely aged, and it is difficult to distinguish defects such as cracks and deformations from the background, which easily leads to misjudgments. Third, the surrounding environments of ancient bridges are complex, with many obstacles such as trees and buildings, and the lighting conditions are variable, increasing the difficulty of image processing. In addition, different types of defects have different manifestations, and some subtle defects are difficult to capture, requiring refined detection. Finally, the detection of ancient bridges has high requirements for efficiency and accuracy. It is necessary to complete the analysis of a large amount of data within a limited time while ensuring reliability. In summary, the machine vision detection of ancient bridges faces technical problems such as difficult selection of shooting angles, large background interference, difficult defect recognition, difficult realization of refined detection, and difficult rapid analysis of large-scale data. It is urgent to break through the relevant technical bottlenecks and develop an intelligent detection method specifically for the characteristics of ancient bridges to improve the health monitoring level of ancient bridges. Summary of the Invention

[0003] To solve the above technical problems, the present invention proposes an ancient bridge detection method based on machine vision to solve the problems existing in the above prior art.

[0004] To achieve the above object, the present invention provides an ancient bridge detection method based on machine vision, including:

[0005] Obtain an image dataset of an ancient bridge, preprocess the image dataset to obtain a second image dataset;

[0006] Perform defect recognition on the second image data through a defect recognition model, extract feature information according to the defect recognition result, and perform recognition on the feature information through a defect classification model to obtain a preliminary classification result;

[0007] Judge the feature information according to the preliminary classification result, and based on the judgment result, obtain subtle defects;

[0008] Classify the subtle defects through a classification model to obtain a final defect detection result;

[0009] According to the final defect detection result, obtain a visualization result, analyze the visualization result, and obtain an ancient bridge health detection result.

[0010] Optionally, the process of obtaining the second image dataset includes:

[0011] The adaptive light compensation method is used to process the image dataset, and the occlusion is removed from the processing result by the background separation method to obtain a second image dataset.

[0012] Optionally, before defect recognition of the second image data, it further includes:

[0013] The second image data is subjected to image normalization and data augmentation, and the enhanced image is used as the input data of the defect recognition model.

[0014] Optionally, the defect recognition model adopts a deep learning model. In the defect recognition model, atrous convolution is introduced in the convolutional layer, and an attention mechanism is added to the backbone network, and the defect recognition model is optimized by the Adam optimizer.

[0015] Optionally, the process of extracting feature information according to the defect recognition result includes:

[0016] When there are defects in the second image dataset, the defect area is segmented, and the feature information is extracted according to the defect area, where the feature information includes the size, shape and texture of the defect area.

[0017] Optionally, the defect classification model and the classification model adopt machine learning models.

[0018] Optionally, the process of obtaining the final defect detection result includes:

[0019] The confidence levels of different defect types in the preliminary classification result and the subtle defect splitting result are weighted and fused, and according to the weighted fusion result, the final defect detection result is obtained.

[0020] Optionally, according to the final defect detection result, a defect distribution map is obtained, spatial clustering analysis is performed on the defects to obtain the spatial distribution characteristics of the defects, the spatial distribution pattern is judged through the defect distribution map and the spatial distribution characteristics, and according to the spatial distribution pattern, the current ancient bridge health detection result is obtained, and the spatial distribution characteristics are predicted, and according to the prediction result, the overall health evaluation result of the ancient bridge is obtained.

[0021] Compared with the prior art, the present invention has the following advantages and technical effects:

[0022] The present invention discloses an ancient bridge detection method based on machine vision. Aiming at the characteristics of the complex structure of ancient bridges, a multi-angle image acquisition device is used to obtain comprehensive bridge data. The images are preprocessed by adaptive illumination compensation and background separation techniques to eliminate environmental interference. A defect recognition network is trained using a deep learning object detection model, and an attention mechanism is introduced to improve the recognition accuracy. For the detected subtle defects, super-resolution reconstruction and edge detection techniques are used for refined analysis. Finally, time series analysis is combined with historical data to predict the development trend of defects and generate an evaluation report on the health status of the ancient bridge. The present invention realizes the intelligent and accurate detection of the structural defects of ancient bridges, provides a scientific basis for the maintenance and protection of ancient bridges, and effectively improves the accuracy and efficiency of the safety assessment of ancient bridge structures. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings constituting a part of this application are used to provide a further understanding of this application. The schematic embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation to this application. In the drawings:

[0024] Figure 1 is a flowchart of the ancient bridge detection method based on machine vision according to an embodiment of the present invention;

[0025] Figure 2 is another schematic diagram of the process of the ancient bridge detection method based on machine vision according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments may be combined with each other. The following will refer to the drawings and combine the embodiments to detail this application.

[0027] It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0028] As Figure 1-2 shown, a specific ancient bridge detection method based on machine vision in this embodiment may specifically include:

[0029] Step S101, aiming at the complex structure of the ancient bridge, a multi-angle image acquisition device is used to obtain multi-view image data, and the key areas of the bridge are ensured to be covered through a preset acquisition path planning algorithm, and a first image dataset is obtained.

[0030] According to the preset acquisition path planning algorithm, the acquisition positions and angles of the multi-angle image acquisition device are determined, multi-view image data covering the key areas of the ancient bridge are obtained, and a first image dataset is obtained.

[0031] Specifically, determining the acquisition position and angle of the multi-angle image acquisition device is a key step in the 3D reconstruction of ancient bridges. By presetting a path planning algorithm, it is possible to ensure the acquisition of image data that comprehensively covers the key areas of ancient bridges. For example, for stone arch bridges, determine the passable areas, and set different waypoints in the above areas. At different waypoints, ensure that the ancient bridges can be comprehensively imaged, and pass through the above waypoints in sequence. During the process of passing through the waypoints, the camera sequentially captures images of the ancient bridges at a certain time interval or frame rate, and the captured images of the ancient bridges are used as the first image dataset.

[0032] Step S102: Preprocess the first image dataset, use an adaptive illumination compensation algorithm to eliminate the influence of illumination changes, and combine background separation technology to remove environmental occlusions, obtaining a denoised second image dataset.

[0033] Based on the first image dataset, obtain the illumination distribution characteristics of each image, establish an adaptive illumination compensation model, perform illumination equalization processing on the images to eliminate the influence of illumination changes, and obtain illumination-compensated images. For the illumination-compensated images, use a background modeling method, through foreground object detection and segmentation, remove the environmental occlusions in the images, and obtain foreground object images. Perform image enhancement processing on the foreground object images, using a method that combines wavelet transform and frequency domain filtering to remove image noise, obtaining a denoised second image dataset.

[0034] Specifically, the illumination compensation model is a key step in processing the image of the ancient bridge. By analyzing the illumination distribution characteristics of each image, an adaptive model is established to balance the illumination. For example, for an image of an ancient bridge across a river, there may be obvious differences between direct sunlight and shadow areas. By calculating the brightness histogram of each area of ​​the image, the areas that are too dark or too bright are identified, and then the local contrast enhancement algorithm is applied to improve the visibility of details in the shadow area and reduce the brightness of the overexposed area. This allows the bridge deck, arches and other structures to be clearly presented under different lighting conditions. Background modeling and foreground target detection are crucial for removing environmental occluders. Taking the multi-angle images of the ancient bridge as an example, there may be occluders such as pedestrians and vehicles. By establishing a background model, static bridge structures and dynamic occluders can be identified. A Gaussian mixture model is used to represent the background of each pixel, and then a foreground target detection algorithm, such as the frame difference method or the optical flow method, is used to identify moving targets. In this way, the ancient bridge structure can be effectively separated and a clear foreground target image can be obtained. In image enhancement processing, the combination of wavelet transform and frequency domain filtering can effectively remove noise. For a high-resolution image containing details of an ancient bridge, wavelet decomposition is first performed to decompose the image into different frequency components. Then, threshold denoising is applied in the high-frequency sub-band to remove small noise points. In the low-frequency sub-band, Wiener filtering is applied to suppress large-scale noise. This method can not only preserve the fine structure of the ancient bridge, such as stone texture, but also effectively remove the noise introduced by the shooting equipment or environment.

[0035] Step S103: Based on the second image data set, a deep learning target detection model is used to train a defect recognition network, and an attention mechanism is introduced to enhance the defect area feature extraction capability to obtain a defect recognition model.

[0036] A second image data set is obtained, and the image data is preprocessed, including operations such as image normalization and data enhancement, to obtain a preprocessed image data set.

[0037] Using a deep learning object detection model as the basic model, according to the characteristics of the defect recognition task, the model structure is optimized and improved to obtain a deep learning model suitable for defect recognition. An attention mechanism is introduced into the deep learning model, and the features of the defect area are weighted and enhanced through the attention module to improve the model's attention to the defect area and its feature extraction ability. The preprocessed image dataset is divided into a training set and a validation set. The training set is used to train the defect recognition network, and the validation set is used to evaluate and optimize the model performance during the training process. During the training process, appropriate loss functions and optimization algorithms, such as the cross-entropy loss function and the Adam optimizer, are used to update and optimize the model parameters to improve the model's convergence speed and performance. After training, the test set is used to evaluate the performance of the trained defect recognition model, and metrics such as the precision, recall, and F1 value of the model are calculated to evaluate the model's performance in actual defect recognition tasks. According to the performance evaluation results, the defect recognition model is further optimized and improved, such as adjusting the model structure, hyperparameters, etc., until the required defect recognition performance is obtained to get the final defect recognition model.

[0038] Specifically, after obtaining the second image dataset, image preprocessing is a key step to improve the model performance. Image normalization can scale the pixel values to a unified range, such as [0, 1], which helps to accelerate the model convergence. Data augmentation techniques such as random cropping, rotation, flipping, etc. can expand the training samples and improve the model generalization ability. For bridge defect detection, rotation augmentation can be used to simulate defects at different angles to improve the model's recognition ability for defects in various directions. Deep learning object detection models such as Faster R-CNN, YOLO, etc. can be used as the basic model. For the defect recognition task, the model can be optimized.

[0039] In the detection of surface defects of ancient bridges, a fine-grained feature extraction module can be added to improve the detection ability of tiny defects. For example, dilated convolution can be introduced in the convolutional layer to expand the receptive field and capture defect features at different scales. The introduction of the attention mechanism can significantly improve the model performance. Under the above YOLO series of models, the attention mechanism is added to the structure or output of the backbone network. The spatial attention mechanism is adopted to assign higher weights to the areas where defects may appear, improving the model's attention to key areas. Through the attention module, the model can more accurately locate and identify various defects, such as cracks or other damages. The division of the dataset is an important part of model training. Usually, the training set, validation set, and test set are divided in a ratio of 8:1:1. During the training process, the cross-entropy loss function can be used to evaluate the difference between the model output and the true label, and the Adam optimizer is used to adaptively adjust the learning rate to accelerate the model convergence. The weights of the loss function can be adjusted according to the distribution of different types of defects to balance the recognition accuracy of various defects. The evaluation of model performance is a key step to ensure the practicality of the model. Precision reflects the proportion of correct identifications by the model, recall represents the proportion of detected defects among all defects, and the F1 value takes both into account.

[0040] In practical applications, more attention may be paid to recall to avoid missing defect detections. By adjusting the model structure, optimizing hyperparameters, etc., the model performance can be further improved. For example, adding a Feature Pyramid Network (FPN) can improve the multi-scale feature extraction ability, or using focal loss to alleviate the problem of class imbalance, and finally obtaining a defect recognition model that meets the actual needs.

[0041] Step S104, analyze the second image dataset through the defect recognition model to determine whether there are defects such as cracks and deformations. If a defect is detected, extract the feature vector of the defect area and generate a preliminary defect classification result.

[0042] Obtain the second image dataset to be detected and input it into the pre-constructed defect recognition model for analysis and processing. The defect recognition model scans each frame of the image in the second image dataset one by one to determine whether there are defect features such as cracks and deformations in the image. If a defect is detected during the scanning process, extract the feature vector of the defect area to obtain feature information such as the size, shape, and texture of the defect area. Input the extracted feature vector of the defect area into the pre-trained defect classification model, and analyze the feature vector through the classification model to obtain the preliminary classification result of the defect.

[0043] Specifically, the defect recognition model is an image analysis technology based on deep learning. After obtaining the second image dataset to be detected, the second image dataset includes continuously captured images of the bridge surface. These images are captured at different positions of the bridge by a high-speed camera, forming a dataset containing thousands of frames of images. These images are input into a pre-constructed defect recognition model for analysis, and the model scans each frame of the image. During the scanning process, the model looks for specific patterns or anomalies that may indicate defects. For example, for the bridge surface, the model may detect defects such as cracks and depressions. If a potential defect is detected in a certain frame of the image, the model automatically extracts the feature vector of that area. Feature extraction is a key step in defect recognition. For the detected defects, the model may extract features such as their length, width, and direction. For surface depressions, area, depth, and shape information may be extracted. These features constitute a multi-dimensional vector describing the defect. The extracted feature vector is then input into a pre-trained defect classification model. This classification model is usually a deep neural network trained with a large number of labeled defect samples. The classification model analyzes the feature vector and gives the probability distribution of the defect type. For example, for a detected linear defect, the classification model may give the following results: 80% probability of being a crack, 15% probability of being a depression, and 5% probability of being other types. Based on this result, the system determines that the defect is a crack and further evaluates its severity. The determination of severity is usually based on preset criteria. For example, for a crack, a length exceeding 20 cm may be determined as a serious defect that requires immediate treatment; while a length between 10 - 20 cm may be determined as a medium defect.

[0044] The feature vector of the extracted defect area is input into a pre-trained defect classification model, and the classification model analyzes the feature vector to obtain the preliminary classification result of the defect.

[0045] The input image to be detected is segmented using an image segmentation algorithm to extract the area with defects in the image, obtaining a defect area image. For the extracted defect area image, a feature extraction algorithm is used to extract the features of this area, obtaining a feature vector characterizing the characteristics of the defect area. The feature vector of the extracted defect area is input into a pre-trained defect classification model, and the model receives the feature vector as input. Inside the defect classification model, through the analysis of the feature vector, it determines the defect category to which the feature vector belongs. If the feature vector satisfies the feature pattern of a certain type of defect, it is classified into the corresponding defect category. Through the analysis and calculation of the classification model, the preliminary classification result of the input feature vector of the defect area is obtained, determining which type of defect the defect belongs to.

[0046] Compare the preliminary defect classification results output by the classification model with the preset defect categories. If the preliminary classification result has a high degree of matching with a certain defect category, then determine the defect as that category. According to the preliminary classification results of the defects, combined with the pre-annotated defect category information, verify the preliminary classification results to determine the final defect classification results and complete the defect identification of the defect area.

[0047] Specifically, image segmentation is a key step in defect detection, which can separate the defect area in the image from the normal area. Commonly used image segmentation algorithms include threshold segmentation, edge detection, and region growing, etc. Taking threshold segmentation as an example, according to the distribution characteristics of the image gray value, an appropriate threshold can be selected to divide the image into foreground (defect area) and background. Suppose in the image of the bridge surface, the gray value of the defect area is significantly lower than that of the normal area, and the possible defect area can be segmented by setting the gray threshold to 128. Feature extraction is the process of converting the segmented defect area into a quantifiable feature vector. Commonly used features include shape features, texture features, and statistical features, etc. Taking texture features as an example, the gray-level co-occurrence matrix (GLCM) can be used to describe the texture information of the defect area. By calculating the statistics such as the energy, contrast, and correlation of the GLCM, a vector describing the defect texture features can be obtained. For example, for a crack defect, its GLCM features may show high contrast and low uniformity. The selection of the defect classification model is crucial for accurately identifying the defect type. Commonly used classification models include support vector machine (SVM), decision tree, and neural network, etc. Taking SVM as an example, it realizes classification by finding the optimal classification hyperplane in the high-dimensional feature space. For binary classification problems, such as distinguishing cracks and corrosion, SVM can effectively find the decision boundary for distinguishing these two types of defects. In practical applications, kernel functions (such as radial basis function) can be used to handle the case of non-linearly separable to improve the classification accuracy. The verification of the preliminary classification results is an important link to ensure classification accuracy. This can be achieved by comparing with the pre-annotated defect category information.

[0048] For example, if the model preliminarily classifies a defect as "crack", it can be checked whether the feature information such as the aspect ratio and directionality of the defect conforms to the typical features of cracks. If it is found that they do not match, it is considered a minor defect and may require further analysis or reclassification. The advantage of this defect detection and classification method lies in its flexibility and interpretability. By adjusting the parameters of the segmentation algorithm, selecting different feature extraction methods, or replacing the classification model, it can adapt to different defect detection scenarios. For example, when detecting tiny cracks on the bridge surface, a more refined image segmentation algorithm and more sensitive texture features may be required; while when detecting large-area corrosion, more attention may be paid to color and shape features. This method also allows relevant personnel to adjust and optimize the detection process according to specific problems, improving the accuracy and efficiency of detection.

[0049] Step S105: For the minor defects in the preliminary defect classification result, use super-resolution reconstruction technology to enhance the defect area image, combine edge detection algorithms to extract the defect contour, obtain high-precision defect morphology data, and update the defect classification result.

[0050] According to the preliminary defect classification result, judge whether there are minor defects. If there are minor defects, perform subsequent processing on the minor defect area; if there are no minor defects, directly output the preliminary defect classification result. Use super-resolution reconstruction technology to enhance the image of the minor defect area. Through the high-resolution image obtained by super-resolution model training, improve the image quality and clarity of the minor defect area. Perform edge detection on the image of the minor defect area after super-resolution reconstruction. Use the Canny edge detection algorithm to extract the contour information of the minor defect through steps such as gradient calculation and non-maximum suppression. According to the edge detection result, obtain the high-precision morphology data of the minor defect, including geometric features such as the size, shape, and direction of the defect, and form the morphological feature vector of the minor defect. Fuse the high-precision morphological feature vector of the minor defect with the preliminary defect classification result, and update the original defect classification feature representation through methods such as feature splicing or feature mapping. Use the support vector machine (SVM) algorithm to classify the updated defect features again. Through the SVM model obtained by training, perform refined defect category determination on the minor defect to obtain the high-precision classification result of the minor defect. Integrate the high-precision classification result of the minor defect with the preliminary defect classification result, and perform weighted fusion on the confidence levels of different defect categories to obtain the final comprehensive defect classification result as the output result to return.

[0051] Specifically, in the process of defect detection, the identification and handling of subtle defects are crucial. First, it is necessary to determine whether there are subtle defects. For example, in the inspection of bridge surfaces, some small cracks or depressions may be misjudged as other types of defect textures in the preliminary classification. At this time, these suspicious areas need to be further analyzed. Super-resolution reconstruction technology can significantly improve the image quality. Taking the small cracks on the bridge surface as an example, the original image may only be 100x100 pixels, making it difficult to identify details. Through super-resolution reconstruction, it can be enlarged to 400x400 pixels, making the subtle crack contours more clearly visible. This technology is not just a simple magnification, but an intelligent reconstruction of the image through a deep learning model to fill in the missing detail information. Edge detection is a key step in identifying subtle defects. The Canny algorithm performs well in this regard, and it can effectively extract the contour information of the defects. For example, for the small cracks on the bridge surface, the Canny algorithm can accurately depict the trend and shape of the cracks. This high-precision contour information is crucial for subsequent defect analysis. Obtaining high-precision morphological data is the basis for accurate classification. For example, for a small crack with a length of 8 cm and a width of 2 cm, its geometric features such as aspect ratio and orientation angle can be accurately measured. These data form the morphological feature vector of the defect, providing an important basis for subsequent classification. Feature fusion is an effective means to improve the classification accuracy. Combining the preliminary classification results with the high-precision morphological features of subtle defects can greatly improve the classification accuracy. For example, the preliminary classification may misjudge a small depression as a crack, but by combining its circular geometric features, it can be more accurately classified as a pit. The Support Vector Machine (SVM) algorithm plays an important role in the refined classification of defects. Through training data, SVM can learn the feature boundaries of different types of defects. For example, it can effectively distinguish small cracks and pits, even if these two types of defects are very similar visually. The advantage of SVM lies in its ability to handle high-dimensional feature spaces and is suitable for dealing with complex defect classification problems. Finally, the integration of comprehensive classification results is an important link to ensure the reliability of detection. By weighted fusion of different classification results, a more reliable final judgment can be obtained. For example, if the preliminary classification determines that the probability of a certain defect being a pit is 60%, and the refined classification determines that the probability of it being a crack is 80%, then it may ultimately be classified as a crack, but at the same time, a certain degree of uncertainty is retained for subsequent manual review. This multi-level and multi-angle defect detection method not only improves the accuracy of detection but also provides detailed data support for subsequent quality control and production optimization. Through this method, potential quality problems can be discovered earlier, thereby improving product quality and reducing production costs.

[0052] The updated defect features are re-classified using the Support Vector Machine (SVM) algorithm. Through the SVM model obtained by training, refined defect category determination is performed on subtle defects to obtain a high-precision classification result for subtle defects.

[0053] Obtain the image data of subtle defects to be classified, and preprocess the image, including operations such as denoising and enhancement, to improve the image quality and prepare for subsequent feature extraction. For the preprocessed defect image, use a variety of feature extraction algorithms, such as texture features, shape features, color features, etc., to extract feature vectors that can characterize the defect characteristics. Take the extracted defect feature vectors as the input of the SVM algorithm, and train the SVM classification model according to the predefined defect category labels. During the training process, optimize the model parameters through methods such as cross-validation to improve the classification accuracy. Use the trained SVM classification model to classify new subtle defect images. Input the feature vectors of the defect image into the SVM model, and calculate through the discriminant function of the model to obtain the category to which the defect belongs. If the classification confidence is lower than the preset threshold, mark the defect as an unknown category and prompt that further manual inspection and confirmation are required; if the classification confidence is higher than the threshold, use the classification result as the final defect category determination result. According to the defect category determination result, automatically generate a defect detection report, including information such as defect type, location, quantity, etc., to provide a basis for subsequent defect handling and quality control. Continuously collect new defect samples found in actual production, and retrain and optimize the SVM classification model regularly to continuously improve the generalization ability and classification accuracy of the model and adapt to the changing defect characteristics.

[0054] Specifically, the preprocessing of minute defect images is a crucial step in improving classification accuracy. Denoising operations can use Gaussian filtering or median filtering to effectively eliminate random noise in the images. For example, for an image of a bridge surface containing fine cracks, applying Gaussian filtering can smooth the background texture and highlight the crack features. Image enhancement can enhance the contrast through histogram equalization to make the defects more obvious. Feature extraction is the core step of defect classification. Texture features can be extracted through the gray-level co-occurrence matrix (GLCM) to calculate statistics such as energy and contrast. Shape features can use the Hough transform to detect linear or circular defects. Color features can extract hue and saturation information in the HSV color space. For example, for a surface corrosion defect, GLCM can capture its irregular texture, the Hough transform can describe its contour shape, and HSV features can reflect its color changes. During the training process of the SVM classification model, parameter optimization is crucial. The grid search method can be used to select the optimal parameters through cross-validation among different combinations of kernel functions (such as linear kernel, RBF kernel) and penalty parameter C. For example, for a dataset containing multiple types of defects such as cracks, dents, and corrosion, it may be found that when the RBF kernel function is combined with C = 10, the model achieves the highest classification accuracy on the validation set. The setting of the classification confidence threshold requires a balance between accuracy and efficiency. The best operating point can be selected through ROC curve analysis. For example, if the threshold is set to 0.8, it means that when the model's judgment probability for the defect category is lower than 80%, it will mark it as an unknown category. This helps reduce misclassification but may increase the workload of manual inspection. The automatic generation of defect detection reports can greatly improve work efficiency. The report can include information such as the type, location coordinates, and area size of the defects. For example, for a detected surface scratch, the report can record it as a "linear scratch" located at image coordinates (100, 150) with a length of approximately 2.5 mm. These detailed information helps with subsequent defect repair and quality control. The continuous optimization of the model is the key to maintaining classification performance. New defect samples can be regularly collected, especially those that were previously misclassified or marked as unknown. For example, if a new type of surface contamination defect is discovered, it can be added to the training set to retrain the SVM model. This iterative optimization process enables the model to adapt to the changing production environment and improve the recognition ability for new types of defects.

[0055] Step S106: Based on the updated defect classification results, obtain the defect distribution map and the spatial clustering results, adopt the time series analysis method, combine the current detection data with the pre-stored historical detection data, predict the development trend of the defects, and generate an assessment report on the health status of the ancient bridge.

[0056] According to the updated defect classification results, obtain the defect distribution map, conduct spatial clustering analysis on the defects, and obtain the spatial distribution characteristics of the defects. Obtain the current detection data and the pre-stored historical detection data, and use time series analysis methods to model and analyze the time variation trend of the defects. Through the defect distribution map and the spatial clustering results, judge the spatial distribution pattern of the defects. If the distribution is relatively concentrated, it is considered that the health status of the ancient bridge in this area is poor. According to the time series analysis results, predict the development trend of the defects in the future period. If the prediction results show that the number and severity of the defects will continue to increase, it is considered that the health status of the ancient bridge will further deteriorate. Integrate the spatial distribution characteristics and time variation trend of the defects, and use the support vector machine algorithm to evaluate the overall health status of the ancient bridge and obtain the health status level. According to the health status evaluation results, use the decision tree algorithm to judge whether the ancient bridge needs to be repaired and strengthened. If so, give specific repair and strengthening suggestions. Generate an ancient bridge health status evaluation report, including the defect distribution map, spatial clustering results, defect development trend prediction results, health status level, and repair and strengthening suggestions, etc., to provide decision support for the maintenance of the ancient bridge.

[0057] Specifically, the defect distribution map is an important basis for the health status assessment of ancient bridges. By marking the detected defects on the bridge structure diagram, the spatial distribution of the defects can be visually presented. For example, the defect distribution map of a certain stone arch bridge shows that the crack density is relatively high at the crown and springings of the arch, which may imply that this area bears greater stress. Spatial clustering analysis helps to identify the concentrated areas of defects. By using the K-means algorithm to cluster the defect coordinates, the spatial distribution characteristics of the defects can be obtained. Suppose the clustering result shows that there is a high-density defect cluster in the middle of the bridge deck, which may indicate that this area is affected by a large vehicle load. Time series analysis is crucial for predicting the development trend of defects. By using the autoregressive integrated moving average (ARIMA) model, the historical detection data can be modeled. For example, after the ARIMA analysis of the crack width data of a certain ancient bridge, it is predicted that the crack width will increase by 0.5 mm within the next three months, which indicates that the bridge structure may be deteriorating continuously. The spatial distribution pattern of defects reflects the overall health status of ancient bridges. If the defects show a concentrated distribution, such as a large number of spalling and weathering phenomena occurring in the arch ring of a certain stone arch bridge, the health status of this area is poor and requires key attention. On the contrary, if the defects are relatively scattered and minor in degree, it may indicate that the overall condition of the bridge is acceptable. The support vector machine (SVM) algorithm plays an important role in the health status assessment of ancient bridges. By inputting features such as defect type, quantity, and severity, the SVM can classify the health status of ancient bridges into levels such as "good", "general", "poor", and "dangerous". For example, the SVM assessment result of a certain ancient bridge is "poor", which means that timely maintenance measures need to be taken. The decision tree algorithm can judge whether repair and reinforcement are needed according to the health status assessment result. The nodes of the decision tree can include key indicators such as "crack width" and "load capacity". If the crack width of a certain ancient bridge exceeds the safety threshold, the decision tree may give a suggestion of "crack grouting repair is needed". The health status assessment report is an important basis for the maintenance decision of ancient bridges. The defect distribution map in the report can visually display the damage location, the spatial clustering result can reveal the weak areas, and the prediction of the defect development trend can guide the future maintenance plan. For example, the assessment report of a certain ancient bridge shows that its health status is "poor", predicts that the cracks will continue to expand in the future, and recommends arch ring reinforcement and bridge deck waterproof treatment within three months, which provides clear guidance for the bridge management department to formulate maintenance strategies.

[0058] The present invention provides an ancient bridge detection system based on machine vision, mainly including:

[0059] An image acquisition module, which is used to obtain multi-view image data by using a multi-angle image acquisition device for the complex structure of the ancient bridge, and ensure coverage of the key areas of the bridge through a preset acquisition path planning algorithm to obtain a first image data set;

[0060] An image preprocessing module, which is used to preprocess the first image dataset, eliminate the influence of illumination changes by using an adaptive illumination compensation algorithm, and remove environmental occlusions by combining background separation technology to obtain a denoised second image dataset;

[0061] A defect recognition model training module, which is used to train a defect recognition network based on the second image dataset by using a deep learning object detection model, introduce an attention mechanism to enhance the defect region feature extraction ability, and obtain a defect recognition model;

[0062] A defect detection and analysis module, which is used to analyze the second image dataset through the defect recognition model to determine whether there are defects such as cracks and deformations. If a defect is detected, the feature vector of the defect region is extracted to generate a preliminary defect classification result;

[0063] A defect enhancement and classification module, which is used to enhance the defect region image of the preliminary defect classification result by using super-resolution reconstruction technology, extract the defect contour by combining edge detection algorithms, obtain high-precision defect morphology data, and update the defect classification result;

[0064] A health status evaluation module, which is used to obtain a defect distribution map and a spatial clustering result based on the updated defect classification result, adopt a time series analysis method, combine the current detection data with the pre-stored historical detection data, predict the development trend of the defects, and generate an ancient bridge health status evaluation report.

[0065] The above is only a preferred specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for detecting ancient bridges based on machine vision, characterized in that: include: Acquire an image dataset of ancient bridges, and preprocess the image dataset to obtain a second image dataset; Performing defect recognition on the second image data by using a defect recognition model, extracting feature information according to the defect recognition result, and recognizing the feature information by using a defect classification model to obtain a preliminary classification result; The feature information is judged according to the preliminary classification results, and subtle defects are obtained based on the judgment results; Classify subtle defects through the classification model to obtain the final defect detection results; Based on the final defect detection results, visualization results are obtained, and the visualization results are analyzed to obtain the health detection results of the ancient bridge.

2. The method according to claim 1, characterized in that: The process of acquiring the second image data set includes: The image data set is processed by using an adaptive illumination compensation method, and occlusions are removed from the processing result by using a background separation method to obtain a second image data set.

3. The method according to claim 1, characterized in that: Before performing defect recognition on the second image data, the method further includes: The second image data is normalized and enhanced, and the enhanced image is used as input data of the defect recognition model.

4. The method according to claim 1, characterized in that: The defect recognition model adopts a deep learning model. In the defect recognition model, a hole convolution is introduced in the convolution layer, and an attention mechanism is added to the backbone network. The defect recognition model is optimized by the Adam optimizer.

5. The method according to claim 1, characterized in that The process of extracting feature information based on defect recognition results includes: When there is a defect in the second image data set, the defect area is segmented, and feature information is extracted according to the defect area, wherein the feature information includes the size, shape and texture of the defect area.

6. The method according to claim 1, characterized in that The defect classification model and classification model adopt machine learning models.

7. The method according to claim 1, characterized in that The process of obtaining the final defect detection results includes: The confidences of different defect types in the preliminary classification results and the subtle defect splitting results are weighted and fused, and the final defect detection results are obtained based on the weighted fusion results.

8. The method according to claim 1, characterized in that According to the final defect detection results, a defect distribution map is obtained, and a spatial clustering analysis is performed on the defects to obtain the spatial distribution characteristics of the defects. The spatial distribution pattern is judged based on the defect distribution map and the spatial distribution characteristics. According to the spatial distribution pattern, a judgment is made to obtain the current health detection results of the ancient bridge, and the spatial distribution characteristics are predicted. According to the prediction results, the overall health evaluation results of the ancient bridge are obtained.