Special equipment defect automatic identification method and system
By analyzing the image grayscale gradient and direction continuity, combining local grayscale consistency and edge direction stability, removing brightness mutation points and generating target defect area tiles, high-precision identification and stable classification of surface defects of special equipment are achieved, and the problems of incomplete extraction of defect edge contours and insufficient fusion of multi-dimensional parameters in the prior art are solved.
Patent Information
- Application Number
- CN202510581699.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the detection of image recognition defects, due to the limitation of image noise interference and increased texture complexity, the defect edge profile is incomplete, and the local grayscale difference in image is difficult to accurately present, especially when the metal surface reflective interference decreases recognition stability, and lacks the ability to fusion analysis of multi-dimensional parameters, making it difficult to accurately identify defect types with blurred boundaries or complex structures, which affects subsequent operation and maintenance and safety judgment accuracy and timeliness.
By extracting the difference between the grayscale gradient of the image pixel and the adjacent points, marking the gradient change path of direction continuity, identifying the linear connectivity intensity of the pixels in the boundary set, combining local grayscale consistency and edge gradient direction stability, removing brightness mutation points, generating target defect area tiles, matching classification labels based on the difference value, forming a defect type discrimination data set, and fusing multi-dimensional image attributes for classification.
It improves the accurate extraction ability of defect profiles, ensures the integrity of the overall defect morphology expression, realizes continuous recovery of micro-crack areas, accurately determines defect types and matches spatial locations, improves the fine-grainedness and spatial correlation of classification, and ensures traceability and partition consistency of identification results.
Smart Images

Figure CN120495756A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect detection, and in particular to a method and system for automatically identifying defects of special equipment. Background Art
[0002] The field of defect detection technology encompasses the means and methods for identifying and classifying surface or internal defects in material structures. It is widely used in multiple industries, including industrial manufacturing, safety monitoring, and equipment maintenance. The core of this technology lies in the accurate identification and qualitative analysis of different types of defects through image acquisition, feature extraction, and image analysis. Current defect detection technology can be divided into categories such as non-destructive testing, image recognition testing, and sensor monitoring, based on the detection method. Image recognition testing, as one of the mainstream methods, uses machine vision and image processing to identify and locate typical defects such as cracks, corrosion, and pits. Development efforts in this field focus on improving recognition accuracy, expanding the scope of application, and optimizing detection processes, enabling comprehensive testing of various structural components and operating equipment.
[0003] Among them, the automatic identification method of special equipment defects refers to a method of obtaining surface images of special equipment based on image acquisition equipment, building a defect feature database, comparing and analyzing the images, and then determining whether there are specific defect types in the images. This patent subject is aimed at surface defects such as cracks, peeling, rust, etc. that may occur during the operation of special equipment. It uses image processing methods such as image acquisition, grayscale conversion, edge extraction, and texture analysis to perform feature identification, and determines the defect attributes and classification by setting defect standards and comparing the results with samples. The method analyzes local texture changes based on the image grayscale co-occurrence matrix, and realizes automatic identification and classification of defect areas through statistical discrimination methods.
[0004] Existing technologies for image recognition-based defect detection rely on basic processing methods for static image grayscale features and edge contour extraction. Limited by image noise interference and increased texture complexity, these methods can easily lead to incomplete defect edge contour extraction and difficulty accurately representing local grayscale differences in the image. Common brightness changes or high-contrast areas in images are not effectively filtered, which can easily lead to misidentification of defect areas. This is especially true when reflective interference exists on metal surfaces, significantly reducing recognition stability. The connectivity of defect areas is not considered for the spatial structural characteristics of isolated pixels and small voids, preventing the formation of a closed representation of tiny cracks and edge starting points, resulting in a high risk of omissions. At the classification processing level, existing methods primarily rely on single image attribute comparisons and lack the ability to perform multi-dimensional parameter fusion analysis. This makes it difficult to accurately identify defects with blurred boundaries or complex structures. For example, in the crane hook area, where image textures are complex and edge features change frequently, existing recognition methods struggle to construct accurate spatial difference mapping models, which can easily lead to misclassification or missed annotations, impacting the accuracy and timeliness of subsequent operations and safety assessments. Summary of the Invention
[0005] In order to solve the problem that the existing technology relies on the basic processing means of static image grayscale features and edge contour extraction in the process of image recognition defect detection, which is limited by image noise interference and increased texture complexity, it is easy to cause incomplete defect edge contour extraction and difficulty in accurately presenting local grayscale differences in the image. Common brightness mutations or high-contrast areas in the image are not effectively filtered, which can easily lead to misidentification of defect areas. Especially when there is reflective interference on the metal surface, the recognition stability is significantly reduced. In terms of connectivity processing of defect areas, the spatial structural characteristics of isolated pixels and small voids are not considered, resulting in the inability to form a closed expression of tiny cracks and edge starting points, and the risk of omission is high. At the classification processing level, the existing methods mainly rely on single image attributes for comparison, lack the ability of multi-dimensional parameter fusion analysis, and are difficult to accurately identify defect types with fuzzy boundaries or complex structures. Specifically, in the crane hook area, the image texture is complex and the edge features change frequently. The existing recognition method is difficult to construct an accurate spatial difference mapping model, which can easily lead to misclassification or omission of annotation, affecting the accuracy and timeliness of subsequent operation and maintenance and safety judgment. The embodiment of the present invention provides a method and system for automatic identification of special equipment defects. The technical solution is as follows:
[0006] In one aspect, a method for automatically identifying defects of special equipment is provided, the method comprising:
[0007] S1: Based on the surface image of the crane metal boom section, the grayscale gradient of the image pixel and the grayscale difference of the adjacent points are extracted and compared, the gradient change path of directional continuity is marked, the linear connectivity strength of the pixels in the boundary set is identified, and the surface image contour recognition layer is obtained;
[0008] S2: Based on the surface image contour recognition layer, continuous pixel blocks within the contour are extracted, the local grayscale consistency and edge gradient directional stability of the wire rope joint image are analyzed, and a pixel set that meets the texture aggregation characteristics is determined as a growth basis. The adjacent area is expanded in the texture direction and brightness mutation points are eliminated to generate a target defect area block;
[0009] S3: Based on the target defect area block, mark the location set of void points and isolated points, apply morphological connection operation to the locations, merge adjacent small areas, remove fragments with an area below the background interference standard, and obtain a defect contour closed layer;
[0010] S4: Based on the target area data in the defect contour closed layer, the distribution characteristics of the crane hook suspension point area are compared, and predefined classification labels are matched according to the difference values. The spatial position and attribute characteristics are recorded to form a defect type discrimination data set.
[0011] As a further solution of the present invention, the surface image contour recognition layer includes boundary pixel distribution characteristics, grayscale gradient direction set, and connectivity weight parameters; the target defect area block includes texture consistency fragments, edge direction aggregation areas, and brightness anomaly rejection marks; the defect contour closure layer includes closed boundary structure, void connection path, and low interference area screening results; the defect type discrimination data set includes texture curvature feature values, edge density distribution parameters, and direction offset indicators.
[0012] As a further solution of the present invention, the step of identifying the surface image contour layer is specifically as follows:
[0013] S101: Based on the surface image of the crane metal boom section, extract the horizontal and vertical grayscale values of the pixels and the grayscale differences of adjacent pixels, calculate the gradients in both directions, determine the grayscale change intensity, and generate a set of pixel grayscale change intensity values;
[0014] S102: Based on the pixel grayscale change intensity value set, call the grayscale gradient direction of the pixel and its adjacent pixels, compare the gradient differences of consecutive pixels, identify monotonically changing pixel paths, record the path sequence and direction consistency, and generate a direction-preserving path intensity value set;
[0015] S103: calling the direction-preserving path strength value set, screening paths with consistent directions in image boundary pixels, judging and mapping them to the image space based on linear continuity, and obtaining a surface image contour recognition layer.
[0016] As a further solution of the present invention, the step of mapping the target defect area is specifically as follows:
[0017] S201: extracting continuous pixel blocks within the contour based on the surface image contour recognition layer, counting the grayscale differences between the pixels and adjacent pixels, and calculating and obtaining a grayscale consistency index within the contour;
[0018] S202: extracting edge gradient direction values within the region based on the grayscale consistency index within the contour, comparing gradient direction differences between adjacent pixels, determining a variation range, and generating an edge direction stability interval;
[0019] S203: calling the edge direction stability interval, screening pixels whose edge direction difference meets the texture aggregation threshold, merging and detecting local direction concentration by region, determining the direction concentration region as the expandable region, and generating a texture direction expansion primitive coordinate set;
[0020] S204: Based on the texture direction extended primitive coordinate set, extract neighboring pixels and compare brightness change rates, remove pixels with brightness mutations exceeding a threshold, and then perform regional reconstruction to obtain a target defect area block.
[0021] As a further solution of the present invention, the step of closing the defect contour layer is specifically as follows:
[0022] S301: extracting pixels with low grayscale differences based on the target defect area image block, marking coordinates without neighborhood connectivity, performing morphological connection on a set of points whose adjacent distance is less than a connection threshold, and obtaining the number of hollow connection areas;
[0023] S302: Call the number of the hole connection areas, screen the area values, remove the areas smaller than the background interference area threshold, merge the connected blocks connected by the boundaries, reconstruct the boundaries of the merged areas and generate closed contours to obtain a defect contour closed layer.
[0024] As a further solution of the present invention, the step of identifying the defect type data set is specifically as follows:
[0025] S401: calling the target area in the defect contour closed layer, extracting the grayscale direction change in the grid, calculating the texture curvature range of each block, and obtaining the texture curvature dispersion;
[0026] S402: Extracting the boundary pixel density and the directional offset angle of the continuous edge segment based on the texture curvature dispersion, calculating the difference with the similar structure in the hook hanging point area, identifying the directional offset, edge density and structural morphology differences, and summarizing them into feature difference items to obtain the target area structural difference data;
[0027] S403: calling the target area structure difference data, matching the difference with the classification label discrimination threshold, recording the spatial coordinates and corresponding labels of the area that meets the conditions, and obtaining a defect type discrimination data set.
[0028] As a further solution of the present invention, the difference in the directional offset angles of the continuous edge segments is calculated using the formula:
[0029]
[0030] Among them, θ represents the difference in the offset angle of the continuous edge segment direction, D i Represents the real-time direction angle value of the i-th continuous edge segment, E i represents the reference direction angle value of the hook hanging point area of the i-th continuous edge segment, K i represents the texture curvature weighting coefficient of the i-th continuous edge segment, ρ represents the boundary pixel density of the target area, σ represents the standard deviation of the texture curvature dispersion of the target area, δ represents the mean of the texture curvature dispersion of the target area, and n represents the total number of continuous edge segments.
[0031] As a further solution of the present invention, the method further includes S5:
[0032] S5: Based on the defect type discrimination dataset, extract the texture coding sequence of each type of defect area, perform similarity clustering on the coding sequence and assign a unified label number, identify the mapping relationship between the type index and the spatial area, and output the device defect classification and partition identification label set;
[0033] The equipment defect classification and partitioning identification tag set includes a unified type code, a space mapping index, and a classification area identifier.
[0034] As a further solution of the present invention, the steps of classifying and partitioning equipment defects and identifying label sets are specifically as follows:
[0035] S501: Based on the defect type discrimination data set, extract the texture grayscale coding value of each type of defect area, unify the sequence length and standardize the direction arrangement, and obtain a defect texture coding sequence set;
[0036] S502: Based on the defect texture coding sequence set, identify the grayscale change position difference between sequences, construct a deviation matrix and perform clustering, assign numbers to groups, associate type labels with spatial positions, and obtain a defect type cluster number mapping table;
[0037] S503: calling the defect type cluster number mapping table, extracting defect area boundaries and label indexes according to numbers, sorting out the relationship between numbers and coordinates and recording type identifiers, and obtaining a device defect classification and partition identification label set.
[0038] On the other hand, an electric vehicle state monitoring system is provided, wherein the electric vehicle state monitoring system is used to execute the above electric vehicle state monitoring method, and the system includes:
[0039] The image gradient extraction module extracts the gradient difference of pixel grayscale values based on the surface image of the crane's metal boom section. It calculates the absolute value of the grayscale difference between adjacent pixels and the gradient direction consistency score. It then filters continuous paths and counts the pixel sets whose direction change rate is less than a threshold. It locates the boundary distribution of the pixel sets in the original image and constructs a boundary layer for the hook structure.
[0040] The texture region recognition module extracts the standard deviation of pixel intensity, directional angle fluctuation, and density distribution coefficient within the closed area based on the hook structure boundary layer, determines the pixel area that meets the surface texture characteristics of the wire rope, marks the dense segments with consistent directions within the edge, eliminates the light intensity mutation points, and constructs the wire rope texture aggregation block;
[0041] The defect layer generation module locates discontinuous points and isolated strong edge pixels based on the wire rope texture clustering blocks, performs area filling according to point spacing and connectivity, connects broken areas, removes fragments smaller than the interference threshold, merges residual edge graphics, and generates a special equipment defect contour layer;
[0042] The feature comparison and analysis module extracts the regional boundary curvature, structural density and directional deviation angle based on the defect contour layer of the special equipment, calls the standard working condition hook texture parameter library, compares the deviation amplitude of the characteristic value, marks the abnormal area and standard deviation distribution, and constructs the defect comparison feature set of the key parts of the hook;
[0043] The defect type classification module extracts the regional grayscale texture coding index based on the defect comparison feature set of the key parts of the hook, identifies the structural similarity, groups the coding according to the similarity, establishes the correspondence between the label and the layer coordinate, and outputs the special equipment defect positioning classification label set.
[0044] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0045] By contrasting the grayscale gradients of metal arm images and analyzing the trajectory of directional continuity changes, the system enhances the perception of linear boundary structures and the reliability of identifying subtle structures in the image. Combining grayscale consistency and edge directional stability within the image contour area, the system automatically expands and identifies image regions with clustered texture features. By eliminating brightness mutation points, the system reduces the misleading effects of high-contrast interference on target area identification, improving the ability to accurately extract defect contours. When performing structural connection and noise removal on defect target blocks, the system focuses on the morphological evolution of isolated and void pixels, restoring the continuity of tiny crack areas and accurately eliminating pseudo-defects, ensuring the integrity of the overall defect morphology and minimizing interference. By integrating multi-dimensional image attributes such as texture curvature, edge density and directional offset, the difference comparison between the key parts and regional image features of the hook can be achieved, the defect type can be accurately determined and the corresponding spatial position can be matched, and the fine-grainedness and spatial correlation of the classification can be effectively improved. The defect type boundaries are divided by clustering the similarity of the texture coding sequence, and the unified label numbering ensures the traceability and partition consistency of the recognition results. The entire image processing process has achieved substantial improvements in many aspects such as accuracy, efficiency and regional mapping rationality, meeting the needs of high-precision recognition and stable classification of surface defects of special equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a schematic diagram of the workflow of the present invention;
[0047] Figure 2 This is a detailed flow chart of S1 of the present invention;
[0048] Figure 3 This is a detailed flow chart of S2 of the present invention;
[0049] Figure 4 This is a detailed flow chart of S3 of the present invention;
[0050] Figure 5 This is a detailed flow chart of S4 of the present invention;
[0051] Figure 6 This is a detailed flow chart of S5 of the present invention;
[0052] Figure 7 It is a system flow chart of the present invention. DETAILED DESCRIPTION
[0053] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0054] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as an "exemplary" in the present invention should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete manner. Furthermore, in the embodiments of the present invention, "and / or" can mean both or either of the two.
[0055] In the embodiments of the present invention, the terms "image" and "picture" may be used interchangeably. It should be noted that, when the distinction between them is not emphasized, their intended meanings are the same. The terms "of," "corresponding," and "corresponding" may be used interchangeably. It should be noted that, when the distinction between them is not emphasized, their intended meanings are the same.
[0056] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are the same.
[0057] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0058] See also Figure 1 The embodiment of the present invention provides a method for automatically identifying defects of special equipment. The processing flow of the method may include the following steps:
[0059] S1: Based on the surface image of the crane metal boom section, the grayscale gradient of the image pixel and the grayscale difference of the adjacent points are extracted and compared, the gradient change path of directional continuity is marked, the linear connectivity strength of the pixels in the boundary set is identified, and the surface image contour recognition layer is obtained;
[0060] S2: Based on the surface image contour recognition layer, continuous pixel blocks within the contour are extracted, and the local grayscale consistency and edge gradient directional stability of the wire rope joint image are analyzed. The pixel set that meets the texture aggregation characteristics is determined as the growth basis. The adjacent area is expanded along the texture direction and the brightness mutation points are eliminated to generate the target defect area block;
[0061] S3: Based on the target defect area block, mark the location set of void points and isolated points, apply morphological connection operation to the location, merge adjacent small areas, remove fragments with an area below the background interference standard, and obtain the defect contour closed layer;
[0062] S4: Call the texture curvature, edge shape density, and direction deviation of the target area in the defect contour closed layer, compare the distribution characteristics of the crane hook hanging point area, match the predefined classification labels based on the difference values, record the spatial position and attribute characteristics, and form a defect type discrimination dataset;
[0063] S5: Based on the defect type discrimination dataset, extract the texture coding sequence of each type of defect area, perform similarity clustering on the coding sequence and assign a unified label number, identify the mapping relationship between the type index and the spatial area, and output the device defect classification and partition identification label set.
[0064] The surface image contour recognition layer includes boundary pixel distribution characteristics, grayscale gradient direction set, and connectivity weight parameters. The target defect area block includes texture consistency fragments, edge direction aggregation areas, and brightness anomaly rejection marks. The defect contour closure layer includes closed boundary structure, void connection path, and low-interference area screening results. The defect type discrimination data set includes texture curvature feature values, edge density distribution parameters, and direction offset indicators. The equipment defect classification and partitioning identification label set includes unified type coding, spatial mapping index, and classification area identifier.
[0065] Specifically, if Figure 2 As shown in the figure, the steps of surface image contour recognition layer are as follows:
[0066] S101: Based on the surface image of the crane metal boom section, extract the horizontal and vertical grayscale values of the pixels and the grayscale differences of adjacent pixels, calculate the gradients in both directions, determine the grayscale change intensity, and generate a set of pixel grayscale change intensity values;
[0067] Extracting pixel grayscale values from an image involves performing horizontal and vertical grayscale extraction on each pixel to obtain the grayscale value. This process also involves calculating the grayscale difference between each pixel and its neighbors. This process can be accomplished by traversing each pixel in the image and comparing it with its neighboring pixels. For each pixel in the image, the grayscale difference between the four adjacent pixels above, below, and to the left and right of the pixel is calculated. This difference is used to measure the grayscale change in the image. The gradients in both directions—the horizontal and vertical gradients—are calculated by approximating the gradient change using the grayscale differences between adjacent pixels. For example, if a point has a grayscale value of G and the pixel to its right has a grayscale value of Gr, the horizontal gradient can be calculated as Gr - G. The vertical gradient is calculated similarly, comparing the pixels above and below. Using the gradient values, the intensity of the grayscale change for each pixel can be obtained, forming a set containing grayscale change information for each location in the image. This set serves as the basis for further processing, resulting in a set of pixel grayscale change intensity values, providing the necessary data support for path recognition in the next step.
[0068] S102: Based on the pixel grayscale change intensity value set, call the grayscale gradient direction of the pixel and its neighboring pixels, compare the gradient differences of consecutive pixels, identify the monotonically changing pixel path, record the path sequence and direction consistency, and generate a direction-preserving path intensity value set;
[0069] For each pixel in the image, the gradient values of its adjacent pixels are compared with the gradient value of the pixel, and the difference between the two is calculated. If the difference is small, it indicates that the grayscale change direction of the pixel and the adjacent pixels is relatively consistent. In this way, pixel paths in the image with relatively monotonous grayscale changes can be identified, indicating that the paths have strong directional consistency. In specific implementation, a difference threshold is first set, such as 0.1. When the gradient difference between consecutive pixels is less than this threshold, the grayscale change direction between the two pixels is considered to be consistent, forming a monotonically changing path. The intensity value set of this path is composed of the intensity values of the pixel paths with consistent direction. The path strength is determined based on the grayscale change intensity of each pixel in the path. The calculation method can be the average or weighted average of the grayscale change intensity of all pixels in the path. For example, if there are multiple pixels on the path, and the grayscale change intensity is 10, 15, and 20 respectively, the path strength can be calculated as (10 + 15 + 20) / 3 = 15. In this way, a set of direction-preserving path strength values can be obtained, which provides support for subsequent screening and analysis.
[0070] S103: calling the direction-preserving path strength value set, screening the paths with consistent directions in the image boundary pixels, judging and mapping them to the image space based on linear continuity, and obtaining the surface image contour recognition layer;
[0071] Linear continuity is determined for each path. This refers to checking whether the pixels on the path are continuously distributed along a certain direction. Methods such as calculating inter-pixel distances and directional deviations can be used to determine linear continuity. When the pixels on the path exhibit strong spatial continuity, the path is considered to have high linear continuity. For each candidate path, its directional consistency must first be determined, i.e., whether the grayscale gradient directions of all pixels on the path are consistent. If they are, the linear continuity determination is continued. After the determination is complete, the paths that meet the criteria are mapped into the image space to obtain a surface image contour recognition layer. During implementation, the path mapping can use a coordinate transformation method to convert the coordinates of each pixel on the path into the actual image space, ultimately forming a contour layer.
[0072] Specifically, if Figure 3 As shown, the steps for the target defect area block are as follows:
[0073] S201: Based on the surface image contour recognition layer, extract continuous pixel blocks within the contour, count the grayscale differences between the pixel and the adjacent pixels, and calculate the grayscale consistency index within the contour;
[0074] First, extract the continuous pixel blocks within the contour, group the pixels of the contour area in the image, and determine the range of each continuous pixel block. The definition of a continuous pixel block refers to a set of pixels that are adjacent to each other in space and have relatively consistent changes in grayscale values. For each continuous pixel block, count the grayscale difference between the pixel and the adjacent pixels, and calculate the difference by comparing the grayscale values of each pixel with its adjacent pixels one by one. If the difference is small, it means that the grayscale change is relatively consistent. If the difference is large, it means that the grayscale has changed significantly. By calculating the statistical characteristics of the grayscale difference, such as the average difference and variance, the grayscale consistency index within the contour is obtained. The role of the grayscale consistency index is to measure the smoothness of the grayscale change in the area. Specifically, the grayscale consistency score of the area can be calculated by averaging the grayscale difference of each pixel. If the score is high, it means that the grayscale change in the area is relatively smooth. Otherwise, it means that there is a large grayscale fluctuation in the area.
[0075] S202: extracting edge gradient direction values within the region based on the grayscale consistency index within the contour, comparing gradient direction differences between adjacent pixels, determining the variation range, and generating an edge direction stability interval;
[0076] For each pixel in the contour area, calculate its gradient value and obtain the gradient direction. The gradient direction can be calculated by comparing the grayscale values of each pixel and its neighboring pixels, and then calculating the direction of the gradient value. The direction of grayscale change of each pixel can be determined, and then the distribution of the edge gradient direction can be obtained. Compare the gradient direction differences between adjacent pixels. Specifically, for each pair of adjacent pixels, calculate the gradient direction difference. If the difference is small, it means that the edge change in the area is relatively stable. If the difference is large, it means that the edge has changed significantly. Based on the gradient difference, further determine the range of change. The range of change refers to the difference between the maximum and minimum values of the gradient direction difference. The smaller this range, the smoother the edge change. By calculating the range of change, generate an edge direction stability interval. This interval is used to define the edge direction within this interval as a stable edge. The stable edge direction can provide guidance for further texture analysis and region recognition.
[0077] S203: calling the edge direction stability interval, screening pixels whose edge direction difference meets the texture aggregation threshold, merging and detecting the local direction concentration by region, determining the direction concentration region as the expandable region, and generating a texture direction expansion primitive coordinate set;
[0078] By comparing the gradient direction difference between each pixel and its neighboring pixels, if the difference is less than the preset texture aggregation threshold, the pixel is considered to belong to the texture aggregation area. A threshold range is set (for example, 0.05). When the gradient direction difference between adjacent pixels is less than 0.05, the pixel is considered to have strong texture consistency and can be classified into the same area. The pixels are merged by area. The basis for merging is that the gradient direction difference between adjacent pixels is less than the threshold and the pixels are close to each other in space. The local direction concentration of the merged area is detected, that is, whether the gradient direction of all pixels in the area tends to a specific direction. If the gradient direction in the area is highly consistent, it means that the area has a high direction concentration and belongs to an expandable area. Based on the area with high direction concentration, a texture direction extension primitive coordinate set is generated. The coordinate set represents the area where the texture direction is extended, thereby providing an effective basis for the identification and extraction of defect areas.
[0079] S204: Based on the texture direction expansion primitive coordinate set, extract neighboring pixels and compare the brightness change rate, remove pixels with brightness mutation exceeding the threshold, and then perform regional reconstruction to obtain the target defect area block;
[0080] For each extended primitive coordinate, the grayscale values of the pixels in its surrounding neighborhood are obtained and the rate of change of its brightness is calculated. The rate of change of brightness refers to the speed at which the grayscale value of a pixel changes within a certain distance. If the rate of change of brightness in a certain neighborhood exceeds a preset threshold, it is considered that there is an obvious brightness mutation in the area and the pixel needs to be removed. For example, a brightness mutation threshold is set to 10. If the brightness difference between a pixel and the pixels in its neighborhood is greater than 10, the pixel is considered to be a mutation pixel and needs to be removed. After removing the mutation pixels, regional reconstruction is performed on the remaining pixels, that is, the pixels are reorganized to form new regional blocks. The process of regional reconstruction is carried out by reconstructing the grayscale values and spatial positions of the neighboring pixels. The obtained blocks can more accurately represent the target defect area, and finally the target defect area blocks can be obtained. The regional blocks serve as candidate areas for the defect area and provide a basis for subsequent defect analysis and processing.
[0081] Specifically, if Figure 4 As shown in the figure, the steps for closing the defect contour layer are as follows:
[0082] S301: Extract pixels with low grayscale differences based on the target defect area image block, mark the coordinates without neighborhood connectivity, perform morphological connection on the set of points whose adjacent distance is less than the connection threshold, and obtain the number of hollow connection areas;
[0083] Through the threshold-based grayscale segmentation method or region growing method, after obtaining the defect area, the pixels with low grayscale differences are further extracted. Pixels with low grayscale differences indicate that the texture changes in the area are not obvious, and it is a flat or uniform area. For pixel points, the coordinates marked as having no neighborhood connectivity relationship indicate that the pixel has no direct adjacency relationship with the surrounding pixels, that is, it is isolated. It is necessary to identify the distance between isolated points and calculate whether they belong to the same void area. If the adjacent distance of the point is less than the preset connection threshold (the threshold can be set experimentally, for example, the threshold is set to 3 pixels), morphological connection will be performed, and the points will be merged into a connected area through morphological connection operations (such as corrosion or expansion operations). After the connection, the number of void connected areas can be determined, and the number of void connected areas can be obtained.
[0084] S302: Call the number of hole connection areas, filter the area values, remove areas smaller than the background interference area threshold, merge the connected blocks with connected boundaries, reconstruct the boundaries of the merged areas and generate closed contours to obtain a defect contour closed layer;
[0085] The number of connected void regions calculated previously is called. The sizes of the regions vary. In order to ensure the accuracy of the analysis results, the regions are screened for area values. The area of each region can be obtained by calculating the number of pixels in the region, which can be achieved by directly calculating the number of pixels in the region. If the area of a region is smaller than the set background interference area threshold (for example, a region with an area of less than 50 pixels is considered noise), the region will be eliminated. This is to exclude small regions that are not actual defects. Small regions are caused by image noise or background interference. The remaining regions are processed and those connected blocks with connected boundaries are merged. The merging process is carried out by checking the intersection of the boundaries of each region. If the boundaries of two regions touch or are very close, and the distance is less than a set threshold (such as 1 pixel), the two regions will be merged into one region. The merged region will reconstruct the boundaries, which involves smoothing and optimizing the contours of the merged region to ensure the continuity and accuracy of the boundaries. Through the closed contour generation operation, a defect contour closed layer is obtained, which contains the boundary contours of all merged and reconstructed defect regions.
[0086] Specifically, if Figure 5 As shown in the figure, the steps for defect type discrimination dataset are as follows:
[0087] S401: Call the target area in the defect contour closed layer, extract the grayscale direction change in the grid, calculate the texture curvature range of each block, and obtain the texture curvature dispersion;
[0088] The target region is extracted. This refers to the defective portion of the image. Image segmentation techniques are used to identify and locate the defective region. Defective regions are extracted by performing edge detection (e.g., the Canny edge detection algorithm) or region growing-based methods. After extraction, the region is meshed into multiple smaller grid cells. Within each grid cell, the directional change in grayscale is analyzed by calculating the grayscale value change of adjacent pixels. For each grid cell, the grayscale gradient within the grid cell is first calculated (e.g., using the Sobel operator). By calculating the grayscale value change of each pixel, local directional change information is obtained. Based on the grayscale gradient, texture curvature is further calculated. This relies on curvature calculation methods in image processing, such as algorithms based on local surface fitting to extract texture curvature. Texture curvature is an important parameter that describes the rate of change of an image surface. Its calculation is based on the relationship between the grayscale value of each pixel in the image and its neighboring pixels. By calculating the texture curvature of each block within the grid, the discrepancy of the texture curvature can be obtained, that is, the curvature difference between each grid block. A higher discrepancy value indicates greater texture variation, which is of great significance in defect recognition.
[0089] S402: Based on the texture curvature dispersion, the boundary pixel density is extracted, the directional offset angle difference values of the continuous edge segments are calculated, the difference with the similar structure in the hook hanging point area is analyzed, the directional offset, edge density and structural morphology differences are identified, and the differences are summarized as feature difference items to obtain the target area structure difference data;
[0090] The difference in the offset angles of consecutive edge segments is calculated using the formula:
[0091]
[0092] Among them, θ represents the difference in the offset angle of the continuous edge segment direction, D i Represents the real-time direction angle value of the i-th continuous edge segment, E i represents the reference direction angle value of the hook hanging point area of the i-th continuous edge segment, K i represents the texture curvature weighting coefficient of the i-th continuous edge segment, ρ represents the boundary pixel density of the target area, σ represents the standard deviation of the texture curvature dispersion of the target area, δ represents the mean of the texture curvature dispersion of the target area, and n represents the total number of continuous edge segments;
[0093] This formula is designed to calculate the difference in the directional offset angles of consecutive edge segments to evaluate the structural differences between the target area and the reference area. The parameter D i is the actual direction angle value of the i-th continuous edge segment, E i is the reference direction angle value of the hook hanging point area. The angle value needs to be obtained by monitoring the actual direction of the continuous edge segment in real time through the angle sensor. K iis the texture curvature weighting coefficient, which needs to be assigned after analyzing the curvature of the edge texture based on image analysis software. n is the total number of continuous edge segments, which is obtained by automatic identification and counting through image processing algorithms.
[0094] E i and D i The value of varies from 0° to 360°. The specific value is recorded by the actual monitoring equipment. For example, assuming E i =150°, and five consecutive edge segments D i The angles are 152°, 147°, 149°, 154°, and 151° respectively;
[0095] Texture curvature weighting coefficient K i It can be determined by calculating the curvature change of each edge segment, which is achieved by edge detection and curvature calculation software, assuming K i =0.8, this value reflects the importance of edge curvature in image processing. A higher K value means that the curvature change has a greater impact on the overall direction deviation;
[0096] ρ is the boundary pixel density of the target area, which is calculated by image analysis software and represents the number of boundary pixels per unit area. Assume that the number of boundary pixels in a standardized area is 300 pixels;
[0097] σ is the standard deviation of the texture curvature dispersion, and δ is the mean of the texture curvature dispersion. Both are obtained from a series of samples by statistical analysis method. Assume that σ = 0.05 and δ = 0.02;
[0098] Substituting all parameters into the formula, the calculation process is as follows:
[0099] Calculate each (D i -E i ) and multiply by K i :
[0100] (152-150)·0.8=1.6;
[0101] (147-150)·0.8=-2.4;
[0102] (149-150)·0.8=-0.8;
[0103] (154-150)·0.8=3.2;
[0104] (151-150)·0.8=0.8;
[0105] The sum is: 1.6 + (-2.4) + (-0.8) + 3.2 + 0.8 = 2.4;
[0106] Substitute into the formula to calculate θ:
[0107] The results show that the difference in the directional offset angles of consecutive edge segments is 0.0198 degrees, which means that there is a slight deviation between the actual measured edge direction and the reference direction. This difference reflects the structural comparison between the target area and the hook hanging point area, which is used for further quality inspection or adjustment measures.
[0108] S403: Calling the target area structure difference data, matching the difference with the classification label discrimination threshold, recording the spatial coordinates and corresponding labels of the areas that meet the conditions, and obtaining the defect type discrimination data set;
[0109] By extracting the structural difference data, the feature difference items of each area are calculated and compared with the pre-set classification label discrimination threshold. The threshold is set according to historical data and empirical knowledge to set a difference range. When the structural difference of a certain area is greater than a certain threshold, it is considered that there is a defect in the area. The difference calculation is to compare the difference between the feature data of the target area and the known standard or sample data. Common calculation methods include Euclidean distance or Manhattan distance. After matching, for areas that meet the conditions, the spatial coordinates of the area and its corresponding label (for example, defect type label) will be recorded. By aggregating the data of multiple areas that meet the conditions, a defect type discrimination dataset is obtained. This dataset can be used as a training sample and further used in machine learning algorithms to help improve the accuracy of defect detection.
[0110] Specifically, if Figure 6 As shown in Figure 2, the steps for classifying and partitioning equipment defects and identifying label sets are as follows:
[0111] S501: Based on the defect type discrimination data set, extract the texture grayscale coding value of each type of defect area, unify the sequence length and standardize the direction arrangement, and obtain the defect texture coding sequence set;
[0112] First, based on the defect type discrimination dataset, the texture of each defect region is analyzed. The texture grayscale encoding value is obtained by calculating the grayscale value within each region. To obtain the image grayscale information within the defect region, each pixel in the target region is traversed, its grayscale value is recorded, and then converted into a texture grayscale encoding according to certain rules. For texture grayscale encoding value extraction, a specific encoding value is assigned according to the grayscale level, for example, 0 represents black and 255 represents white. Intermediate values are obtained by linear mapping to obtain grayscale encoding. The extracted grayscale encoding values are then uniformly processed, which mainly includes two steps: first, unifying the sequence length, which can be handled by an interpolation algorithm, such as using linear interpolation or spline interpolation to adjust the sequence length; second, standardizing the directional arrangement, which involves arranging the texture within the region according to a certain standard direction, for example, by rotating it by calculating the main direction (such as the direction with the largest grayscale change) to make the texture arrangement more uniform. After these two steps, a set of defect texture encoding sequences is obtained, which is further used for subsequent defect classification and clustering.
[0113] S502: Based on the defect texture coding sequence set, identify the grayscale change position difference between sequences, construct a deviation matrix and perform clustering, assign numbers to groups, and associate type labels with spatial positions to obtain a defect type cluster number mapping table;
[0114] For each sequence in the defect texture coding sequence set, the grayscale position difference is calculated. The difference between adjacent coding values within each sequence is calculated. This difference is obtained by calculating the absolute difference between adjacent coding values. For each sequence, the grayscale position difference is calculated by calculating the difference between all adjacent coding values. This difference information is used to construct a deviation matrix. The deviation matrix can be considered a multidimensional matrix, where each element represents the difference between two sequences. Once the matrix is constructed, the sequences are grouped using cluster analysis. Common clustering methods include K-means clustering and hierarchical clustering. The goal of clustering is to group sequences with small differences. Each cluster group is assigned a number. The order of number assignment can be determined based on the intra-group difference in the clustering results. After clustering, each cluster group is associated with the type label and spatial location in the original data to ensure that the defect type and spatial location information of each cluster group are preserved. This information is then used to form a defect type cluster number mapping table, which records each cluster group number, the corresponding defect type label, and the spatial location within the group.
[0115] S503: Call the defect type cluster number mapping table, extract the defect area boundary and label index according to the number, organize the relationship between the number and coordinates and record the type identifier, and obtain the equipment defect classification and partition identification label set;
[0116] Through the numbering information in the table, each cluster group can be located, and the boundary of the defect area corresponding to the cluster group can be extracted according to the cluster number. The boundary is extracted by the edge detection algorithm. The boundary represents the outline of the defect area. It is necessary to associate the boundary information with the cluster number and extract the label index within each cluster group at the same time. The label index represents the type of defect in the cluster group. After obtaining the cluster number and label index, the relationship between the number and the coordinate is further sorted out, and the number of each defect area is matched with its spatial coordinates. The record of spatial coordinates is obtained by extracting the position of the defect area in the image. Common coordinate extraction methods include pixel coordinate method or world coordinate method based on image calibration. After sorting out the relationship between the number and the coordinate, the type identification, that is, the type label of each defect area, is recorded. This is determined by comparing the characteristics of the defect area with the known type label, and generating a device defect classification and partition identification label set. This label set provides detailed area information and type classification for subsequent equipment defect management and positioning.
[0117] like Figure 7 As shown, a special equipment defect automatic identification system includes:
[0118] The image gradient extraction module extracts the gradient difference of pixel grayscale values based on the surface image of the crane's metal boom section. It calculates the absolute value of the grayscale difference between adjacent pixels and the gradient direction consistency score. It then filters continuous paths and counts the pixel sets whose direction change rate is less than a threshold. It locates the boundary distribution of the pixel sets in the original image and constructs a boundary layer for the hook structure.
[0119] The texture region recognition module extracts the standard deviation of pixel intensity, directional angle fluctuation, and density distribution coefficient within the closed area based on the hook structure boundary layer. It determines the pixel area that meets the surface texture characteristics of the wire rope, marks the dense segments with consistent directions within the edge, eliminates the sudden change points of light intensity, and constructs the wire rope texture aggregation block.
[0120] The defect layer generation module aggregates the wire rope texture blocks, locates discontinuous points and isolated strong edge pixels, fills the area based on the point spacing and connectivity, connects the broken areas, removes fragments smaller than the interference threshold, merges the residual edge graphics, and generates the special equipment defect contour layer;
[0121] The feature comparison and analysis module extracts the regional boundary curvature, structural density, and directional deviation angle based on the special equipment defect contour layer. It calls the standard working condition hook texture parameter library, compares the deviation amplitude of the characteristic value, marks the abnormal area and standard deviation distribution, and constructs a comparative feature set of defects in key parts of the hook.
[0122] The defect type classification module is based on the defect comparison feature set of key parts of the hook, extracts the regional grayscale texture coding index, identifies the structural similarity, groups the codes according to the similarity, establishes the correspondence between the label and the layer coordinates, and outputs the special equipment defect location classification label set.
[0123] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for automatically identifying defects of special equipment, characterized in that: The following steps are involved: S1: Based on the surface image of the crane metal boom section, the grayscale gradient of the image pixels and the grayscale difference of adjacent points are extracted and compared, the gradient change path of directional continuity is marked, the linear connectivity strength of the pixels in the boundary set is identified, and the surface image contour recognition layer is obtained; S2: Based on the surface image contour recognition layer, continuous pixel blocks within the contour are extracted, the local grayscale consistency and edge gradient directional stability of the wire rope joint image are analyzed, and a pixel set that meets the texture aggregation characteristics is determined as a growth basis. The adjacent area is expanded in the texture direction and brightness mutation points are eliminated to generate a target defect area block; S3: Based on the target defect area block, mark the location set of void points and isolated points, apply morphological connection operation to the locations, merge adjacent small areas, remove fragments with an area below the background interference standard, and obtain a defect contour closed layer; S4: Based on the target area data in the defect contour closed layer, the distribution characteristics of the crane hook suspension point area are compared, and predefined classification labels are matched according to the difference values. The spatial position and attribute characteristics are recorded to form a defect type discrimination data set.
2. The method for automatically identifying defects of special equipment according to claim 1, characterized in that: The surface image contour recognition layer includes boundary pixel distribution characteristics, grayscale gradient direction set, and connectivity weight parameters. The target defect area block includes texture consistency fragments, edge direction aggregation areas, and brightness anomaly rejection marks. The defect contour closure layer includes closed boundary structure, void connection path, and low-interference area screening results. The defect type discrimination data set includes texture curvature feature values, edge density distribution parameters, and direction offset indicators.
3. The method for automatically identifying defects of special equipment according to claim 1, characterized in that: The steps of the surface image contour recognition layer are specifically as follows: S101: Based on the surface image of the crane metal boom section, extract the horizontal and vertical grayscale values of the pixels and the grayscale differences of adjacent pixels, calculate the gradients in both directions, determine the grayscale change intensity, and generate a set of pixel grayscale change intensity values; S102: Based on the pixel grayscale change intensity value set, call the grayscale gradient direction of the pixel and its adjacent pixels, compare the gradient differences of consecutive pixels, identify monotonically changing pixel paths, record the path sequence and direction consistency, and generate a direction-preserving path intensity value set; S103: calling the direction-preserving path strength value set, screening paths with consistent directions in image boundary pixels, judging and mapping them to the image space based on linear continuity, and obtaining a surface image contour recognition layer.
4. The method for automatically identifying defects of special equipment according to claim 3, characterized in that: The steps of the target defect area block are specifically as follows: S201: extracting continuous pixel blocks within the contour based on the surface image contour recognition layer, counting the grayscale differences between the pixels and adjacent pixels, and calculating and obtaining a grayscale consistency index within the contour; S202: extracting edge gradient direction values within the region based on the grayscale consistency index within the contour, comparing gradient direction differences between adjacent pixels, determining a variation range, and generating an edge direction stability interval; S203: calling the edge direction stability interval, screening pixels whose edge direction difference meets the texture aggregation threshold, merging and detecting local direction concentration by region, determining the direction concentration region as the expandable region, and generating a texture direction expansion primitive coordinate set; S204: Based on the texture direction extended primitive coordinate set, extract neighboring pixels and compare brightness change rates, remove pixels with brightness mutations exceeding a threshold, and then perform regional reconstruction to obtain a target defect area block.
5. The method for automatically identifying defects of special equipment according to claim 4, characterized in that: The steps of closing the defect contour layer are specifically as follows: S301: extracting pixels with low grayscale differences based on the target defect area image block, marking coordinates without neighborhood connectivity, performing morphological connection on a set of points whose adjacent distance is less than a connection threshold, and obtaining the number of hollow connection areas; S302: Call the number of the hole connection areas, screen the area values, remove the areas smaller than the background interference area threshold, merge the connected blocks connected by the boundaries, reconstruct the boundaries of the merged areas and generate closed contours to obtain a defect contour closed layer.
6. The method for automatically identifying defects of special equipment according to claim 5, characterized in that: The steps of the defect type discrimination data set are specifically as follows: S401: calling the target area in the defect contour closed layer, extracting the grayscale direction change in the grid, calculating the texture curvature range of each block, and obtaining the texture curvature dispersion; S402: Extracting the boundary pixel density and the directional offset angle of the continuous edge segment based on the texture curvature dispersion, calculating the difference with the similar structure in the hook hanging point area, identifying the directional offset, edge density and structural morphology differences, and summarizing them into feature difference items to obtain the target area structural difference data; S403: calling the target area structure difference data, matching the difference with the classification label discrimination threshold, recording the spatial coordinates and corresponding labels of the area that meets the conditions, and obtaining a defect type discrimination data set.
7. The method for automatically identifying defects of special equipment according to claim 6, characterized in that: The difference in the offset angles of the continuous edge segments is calculated using the formula: Among them, θ represents the difference in the offset angle of the continuous edge segment direction, D i Represents the real-time direction angle value of the i-th continuous edge segment, E i represents the reference direction angle value of the hook hanging point area of the i-th continuous edge segment, K i represents the texture curvature weighting coefficient of the i-th continuous edge segment, ρ represents the boundary pixel density of the target area, σ represents the standard deviation of the texture curvature dispersion of the target area, δ represents the mean of the texture curvature dispersion of the target area, and n represents the total number of continuous edge segments.
8. The method for automatically identifying defects of special equipment according to claim 1, characterized in that: The method also includes S5: S5: Based on the defect type discrimination dataset, extract the texture coding sequence of each type of defect area, perform similarity clustering on the coding sequence and assign a unified label number, identify the mapping relationship between the type index and the spatial area, and output the device defect classification and partition identification label set; The equipment defect classification and partitioning identification tag set includes a unified type code, a space mapping index, and a classification area identifier.
9. The method for automatically identifying defects of special equipment according to claim 8, characterized in that: The steps of classifying and partitioning equipment defects and identifying label sets are specifically as follows: S501: Based on the defect type discrimination data set, extract the texture grayscale coding value of each type of defect area, unify the sequence length and standardize the direction arrangement, and obtain a defect texture coding sequence set; S502: Based on the defect texture coding sequence set, identify the grayscale change position difference between sequences, construct a deviation matrix and perform clustering, assign numbers to groups, associate type labels with spatial positions, and obtain a defect type cluster number mapping table; S503: calling the defect type cluster number mapping table, extracting defect area boundaries and label indexes according to numbers, sorting out the relationship between numbers and coordinates and recording type identifiers, and obtaining a device defect classification and partition identification label set.
10. A special equipment defect automatic identification system, characterized in that: The system is used to implement the method for automatically identifying defects of special equipment according to any one of claims 1 to 9, and the system includes: The image gradient extraction module extracts the gradient difference of pixel grayscale values based on the surface image of the crane's metal boom section. It calculates the absolute value of the grayscale difference between adjacent pixels and the gradient direction consistency score. It then filters continuous paths and counts the pixel sets whose direction change rate is less than a threshold. It locates the boundary distribution of the pixel sets in the original image and constructs a boundary layer for the hook structure. The texture region recognition module extracts the standard deviation of pixel intensity, directional angle fluctuation, and density distribution coefficient within the closed area based on the hook structure boundary layer, determines the pixel area that meets the surface texture characteristics of the wire rope, marks the dense segments with consistent directions within the edge, eliminates the light intensity mutation points, and constructs the wire rope texture aggregation block; The defect layer generation module locates discontinuous points and isolated strong edge pixels based on the wire rope texture clustering blocks, performs area filling according to point spacing and connectivity, connects broken areas, removes fragments smaller than the interference threshold, merges residual edge graphics, and generates a special equipment defect contour layer; The feature comparison and analysis module extracts the regional boundary curvature, structural density and directional deviation angle based on the defect contour layer of the special equipment, calls the standard working condition hook texture parameter library, compares the deviation amplitude of the characteristic value, marks the abnormal area and standard deviation distribution, and constructs the defect comparison feature set of the key parts of the hook; The defect type classification module extracts the regional grayscale texture coding index based on the defect comparison feature set of the key parts of the hook, identifies the structural similarity, groups the coding according to the similarity, establishes the correspondence between the label and the layer coordinate, and outputs the special equipment defect positioning classification label set.
Citation Information
Cited By
Three-dimensional imaging detection method for surface defects of connector
CN120703106A
Speed difference automatic controller falling risk early warning method and system based on image dynamic analysis
CN120833463A
Fall risk early warning method and system of speed difference automatic controller based on image dynamic analysis
CN120833463B
Tire tread production control method based on image recognition
CN120894374A
Packaging piece detection method and system
CN120912614A