Drainage pipe image recognition method and device based on multi-feature fusion and electronic equipment

By using a multi-feature fusion method, color, pixel, and shape features of drainage pipe images are extracted, multi-dimensional feature combinations are generated, and compared with a dictionary database. This solves the problems of high programming complexity and low recognition accuracy in existing technologies, and achieves accurate identification of drainage pipe defects.

CN120747645BActive Publication Date: 2025-12-05POWERCHINA HUADONG ENG CORP LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511222680.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-12-05
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

Existing drainage pipe image recognition methods have high programming complexity and low recognition accuracy, making it difficult to effectively identify various defects in complex drainage pipe environments.

Method used

A multi-feature fusion method is adopted. By acquiring images of drainage pipes, color, pixel, texture and shape features are extracted to generate multi-dimensional feature combinations. Error calculation is performed with a preset dictionary database, and the minimum error value is selected to identify defects.

Benefits of technology

It improves the accuracy and efficiency of drainage pipe image recognition, and enables precise identification of drainage pipe defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120747645B_ABST
    Figure CN120747645B_ABST
Patent Text Reader

Abstract

The application provides a drainage pipe image recognition method and device based on multi-feature fusion and electronic equipment, comprising: collecting a drainage pipe image; performing multi-dimensional feature extraction on the drainage pipe image to generate a first multi-dimensional feature combination; calculating error values of the first multi-dimensional feature combination and multiple dictionary databases according to the first multi-dimensional feature combination, the multiple dictionary databases and terminal state feature coefficient vectors of the multiple dictionary databases; selecting a minimum error value from the error values; determining a defect result of the drainage pipe image according to a target dictionary database of the minimum error value; a construction method of the dictionary database comprises: collecting an original drainage pipe image with drainage pipe defect information; extracting color features, pixel features, texture features and shape features of the original drainage pipe image to generate a second multi-dimensional feature combination; and constructing the dictionary database and the terminal state feature coefficient vector of the dictionary database according to the second multi-dimensional feature combination. The method can improve the drainage pipe image recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus and electronic device for recognizing drainage pipe images based on multi-feature fusion. Background Technology

[0002] During the long-term operation of drainage pipe networks, functional or structural damage may occur inside the pipes due to the presence of acidic or corrosive substances in the transported water. This damage includes cracking, leakage, deformation, corrosion, misalignment, disconnection, and root intrusion. These problems cause varying degrees of damage to the drainage pipes, thus affecting their normal function. To ensure the safe and stable operation of drainage pipes, inspection is usually required. Commonly used inspection methods include closed-circuit television (CCTV) inspection, periscope inspection, sonar inspection, and manual observation. By analyzing video or images captured inside the drainage pipes, the type of defect can be identified, providing a basis for subsequent repair work. In the field of drainage pipe image classification, commonly used methods include support vector machines, convolutional neural networks, and particle swarm optimization algorithms.

[0003] Support vector machines (SVMs) are primarily suited for binary classification problems. While they can be extended to multi-class classification, this significantly increases programming complexity. Convolutional neural networks (CNNs), on the other hand, possess strong intelligence and data processing capabilities, capable of handling tens of thousands of training samples. However, when faced with a wide variety of drainage pipe defects and complex drainage pipe environments, deep learning-based automatic identification methods still have certain limitations, and their accuracy needs improvement.

[0004] Overall, current methods for recognizing drainage pipe images generally suffer from high programming complexity and low recognition accuracy, and urgently need further improvement and optimization. Summary of the Invention

[0005] The purpose of this invention is to provide a drainage pipe image recognition method, device, and electronic device based on multi-feature fusion, so as to alleviate the technical problems of high programming complexity and low recognition accuracy that are common in current drainage pipe image recognition methods, thereby reducing programming difficulty and improving recognition accuracy.

[0006] In a first aspect, embodiments of the present invention provide a drainage pipe image recognition method based on multi-feature fusion, comprising: acquiring a drainage pipe image; performing multi-dimensional feature extraction on the drainage pipe image to generate a first multi-dimensional feature combination; calculating an error value between the first multi-dimensional feature combination and the multiple dictionary databases based on the first multi-dimensional feature combination, multiple preset dictionary databases, and the final state feature coefficient vectors of the multiple dictionary databases; selecting the minimum error value from the error values; and determining the defect recognition result of the drainage pipe image based on the target dictionary database corresponding to the minimum error value. The method for constructing the dictionary database comprises: acquiring an original drainage pipe image with drainage pipe defect information; extracting color features, pixel features, texture features, and shape features from the original drainage pipe image to generate a second multi-dimensional feature combination; and constructing the dictionary database and the final state feature coefficient vectors of the dictionary database based on the second multi-dimensional feature combination.

[0007] In a preferred embodiment of the present invention, the step of extracting pixel features from the original drainage pipe image includes: dividing the original drainage pipe image into multiple image blocks based on preset parameters; determining the average pixel value, pixel variance, and pixel kurtosis of each image block according to the preset weights of the corresponding regions of the image blocks and the pixel values ​​of each image block; multiplying the preset weights of the multiple image blocks to obtain a multiplication result of 1; and determining the pixel features of the original drainage pipe image based on the average pixel value, the pixel variance, and the pixel kurtosis.

[0008] In a preferred embodiment of the present invention, the step of determining the pixel average, pixel variance, and pixel kurtosis of each image block based on the preset weights of the regions corresponding to the image blocks and the pixel values ​​of each image block includes: calculating the pixel average of each image block based on the preset weights of the regions corresponding to the image blocks and the pixel values ​​of each image block; using a sliding window technique of a preset size, calculating the local variance and global variance of each pixel in each image block based on the pixel values ​​of each image block, the pixel average, and the window pixel average corresponding to the sliding window; calculating the pixel variance based on the local variance and the global variance; and calculating the pixel kurtosis based on the pixel variance, the pixel values ​​of each image block, and the pixel average.

[0009] In a preferred embodiment of the present invention, the step of calculating the local variance and global variance of each pixel in each image block based on the pixel value of each image block, the average pixel value, and the average window pixel value corresponding to the sliding window includes: calculating the local variance of each pixel in each image block based on the preset size of the sliding window, the pixel value of the (i+m)th row and (j+n)th column of the image block, and the average window pixel value when the center pixel of the sliding window is the (i)th row and (j)th column; and calculating the global variance of each pixel in each image block based on the number of rows of the image block, the number of columns of the image block, the pixel value of the (i)th row and (j)th column of the image block, and the average pixel value.

[0010] In a preferred embodiment of the present invention, the step of extracting the shape features of the original drainage pipe image includes: extracting the first-order invariant moments, second-order invariant moments, third-order invariant moments, fourth-order invariant moments, fifth-order invariant moments, sixth-order invariant moments, and seventh-order invariant moments of the original drainage pipe image; and determining the shape features of the original drainage pipe image based on the first-order invariant moments, second-order invariant moments, third-order invariant moments, fourth-order invariant moments, fifth-order invariant moments, sixth-order invariant moments, and seventh-order invariant moments.

[0011] In a preferred embodiment of the present invention, the step of extracting the first-order invariant moments, second-order invariant moments, third-order invariant moments, fourth-order invariant moments, fifth-order invariant moments, sixth-order invariant moments, and seventh-order invariant moments of the original drainage pipe image includes: calculating the first-order invariant moment of the original drainage pipe image based on the second-order central moment in the horizontal direction and the second-order central moment in the vertical direction; calculating the second-order invariant moment of the original drainage pipe image based on the second-order central moment in the horizontal direction, the second-order central moment in the vertical direction, the first-order central moment in the horizontal direction, and the first-order central moment in the vertical direction; and calculating the third-order invariant moments, fourth-order invariant moments, fifth-order invariant moments, sixth-order invariant moments, and seventh-order invariant moments of the original drainage pipe image based on the third-order central moment in the horizontal direction, the third-order central moment in the vertical direction, the second-order central moment in the horizontal direction, the first-order central moment in the horizontal direction, and the second-order central moment in the vertical direction, respectively.

[0012] In a preferred embodiment of the present invention, after the step of extracting the color features, pixel features, texture features, and shape features of the original drainage pipe image to generate a second multi-dimensional feature combination, the method includes: normalizing the second multi-dimensional feature combination to obtain normalized features; and constructing the dictionary database and the final state feature coefficient vector of the dictionary database based on the second multi-dimensional feature combination, which includes: constructing the dictionary database and the final state feature coefficient vector of the dictionary database based on the normalized features.

[0013] In a preferred embodiment of the present invention, the step of normalizing the above-mentioned second multidimensional feature combination to obtain normalized features includes: determining the number of groups based on the feature dimension of the above-mentioned second multidimensional feature combination; the square of the number of groups is equal to the feature dimension; dividing the above-mentioned second multidimensional feature combination into multiple sub-feature combinations according to the number of groups; calculating the mean and variance of each sub-feature combination; normalizing the above-mentioned second multidimensional feature combination based on the mean and variance of the sub-feature combinations to obtain intermediate normalized features; and adjusting the intermediate normalized features based on preset scaling and offset coefficients to obtain normalized features.

[0014] Secondly, embodiments of the present invention also provide a drainage pipe image recognition device based on multi-feature fusion, comprising: a data acquisition module for acquiring drainage pipe images; performing multi-dimensional feature extraction on the drainage pipe images to generate a first multi-dimensional feature combination; an error calculation module for calculating the error value between the first multi-dimensional feature combination and the multiple dictionary databases based on the first multi-dimensional feature combination, a preset multiple dictionary databases, and the final state feature coefficient vectors of the multiple dictionary databases; and selecting the minimum error value from the error values; and a defect recognition module for determining the defect recognition result of the drainage pipe image based on the target dictionary database corresponding to the minimum error value; the method for constructing the dictionary database includes: acquiring an original drainage pipe image with drainage pipe defect information; extracting color features, pixel features, texture features, and shape features from the original drainage pipe image to generate a second multi-dimensional feature combination; and constructing the dictionary database and the final state feature coefficient vectors of the dictionary database based on the second multi-dimensional feature combination.

[0015] Thirdly, embodiments of the present invention also provide an electronic device, which includes a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the above-mentioned drainage pipe image recognition method based on multi-feature fusion.

[0016] The embodiments of the present invention have the following beneficial technical effects:

[0017] This invention provides a method, apparatus, and electronic device for drainage pipe image recognition based on multi-feature fusion, comprising: acquiring a drainage pipe image; extracting multi-dimensional features from the drainage pipe image to generate a first multi-dimensional feature combination; calculating the error value between the first multi-dimensional feature combination and the multiple dictionary databases based on the first multi-dimensional feature combination, multiple preset dictionary databases, and the final state feature coefficient vectors of the multiple dictionary databases; selecting the minimum error value from the error values; and determining the defect recognition result of the drainage pipe image based on the target dictionary database corresponding to the minimum error value. The method for constructing the dictionary database includes: acquiring an original drainage pipe image containing drainage pipe defect information; extracting color features, pixel features, texture features, and shape features from the original drainage pipe image to generate a second multi-dimensional feature combination; and constructing the dictionary database and the final state feature coefficient vectors of the dictionary database based on the second multi-dimensional feature combination. This method achieves accurate identification of defects in drainage pipe images by comparing the first multi-dimensional feature combination with the pre-constructed dictionary database, thereby improving the accuracy and efficiency of drainage pipe image recognition. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating a drainage pipe image recognition method based on multi-feature fusion provided in an embodiment of the present invention;

[0020] Figure 2 A schematic diagram illustrating the process of constructing a dictionary database and the final state feature coefficient vector of the dictionary database, provided in an embodiment of the present invention;

[0021] Figure 3 A schematic diagram of the structure of a drainage pipe image recognition device based on multi-feature fusion provided in an embodiment of the present invention;

[0022] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0023] Icons: 31-Data acquisition module; 32-Error calculation module; 33-Defect identification module; 41-Memory; 42-Processor; 43-Bus; 44-Communication interface. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0025] Drainage pipe networks are prone to damage such as rupture, leakage, and corrosion due to the long-term transport of acidic or corrosive substances, requiring detection through methods such as closed-circuit television and sonar. Further, image classification methods are used for defect identification. However, defect identification in images commonly uses support vector machines (SVMs), convolutional neural networks (CNNs), and particle swarm optimization (PSO) algorithms. While SVMs are primarily suitable for binary classification problems, and can be extended to multi-class classification, this significantly increases programming complexity. Convolutional neural networks, on the other hand, possess strong intelligence and data processing capabilities, capable of handling tens of thousands of training samples. Faced with the diverse types of drainage pipe defects and complex drainage pipe environments, deep learning-based automatic identification methods still have certain limitations, and their accuracy needs improvement.

[0026] Based on this, embodiments of the present invention provide a drainage pipe image recognition method, device, and electronic device based on multi-feature fusion. This method achieves accurate identification of defects in drainage pipe images by comparing a first multi-dimensional feature combination with a pre-built dictionary database, thereby improving the accuracy and efficiency of drainage pipe image recognition.

[0027] Example 1

[0028] In this embodiment, Figure 1 This is a flowchart illustrating a drainage pipe image recognition method based on multi-feature fusion, provided in an embodiment of the present invention.

[0029] Depend on Figure 1 As seen, the method includes:

[0030] Step S101: Acquire images of the drain pipe.

[0031] In this embodiment, images of the drain pipe are typically acquired using an image acquisition device. Here, the drain pipe image is generally an image of the inside of the drain pipe.

[0032] Step S102: Perform multi-dimensional feature extraction on the above drainage pipe image to generate the first multi-dimensional feature combination.

[0033] In one embodiment, the step of extracting multidimensional features from the above-mentioned drainage pipe image to generate a first multidimensional feature combination includes: extracting color features, pixel features, texture features and shape features from the above-mentioned drainage pipe image to generate a first multidimensional feature combination.

[0034] In another embodiment, one or more of the color features, pixel features, texture features, and shape features of the above-mentioned drainage pipe image can be extracted to generate a first multidimensional feature combination.

[0035] Step S103: Calculate the error value between the first multidimensional feature combination and the multiple dictionary databases based on the first multidimensional feature combination, the preset multiple dictionary databases, and the final state feature coefficient vectors of the multiple dictionary databases.

[0036] Step S104: Select the smallest error value from the above error values.

[0037] Step S105: Determine the defect identification result of the drainage pipe image based on the target dictionary database corresponding to the minimum error value; the method for constructing the dictionary database includes: acquiring the original drainage pipe image with drainage pipe defect information; extracting the color features, pixel features, texture features and shape features of the original drainage pipe image to generate a second multi-dimensional feature combination; constructing the dictionary database and the final state feature coefficient vector of the dictionary database based on the second multi-dimensional feature combination.

[0038] In this embodiment, the step of extracting the color features of the original drain pipe image includes: extracting the color features of the original drain pipe image through color channels and a luminance model constructed from the color channels.

[0039] Specifically, the brightness model described above is I = 0.21R + 0.72G + 0.07B, which is a weighted average of the RGB channels. Here, I represents the brightness model, R represents the red channel, G represents the green channel, and B represents the blue channel.

[0040] Furthermore, the step of extracting pixel features from the original drainage pipe image includes: dividing the original drainage pipe image into multiple image blocks based on preset parameters; determining the average pixel value, pixel variance, and pixel kurtosis of each image block according to the preset weights of the corresponding regions of the image blocks and the pixel values ​​of each image block; multiplying the preset weights of the multiple image blocks to obtain a multiplication result of 1; and determining the pixel features of the original drainage pipe image based on the average pixel value, the pixel variance, and the pixel kurtosis.

[0041] Here, the pixel value of each of the above image blocks is determined by the ratio of the number of pixels with a preset pixel intensity within the image block to the total number of pixels within the image block.

[0042] The step of determining the pixel average, pixel variance, and pixel kurtosis of each image block based on the preset weights of the regions corresponding to the image blocks and the pixel values ​​of each image block includes: calculating the pixel average of each image block based on the preset weights of the regions corresponding to the image blocks and the pixel values ​​of each image block; using a sliding window technique of a preset size, calculating the local variance and global variance of each pixel in each image block based on the pixel values ​​of each image block, the pixel average, and the window pixel average corresponding to the sliding window; calculating the pixel variance based on the local variance and the global variance; and calculating the pixel kurtosis based on the pixel variance, the pixel values ​​of each image block, and the pixel average.

[0043] Furthermore, the step of calculating the local variance and global variance of each pixel in each of the aforementioned image blocks, based on the pixel values ​​of each of the aforementioned image blocks, the aforementioned average pixel value, and the average pixel value of the window corresponding to the aforementioned sliding window, includes: calculating the aforementioned local variance based on the following formula:

[0044]

[0045] in, For the aforementioned local variance, The preset size of the sliding window is as described above. Let i be the pixel value in the (i+m)th row and (j+n)th column of the above image block. The average pixel value of the sliding window when the center pixel of the sliding window is in the i-th row and j-th column;

[0046] The overall variance above is calculated using the following formula:

[0047]

[0048] in, Let M be the overall variance, M be the number of rows in the image patch, N be the number of columns in the image patch, and I(i,j) be the pixel value in the i-th row and j-th column of the image patch. This is the average value of the above pixels;

[0049] The steps for calculating the pixel variance based on the local variance and the global variance described above include:

[0050] The above pixel variance is calculated using the following formula:

[0051]

[0052] in, The above pixel variance, These are preset coefficients.

[0053] Furthermore, the step of extracting the shape features of the original drainage pipe image includes: extracting the first-order invariant moments, second-order invariant moments, third-order invariant moments, fourth-order invariant moments, fifth-order invariant moments, sixth-order invariant moments, and seventh-order invariant moments of the original drainage pipe image; and determining the shape features of the original drainage pipe image based on the first-order invariant moments, second-order invariant moments, third-order invariant moments, fourth-order invariant moments, fifth-order invariant moments, sixth-order invariant moments, and seventh-order invariant moments.

[0054] Furthermore, the steps of extracting the first, second, third, fourth, fifth, sixth, and seventh invariant moments of the original drainage pipe image include: extracting the first invariant moment of the original drainage pipe image based on the following formula:

[0055]

[0056] in, For the above first-order invariant moments, The second-order central moment in the horizontal direction of the original drainage pipe image above. The second-order central moment in the vertical direction of the original drainage pipe image above;

[0057] The second-order invariant moments of the original drain pipe image above are extracted using the following formula:

[0058]

[0059] in, For the above first-order invariant moments, The first-order central moment in the horizontal direction and the first-order central moment in the vertical direction are mentioned above.

[0060] The third invariant moments of the original drainage pipe image above are extracted using the following formula:

[0061]

[0062] in, For the above third-order invariant moments, The third-order central moment in the horizontal direction is given above. The third-order central moment in the vertical direction is given above. Let the second-order central moment in the horizontal direction and the first-order central moment in the vertical direction be the aforementioned. These are the first-order central moments in the horizontal direction and the second-order central moments in the vertical direction.

[0063] The fourth invariant moments of the original drain pipe image above are extracted using the following formula:

[0064]

[0065] in, These are the aforementioned fourth-order invariant moments;

[0066] The fifth-order invariant moments of the original drain pipe image above are extracted using the following formula:

[0067]

[0068] in, These are the aforementioned fifth-order invariant moments;

[0069] The sixth invariant moments of the original drain pipe image above are extracted using the following formula:

[0070]

[0071] in, These are the aforementioned sixth-order invariant moments;

[0072] The seventh invariant moments of the original drain pipe image above are extracted using the following formula:

[0073]

[0074] in, These are the seventh invariant moments mentioned above.

[0075] Furthermore, the step of extracting the texture features of the original drain pipe image includes: converting the original drain pipe image into a grayscale image; calculating a grayscale co-occurrence matrix for a preset direction based on the grayscale image; and calculating the Haralick texture features corresponding to each of the aforementioned directions based on the grayscale co-occurrence matrix.

[0076] In this invention, GLCM is generated from three angles: 0°, 45°, and 90°.

[0077] In the pipeline image described above, the GLCM of two pixel intensity values ​​at a distance d and an angle ϕ is defined as P(Im,In,d,ϕ), representing the probability of a pixel pair with intensity values ​​Im and In occurring at a distance d and an angle φ. Here, P(Im,In,d,ϕ) is the ratio of the number of (Im,In) pairs at a distance d and an angle ϕ to the total number of pixel pairs.

[0078] Where N is the number of pixel intensity values;

[0079] Im and In: Two different gray levels in the grayscale image above;

[0080] d: Distance between pixel pairs;

[0081] φ: directional angle between pixel pairs;

[0082] Five Haralick texture features were obtained from GLCM, specifically:

[0083] ;

[0084] in, ;

[0085] ;

[0086] ;

[0087] ;

[0088] ;

[0089] Where ASM is the second moment of the angle, CON is the contrast, IDF is the inverse difference moment, Corr is the correlation, and Var is the variance.

[0090] GLCM is calculated for three different angles θ, namely 0°, 45° and 90°, and GLCM is generated by two pixel intensity values ​​(Im, In) at three distance values ​​d=1, 2 and 3.

[0091] Therefore, nine gray-level co-occurrence matrices were generated for each image patch. Furthermore, five texture features were calculated from each gray-level co-occurrence matrix, resulting in 45 texture feature vectors, denoted as WT.

[0092] In some embodiments, after the step of extracting the color features, pixel features, texture features, and shape features of the original drainage pipe image to generate a second multidimensional feature combination, the method includes: normalizing the second multidimensional feature combination to obtain normalized features; and constructing the dictionary database and the final state feature coefficient vector of the dictionary database based on the second multidimensional feature combination, which includes: constructing the dictionary database and the final state feature coefficient vector of the dictionary database based on the normalized features.

[0093] Further, the step of normalizing the above-mentioned second multidimensional feature combination to obtain normalized features includes: determining the number of groups based on the feature dimension of the above-mentioned second multidimensional feature combination; the square of the number of groups is equal to the feature dimension; dividing the above-mentioned second multidimensional feature combination into multiple sub-feature combinations according to the number of groups; calculating the mean and variance of each sub-feature combination; normalizing the above-mentioned second multidimensional feature combination based on the mean and variance of the sub-feature combinations to obtain intermediate normalized features; and adjusting the intermediate normalized features based on preset scaling and offset coefficients to obtain normalized features.

[0094] For ease of understanding, assume there are N samples with combinations of second-dimensional features, each consisting of color, texture, and shape features, resulting in a feature dimension of 64. Assume there are 8 groups, meaning each group has 8 features. Then, for each sample with a combination of second-dimensional features, calculate the mean and variance of each feature group.

[0095] The mean and variance of each feature group are calculated using the following formulas:

[0096] ;

[0097]

[0098] in, Let g be the mean of the eigenvalues ​​of the g-th group. Let g be the variance of the eigenvalues ​​of the g-th group. Let H be the feature value of the g-th group of the i-th second multidimensional feature combination sample, and H and W be the width and height of the feature map, where H=W=1.

[0099] Next, based on the mean and variance of the above sub-feature combinations, the above second multi-dimensional feature combination is normalized to obtain intermediate normalized features; the above intermediate normalized features are adjusted based on preset scaling and offset coefficients to obtain normalized features.

[0100] The calculation formula is as follows:

[0101]

[0102]

[0103] Among them, the above Let g be the eigenvalue of the intermediate normalized feature of the i-th second multidimensional feature combination sample. It is a non-zero positive number. This is the scaling factor. This is the offset coefficient. This is a normalized feature.

[0104] Furthermore, the aforementioned drainage pipe defect information includes: no defects, leakage, cracks, undulations, misalignment, and the defect level information corresponding to the aforementioned no defects, leakage, cracks, undulations, and misalignment.

[0105] To facilitate understanding, this application will be described in detail through the following practical examples:

[0106] Assume the above dictionary databases contain the data shown in Table 1 below:

[0107] Table 1

[0108]

[0109] First, by inputting the above first multidimensional feature combination, the error between the first multidimensional feature combination and each dictionary database is calculated respectively:

[0110] Error=||Y-Da||F

[0111] Where Error is the error, Y is the first multidimensional feature combination, D is the dictionary database, and a is the final state feature coefficient vector of the dictionary database.

[0112] Then, the error values ​​are analyzed and compared. The defect type corresponding to the smallest error value is the defect classification of the drainage pipe image.

[0113] As shown in Table 2 below, when the first input image feature vector is Y1, the corresponding error is 0.1, and the defect classification of the output pipeline image is leakage.

[0114] Table 2

[0115]

[0116] This invention provides a drainage pipe image recognition method based on multi-feature fusion, comprising: acquiring a drainage pipe image; extracting multi-dimensional features from the drainage pipe image to generate a first multi-dimensional feature combination; calculating the error value between the first multi-dimensional feature combination and the multiple dictionary databases based on the first multi-dimensional feature combination, multiple preset dictionary databases, and the final state feature coefficient vectors of the multiple dictionary databases; selecting the minimum error value from the error values; and determining the defect recognition result of the drainage pipe image based on the target dictionary database corresponding to the minimum error value. The method for constructing the dictionary database includes: acquiring an original drainage pipe image with drainage pipe defect information; extracting color features, pixel features, texture features, and shape features from the original drainage pipe image to generate a second multi-dimensional feature combination; and constructing the dictionary database and the final state feature coefficient vectors of the dictionary database based on the second multi-dimensional feature combination. This method achieves accurate defect recognition of drainage pipe images by comparing the first multi-dimensional feature combination with the pre-constructed dictionary database, thereby improving the accuracy and efficiency of drainage pipe image recognition.

[0117] Example 2

[0118] In this embodiment, we focus on the process of constructing a dictionary database and the final state feature coefficient vector of the dictionary database. Figure 2 This is a schematic diagram illustrating the process of constructing a dictionary database and the final state feature coefficient vector of the dictionary database, as provided in an embodiment of the present invention.

[0119] Depend on Figure 2 As seen, the steps for constructing the dictionary database and the final-state feature coefficient vector of the dictionary database include:

[0120] Step S201: Based on the above-mentioned second multidimensional feature combination, determine the atomic units with the same number of columns as the above-mentioned second multidimensional feature combination.

[0121] To ensure the number of atomic units in the dictionary matches the number of columns in the second multidimensional feature combination, we first need to understand the specific structure of the second multidimensional feature combination. Assume the second multidimensional feature combination is a C-dimensional vector, meaning it has C columns, each representing a specific feature in the image (e.g., texture, color, or shape). Next, we need to construct a dictionary containing C atomic units for this C-dimensional vector. Each atomic unit can be viewed as a basic pattern describing local or global features of the image. During initialization, these C atomic units can be created randomly or based on prior knowledge. These atomic units will serve as the basic elements of the dictionary, used to represent and reconstruct image features. During optimization, these atomic units are continuously adjusted to fit each column of feature values ​​in the second multidimensional feature combination as closely as possible. Ultimately, each atomic unit will be able to capture an important aspect of the image feature vector, enabling the entire dictionary to efficiently and accurately represent the complex features of the image. In short, determining the number of atomic units to be the same as the number of columns in the second multidimensional feature combination ensures that the number of base units in the dictionary matches the dimension of the feature vector, allowing for efficient modeling and compression of image features during subsequent sparse representation and optimization. This not only improves the accuracy of feature representation but also enhances the overall performance of the model.

[0122] Step S202: Construct an initial dictionary database based on the above atomic units.

[0123] Here, based on the determined C atomic units, an initial dictionary database containing these atomic units is initialized for subsequent feature representation and optimization processes.

[0124] Step S203: Calculate the intermediate feature coefficient vector based on the above-mentioned second multidimensional feature combination, the above-mentioned initial dictionary database, and the randomly generated initial feature coefficient vector; the above-mentioned initial feature coefficient vector has the same dimension as the above-mentioned second multidimensional feature combination.

[0125] Step S204: Based on the intermediate state feature coefficient vector and the initial dictionary database, construct the dictionary database and the final state feature coefficient vector.

[0126] In practice, the steps for calculating the intermediate feature coefficient vector based on the aforementioned second multidimensional feature combination, the aforementioned initial dictionary database, and the randomly generated initial feature coefficient vector include:

[0127] Step A1: Based on the above-mentioned second multidimensional feature combination, the above-mentioned initial dictionary database, and the above-mentioned initial feature coefficient vector, calculate the calculation result of the preset objective function and the above-mentioned intermediate feature coefficient vector corresponding to the above-mentioned calculation result.

[0128] The objective function is as follows: ;|| || o <L;

[0129] Where L is the preset sparsity, D is the dictionary matrix corresponding to the initial dictionary database, F represents the calculation result, and X is the combination of the second multidimensional features. The above is the initial feature coefficient vector.

[0130] Step A2: Evaluate the performance parameters of each subset in the initial feature coefficient vector based on the preset fitness function.

[0131] Step A3: Filter the target subset of the initial feature coefficient vector in which the above performance parameters are greater than the preset parameter threshold.

[0132] Step A4: Perform genetic operations on the above target subset to obtain the sub-intermediate state feature coefficient vector.

[0133] Step A5: Repeat steps A1 to A4 above to reach the preset number of iterations until the value of the above calculation result is minimized.

[0134] Step A6: Determine the sub-intermediate state feature coefficient vector corresponding to the calculation result with the smallest value as the intermediate state feature coefficient vector.

[0135] Furthermore, the genetic operations described above include crossover, mutation, and replacement operations on the target subset.

[0136] In some embodiments, the step of constructing the dictionary database and the final state feature coefficient vector based on the intermediate state feature coefficient vector and the initial dictionary database includes: Step B1: Constructing an error matrix based on the intermediate state feature coefficient vector and the initial dictionary database; Step B2: Performing singular value decomposition on the error matrix to obtain the intermediate state dictionary database and the updated feature coefficient vector; Step B3: Calculating the Frobenius norm between the intermediate state dictionary database and the second multidimensional feature combination; Step B4: Determining whether the Frobenius norm is less than a preset threshold; Step B5: When the Frobenius norm is greater than or equal to the preset threshold, repeating steps A1 to A6 and steps B1 to B5 until the Frobenius norm is less than the preset threshold, and determining the updated feature coefficient vector and the intermediate state dictionary database corresponding to the Frobenius norm less than the preset threshold as the final state feature coefficient vector and the dictionary database, respectively.

[0137] The error matrix is ​​constructed based on the intermediate state feature coefficient vector and the initial dictionary database described above, using the following formula:

[0138] Ek=XΩk-DΩkαΩk;

[0139] Where Ek is the error matrix, dk is the atomic unit, Ωk is the set of indices of all signals using the atomic unit, XΩk is a subset of all signals using the atomic unit, DΩk is a subset of the atomic units corresponding to the indices in Ωk, and αΩk is a subset of the characteristic coefficients corresponding to the aforementioned intermediate state characteristic coefficient vector.

[0140] Furthermore, singular value decomposition is performed on the above error matrix based on the following formula to obtain the intermediate state dictionary database and the updated feature coefficient vector:

[0141] [U, S, V] = SVD(Ek)

[0142] Where U, S, and V are the matrices obtained by singular value decomposition of the error matrix.

[0143] Take the first column of U as the new atomic unit, and the product of the first element of S and the first column of V is the updated feature coefficient vector.

[0144] The present invention uses the following practical examples to illustrate the above steps in detail:

[0145] Assume the second multidimensional feature combination is Each column represents a set of feature vectors;

[0146] The initial dictionary database is Each column represents an atomic unit;

[0147] Given the first set of eigenvectors x1=[1,4,7]T;

[0148] x1≈Dα1

[0149]

[0150] The following can be obtained using a genetic algorithm:

[0151] Then we can get:

[0152]

[0153] Similarly, we can obtain:

[0154]

[0155]

[0156] Therefore, we can obtain:

[0157]

[0158] in, It is a subset of the intermediate state feature coefficient vector.

[0159] The atomic units of the initial dictionary database are used by all signals, therefore the following calculations are performed:

[0160]

[0161] Next, the initial dictionary database is updated. Given d1=[1,0,1]T, the error matrix E1 is constructed:

[0162]

[0163] Singular value decomposition of E1 yields the following results:

[0164]

[0165]

[0166]

[0167] Thus, the updated atomic unit can be obtained, denoted as dk′, i.e., dk′=U[:,0]=U[:,0]=[-0.69 0.34 0.64]T. Simultaneously, the updated eigenvalue vector αΩk can be obtained by multiplying Σ(1,1) by the first column of matrix V, i.e., αΩk=Σ(1,1)•V[:,0]= [5.85 0.00 0.00]T.

[0168] Repeat the above steps until the objective function reaches its minimum value.

[0169] Next, the error of the intermediate dictionary database is calculated. This error is obtained by calculating the Frobenius norm between the second multidimensional feature combination, the initial dictionary database, and the intermediate dictionary database. The error calculation formula is as follows:

[0170] Error = ||X-Da||F;

[0171] The specific formula for calculating the Frobenius norm is as follows:

[0172]

[0173] Where m and n are the number of rows and columns of the second multidimensional feature combination, respectively, xij is the element in the i-th row and j-th column of the second multidimensional feature combination, and (Dα)ij is the element in the i-th row and j-th column of the intermediate state dictionary database.

[0174] Furthermore, if the Frobenius norm is less than a preset threshold ε, then convergence is considered to have occurred; otherwise, the intermediate state dictionary database needs to be updated.

[0175] This invention provides a method for constructing a dictionary database and a final-state feature coefficient vector of the dictionary database, comprising: determining atomic units with the same number of columns as the second multidimensional feature combination based on the aforementioned second multidimensional feature combination; constructing an initial dictionary database based on the aforementioned atomic units; calculating an intermediate-state feature coefficient vector based on the aforementioned second multidimensional feature combination, the aforementioned initial dictionary database, and a randomly generated initial feature coefficient vector; wherein the aforementioned initial feature coefficient vector has the same dimension as the aforementioned second multidimensional feature combination; and constructing the aforementioned dictionary database and the aforementioned final-state feature coefficient vector based on the aforementioned intermediate-state feature coefficient vector and the aforementioned initial dictionary database. This method constructs an initial dictionary database based on the second multidimensional feature combination and iteratively optimizes the feature coefficient vector, thereby further achieving efficient and accurate representation of pipeline image features and improving the accuracy and reliability of pipeline defect classification.

[0176] Example 3

[0177] Based on the above embodiments, Figure 3 This is a schematic diagram of the structure of a drainage pipe image recognition device based on multi-feature fusion, provided in an embodiment of the present invention.

[0178] Depend on Figure 3 As seen, the device includes:

[0179] The data acquisition module 31 is used to acquire images of the drainage pipe; to extract multi-dimensional features from the drainage pipe images and generate a first multi-dimensional feature combination.

[0180] The error calculation module 32 is used to calculate the error value between the first multidimensional feature combination and the multiple dictionary databases based on the first multidimensional feature combination, the multiple preset dictionary databases and the final state feature coefficient vectors of the multiple dictionary databases; and to select the minimum error value from the error values.

[0181] The defect identification module 33 is used to determine the defect identification result of the drainage pipe image based on the target dictionary database corresponding to the minimum error value. The method for constructing the dictionary database includes: acquiring an original drainage pipe image with drainage pipe defect information; extracting the color features, pixel features, texture features and shape features of the original drainage pipe image to generate a second multi-dimensional feature combination; and constructing the dictionary database and the final state feature coefficient vector of the dictionary database based on the second multi-dimensional feature combination.

[0182] In one embodiment, the data acquisition module 31 is further configured to divide the original drainage pipe image into multiple image blocks based on preset parameters; determine the average pixel value, pixel variance, and pixel kurtosis of each image block according to the preset weight of the corresponding region of the image block and the pixel value of each image block; the multiplication result obtained by multiplying the preset weights of the multiple image blocks is 1; and determine the pixel features of the original drainage pipe image according to the average pixel value, the pixel variance, and the pixel kurtosis.

[0183] In one embodiment, the data acquisition module 31 is further configured to calculate the average pixel value of each image block based on the preset weight of the region corresponding to the image block and the pixel value of each image block; using a sliding window technique of a preset size, calculate the local variance and global variance of each pixel in each image block based on the pixel value of each image block, the average pixel value, and the average pixel value of the window corresponding to the sliding window; calculate the pixel variance based on the local variance and the global variance; and calculate the pixel kurtosis based on the pixel variance, the pixel value of each image block, and the average pixel value.

[0184] In one embodiment, the data acquisition module 31 is further configured to calculate the local variance based on the following formula:

[0185]

[0186] in, For the aforementioned local variance, The preset size of the sliding window is as described above. Let i be the pixel value in the (i+m)th row and (j+n)th column of the above image block. The average pixel value of the sliding window when the center pixel of the sliding window is in the i-th row and j-th column;

[0187] The overall variance above is calculated using the following formula:

[0188]

[0189] in, Let M be the overall variance, M be the number of rows in the image patch, N be the number of columns in the image patch, and I(i,j) be the pixel value in the i-th row and j-th column of the image patch. This is the average value of the above pixels;

[0190] The steps for calculating the pixel variance based on the local variance and the global variance described above include:

[0191] The above pixel variance is calculated using the following formula:

[0192]

[0193] in, The above pixel variance, These are preset coefficients.

[0194] In one embodiment, the data acquisition module 31 is further configured to extract the shape features of the original drainage pipe image, including: extracting the first-order invariant moments, second-order invariant moments, third-order invariant moments, fourth-order invariant moments, fifth-order invariant moments, sixth-order invariant moments, and seventh-order invariant moments of the original drainage pipe image; and determining the shape features of the original drainage pipe image based on the first-order invariant moments, second-order invariant moments, third-order invariant moments, fourth-order invariant moments, fifth-order invariant moments, sixth-order invariant moments, and seventh-order invariant moments.

[0195] In one embodiment, the data acquisition module 31 is further configured to extract the first-order invariant moment of the original drain pipe image based on the following formula:

[0196]

[0197] in, For the above first-order invariant moments, The second-order central moment in the horizontal direction of the original drainage pipe image above. The second-order central moment in the vertical direction of the original drainage pipe image above;

[0198] The second-order invariant moments of the original drain pipe image above are extracted using the following formula:

[0199]

[0200] in, For the above first-order invariant moments, The first-order central moment in the horizontal direction and the first-order central moment in the vertical direction are mentioned above.

[0201] The third invariant moments of the original drainage pipe image above are extracted using the following formula:

[0202]

[0203] in, For the above third-order invariant moments, The third-order central moment in the horizontal direction is given above. The third-order central moment in the vertical direction is given above. Let the second-order central moment in the horizontal direction and the first-order central moment in the vertical direction be the aforementioned. These are the first-order central moments in the horizontal direction and the second-order central moments in the vertical direction.

[0204] The fourth invariant moments of the original drain pipe image above are extracted using the following formula:

[0205]

[0206] in, These are the aforementioned fourth-order invariant moments;

[0207] The fifth-order invariant moments of the original drain pipe image above are extracted using the following formula:

[0208]

[0209] in, These are the aforementioned fifth-order invariant moments;

[0210] The sixth invariant moments of the original drain pipe image above are extracted using the following formula:

[0211]

[0212] in, These are the aforementioned sixth-order invariant moments;

[0213] The seventh invariant moments of the original drain pipe image above are extracted using the following formula:

[0214]

[0215] in, These are the seventh invariant moments mentioned above.

[0216] In one embodiment, the defect identification module 33 is further used to normalize the above-mentioned second multidimensional feature combination to obtain normalized features; and to construct the above-mentioned dictionary database and the final state feature coefficient vector of the above-mentioned dictionary database based on the above-mentioned normalized features.

[0217] In one embodiment, the defect identification module 33 is further configured to determine the number of groups based on the feature dimension of the second multidimensional feature combination; the square of the number of groups is equal to the feature dimension; divide the second multidimensional feature combination into multiple sub-feature combinations according to the number of groups; calculate the mean and variance of each sub-feature combination; normalize the second multidimensional feature combination based on the mean and variance of the sub-feature combinations to obtain intermediate normalized features; and adjust the intermediate normalized features based on preset scaling and offset coefficients to obtain normalized features.

[0218] The drainage pipe image recognition device based on multi-feature fusion provided in this embodiment of the invention has the same technical features as the drainage pipe image recognition method based on multi-feature fusion provided in the above embodiments, and therefore can also solve the same technical problems and achieve the same technical effects. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0219] Example 4

[0220] This embodiment provides an electronic device, including a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of a pipeline image classification method.

[0221] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a drainage pipe image recognition method based on multi-feature fusion.

[0222] See Figure 4The diagram shows the structure of an electronic device, which includes a memory 41 and a processor 42. The memory 41 stores a computer program that can run on the processor 42. When the processor executes the computer program, it implements the steps provided by the above-mentioned drainage pipe image recognition method based on multi-feature fusion.

[0223] like Figure 4 As shown, the device also includes a bus 43 and a communication interface 44, with the processor 42, the communication interface 44 and the memory 41 connected via the bus 43; the processor 42 is used to execute executable modules, such as computer programs, stored in the memory 41.

[0224] The memory 41 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this device network element and at least one other network element is achieved through at least one communication interface 44 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0225] Bus 43 can be an ISA bus, PCI bus, or EISA bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0226] The memory 41 stores the program, and the processor 42 executes the program after receiving the execution instruction. The method executed by the pipeline image classification device disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 42, or implemented by the processor 42. The processor 42 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor 42 or by instructions in the form of software. The processor 42 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this invention can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 41, and processor 42 reads information from memory 41 and, in conjunction with its hardware, completes the steps of the above method.

[0227] Furthermore, this embodiment of the invention also provides a machine-readable storage medium storing machine-executable instructions. When these machine-executable instructions are invoked and executed by the processor 42, they cause the processor 42 to implement the above-described drainage pipe image recognition method based on multi-feature fusion.

[0228] The electronic devices and computer-readable storage media provided in the embodiments of the present invention have the same technical features, so they can also solve the same technical problems and achieve the same technical effects.

[0229] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0230] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

Claims

1. A sewer image recognition method based on multi-feature fusion, characterized in that, The method comprises the following steps: acquiring a sewer image; performing multi-dimensional feature extraction on the sewer image to generate a first multi-dimensional feature combination; calculating error values between the first multi-dimensional feature combination and a plurality of dictionary databases according to the first multi-dimensional feature combination, preset dictionary databases, and terminal state feature coefficient vectors of the dictionary databases; selecting a minimum error value from the error values; determining a defect recognition result of the sewer image according to a target dictionary database corresponding to the minimum error value; The dictionary database construction method comprises the following steps: acquiring an original sewer image with sewer defect information; extracting color features, pixel features, texture features, and shape features of the original sewer image to generate a second multi-dimensional feature combination; constructing the dictionary database and the terminal state feature coefficient vector of the dictionary database according to the second multi-dimensional feature combination; The step of extracting the pixel features of the original sewer image comprises the following steps: dividing the original sewer image into a plurality of image blocks based on preset parameters; determining pixel mean, pixel variance, and pixel kurtosis of each image block according to preset weights of corresponding regions of the image blocks and pixel values of each image block; determining pixel features of the original sewer image according to the pixel mean, the pixel variance, and the pixel kurtosis; The step of determining the pixel mean, the pixel variance, and the pixel kurtosis of each image block according to the preset weights of corresponding regions of the image blocks and the pixel values of each image block comprises the following steps: calculating the pixel mean of each image block according to the preset weights of corresponding regions of the image blocks and the pixel values of each image block; 2.The sewer image recognition method based on multi-feature fusion according to claim 1, characterized in that, calculating local variance and overall variance of each pixel point in each image block according to the pixel values of each image block, the pixel mean, and window pixel mean corresponding to the sliding window of a preset size; calculating the pixel variance according to the local variance and the overall variance; calculating the pixel kurtosis according to the pixel variance, the pixel values of each image block, and the pixel mean. 3.The sewer image recognition method based on multi-feature fusion according to claim 1, characterized in that, The step of calculating the local variance and the overall variance of each pixel point in each image block according to the pixel values of each image block, the pixel mean, and window pixel mean corresponding to the sliding window comprises the following steps: calculating the local variance of each pixel point in each image block based on the preset size of the sliding window, the pixel value of the i+mth row and j+nth column in the image block, and the window pixel mean when the center pixel of the sliding window is the ith row and jth column; calculating the overall variance of each pixel point in each image block based on the number of rows of the image block, the number of columns of the image block, the pixel value of the ith row and jth column in the image block, and the pixel mean. The step of extracting the shape features of the original sewer image comprises the following steps: extracting first-order moments, second-order moments, third-order moments, fourth-order moments, fifth-order moments, sixth-order moments, and seventh-order moments of the original sewer image; Determine the shape feature of the original sewer image according to the first-order invariant moment, the second-order invariant moment, the third-order invariant moment, the fourth-order invariant moment, the fifth-order invariant moment, the sixth-order invariant moment and the seventh-order invariant moment.

4. The multi-feature fusion-based sewer image recognition method according to claim 3, characterized in that, The step of extracting the first-order invariant moment, the second-order invariant moment, the third-order invariant moment, the fourth-order invariant moment, the fifth-order invariant moment, the sixth-order invariant moment and the seventh-order invariant moment of the original sewer image comprises: Calculate the first-order invariant moment of the original sewer image based on the 2nd-order central moment in the horizontal direction and the 2nd-order central moment in the vertical direction of the original sewer image; Calculate the second-order invariant moment of the original sewer image based on the 2nd-order central moment in the horizontal direction, the 2nd-order central moment in the vertical direction, the 1st-order central moment in the horizontal direction and the 1st-order central moment in the vertical direction; Calculate the third-order invariant moment, the fourth-order invariant moment, the fifth-order invariant moment, the sixth-order invariant moment and the seventh-order invariant moment of the original sewer image based on the 3rd-order central moment in the horizontal direction, the 3rd-order central moment in the vertical direction, the 2nd-order central moment in the horizontal direction and the 1st-order central moment in the vertical direction, the 1st-order central moment in the horizontal direction and the 2nd-order central moment in the vertical direction, respectively. 5.The sewer image recognition method based on multi-feature fusion according to claim 1, characterized in that, After the step of extracting the color feature, the pixel feature, the texture feature and the shape feature of the original sewer image to generate a second multi-dimensional feature combination, the method comprises: Perform normalization processing on the second multi-dimensional feature combination to obtain a normalized feature; The steps of constructing the dictionary database and the terminal state feature coefficient vector of the dictionary database according to the second multi-dimensional feature combination comprise: Construct the dictionary database and the terminal state feature coefficient vector of the dictionary database according to the normalized feature. 6.The sewer image recognition method based on multi-feature fusion according to claim 5, characterized in that, The step of performing normalization processing on the second multi-dimensional feature combination to obtain a normalized feature comprises: Determine the number of groups according to the feature dimension of the second multi-dimensional feature combination; the square of the number of groups is equal to the feature dimension; Divide the second multi-dimensional feature combination into a plurality of groups of sub-feature combinations according to the number of groups; Calculate the mean and variance of each group of sub-feature combinations; Perform normalization processing on the second multi-dimensional feature combination according to the mean and variance of the sub-feature combinations to obtain an intermediate state normalized feature; Adjust the intermediate state normalized feature based on a preset scaling coefficient and an offset coefficient to obtain a normalized feature.

7. A sewer image recognition device based on multi-feature fusion, characterized in that, Comprise: The data acquisition module is used for collecting sewer images; Perform multi-dimensional feature extraction on the sewer images to generate a first multi-dimensional feature combination; The error calculation module is used for calculating error values between the first multi-dimensional feature combination and a plurality of dictionary databases according to the first multi-dimensional feature combination, a plurality of preset dictionary databases and terminal state feature coefficient vectors of the plurality of dictionary databases; Select the minimum error value from the error values; The defect identification module is used for determining a defect identification result of the sewer image according to a target dictionary database corresponding to the minimum error value. The construction method of the dictionary database comprises: collecting original sewer images with sewer defect information; extracting color features, pixel features, texture features and shape features of the original sewer images to generate a second multi-dimensional feature combination; and constructing the dictionary database and a final state feature coefficient vector of the dictionary database according to the second multi-dimensional feature combination. The data acquisition module is further configured to: divide the original sewer image into a plurality of image blocks based on preset parameters; determine pixel average values, pixel variances and pixel kurtoses of each of the image blocks according to preset weights of corresponding regions of the image blocks and pixel values of each of the image blocks; and determine pixel features of the original sewer image according to the pixel average values, the pixel variances and the pixel kurtoses. The data acquisition module is further configured to: calculate the pixel average values of each of the image blocks according to the preset weights of corresponding regions of the image blocks and the pixel values of each of the image blocks; calculate local variances and overall variances of each pixel point in each of the image blocks according to the pixel values of each of the image blocks, the pixel average values and window pixel average values corresponding to the sliding window of a preset size; calculate the pixel variances according to the local variances and the overall variances; and calculate the pixel kurtoses according to the pixel variances, the pixel values of each of the image blocks and the pixel average values.

8. An electronic device, comprising: The electronic device comprises a processor and a memory, the memory stores computer executable instructions capable of being executed by the processor, and the processor executes the computer executable instructions to implement the sewer image recognition method based on multi-feature fusion according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Powder bed defect visual detection method based on image feature fusion

    CN112001909A

  • Cotton fabric mercerization defect identification method

    CN115829984A

  • Surface defect detection method and system based on feature extraction and sparse representation

    CN117314855A