Equipment surface defect detection method based on multi-dimensional feature fusion
The device surface defect detection method using multi-dimensional feature fusion solves the problems of accuracy and resource consumption in existing technologies, and achieves fast and accurate device surface defect detection, which is suitable for edge terminal devices.
Patent Information
- Application Number
- CN202511408548.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-01-09
AI Technical Summary
Existing methods for detecting surface defects in equipment are insufficient in terms of accuracy, computational resources, and processing time, making it difficult to meet the needs of mobile and outdoor inspection.
A multi-dimensional feature fusion method is adopted, including image content enhancement, cropping alignment, filtering and block division, and multi-dimensional manually designed feature extraction, combined with Euclidean distance and voting mechanism for defect detection.
It achieves high accuracy, low resource consumption, and fast computation for detecting surface defects in equipment, and is suitable for edge terminal devices in mobile and harsh environments.
Smart Images

Figure CN121304569A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of image intelligent processing, and particularly relates to a device surface defect detection method based on multi-dimensional feature fusion. BACKGROUND
[0002] The purpose of device surface defect detection is to timely find defects such as scratches, cracks, deformation, peeling, corrosion and discoloration on the surface of the device, prevent potential threats to the normal operation of the device, and achieve the goal of improving the safety of the device.
[0003] Currently, the mainstream device surface defect detection mainly includes three methods, which are defect detection based on domain expert knowledge, defect detection based on artificial design feature extraction and defect detection based on deep learning modeling. The defect detection based on domain expert knowledge is carried out by means of visual inspection, vernier caliper, coating thickness gauge and the like, which is highly subjective and needs to consume a large amount of manual resources; the defect detection based on deep learning modeling needs to consume a large amount of storage resources and operation time in the aspects of model parameter configuration and offline training, and is difficult to be deployed in application scenarios requiring mobile defect detection; the defect detection based on artificial design feature extraction extracts significant features such as color and texture from device images for comparative analysis, which is fast in calculation but low in accuracy.
[0004] In practice, device surface defect detection may need to be carried out in outdoor, high-altitude and other scenes, and a detection method with high accuracy, less computing resources and short operation time is needed, so the application provides a device surface defect detection method based on multi-dimensional feature fusion to meet the application requirements. SUMMARY
[0005] (I) Technical problem to be solved
[0006] The technical problem to be solved by the application is how to provide a device surface defect detection method based on multi-dimensional feature fusion to solve the above problems existing in the prior art device surface defect detection method.
[0007] (II) Technical scheme
[0008] In order to solve the above technical problems, the application provides a device surface defect detection method based on multi-dimensional feature fusion, which comprises the following steps:
[0009] S1, device image content enhancement. According to the multi-dimensional feature characteristics used for device surface detection, Scharr sharpening and Laplacian enhancement are performed on normal and to-be-detected two comparison images to improve the line detail description and visual effect of the images.
[0010] S2, device image cropping alignment. The outer frame of the two contrast images is positioned, and the invalid background is cropped to reduce the interference on feature extraction; the feature registration is used to carry out geometric alignment of the two images, and the defect detection is carried out under the premise of meeting the spatial coordinate consistency.
[0011] S3, device image filtering and blocking. Total variation filtering is used to reduce the noise in the image to improve the accuracy of feature extraction, and image blocking is used to refine the detection area, reduce the feature calculation amount and facilitate defect positioning.
[0012] S4, multi-dimensional artificial design feature extraction. Image features are extracted from color, texture, shape and frequency domain to form the basis for multi-dimensional fusion defect detection.
[0013] S5, surface defect detection and positioning. The Euclidean distance of multi-dimensional features between normal block images and images to be detected is calculated and compared with the corresponding threshold, and the surface defect detection is completed through the voting mechanism, and the template matching method is used to mark the position of the surface defect in the original image to be detected.
[0014] (Three) beneficial effects
[0015] The present application provides a kind of based on multi-dimensional feature fusion equipment surface defect detection method, the equipment surface defect detection method of the present application, implementation Scharr sharpening and Laplacian enhancement to strengthen image content, based on scale invariant feature transformation in different scale space extraction image key point is completed registration, utilize total variation filtering to reduce the noise in the two contrast images to improve the accuracy of feature extraction, through image blocking to refine detection area and facilitate defect positioning, extract color, texture, shape and frequency domain features for image content, using the way of multi-dimensional feature fusion completes equipment surface characteristic analysis, higher accuracy, less resource consumption, faster running speed, it is suitable for in mobile, outdoor and other application scenarios under the edge terminal device deployment, in equipment surface defect detection can play an important role. DETAILED DESCRIPTION
[0016] Figure 1 The flow chart of the equipment surface defect detection method based on multi-dimensional feature fusion of the present application. DETAILED DESCRIPTION
[0017] In order to make the purpose, content and advantages of the present application clearer, the specific embodiments of the present application are described in detail below in combination with the drawings and examples.
[0018] The application discloses a device surface defect detection method based on multi-dimensional feature fusion, and designs a method for extracting multi-dimensional artificial design features from a device surface image and detecting through similarity measurement and a voting mechanism. The method mainly comprises the following steps: (1) device image content enhancement; (2) device image cutting and alignment; (3) device image filtering and blocking; (4) multi-dimensional artificial design feature extraction; and (5) surface defect detection and positioning.
[0019] The device surface defect detection method has the characteristics of high accuracy, less computing resources and short operation time, is suitable for edge terminal devices, does not need to consume a large amount of human resources, avoids the hardware configuration requirement of a deep learning model in offline training, and can play an important role in defect detection in a mobile environment and a harsh scene.
[0020] The application discloses a device surface defect detection method based on multi-dimensional feature fusion, and designs a method for extracting multi-dimensional artificial design features from a device surface image and detecting through similarity measurement and a voting mechanism. The method mainly comprises the following steps: (1) device image content enhancement; (2) device image cutting and alignment; (3) device image filtering and blocking; (4) multi-dimensional artificial design feature extraction; and (5) surface defect detection and positioning.
[0021] S1, device image content enhancement: according to the characteristics of the extracted multi-dimensional artificial design features, content enhancement is performed on the two comparison device images, namely a normal device image and a device image to be detected, so as to improve the feature expression ability. On one hand, the image is subjected to Scharr sharpening, so as to deepen the description of line information such as texture and shape; on the other hand, the image is subjected to Laplacian enhancement, so as to strengthen the high-frequency components of the image and improve the visual effect.
[0022] S11, Scharr sharpening. The Scharr operator adopts a fine weight distribution strategy and uses convolution operation to complete line information sharpening. The sharpening convolution kernel for the horizontal direction is The sharpening convolution kernel for the vertical direction is
[0023] S12, Laplacian enhancement. Assuming the image is represented as f(x, y), the Laplacian operator of second-order differential can be defined as:
[0024]
[0025] Assuming the coefficient is c, the Laplacian enhancement can be defined as:
[0026]
[0027] S2, device image cropping alignment. The invalid background outside the outer frame of the two comparison images is removed to reduce interference, and the two images are geometrically aligned according to feature registration to meet consistency in spatial coordinates, facilitating subsequent defect detection.
[0028] S21, edge cropping. First, apply an edge detection algorithm to the image to determine the outer boundary of the device, providing a profile basis for cropping; second, use the topological relationship of the pixel points in the image, i.e. the connectivity information of the edge pixels, to connect adjacent edge points into a profile and form a closed loop boundary; finally, complete the cropping according to the closed loop and remove the background other than the device.
[0029] S22, image registration: use scale-invariant feature transformation to extract image key points in different scale spaces to complete registration. The Gaussian kernel G(x, y, σ) can be used to generate multi-scale spaces:
[0030]
[0031] Assuming the image is represented as f(x, y), according to different values of σ, the image set with different scale spaces can be constructed as:
[0032] L(x, y, σ) = G(x, y, σ) * f(x, y)
[0033] First, use the DOG function to perform local extremum detection based on L(x, y, σ) to obtain the extremum points; second, find the sub-pixel level accurate position and scale of the extremum points by Taylor expansion fitting and eliminate points with low contrast; then, use the Hessian matrix to judge and eliminate unstable points located on the edge; finally, after obtaining a set of unique, stable, and repeatable key points, use the gradient and direction distribution features to generate two image key point descriptor vectors with rotation invariance, find the nearest neighbor matching pair and estimate the optimal spatial transformation parameters to complete image registration. The gradient and direction distribution features of the key points can be represented as:
[0034]
[0035] θ(x, y) = tan -1(((L(x,y+1)-L(x,y-1)) / (L(x+1,y)-L(x-1,y)))
[0036] S3, device image filtering block: use total variation filtering to reduce the noise in two contrast images to improve the accuracy of feature extraction, and refine the detection area by image blocking and facilitate defect positioning.
[0037] S31, image filtering. The total variation of the image is high, which indicates that it may contain too much or even false detail information. Under the premise of maintaining the high matching of the image, reducing the total variation of the image can remove irrelevant information and retain important details such as edges.
[0038] S32, image blocking. According to the target size, calculate the number of blocks that can be divided in the horizontal and vertical directions of the image, and determine the position of each block in the left, right, top and bottom directions by iteration. Cut and sequentially store the normal and two contrast device images in the specified folder to generate two sets of block image collections for similarity measurement.
[0039] S4, multi-dimensional artificial design feature extraction. Extract color, texture, shape and frequency domain features from image content to form a defect detection feature basis under multi-dimensional fusion.
[0040] S41, color feature. This feature describes the surface properties of the components corresponding to the device. Color histogram can describe the proportion of different colors in the image, and can reflect whether there is a change in the encoding of the two contrast images, especially suitable for corrosion, fading and other defects.
[0041] S42, texture feature. This feature has selective invariance and certain resistance to noise. Gray level co-occurrence matrix is a statistical method for describing texture features, and can further extract related features such as contrast, homogeneity and energy, especially suitable for scratches, cracks and other defects.
[0042] S43, shape feature. Local binary pattern is a feature operator for describing local shape of image, which can be used to extract shape features of device. Histogram equalization is needed before extracting shape features to improve image contrast and feature robustness, especially suitable for defects such as shedding.
[0043] S44, frequency domain feature. Fourier amplitude spectrum of the image can be extracted using Fourier transform. This feature is an important tool for representing the intensity of frequency components of the device, revealing the energy distribution of the device in the frequency domain, especially suitable for deformation and other defects.
[0044] S5. Surface Defect Detection and Localization. Calculate the Euclidean distance of multidimensional features between the normal block image and the block image to be inspected, and compare it with the corresponding thresholds. Complete surface defect detection through a voting mechanism, and use a template matching method to mark the position of the surface defect in the original image to be inspected.
[0045] S51. Defect Detection. As a commonly used similarity metric, Euclidean distance represents the true distance between two points in n-dimensional space, or the natural length of a vector (i.e., the distance from that point to the origin). When the Euclidean distance of a certain feature in both normal and inspected images exceeds an anomaly threshold, the inspected image is considered to have an anomaly risk under that feature. The comparison results of the Euclidean distances of all features with their corresponding thresholds are fused, and the final defect detection result for the image is determined by voting.
[0046] S52. Anomaly Localization. Perform defect detection on all image blocks and record the image blocks with defects. Based on the image content, use template matching to locate the position of the defective image block in the image to be inspected and mark it.
[0047] Example 1:
[0048] The following is in conjunction with the appendix Figure 1 The present invention is described in detail, but is not intended to limit the specific implementation method.
[0049] The specific implementation process of this invention is as follows.
[0050] (1) Image content enhancement. The image content is sharpened using Scharr and enhanced using Laplacian to improve feature extraction accuracy. Specifically, assuming the image is represented as f(x,y), horizontal convolution is first used... and vertical convolution First, sharpen the image's line information; second, define the image Laplacian operator. Finally, after setting the coefficient c, the Laplacian enhancement of the two contrasting images was completed.
[0051] (2) Device image cropping and alignment.
[0052] The enhanced device image is bounded and cropped to remove irrelevant background. Feature registration is used to geometrically align the two images for subsequent detection. Specifically, firstly, an edge detection algorithm is applied to the image to determine the outer boundary of the device, forming a boundary loop using the topological relationships of pixels (i.e., the connectivity information of edge pixels); secondly, cropping is performed based on the loop to remove the background except for the device; thirdly, a Gaussian kernel is set to generate the multi-scale space. Based on different values of σ, an image pyramid L(x,y,σ) = G(x,y,σ)*f(x,y) with different scales is constructed. Fourth, based on L(x,y,σ), the DOG function is used for local extremum detection. If a point is the maximum or minimum value of its 26 neighboring points, it is marked as an extremum point. Fifth, the Taylor second-order expansion of the extremum points is interpolated. If the absolute value is too small, it is considered to have low contrast and is removed. Sixth, the curvature of the remaining extremum points is evaluated using the Hessian matrix. If the curvature is too large, it is considered to be on the edge and is removed, finally obtaining the key points. Seventh, after determining the key points, gradient descent is used. tan and directional distribution characteristics -1 ((L(x,y+1)-L(x,y-1)) / (L(x+1,y)-L(x-1,y))) generates rotation-invariant descriptor vectors, and image registration is achieved after vector matching and correspondence establishment.
[0053] (3) Device image filtering blocks.
[0054] Assuming the domain of the image is Ω, the total variation of the image is defined as follows: in Representing the image gradient, total variation filtering minimizes... Implementation, in which This is the filtered image, where λ controls the balance between smoothing and detail preservation.
[0055] Assumption If the width and height are w and h respectively, and the target block size is b, then the number of blocks that the image can be divided into horizontally is _____. The number of blocks that can be divided vertically is The number of images that can be generated after dividing the two comparison images into blocks is 2×m×n.
[0056] (4) Multidimensional artificially designed feature extraction. Multidimensional features F = {F1, F2, ..., F...} are extracted from the two contrasting images in the color, texture, shape, and frequency domains. n This provides a feature basis for defect detection. In practical implementation,
[0057] For color features, iterate through and read the color value of each pixel in the image, count the number of pixels with different color values in the color gamut of the entire image, and form a color histogram;
[0058] For texture features, the displacement vector (dx, dy) is calculated based on the distance parameter a and the orientation parameter θ. For each pixel (x, y) in the image, its gray value g1 is calculated, and the corresponding pixel (x+dx, y+dy) is found and its gray value g2 is calculated. (g1, g2) is used as a gray value pair, and the frequency of occurrence in the entire image is counted. Based on the statistical results, a gray-level co-occurrence matrix is constructed, and features such as contrast, homogeneity, and energy are further calculated.
[0059] For shape features, the Local Binary Pattern Operator is defined as a 3×3 square window. The center pixel of the window is used as the threshold. The values of its 8 neighboring pixels are compared with the center pixel. If the value is less than the center pixel value, it is set to 0; otherwise, it is set to 1. The operation is performed on the entire image to obtain shape features based on the Local Binary Pattern.
[0060] For frequency domain features, assuming the image has width and height w and height h respectively, denoted as f(x,y), then the Fourier transform can be expressed as: The amplitude of the spectrum can be expressed as Where R(u,v) and I(u,v) are the real and imaginary parts of the spectrum, respectively.
[0061] (5) Surface defect detection and localization. Thresholds are set according to the Euclidean distance of the multidimensional features, and the surface defects are detected by fusing them through a voting mechanism; the image blocks with defects are located and their positions are marked in the original image to be inspected.
[0062] In practice, assuming the multidimensional features extracted from the normal segmented image are F, and the multidimensional features extracted from the segmented image to be inspected are F′, the Euclidean distance between them can be expressed as: Pre-set the corresponding threshold as T = {T1, T2, ..., T} N}, where N is the number of features, then the Euclidean distance of the multidimensional features, after comparison with the threshold, is expressed as: The voting mechanism is represented as Finally, based on the voting results v re and the preset decision threshold V th To determine the detection results after fusion
[0063] If the segmented image has defects, it is used as a template. Its position in the image to be inspected is matched using the squared difference, and it is marked in the image to be inspected to visualize the surface defect area.
[0064] Example 2:
[0065] A method for detecting surface defects in equipment based on multi-dimensional feature fusion, characterized in that the method includes the following steps:
[0066] (1) Equipment image content enhancement. Based on the multi-dimensional features used for equipment surface inspection, Scharr sharpening and Laplacian enhancement are applied to two contrasting images of normal and under inspection to improve the line detail description and visual effect of the images.
[0067] (2) Equipment image cropping and alignment. The outer borders of the two comparison images are located and invalid backgrounds are cropped to reduce interference with feature extraction; feature registration is used to geometrically align the two images and defect detection is carried out under the premise of satisfying spatial coordinate consistency.
[0068] (3) Equipment image filtering and segmentation. Total variation filtering is used to reduce noise in the image to improve the accuracy of feature extraction. Image segmentation is used to refine the detection area, reduce the amount of feature calculation, and facilitate defect location.
[0069] (4) Multidimensional artificial design feature extraction. Image features are extracted from four aspects: color, texture, shape and frequency domain, forming the basis for multidimensional fusion defect detection.
[0070] (5) Surface defect detection and localization. The Euclidean distance of multidimensional features between the normal block image and the block image to be inspected is calculated and compared with the corresponding thresholds. Surface defect detection is completed through a voting mechanism, and the position of surface defects in the original image to be inspected is marked using a template matching method.
[0071] Step (1) of this method includes the following sub-steps:
[0072] (21) Scharr sharpening. Assuming the image is represented as f(x,y), horizontal and vertical convolutions are used to traverse the image to sharpen the line information.
[0073] (22) Laplacian Enhancement. Define the Laplacian operator. Laplacian enhancement of the image is completed after setting the coefficient c.
[0074] Step (2) of this method includes the following sub-steps:
[0075] (31) Edge cropping. The outer boundary of the device is determined by the edge detection algorithm. The boundary loop is formed by using the pixel topological relationship (i.e. the connectivity information of edge pixels). The cropping is completed based on the loop and the background outside the device is removed.
[0076] (32) Image registration. Set the Gaussian kernel to... Based on different values of σ, an image pyramid L(x,y,σ)=G(x,y,σ)*f(x,y) with different scales is constructed. Based on L(x,y,σ), the DOG function is used to detect local extrema and obtain extrema points. Key points are further screened from the extrema points by Taylor expansion fitting and Hessian matrix. The gradient and orientation distribution features of the key points are used to estimate the optimal spatial transformation parameters to complete image registration.
[0077] Step (3) of this method includes the following sub-steps:
[0078] (41) Image filtering. Assuming the image domain is Ω, the total image variation is defined as... in, Total variation filtering minimizes Implementation, in which This is the filtered image, where λ controls the balance between smoothing and detail preservation.
[0079] (42) Image segmentation. Assume... If the width and height are w and h respectively, and the target block size is b, then the number of blocks that the image can be divided into horizontally is . The number of blocks that can be divided vertically is The total number of images generated after dividing the two comparison images into blocks is 2×m×n.
[0080] Step (4) of this method includes the following sub-steps:
[0081] (51) Color features. Traverse and read the color value of each pixel in the image, count the number of pixels with different color values in the color gamut of the entire image, and form a color histogram to extract color features.
[0082] (52) Texture features. Set the distance parameter a and the direction parameter θ, and calculate the corresponding displacement vector (dx, dy). Calculate the gray value g1 for each pixel (x, y) in the image, find the corresponding pixel (x+dx, y+dy) and calculate the gray value g2. Use (g1, g2) as a gray value pair, count the number of times it appears in the entire image, construct the gray-level co-occurrence matrix based on the statistical results, and calculate features such as contrast, homogeneity, and energy.
[0083] (53) Shape features. The local binary pattern operator is defined as a 3×3 square window. The center pixel of the window is used as the threshold. The values of its 8 neighboring pixels are compared with the center pixel. If the value is less than the center pixel value, it is set to 0; otherwise, it is set to 1. The operation is performed on the entire image to obtain the shape features based on the local binary pattern.
[0084] (54) Frequency domain characteristics. An image of size b. After Fourier transform, it can be expressed as The amplitude of the spectrum can be expressed as R(u,v) and I(u,v) correspond to the real and imaginary parts of the spectrum, respectively.
[0085] Step (5) of this method includes the following sub-steps:
[0086] (61) Defect Detection. Assuming the multidimensional features extracted from the normal segmented image are F, and the multidimensional features extracted from the segmented image to be inspected are F′, the Euclidean distance for evaluating their similarity can be expressed as: Pre-set the corresponding threshold as T = {T1, T2, ..., T} N}, where N is the number of features, then the Euclidean distance of the multidimensional features, after comparison with the threshold, is expressed as: The voting mechanism is represented as Finally, based on the voting results v re and the preset decision threshold V th To determine the detection results after fusion
[0087] (62) Anomaly localization. Record the content of the block image where surface defects are determined to exist, and use the square difference matching method to analyze the specific location of the block in the image to be inspected. Mark the block in the image to be inspected to visualize the surface defect area.
[0088] The device surface defect detection method of the present invention implements Scharr sharpening and Laplacian enhancement to enhance image content, extracts key points of the image in different scale spaces based on scale-invariant feature transformation to complete registration, uses total variation filtering to reduce noise in two contrasting images to improve feature extraction accuracy, refines the detection area by image segmentation to facilitate defect localization, extracts color, texture, shape and frequency domain features from image content, and uses multi-dimensional feature fusion to complete the analysis of device surface characteristics. It has high accuracy, low resource consumption and fast running speed, and is suitable for deployment in edge terminal devices in mobile, outdoor and other application scenarios, and can play an important role in device surface defect detection.
[0089] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for detecting surface defects in equipment based on multi-dimensional feature fusion, characterized in that, The method includes the following steps: S1. Equipment Image Content Enhancement: Scharr sharpening and Laplacian enhancement are applied to two contrasting images, one normal and one under inspection, to improve the line detail description and visual effect of the image. S2. Equipment Image Cropping and Alignment: Locate the outer borders of the two comparison images and crop out the invalid background; use feature registration to geometrically align the two images and carry out subsequent defect detection under the premise of satisfying spatial coordinate consistency; S3. Equipment Image Filtering and Blocking: Total variation filtering is used to reduce noise in the image to improve the accuracy of feature extraction. Image blocking is used to refine the detection area, reduce the amount of feature calculation, and facilitate defect location. S4. Multidimensional artificial design feature extraction: Extract image features from four aspects: color, texture, shape and frequency domain, to form the basis for multidimensional fusion defect detection. S5. Surface Defect Detection and Localization: Calculate the Euclidean distance of multidimensional features between the normal block image and the block image to be inspected, and compare it with the corresponding thresholds. Surface defect detection is completed through a voting mechanism, and the position of the surface defect in the original image to be inspected is marked using a template matching method.
2. The equipment surface defect detection method based on multi-dimensional feature fusion as described in claim 1, characterized in that, S1 includes: S11, Scharr Sharpening: The Scharr operator employs a refined weight allocation strategy, utilizing convolution operations to sharpen line information; the convolution kernel used for horizontal sharpening is... The sharpening convolution kernel used in the vertical direction is S12, Laplacian Enhancement: Assuming the image is represented as f(x,y), the Laplacian operator applying second-order differentiation is defined as: Assuming the coefficient is c, the Laplacian enhancement is defined as follows:
3. The equipment surface defect detection method based on multi-dimensional feature fusion as described in claim 2, characterized in that, S2 includes: S21. Edge cropping: First, an edge detection algorithm is applied to the image to determine the outer boundary of the device, providing a contour basis for cropping; second, by using the topological relationship of pixels in the image, that is, the connectivity information of edge pixels, neighboring edge points are connected to form a contour, forming a boundary loop; finally, cropping is completed based on the loop, removing the background except for the device. S22. Image Registration: Scale-invariant feature transform is used to extract key points in the image at different scales to complete the registration; a Gaussian kernel G(x,y,σ) is used to generate the multi-scale space. Assuming the image is represented as f(x,y), then the image sets with different scale spaces constructed according to different values of σ are as follows: L(x,y,σ)=G(x,y,σ)*f(x,y) First, the DOG function is used to detect local extrema based on L(x,y,σ) to obtain extrema points. Second, Taylor expansion fitting is used to find the sub-pixel-level precise location and scale of the extrema points, and low-contrast points are removed. Then, the Hessian matrix is used to identify and remove unstable points located at the edges. Finally, after obtaining a set of unique, stable, and repeatable keypoints, gradient and orientation distribution features are used to generate rotation-invariant descriptor vectors for the keypoints of the two images, find the nearest neighbor matching pair, and estimate the optimal spatial transformation parameters to complete image registration. The gradient and orientation distribution characteristics of key points can be expressed as follows: θ(x,y)=tan -1 (((L(x,y+1)-L(x,y-1)) / (L(x+1,y)-L(x-1,y))) 4. The equipment surface defect detection method based on multi-dimensional feature fusion as described in claim 2, characterized in that, S22 includes: using the DOG function to detect local extrema according to L(x,y,σ), assuming that a certain point is the maximum or minimum value of its 26 neighboring points, then marking it as an extremum point; interpolating the Taylor second-order expansion of the extremum point, if the absolute value is too small, it is considered to have low contrast and is removed; evaluating the curvature of the remaining extremum points using the Hessian matrix, if the curvature is too large, it is considered to be on the edge and is removed, finally obtaining the key points.
5. The equipment surface defect detection method based on multi-dimensional feature fusion as described in claim 3, characterized in that, S3 includes: S31. Image filtering: While maintaining a high degree of image matching, reduce the total variation of the image to remove irrelevant information and retain important details; S32. Image segmentation: Based on the target size, calculate the number of blocks that the image can be divided into in the horizontal and vertical directions. By traversing, determine the position of each block in the four directions of left, right, top, and bottom. Crop the normal and the image to be inspected from the comparison device images respectively and store them in the specified folders to generate two sets of segmented image sets for similarity measurement.
6. The equipment surface defect detection method based on multi-dimensional feature fusion as described in claim 3, characterized in that, S31 includes: assuming the domain of the image is Ω, the total variation of the image is defined as... in Representing the image gradient, total variation filtering minimizes... Implementation, in which This is the filtered image, where λ controls the balance between smoothing and detail preservation.
7. The equipment surface defect detection method based on multi-dimensional feature fusion as described in claim 3, characterized in that, S32 includes: assuming If the width and height are w and h respectively, and the target block size is b, then the number of blocks that the image can be divided into horizontally is . The number of blocks that can be divided vertically is The number of images generated after dividing the two comparison images into blocks is 2×m×n.
8. The equipment surface defect detection method based on multi-dimensional feature fusion as described in claim 4, characterized in that, S4 includes: S41, Color Features: Traverse and read the color value of each pixel in the image, count the number of pixels with different color values in the color gamut of the entire image, and form a color histogram; S42. Texture Features: Calculate the displacement vector (dx, dy) based on the distance parameter a and the direction parameter θ; calculate the gray value g1 for each pixel (x, y) in the image, find the corresponding pixel (x+dx, y+dy) and calculate its gray value g2, use (g1, g2) as a gray value pair, count the number of times it appears in the entire image, construct a gray-level co-occurrence matrix based on the statistical results, and further calculate contrast, homogeneity, and energy features; S43. Shape Features: Local Binary Pattern (LCB) is a feature operator that describes the local shape of an image and is used to extract the shape features of the device. Before extracting the shape features, histogram equalization is required to improve image contrast and feature robustness. The LCB operator is defined as a 3×3 square window. The center pixel of the window is used as a threshold. The values of its 8 neighboring pixels are compared with the center pixel. If the value is less than the center pixel value, it is set to 0; otherwise, it is set to 1. The operation is performed on the entire image to obtain the shape features based on the LCB. S44. Frequency Domain Features: Extracting the Fourier amplitude spectrum of an image using Fourier transform; assuming the image has width and height w and height h respectively, f(x,y), then the Fourier transform is expressed as... The amplitude of the spectrum is expressed as Where R(u,v) and I(u,v) are the real and imaginary parts of the spectrum, respectively.
9. The method for detecting surface defects of equipment based on multi-dimensional feature fusion as described in claim 5, characterized in that, S5 includes: S51. Defect Detection: When the Euclidean distance between a certain feature and the normal image and the image under test exceeds the abnormal threshold, the image under test is considered to have an abnormal risk under that feature; the comparison results of the Euclidean distance of all features and the corresponding threshold are fused, and the final defect detection result of the image is determined by voting. S52. Anomaly localization: Perform defect detection on all image blocks and record the image blocks with defects; based on the image content, use template matching to locate the position of the image block in the image to be inspected and mark it.
10. The method for detecting surface defects of equipment based on multi-dimensional feature fusion as described in claim 5, characterized in that, S51 includes: assuming the multidimensional feature extracted from the normal segmented image is F, and the multidimensional feature extracted from the segmented image to be inspected is F', the Euclidean distance between them is expressed as... Pre-set the corresponding threshold as T = {T1, T2, ..., T} N }, where N is the number of features, then the Euclidean distance of the multidimensional features, after comparison with the threshold, is expressed as: The voting mechanism is represented as Finally, based on the voting results v re and the preset decision threshold V th To determine the detection results after fusion