Pipeline internal inspection system based on dual fisheye lenses
Through the internal pipeline detection system based on Pisces lenses, combined with the convolutional neural network and the association rule mining algorithm, the problem of difficulty in analyzing the correlation between crack defects in the existing technology is solved, high-precision defect detection and risk assessment are achieved, and the safety of the pipeline is improved.
Patent Information
- Application Number
- CN202410994746.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-07-24
AI Technical Summary
The existing internal pipeline inspection system has challenges in dealing with complex pipeline environments, achieving high-precision defect positioning and associated risk assessment, and it is particularly difficult to analyze the correlation between crack defects, resulting in the inability to detect high-risk areas in a timely manner.
Using a pipe internal detection system based on Pisces lenses, image capture is performed through two fisheye lens modules, geometric correction and distortion correction are performed using image preprocessing units to generate a panoramic image. Defect detection is carried out in convolutional neural network algorithm, and the spatial distribution and association relationship between crack defects are analyzed through the association rule mining algorithm, and a risk matrix is constructed for risk assessment.
It realizes high-precision detection and positioning of internal defects of the pipeline, can effectively analyze the correlation between crack defects, identify high-risk areas, and improves the safety and reliability of the pipeline.
Smart Images

Figure CN118817694B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of pipeline detection, and in particular to a pipeline internal detection system based on a dual fisheye lens. Background Art
[0002] With the continuous advancement of industrialization, pipeline systems are increasingly used in the fields of oil, natural gas, water and chemical industry. However, the long-term use and complex operating environment of pipelines make it easy for various defects to appear inside the pipelines, such as corrosion, cracks and scale accumulation, which may lead to major safety accidents such as pipeline leakage and explosion. Therefore, the detection and monitoring of the inside of the pipeline becomes particularly important.
[0003] Traditional pipeline internal inspection methods mainly rely on a single camera for image acquisition. This method has problems such as limited field of view, image distortion and detection blind spots, making it difficult to fully and accurately reflect the actual conditions inside the pipeline. In addition, traditional inspection systems also have deficiencies in the accuracy and efficiency of defect detection, and often fail to detect potential high-risk areas in a timely manner.
[0004] With the development of computer vision and artificial intelligence technology, more and more research and applications have begun to introduce advanced image processing and machine learning algorithms to improve the accuracy and efficiency of internal pipeline inspection. However, existing technologies still face challenges in dealing with complex pipeline environments, achieving high-precision defect positioning and associated risk assessment, especially after pipeline crack detection, which can only detect crack defects individually and cannot effectively analyze the correlation between crack defects, thereby discovering the high-risk problems of crack defects after correlation. Summary of the invention
[0005] Based on the above objectives, the present invention provides a pipeline internal detection system based on dual fisheye lenses.
[0006] The pipeline internal inspection system based on dual fisheye lenses includes:
[0007] Two fisheye lens modules, each fisheye lens module includes a fisheye lens and an image preprocessing unit;
[0008] A data acquisition module, used for receiving pre-processed image data from two fisheye lens modules;
[0009] An image fusion processing module is used to fuse the image data collected by the two fisheye lens modules and generate a panoramic image;
[0010] Defect detection module, used to analyze the panoramic image, detect defects inside the pipeline, and determine the defect type and size information. Defect types include corrosion, cracks, and scaling;
[0011] The defect location module locates the defect after detecting the defect inside the pipeline and determines the location information of the defect;
[0012] The correlation analysis module performs correlation analysis on crack defects that are close in space according to the determined locations of crack defects, analyzes the spatial distribution and correlation relationship between crack defects, and evaluates the degree of correlation between them. Based on the results of the correlation analysis, it performs risk assessment to determine whether there is a correlation risk between crack defects.
[0013] Preventive measures module: formulate corresponding preventive measures based on the risk assessment results. If there is a risk of correlation between crack defects, strengthen the monitoring and inspection of the corresponding areas.
[0014] Furthermore, it also includes an inspection robot, two fisheye lens modules are respectively installed at the front and rear parts of the inspection robot, and the angles are adjusted to achieve all-round image acquisition inside the pipeline. The image preprocessing unit is responsible for denoising and enhancing the image data collected by the fisheye lens to improve the quality and clarity of the image.
[0015] Furthermore, the image fusion processing module includes geometric correction of the images collected by the two fisheye lens modules, converting the images into cylindrical projections to eliminate the distortion caused by the fisheye lens, registering the corrected images, aligning the two images to ensure that the positions are consistent in the same coordinate system, stitching the registered images based on the image stitching algorithm of feature points to form a panoramic image, and performing edge fusion processing on the stitched panoramic image to eliminate discontinuities at the stitching points to ensure the visual effect and quality of the panoramic image.
[0016] Furthermore, the defect detection module is based on a convolutional neural network algorithm. The convolutional neural network algorithm introduces a multi-scale feature fusion mechanism, and adds multiple parallel convolution branches to the network structure. Each branch is responsible for extracting features of different scales, which are combined through a feature fusion layer to enhance the perception of multi-scale information. The convolutional neural network algorithm that introduces a multi-scale feature fusion mechanism for defect detection specifically includes:
[0017] Preprocess the panoramic image, including image resizing and normalization;
[0018] Multi-scale feature extraction: Multiple parallel convolution branches are introduced into the network structure. Each branch is responsible for extracting features of different scales. Through multiple convolution branches, the details and global information of the image are captured at different levels.
[0019] The features of each scale are fused to obtain a rich and complete feature representation, and the features of different scales are fused together by weighted summation or concatenation.
[0020] Deep network structure: After feature fusion, the fused features are input into the deep network structure for feature extraction and learning. The deep network includes convolutional layers, pooling layers, and fully connected layers, which are used to abstract and combine features to achieve defect detection.
[0021] Defect detection and classification: A classifier is added to the last layer of the network to detect and classify defects based on the extracted features. A multi-classification approach is used to determine the type and number of defects based on specific task requirements.
[0022] Furthermore, the multi-scale feature extraction includes:
[0023] The convolution operation is expressed as: ,in, is the pixel value of the input image, is the weight of the convolution kernel, is the bias term, is the pixel value of the feature image after convolution;
[0024] Activation function,The activation function is applied after convolution and is expressed as:
[0025] ;
[0026] The pooling operation is expressed as: ,in, is the pixel value of the feature image after pooling;
[0027] The feature fusion is achieved through weighted summation or concatenation operation:
[0028] Weighted sum: ;
[0029] Chain operation: ;
[0030] The classifier uses the softmax function for multi-classification:
[0031] ,in, is the input feature vector, Yes Category The weight vector of is the number of categories.
[0032] Furthermore, the defect location module specifically includes:
[0033] The current position and posture information of the fisheye lens is obtained by a positioning sensor installed on the fisheye lens module, and is expressed in coordinates in the fisheye lens coordinate system;
[0034] Conversion between pixel coordinates and fisheye lens coordinates: convert the defect position in the image captured by the fisheye lens, i.e., pixel coordinates, into coordinates in the fisheye lens coordinate system;
[0035] Determine the fisheye lens coordinates to be converted into coordinates in the world coordinate system, and then convert the defect position into coordinates in the world coordinate system;
[0036] Determine the coordinates of the pipeline in the world coordinate system, and thus locate the coordinates of the defect position in the pipeline.
[0037] Furthermore, the association analysis module specifically includes:
[0038] Calculate the spatial distance between each pair of crack defects :
[0039] ; Obtain the coordinate information of each crack defect from the defect detection module, and then construct a distance matrix based on the calculated spatial distance between each pair of defects ;
[0040] Association rule mining: Analyze the spatial distribution and association relationship between crack defects using association rule mining algorithm, and extract significant (i.e. high confidence) crack defect association rules by setting the minimum support threshold and minimum confidence threshold;
[0041] Correlation evaluation: Calculate the correlation between crack defects :
[0042] ;
[0043] Risk assessment: Based on the results of correlation analysis, risk assessment is performed to determine whether there is any correlation risk between defects;
[0044] Risk Matrix Construction: Based on Correlation Construct a risk matrix for crack defects. By constructing the risk matrix, the associated risks of crack defects can be quantified. The risk matrix maps the correlation between different defects to risk levels to quantify and visualize the risks.
[0045] Furthermore, the association rule mining algorithm specifically includes:
[0046] Get crack defect pairs, according to the calculated distance matrix , generating a list of two-tuples containing defect pairs, each of which represents two crack defects that are too close in space, thereby creating a data set;
[0047] Define the parameters for association rule mining, including minimum support and minimum confidence;
[0048] Generate frequent itemsets: Generate all itemsets, i.e. defect pairs, and then filter out infrequent itemsets based on the minimum support threshold, retaining frequent itemsets;
[0049] Generate candidate rules: Generate candidate sets of association rules from frequent item sets;
[0050] Calculate confidence and filter rules: Calculate the confidence of each candidate rule, filter out rules with low confidence based on the minimum confidence threshold, and retain association rules with high confidence.
[0051] Furthermore, the risk matrix construction includes:
[0052] Correlation between crack defects based on calculation ,in It is and The correlation degree of crack defects is crack defects, then calculate The correlation matrix ;
[0053] Constructing a risk matrix :
[0054] Risk Matrix Based on the association matrix constructed;
[0055] Each element Indicates crack defect and The risk level between
[0056] Risk levels are divided according to the degree of relevance:
[0057] :Low risk;
[0058] :Medium risk;
[0059] :High risk;
[0060] : Very high risk;
[0061] The risk matrix maps the correlation of different defects to risk levels, including , each Mapping to the risk matrix Medium risk level;
[0062] Using heatmaps to visualize risk matrices ,Different colors represent different risk levels, using red for high risk, yellow for medium risk, and green for low risk.
[0063] Furthermore, the support is expressed as: ,in, is the number of records containing item set A, is the total number of records.
[0064] The confidence level is expressed as: ,in, is the number of records that contain both item set A and item set B.
[0065] Beneficial effects of the present invention:
[0066] The present invention uses two fisheye lens modules to capture images, and uses an image preprocessing unit to perform geometric correction and distortion correction on the images to ensure the quality and accuracy of the images. The image fusion processing module fuses the image data collected by the two fisheye lenses to generate a panoramic image, thereby providing a wider field of view and more comprehensive internal information of the pipeline. In addition, after detecting a defect, the defect detection module converts the pixel coordinates into camera coordinates through an accurate coordinate conversion algorithm, and then further converts them into world coordinates, thereby achieving accurate positioning of the defect and providing a reliable data basis for pipeline maintenance and repair.
[0067] The present invention introduces a convolutional neural network (CNN) algorithm for multi-scale feature extraction in the defect detection module. It extracts features of different scales through multiple parallel convolutional layers, captures details and global information inside the pipeline, and combines it with a deep learning model to effectively identify and classify various types of defects, such as corrosion, cracks, and fouling. The deep learning model has been trained with a large amount of labeled data and has high precision and robustness. It can accurately detect defects in complex pipeline environments, improving the efficiency and reliability of internal pipeline detection.
[0068] The present invention innovatively introduces a correlation analysis module for crack defects. By calculating the spatial distance between each pair of crack defects, the association rule mining algorithm is used to analyze the spatial distribution and correlation relationship between crack defects, and the degree of correlation between them is evaluated. By constructing a risk matrix of crack defects, the correlation degrees of different defects are mapped to risk levels, and the correlation risks of crack defects are quantified and visualized. The risk assessment module identifies high-risk areas based on the results of the correlation analysis and generates a risk assessment report, which provides a scientific basis and decision-making support for pipeline maintenance and management, and significantly improves the safety and reliability of pipelines. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0070] Figure 1 A schematic diagram of functional modules of a detection system according to an embodiment of the present invention;
[0071] Figure 2 Schematic diagram of an association analysis module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0072] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0073] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0074] like Figure 1-Figure 2 As shown in the figure, the pipeline internal inspection system based on dual fisheye lenses includes:
[0075] Two fisheye lens modules, each fisheye lens module includes a fisheye lens and an image preprocessing unit;
[0076] A data acquisition module, used for receiving pre-processed image data from two fisheye lens modules;
[0077] An image fusion processing module is used to fuse the image data collected by the two fisheye lens modules and generate a panoramic image;
[0078] Defect detection module, used to analyze the panoramic image, detect defects inside the pipeline, and determine the defect type and size information. Defect types include corrosion, cracks, and scaling;
[0079] The defect location module locates the defect after detecting the defect inside the pipeline and determines the location information of the defect;
[0080] The correlation analysis module performs correlation analysis on crack defects that are close in space according to the determined locations of crack defects, analyzes the spatial distribution and correlation between crack defects, and evaluates the degree of correlation between them. Based on the results of the correlation analysis, a risk assessment is performed to determine whether there is a correlation risk between crack defects and whether such correlation may lead to a greater risk. If an obvious correlation is found between two adjacent defects, the risk of pipeline rupture or leakage may increase.
[0081] The principle logic of correlation analysis is to determine whether there are systematic problems or potential greater risks by evaluating the spatial distribution and correlation between crack defects.
[0082] First, the spatial distance between each pair of crack defects is calculated to understand their relative positions in the pipeline. Spatial distance is the basis for evaluating the correlation between defects. If two crack defects are very close, they may be caused by the same stress or environmental factors. Association rules are used to mine and analyze the correlation between crack defects to discover frequently occurring patterns in the data set. By analyzing the common occurrence patterns of crack defects, it is found whether certain defects tend to appear together, which indicates that there is some correlation or common cause between them.
[0083] Calculate the correlation between crack defects, which is a measure of the correlation between defects. A high correlation means that the defects are strongly related and may be caused by the same cause. If the correlation between two defects is high, it means that they exist at the same time or affect each other, which increases the overall risk.
[0084] High correlation indicates systemic problems: If multiple crack defects show high correlation, it means they are caused by the same common cause such as stress, material fatigue, environmental factors, etc. These systemic problems will lead to more extensive pipeline damage rather than just isolated cracks.
[0085] Defects with high correlation require special attention because they indicate potential greater risks, such as pipeline rupture and leakage. By analyzing the spatial distribution of crack defects, high-risk areas in the pipeline can be identified. These areas may be stress concentration areas, corrosion hot spots, or areas that are greatly affected by the external environment. Identifying high-risk areas helps to carry out targeted maintenance and repairs to prevent further damage to the pipeline.
[0086] Preventive measures module: formulate corresponding preventive measures based on the risk assessment results. If there is a risk of correlation between crack defects, strengthen the monitoring and inspection of the corresponding areas.
[0087] It also includes an inspection robot. Two fisheye lens modules are installed at the front and rear parts of the inspection robot respectively, and the angles are adjusted to achieve all-round image acquisition inside the pipeline. The image preprocessing unit is responsible for denoising and enhancing the image data collected by the fisheye lens to improve the quality and clarity of the image.
[0088] The image fusion processing module includes geometric correction of the images collected by the two fisheye lens modules, converting the images into cylindrical projections to eliminate the distortion caused by the fisheye lens, registering the corrected images, aligning the two images to ensure consistent positions in the same coordinate system, and stitching the registered images based on the image stitching algorithm of feature points to form a panoramic image. The edge fusion processing of the stitched panoramic image is performed to eliminate the discontinuity at the stitching point to ensure the visual effect and quality of the panoramic image.
[0089] Geometric correction is implemented using the radial distortion model of the fisheye lens to convert the fisheye image into a cylindrical projection image. The radial distortion model is expressed as:
[0090] ,in, is the corrected radius, is the radius of the original fisheye image, is the radial distortion coefficient.
[0091] Use the feature point matching algorithm to perform image registration, find the corresponding feature points between the two images, and calculate the transformation matrix, which is expressed as:
[0092] ,in, are the coordinates of the feature points, is the scale of the feature point, is the direction of the feature point, It is the coordinates, scale and direction of the corresponding feature points matched.
[0093] Use perspective transformation based on feature point matching for image stitching, align the two images to the same coordinate system, and perform seamless stitching. The perspective transformation is expressed as:
[0094] ,in, is the transformation matrix, which is calculated by the feature point matching algorithm.
[0095] Edge fusion processing uses a gradient fusion algorithm to perform edge fusion processing on the spliced images to eliminate the discontinuity at the splicing point. The gradient fusion is expressed as:
[0096] ,in, is the fused image, There are two images, is the fusion weight.
[0097] The method also includes using a histogram equalization algorithm to enhance the generated panoramic image to improve the contrast and clarity of the image.
[0098] The defect detection module is based on the convolutional neural network algorithm. The defects on the inner wall of the pipeline have different scales and shapes. In order to better capture these features, the convolutional neural network algorithm introduces a multi-scale feature fusion mechanism. Multiple parallel convolution branches are added to the network structure. Each branch is responsible for extracting features of different scales. They are combined through the feature fusion layer to enhance the perception of multi-scale information. The convolutional neural network algorithm that introduces the multi-scale feature fusion mechanism for defect detection specifically includes:
[0099] Preprocess the panoramic image, including image resizing and normalization;
[0100] Multi-scale feature extraction: Multiple parallel convolution branches are introduced into the network structure. Each branch is responsible for extracting features of different scales. Through multiple convolution branches, the details and global information of the image are captured at different levels.
[0101] The features of each scale are fused to obtain a rich and complete feature representation, and the features of different scales are fused together by weighted summation or concatenation.
[0102] Deep network structure: After feature fusion, the fused features are input into the deep network structure for feature extraction and learning. The deep network includes convolutional layers, pooling layers, and fully connected layers, which are used to abstract and combine features to achieve defect detection.
[0103] Defect detection and classification: A classifier is added to the last layer of the network to detect and classify the extracted features. A multi-classification method is used to determine the type and number of defects according to specific task requirements. Defect types include:
[0104] Corrosion: Corrosion usually appears as local darkening of the color or the appearance of concave areas in the image, and is identified based on color and shape characteristics.
[0105] Cracks: Cracks appear as thin lines or broken areas in the image and are identified by detecting the broken lines in the image and performing shape analysis.
[0106] Fouling: Fouling appears as stains or attachments in the image and is identified by features such as color and texture. It can also be detected by comparing the grayscale value of the defective area with the surrounding area.
[0107] The network is trained using labeled image data of the interior of the pipeline, and the network parameters are optimized through the back-propagation algorithm so that it can identify the defect types inside the pipeline.
[0108] Multi-scale feature extraction includes:
[0109] The convolution operation is expressed as: ,in, is the pixel value of the input image, is the weight of the convolution kernel, is the bias term, is the pixel value of the feature image after convolution;
[0110] Activation function,The activation function is applied after convolution and is expressed as:
[0111] ;
[0112] The pooling operation is expressed as: ,in, is the pixel value of the feature image after pooling;
[0113] Feature fusion is achieved through weighted summation or concatenation operation:
[0114] Weighted sum: ;
[0115] Chain operation: ;
[0116] The classifier uses the softmax function for multi-classification:
[0117] ,in, is the input feature vector, Yes Category The weight vector of is the number of categories.
[0118] The convolution layer performs the convolution operation as described above;
[0119] The pooling layer downsamples the input feature map to reduce the size and number of parameters of the feature map. It uses maximum pooling and is expressed as:
[0120] ,in, is the pixel value of the feature map after pooling, etc. are the pixel values in the pooled area. The pooling layer reduces the spatial dimension of the feature map by downsampling the feature map, thereby improving the computational efficiency of the model. At the same time, the pooling operation can also enhance the translation invariance of the model.
[0121] The fully connected layer multiplies the input feature vector by the weight matrix, adds the bias term, and then performs a nonlinear transformation through the activation function, which is expressed as:
[0122] ,in, is the output vector, is the weight matrix, is the input feature vector, is the bias term. The fully connected layer connects all neurons in the previous layer with all neurons in the current layer. Each neuron is connected to all neurons in the previous layer, thereby realizing linear combination and nonlinear transformation of input features.
[0123] The defect location module specifically includes:
[0124] The current position and posture information of the fisheye lens is obtained by a positioning sensor installed on the fisheye lens module, and is expressed in coordinates in the fisheye lens coordinate system;
[0125] Conversion between pixel coordinates and fisheye lens coordinates: The defect position in the image captured by the fisheye lens, i.e., the pixel coordinates, are converted into coordinates in the fisheye lens coordinate system, and the coordinate conversion is performed according to the intrinsic parameter matrix of the fisheye lens;
[0126] Determine the fisheye lens coordinates to be converted into coordinates in the world coordinate system, and then convert the defect position into coordinates in the world coordinate system;
[0127] Determine the coordinates of the pipeline in the world coordinate system, and thus locate the coordinates of the defect position in the pipeline.
[0128] Conversion from pixel coordinates to fisheye lens coordinates: Assume the pixel coordinates of the defect in the image are , the focal length of the fisheye lens is , the coordinates of the optical center (image center) are , the pixel coordinates can be converted to fisheye lens coordinates using the following formula:
[0129] ;in, is the coordinate of the defect in the fisheye lens coordinate system;
[0130] Conversion from fisheye lens coordinates to world coordinates: Assume that the position of the fisheye lens in the world coordinate system is , the rotation matrix from the fisheye lens to the world coordinate system is , the translation vector is The formula for transforming the defect from the fisheye lens coordinate system to the world coordinate system is:
[0131] ;in, yes The rotation matrix describes the rotation from the fisheye lens coordinate system to the world coordinate system. , is the translation vector of the fisheye lens in the world coordinate system;
[0132] Calculate the actual position of the defect in the pipeline: Assume that the position of the pipeline system in the world coordinate system is , then the actual location of the defect in the pipeline Calculated by the following formula: .
[0133] Through the above steps, the defect pixel coordinates in the image can be converted to the actual position coordinates in the pipeline. The specific process includes the conversion of pixel coordinates to camera coordinates, the conversion of camera coordinates to world coordinates, and finally determining the actual position of the defect in the pipeline.
[0134] The association analysis module specifically includes:
[0135] Calculate the spatial distance between each pair of crack defects :
[0136] ; Obtain the coordinate information of each crack defect from the defect detection module, and then construct a distance matrix based on the calculated spatial distance between each pair of defects ;
[0137] Association rule mining: Analyze the spatial distribution and association relationship between crack defects using association rule mining algorithm, and extract significant (i.e. high confidence) crack defect association rules by setting the minimum support threshold and minimum confidence threshold;
[0138] Correlation evaluation: Calculate the correlation between crack defects :
[0139] ;
[0140] Risk assessment: Based on the results of the correlation analysis, a risk assessment is performed to determine whether there is a correlation risk between defects. If a significant correlation is found between two adjacent crack defects, it is marked as a high-risk area;
[0141] Risk Matrix Construction: Based on Correlation Construct a risk matrix for crack defects. By constructing the risk matrix, the associated risks of crack defects can be quantified. The risk matrix maps the correlation between different defects to risk levels to quantify and visualize the risks.
[0142] The association rule mining algorithm specifically includes:
[0143] Get crack defect pairs, according to the calculated distance matrix , generating a list of two-tuples containing defect pairs, each of which represents two crack defects that are too close in space, thereby creating a data set;
[0144] Define the parameters for association rule mining, including minimum support and minimum confidence;
[0145] Minimum support: Support is the frequency of an item set (crack defect pair) appearing in the data set. Setting the minimum support threshold is used to filter out item sets with low occurrence frequency;
[0146] Minimum confidence: Confidence is the accuracy of an association rule (for example, "if crack A exists, crack B also exists"), which means the proportion of records containing item set B among all records containing item set A. The minimum confidence threshold is set to filter out association rules with low confidence.
[0147] Generate frequent itemsets: Generate all itemsets, i.e. defect pairs, and then filter out infrequent itemsets based on the minimum support threshold, retaining frequent itemsets;
[0148] Generate candidate rules: Generate candidate sets of association rules from frequent item sets;
[0149] Calculate confidence and filter rules: Calculate the confidence of each candidate rule, filter out rules with low confidence based on the minimum confidence threshold, and retain association rules with high confidence.
[0150] Risk matrix construction includes:
[0151] Correlation between crack defects based on calculation ,in It is and The correlation degree of crack defects is crack defects, then calculate The correlation matrix ;
[0152] Constructing a risk matrix :
[0153] Risk Matrix Based on the association matrix constructed;
[0154] Each element Indicates crack defect and The risk level between
[0155] Risk levels are divided according to the degree of relevance:
[0156] :Low risk;
[0157] :Medium risk;
[0158] :High risk;
[0159] : Very high risk;
[0160] The risk matrix maps the correlation of different defects to risk levels, including , each Mapping to the risk matrix The risk level in, the mapping rule is defined as:
[0161] = ;
[0162] Using heatmaps to visualize risk matrices ,Different colors represent different risk levels, using red for high risk, yellow for medium risk, and green for low risk.
[0163] The support is expressed as: ,in, is the number of records containing item set A, is the total number of records.
[0164] The confidence level is expressed as: ,in, is the number of records that contain both item set A and item set B.
[0165] The actual operation steps are as follows:
[0166] 1. Generate frequent itemsets:
[0167] Step 1: Generate all crack defect pairs and calculate the support of each defect pair.
[0168] Step 2: Filter out defect pairs whose support is lower than the minimum support threshold and retain frequent defect pairs.
[0169] 2. Generate candidate rules:
[0170] Step 3: Generate candidate association rules from frequent defect pairs. For example, if the frequent item set is , then the candidate rule is and .
[0171] 3. Calculate confidence and filter rules:
[0172] Step 4: Calculate the confidence for each candidate rule.
[0173] Step 5: Filter out the rules whose confidence is lower than the minimum confidence threshold and retain the association rules with high confidence.
[0174] Assume the following crack defect pairs and their support:
[0175] ;
[0176] ;
[0177] ;
[0178] ;
[0179] Set the minimum support to 0.5 and the minimum setting to 0.7, and the screening process is as follows:
[0180] 1. Support screening:
[0181] reserve and , because their support is greater than 0.5.
[0182] Filter out and , because their support is less than 0.5.
[0183] 2. Generate candidate rules and calculate confidence:
[0184] Candidate rules and :
[0185] ;
[0186] ;
[0187] Candidate rules and :
[0188] ;
[0189] ;
[0190] 3. Confidence screening: All candidate rules are retained because their confidence is greater than 0.7.
[0191] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present invention is limited to these examples. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity.
[0192] The present invention is intended to cover all such substitutions, modifications and variations that fall within the broad scope of the claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. The pipeline internal inspection system based on dual fisheye lenses is characterized by: include: Two fisheye lens modules, each fisheye lens module includes a fisheye lens and an image preprocessing unit; A data acquisition module, used for receiving pre-processed image data from two fisheye lens modules; An image fusion processing module is used to fuse the image data collected by the two fisheye lens modules and generate a panoramic image; Defect detection module, used to analyze the panoramic image, detect defects inside the pipeline, and determine the defect type and size information. Defect types include corrosion, cracks, and scaling; The defect location module locates the defect after detecting the defect inside the pipeline and determines the location information of the defect; The correlation analysis module performs correlation analysis on crack defects that are close in space according to the determined locations of crack defects, analyzes the spatial distribution and correlation relationship between crack defects, and evaluates the degree of correlation between them. Based on the results of the correlation analysis, it performs risk assessment to determine whether there is a correlation risk between crack defects. The association analysis module specifically includes: Calculate the spatial distance between each pair of crack defects : ; Obtain the coordinate information of each crack defect from the defect detection module, and then construct a distance matrix based on the calculated spatial distance between each pair of defects ; Association rule mining: Analyze the spatial distribution and association relationship between crack defects using the association rule mining algorithm, and extract the significant crack defect association rules by setting the minimum support threshold and the minimum confidence threshold; Correlation evaluation: Calculate the correlation between crack defects : ; Risk assessment: Based on the results of correlation analysis, risk assessment is performed to determine whether there is any correlation risk between defects; Risk Matrix Construction: Based on Correlation Construct a risk matrix for crack defects. By constructing the risk matrix, the associated risks of crack defects are quantified. The risk matrix maps the correlation between different defects to risk levels, quantifying and visualizing risks. The association rule mining algorithm specifically includes: Get crack defect pairs, according to the calculated distance matrix , generating a list of two-tuples containing defect pairs, each of which represents two crack defects that are too close in space, thereby creating a data set; Define the parameters for association rule mining, including the minimum support threshold and the minimum confidence threshold; Generate frequent itemsets: Generate all itemsets, i.e. defect pairs, and then filter out infrequent itemsets based on the minimum support threshold, retaining frequent itemsets; Generate candidate rules: Generate candidate sets of association rules from frequent item sets; Calculate confidence and filter rules: Calculate the confidence of each candidate rule, filter out rules with low confidence based on the minimum confidence threshold, and retain association rules with high confidence; The risk matrix construction includes: Correlation between crack defects based on calculation ,in It is and The correlation degree of crack defects is crack defects, then calculate The correlation matrix ; Constructing a risk matrix : Risk Matrix Based on the association matrix constructed; Each element Indicates crack defect and The risk level between Risk levels are divided according to the degree of relevance; :Low risk; :Medium risk; :High risk; : Very high risk; The risk matrix maps the correlation of different defects to risk levels, including , each Mapping to the risk matrix The risk level in, the mapping rule is defined as: = ; Using heatmaps to visualize risk matrices ,Different colors indicate different risk levels; The support is expressed as: ,in, is the number of records containing item set A, is the total number of records; The confidence level is expressed as: ,in, is the number of records that contain both item set A and item set B; Preventive measures module: formulate corresponding preventive measures based on the risk assessment results. If there is a risk of correlation between crack defects, strengthen the monitoring and inspection of the corresponding areas.
2. The pipeline internal detection system based on dual fisheye lenses according to claim 1 is characterized in that: It also includes an inspection robot. Two fisheye lens modules are installed at the front and rear parts of the inspection robot respectively, and the angles are adjusted to achieve all-round image acquisition inside the pipeline. The image preprocessing unit is responsible for denoising and enhancing the image data collected by the fisheye lens to improve the quality and clarity of the image.
3. The pipeline internal detection system based on dual fisheye lenses according to claim 1 is characterized in that: The image fusion processing module includes geometric correction of the images collected by the two fisheye lens modules, converting the images into cylindrical projections to eliminate the distortion caused by the fisheye lens, registering the corrected images, aligning the two images to ensure the consistency of positions in the same coordinate system, splicing the registered images based on the image stitching algorithm of feature points to form a panoramic image, and performing edge fusion processing on the spliced panoramic image to eliminate discontinuity at the splicing point to ensure the visual effect and quality of the panoramic image.
4. The pipeline internal detection system based on dual fisheye lenses according to claim 1 is characterized in that: The defect detection module is based on a convolutional neural network algorithm. The convolutional neural network algorithm introduces a multi-scale feature fusion mechanism. Multiple parallel convolution branches are added to the network structure. Each branch is responsible for extracting features of different scales. The features are combined through a feature fusion layer to enhance the perception of multi-scale information. The convolutional neural network algorithm that introduces a multi-scale feature fusion mechanism for defect detection specifically includes: Preprocess the panoramic image, including image resizing and normalization; Multi-scale feature extraction: Multiple parallel convolution branches are introduced into the network structure. Each branch is responsible for extracting features of different scales. Through multiple convolution branches, the details and global information of the image are captured at different levels. The features of each scale are fused to obtain a rich and complete feature representation, and the features of different scales are fused together by weighted summation or concatenation. Deep network structure: After feature fusion, the fused features are input into the deep network structure for feature extraction and learning. The deep network includes convolutional layers, pooling layers, and fully connected layers, which are used to abstract and combine features to achieve defect detection. Defect detection and classification: A classifier is added to the last layer of the network to detect and classify defects based on the extracted features. A multi-classification approach is used to determine the type and number of defects based on specific task requirements.
5. The pipeline internal detection system based on dual fisheye lenses according to claim 4 is characterized in that: The multi-scale feature extraction comprises: The convolution operation is expressed as: ,in, is the pixel value of the input image, is the weight of the convolution kernel, is the bias term, is the pixel value of the feature image after convolution; Activation function,The activation function is applied after convolution and is expressed as: ; The pooling operation is expressed as: ,in, is the pixel value of the feature image after pooling; The feature fusion is achieved through weighted summation or concatenation operation: Weighted sum: ; Chain operation: ; The classifier uses the softmax function for multi-classification: ,in, is the input feature vector, Yes Category The weight vector of is the number of categories.
6. The pipeline internal detection system based on dual fisheye lenses according to claim 1, characterized in that: The defect location module specifically includes: The current position and posture information of the fisheye lens is obtained by a positioning sensor installed on the fisheye lens module, and is expressed in coordinates in the fisheye lens coordinate system; Conversion between pixel coordinates and fisheye lens coordinates: convert the defect position in the image captured by the fisheye lens, i.e., pixel coordinates, into coordinates in the fisheye lens coordinate system; Determine the fisheye lens coordinates to be converted into coordinates in the world coordinate system, and then convert the defect position into coordinates in the world coordinate system; Determine the coordinates of the pipeline in the world coordinate system, and thus locate the coordinates of the defect position in the pipeline.
Citation Information
Patent Citations
Solar cell panel defect detection method based on multi-scale joint convolutional neural network
CN110689011A
Efficient internal thread defect detection system
CN118130480A