Highlight repairing method and system for damaged area of worn surface
Through the two-color reflection model and fuzzy mean clustering technology, combined with the region clustering-growth segmentation model, the priority function of highlight repair is designed, which solves the problem of surface highlight removal of complex texture structures, and realizes accurate repair of the wear surface highlight area and improves wear Accuracy of surface morphology analysis and accuracy of mechanical equipment performance evaluation.
Patent Information
- Application Number
- CN202411250448.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-06
AI Technical Summary
The prior art has inefficiency in the removal of high-gloss light on worn surfaces, especially in the surface of complex textured structures, which limits the accuracy of wear surface morphology analysis and the performance evaluation of mechanical equipment.
The two-color reflection model is used to separate the highlight components, and combine the fuzzy mean clustering and regional clustering-growth segmentation model to design the highlight repair priority function, and accurately repair the highlight area through local information and texture structure information to ensure the integrity of the damaged area. and texture topography.
It realizes accurate repair of the high-gloss areas of the wear surface, improves the accuracy of damage detection and the accuracy of wear mechanism identification, and enhances the reliability of wear surface morphology analysis and engineering application value.
Smart Images

Figure CN119090781A_ABST
Abstract
Description
Background Art
[0002] Wear surface morphology analysis technology, as the most direct and reliable non-destructive testing method for key tribological system status monitoring, provides an important basis for in-depth understanding and mastering the wear mechanism and severity of friction pairs by accurately detecting the damaged area in the wear surface and measuring related parameters. However, in the field of mechanical manufacturing, especially in the surface damage measurement of precision metal friction pairs, the highlight phenomenon caused by the mirror reflection of the metal surface causes the loss of effective information in part of the image, thus limiting the accurate measurement of the wear surface. Therefore, studying effective highlight removal methods to restore the texture morphology of the highlight area of the wear surface not only helps to improve the accuracy of wear surface morphology analysis, but also has important engineering significance for the performance evaluation and maintenance of mechanical equipment.
[0003] The current research status of effective surface highlight removal methods mainly focuses on using multiple images of the same surface under different light sources, viewing angles or time sequences to achieve image information complementarity by matching feature points in multiple pairs of multiple views, thereby eliminating surface highlights. However, in actual operation, it is difficult to find the optimal shooting angle and the matching accuracy of surface feature points is often low, which severely limits the application scenarios of multi-view feature matching highlight removal methods. Although the highlight removal method based on the two-color reflection model only requires a single image, which reduces the complexity of image acquisition and operation, its scope of application is mainly limited to non-conductive material surfaces with low reflection intensity, and it cannot effectively remove highlight areas with saturation in a single image. In recent years, deep learning adversarial generative networks and Exemplar-Based image restoration algorithms have been innovatively applied to surface highlight removal. This method directly learns the mapping relationship between surface highlight areas and corresponding non-highlight areas from the dataset, so that the image generated by the generator is close to the real image without highlights. At the same time, the texture and color information of the known non-highlight areas in a single image are fully utilized to repair the highlight area, thereby retaining more realistic texture information without affecting the color of the non-highlight area. However, this method is currently mainly applicable to surfaces with relatively simple texture structures or periodic texture structures, which limits its application effectiveness in practical engineering.
[0004] In summary, the deep learning adversarial generative network and Exemplar-Based image restoration algorithm successfully restored the highlight area by directly learning the mapping relationship between the highlight area and the non-highlight area, retaining more realistic texture information while reducing the complexity of image acquisition and operation. However, this method is currently mainly applicable to surfaces with relatively simple texture structures or periodic texture structures. For surfaces with complex texture structures, its highlight removal effect is still insufficient. Therefore, in order to further improve the practicality and reliability of surface highlight removal technology, it is urgent to optimize the existing highlight removal method, especially the highlight removal technology for surfaces with complex texture structures, so as to promote the development of wear surface morphology analysis technology. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a method and system for repairing highlight areas of damaged areas on worn surfaces in response to the above-mentioned deficiencies in the prior art, so as to solve the technical problems of repairing and detecting highlight areas of damaged surfaces and improve the accuracy of surface damage detection and measurement.
[0006] The present invention adopts the following technical solutions:
[0007] A method for repairing highlights on a damaged area of a worn surface comprises the following steps:
[0008] S1. Separate the highlight component of the worn surface based on the two-color reflection model, and use fuzzy mean clustering guided by local information to separate the strong highlight area;
[0009] S2. Based on the structure information graph of the worn surface, a clustering-growth segmentation model of the damaged area is constructed, and a search is performed near the highlight area obtained in step S1 to realize the matching area search in the repair process of the highlight area of the worn surface;
[0010] S3. In the damaged area clustering-growth segmentation model obtained in step S2, the texture, confidence and distance information of the damaged area are integrated to design a highlight repair priority function, and a priority sorting mechanism for highlight area repair is constructed to achieve highlight repair in the damaged area of the worn surface.
[0011] Preferably, the highlight area detection is specifically as follows:
[0012] S101, extracting the highlight component of the worn surface based on a two-color reflection model, and then extracting the dark channel of the worn image to reflect the distribution of the highlight area of the worn surface, and obtaining a rough de-highlighted image;
[0013] S102, introducing the idea of fuzzy C-means clustering segmentation, constructing the objective function of highlight area segmentation based on the component information of the highlight point neighborhood, and realizing accurate segmentation of the highlight area of the worn surface through fuzzy clustering;
[0014] S103, obtaining an optimized membership matrix of the worn surface based on Lagrange multiplication optimization solution iteration, and classifying the pixels of the worn surface using a maximum membership criterion of highlight pixels to different classes;
[0015] S104. Identify the initial centers of weak highlight and strong highlight components based on K-means clustering, construct an initial clustering matrix, and obtain the highlight area segmentation result The adaptive threshold segmentation method is combined to constrain the segmentation of non-highlight areas, and the highlight area segmentation results are optimized through morphological reconstruction.
[0016] Preferably, the classification of pixels on the worn surface is realized by using the maximum membership criterion of highlight pixels to different classes as follows:
[0017]
[0018] Among them, u ik is pixel x i The degree of membership to the kth class; c = 3 is the number of clusters; m is the fuzzy index; x i is the value of the i-th pixel; v k is the cluster center value of the kth class; v q is the cluster center value of the qth class; G ik , G iq is the local spatial information fuzzy factor.
[0019] Preferably, the final highlight area segmentation result for:
[0020]
[0021] Among them, I mask is the K-means clustering highlight area segmentation result, I bw is the highlight area segmentation result of Otsu threshold method, and & is the logical AND operation.
[0022] Preferably, the matching area search is specifically:
[0023] S201. Construct a wear surface structure extraction model based on relative total variation to accurately strip the surface texture information in the original wear image, so as to effectively remove the interference of surface texture noise on the damage area detection, and use the L2 norm to represent the consistency of the wear surface structure map with the original wear image;
[0024] S202, using guided filtering to establish a wear surface noise removal strategy, smoothing the texture noise of the wear surface image while retaining relatively clear structural edge information, thereby generating a more accurate wear surface structure image;
[0025] S203, analyzing the grayscale information distribution characteristics in the search area, and accurately identifying the wear surface damage area with low grayscale value in the search area;
[0026] S204: To ensure that there are no subsequent repair errors caused by missing damaged areas around the highlight area, a method based on the average contour coefficient is established. Strategy for testing the rationality of regional division;
[0027] S205 , randomly selecting n pixel points in the damage area as growth seed points, and establishing a method for extracting highlight adjacent damage areas based on region growing.
[0028] Preferably, the average silhouette coefficient is established The specific strategy for testing the rationality of regional division is as follows:
[0029] Use x i After taking the average distance of all samples in a cluster as the distance between the point and the cluster, select the distance from x i The nearest cluster is taken as the nearest cluster; if the number of clusters C = 2 The maximum value is obtained, then there are damaged areas and normal areas in the search area, and the average contour coefficient Specifically:
[0030]
[0031] in, is the average silhouette coefficient, N is the number of pixels in the search area; a i b is the cohesion degree; i is the separation degree; p is a cluster C k Samples in Cluster C k The number of sample points in .
[0032] Preferably, the highlight repair strategy is specifically as follows:
[0033] S301, calculating the confidence item of the highlight block to be repaired in the damaged area of the worn surface, and repairing from the non-highlight boundary first;
[0034] S302, calculating the distance item of the highlight block to be repaired in the damaged area of the worn surface, and preferentially starting the repair from the point close to the highlight boundary of the damaged area;
[0035] S303, calculating the texture structure items of the highlight blocks to be repaired in the damaged area of the worn surface, and giving priority to repairing the highlight blocks with complex texture structure information;
[0036] S304, constructing a repair priority function for the highlight area of the worn surface based on the texture structure of the highlight area sample block, the known information content, and the distance from the damaged area, and considering the problem that the texture structure information of the worn surface is destroyed due to the failure of the priority calculation in the late stage of repairing the highlight area;
[0037] S305: Based on the repair order established by the priority function, the priority values of all highlight blocks on the boundary of the highlight area are calculated and sorted. The repair process follows this sorting and the highlight block with the largest priority value is processed first.
[0038] S306: Calculate the similarity between the highlight block to be repaired and the matching block in the damaged area of the worn surface Determine the matching block with the largest similarity value to the highlight block
[0039] S307, filling the pixel points in the sample block in the damaged area with the highest similarity into the highlight part of the highlight block according to the corresponding relationship, and completing one repair;
[0040] S308. Based on the confidence C(p) of the internal area after the highlight block is repaired, the priority of all subsequent highlight blocks to be repaired is updated, and the highlight area is completely repaired by continuously traversing the boundary points of the highlight area and iteratively replacing the highlight part in the highlight block.
[0041] Preferably, the repair priority function of the highlight area of the worn surface is specifically:
[0042] P(p)=C(p)D(p)Dis(p)
[0043] +[(C(p)+D(p)+Dis(p)) / 3][1-C(p)D(p)Dis(p)] 2
[0044] Among them, C(p), Dis(p), and D(p) are the confidence term, distance term, and texture structure term of the highlight block, respectively.
[0045] Preferably, the similarity between the highlight block and the matching block The calculation is as follows:
[0046]
[0047] Among them, ψ q For the matching block, R, G, and B are the three color component values of the worn surface under the RGB color channel; and Highlight border superior The horizontal and vertical coordinates of the point; x q andq are the horizontal and vertical coordinates of point q in the damaged area Θ.
[0048] In a second aspect, an embodiment of the present invention provides a system for repairing highlights in damaged areas of a worn surface, comprising:
[0049] Clustering module, which separates the highlight components of the worn surface based on the two-color reflection model, and separates the strong highlight areas using fuzzy mean clustering guided by local information;
[0050] The construction module builds a clustering-growth segmentation model of the damaged area based on the structural information graph of the worn surface, performs retrieval near the highlight area obtained by the clustering module, and realizes the matching area search in the repair process of the highlight area of the worn surface;
[0051] The repair module integrates the texture, confidence and distance information of the damaged area into the obtained damage area clustering-growth segmentation model to design a highlight repair priority function, build a priority sorting mechanism for highlight area repair, and realize the repair of highlights in damaged areas on worn surfaces.
[0052] In a third aspect, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for repairing highlights in damaged areas of a worn surface when executing the computer program.
[0053] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for repairing highlights in damaged areas on a worn surface.
[0054] Compared with the prior art, the present invention has at least the following beneficial effects:
[0055] A method for repairing highlights in damaged areas on worn surfaces is proposed. The highlight component map of the worn surface is calculated based on a two-color reflection model, and the highlight area under local highlight noise interference is effectively obtained by combining the Otsu threshold method and the fuzzy local information C-means clustering method, laying the foundation for accurate repair of highlights in damaged areas. A regional clustering-growth segmentation model based on the structural information of the worn surface is constructed, and the corresponding matching search area is determined during the repair of the highlight area, thereby avoiding the destruction of the structural information of the damaged area during the repair process and improving the repair efficiency. A repair priority function that integrates the texture, confidence and distance information of the damaged area is designed, and a sequential strategy for repairing the highlight area is formulated. The detected highlights and matching search areas are combined to achieve accurate repair of the highlights in the damaged area.
[0056] Furthermore, the highlight component map of the worn surface was calculated based on the two-color reflection model, and the highlight area under the interference of local highlight noise was effectively obtained by combining the Otsu threshold method and the fuzzy local information C-means clustering method, laying the foundation for the accurate repair of highlights in the damaged area.
[0057] Furthermore, in order to accurately obtain the matching area corresponding to the highlight repair and avoid the incorrect filling of the damaged area caused by matching to the normal surface, a regional clustering-growth segmentation model based on the structural information of the worn surface was constructed using the relative total variation model, and the corresponding matching search area in the highlight area repair process was determined, thereby avoiding the destruction of the structural information of the damaged area during the repair process and improving the repair efficiency.
[0058] Furthermore, a repair priority function that integrates the texture, confidence, and distance information of the damaged area is designed, and a sequential strategy for repairing the highlight area is formulated. According to the formulated repair order, the similarity between the highlight edge sample block and the sample block inside the matching area is calculated, and the highlight area is filled with the sample block with the highest similarity to achieve repair of the highlight area.
[0059] It can be understood that the beneficial effects of the second aspect mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0060] In summary, the present invention integrates highlight area detection, matching area search and highlight repair strategy construction, which can ensure the integrity and texture morphology of the damaged area while removing the highlights of the damaged area, thereby providing complete morphological information for the detection of damaged areas on worn surfaces and the identification of wear mechanisms.
[0061] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is the overall flow chart of the present invention;
[0063] Figure 2 An algorithm framework for highlight area detection;
[0064] Figure 3 This is the result of highlight removal on the worn surface based on the two-color reflection model. Figure 3 (a) is a worn surface with highlights. Figure 3 (b) is the image without mirror reflection. Figure 3 (c) is the specular component image;
[0065] Figure 4 This is the highlight segmentation result using fuzzy clustering and morphological processing. Figure 4 (a) is the highlight segmentation result based on fuzzy clustering. Figure 4(b) is the highlight segmentation result based on the OTSU method. Figure 4 (c) is the result of AND operation of (a) and (b). Figure 4 (d) is the morphological processing result of (c);
[0066] Figure 5 An algorithmic framework for damage area detection;
[0067] Figure 6 This is the intermediate result of the detection of the damaged area No. 2. Figure 6 (a) is the grayscale search area, Figure 6 (b) is the grayscale histogram, Figure 6 (c) to mark the search area;
[0068] Figure 7 This is the test result of the damaged area No. 2. Figure 7 (a) is the damaged area on the S image. Figure 7 (b) is the detection result guided by S image. Figure 7 (c) is the detection result of the image without S;
[0069] Figure 8 Repair strategies for highlights;
[0070] Fig. 9 A schematic diagram of a computer device provided by an embodiment of the present invention;
[0071] Fig.10 A block diagram of an electronic device provided according to an embodiment of the present invention;
[0072] Fig.11 is a comparison between the present invention and other highlight removal methods, wherein (a) is the original image, (b) is Tan's method, (c) is Shen's method, (d) is Yang's method, (e) is Shen's method, (f) is Yamamoto's method, (g) is Criminisi's method, (h) is the proposed method, (i) is a reference image, (j) is the histogram of (a), and (k) is the histogram of (h);
[0073] Fig.12 Comparison between the restored image and the reference image, where (a) is the original image, (b) is the restored image, and (c) is the reference image without highlights. DETAILED DESCRIPTION
[0074] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0075] In the description of the present invention, it should be understood that the terms “include” and “comprises” indicate the presence of described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.
[0076] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0077] It should be further understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects are in an "or" relationship.
[0078] It should be understood that, although the terms first, second, third, etc. may be used to describe preset ranges, etc. in the embodiments of the present invention, these preset ranges should not be limited to these terms. These terms are only used to distinguish preset ranges from each other. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.
[0079] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0080] Various structural schematic diagrams of the embodiments disclosed in the present invention are shown in the accompanying drawings. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0081] The present invention provides a method for repairing highlights in damaged areas on worn surfaces. The highlight components of the worn surface are separated based on a two-color reflection model, and threshold segmentation and morphological processing are performed on them, thereby realizing the detection of highlight areas under the interference of local highlight noise. A structural information map of the worn surface is extracted to remove surface noise and small scratch interference, and a regional clustering-growth segmentation model is constructed to realize the matching area search in the highlight area repair process. A highlight repair priority function is designed by fusing the damaged area texture, confidence and distance information, and a sequential strategy for highlight area repair is constructed to realize the precise repair of highlights in damaged areas.
[0082] See also Figure 1 The present invention provides a method for repairing the highlight of a damaged area on a worn surface, comprising the following steps:
[0083] S1. Separate the highlight component of the worn surface based on the two-color reflection model, and effectively obtain the highlight area under the interference of local highlight noise by combining the Otsu threshold method and the fuzzy local information C-means clustering method, and realize the detection of the highlight area of the worn surface under the interference of local highlight noise. The detection framework is as follows Figure 2 shown.
[0084] S101, extract the highlight component of the worn surface based on the two-color reflection model, and then extract the dark channel of the worn image to reflect the distribution of the highlight area of the worn surface. By subtracting the minimum value of the three RGB channels from the original worn image, that is, the dark channel of the worn image, and adding a bias term, as shown in formula (1), a rough de-highlighted image is obtained, as shown in Figure 3 shown. Figure 3 (b) shows that although the direct two-color reflection model reduces the highlight component of the worn surface to a certain extent, it not only reduces the overall surface brightness, but also fails to effectively remove the highlight area of the metal surface. This is because the specular component of the pixels in the highlight area is too large, and the highlight area is saturated, resulting in the pixels in the saturated area not satisfying the two-color reflection model. Figure 3 (c) The highlight component of the worn surface separated from the worn surface can effectively reflect the intensity of the specular reflection component contained in each position of the worn surface.
[0085] Formula (1):
[0086] I(X)=m d D(X)+m s S(X)
[0087] I SF (X) = I (X) - I min (X)+λ
[0088] Where X = (x, y) is the horizontal and vertical coordinates of the image, I (X) = {I r (X),I g (X),I b (X)} is the three-channel pixel intensity of the color image, D(X) and S(X) are the diffuse reflection and specular reflection components, respectively, m d (X) and m s (X) are the coefficients of these two components respectively; H and W are the height and width of the image respectively.
[0089] S102, introduce the idea of fuzzy C-means clustering segmentation to deal with the complexity and uncertainty of the highlight area of the wear image; construct the target function of highlight area segmentation based on the neighborhood component information of the highlight point, and realize the accurate segmentation of the highlight area of the wear surface through fuzzy clustering;
[0090] S103, solving the iterative expression based on Lagrange multiplication optimization to obtain the optimized membership matrix of the wear surface, and using the maximum membership criterion of highlight pixels to different classes to classify the pixels of the wear surface, as shown in formula (2);
[0091] Formula (2):
[0092]
[0093] Where c = 3 is the number of clusters, corresponding to the background area, weak highlight component area, and strong highlight component area respectively; m is the fuzzy index; V (0) is the initial cluster center matrix, U (0) is the initial fuzzy partition matrix; ε is the stop threshold; the membership matrix U is continuously updated iteratively (n) And the cluster center matrix V (n) , until the change in the cluster center value is less than ε, that is, max{V (n) -V (n+1) Stop iteration when}<ε.
[0094] S104, based on K-means clustering, the highlight component pixels are divided into two categories, corresponding to the weak highlight component and the strong highlight component, so as to obtain the initial clustering centers (C1, C2) of the weak highlight component and the strong highlight component, and finally the initial clustering center matrix is set to V (0)=[0,C1,C2], and obtain high-precision highlight area segmentation results through continuous iterative calculations, such as Figure 4 (a); Formula (3) is used to perform a logical AND operation on the segmentation result and the Otsu threshold method segmentation result to constrain the non-highlight area segmentation result, and combined with the morphological opening and closing operation processing, the final highlight area segmentation result is obtained, as shown in Figure 4 (d)
[0095] Formula (3):
[0096]
[0097] in, is the final highlight area segmentation result, I mask is the K-means clustering highlight area segmentation result, I bw is the highlight area segmentation result of Otsu threshold method, and & is the logical AND operation.
[0098] S2, extract the worn surface structure information map to remove surface noise and minor scratch interference, build a regional clustering-growth segmentation model, and realize the matching area search in the highlight area repair process. The algorithm framework is as follows Figure 5 As shown, the destruction of the structural information of the damaged area during the repair process is avoided and the repair efficiency is improved;
[0099] S201. Based on the relative total variation prior, different penalty constraints can be imposed on texture and structure in global optimization, which can increase the distinction between surface structure and texture information, thereby better separating the structure and texture of the worn surface. Therefore, a wear surface structure extraction model based on relative total variation is constructed, as shown in formula (4), to separate the surface texture information from the original wear image, so as to effectively remove the interference of surface texture noise on the detection of damaged areas, and use the L2 norm to represent the consistency of the wear surface structure map with the original wear image;
[0100] Formula (4):
[0101]
[0102] Where I is the original wear image, S is the wear surface structure map, λ is the weight parameter to balance the first and second terms, RTV is the ratio of the total variation of the window to the intrinsic variation of the window; n is the pixel point in the rectangular neighborhood R(p) of the pixel point p, g p,n is a weight function related to the spatial distance; σ is the spatial scale of the control rectangular neighborhood. The larger its value is, the smoother the obtained wear surface structure map S is.
[0103] S202, as shown in formula (5), a wear surface noise removal strategy is established by using guided filtering to smooth the texture noise of the wear surface image while retaining relatively clear wear surface structure edge information, thereby generating a more accurate wear surface structure image;
[0104] Formula (5):
[0105]
[0106] Among them, S is the wear surface structure map, O is the wear image map after guided filtering, λ is the weight parameter that balances the first and second terms, and RTV is the ratio of the total variation of the window to the intrinsic variation of the window.
[0107] S203, analyzing the grayscale information distribution in the wear surface retrieval area, Figure 6 (a) shows the grayscale image R corresponding to the red search area. The grayscale histogram distribution of this area is shown in Figure 6 As shown in (b), it has two peaks, which means that the worn surface retrieval area has a damaged area and a normal surface area. K-means clustering is further used to divide the retrieval area into two categories, where the area with low pixel values is regarded as a damaged area. Figure 6 (c) Marked damaged areas on the worn surface;
[0108] S204, in order to ensure that there is no subsequent repair error caused by the missing of the damaged area around the highlight area, a region division rationality inspection strategy based on the average contour coefficient is established, as shown in formula (6);
[0109] Formula (6):
[0110]
[0111] in, is the average silhouette coefficient, and its value range is [-1,1]. The larger the average silhouette coefficient, the better the clustering effect. N is the number of pixels in the search area. a i is the cohesion, representing x i The average distance to other samples in the same cluster; b i is the separation degree, representing x i The average distance to all samples in the nearest cluster; p is a cluster C k The samples in Cluster C k The number of sample points in C j For x i After taking the average distance of all samples from a cluster as the distance between the point and the cluster, select the distance from x i The nearest cluster is taken as the nearest cluster; if the number of clusters C = 2 If the maximum value is obtained, it means that there are damaged areas and normal areas in the search area.
[0112] S205. Randomly select n pixel points in the damage area as growth seed points, and establish a method for extracting highlight adjacent damage areas based on regional growth. Calculate the grayscale mean Avr of n points, and let R = 0 as the initial damage area marker. By traversing the search area on the wear surface structure map, when the absolute difference between the grayscale value of I(i+u,j+v)(u,v=-1,0,1) and the mean Avr is less than the threshold T(Avr / 2), the damage area marker R(i+u,j+v) = 1. By continuously traversing the wear surface structure map, the following is finally obtained. Figure 7 The damage area marking map shown is used to extract the damage area near the highlight area. Figure 7 (a) and 7(c) are the results of the damaged area near the highlight area detected on the S wear surface structure map and the original wear surface image respectively using the fusion-based regional clustering-growing method. Figure 7 (b) corresponds to Figure 7 (a) Detection results in the original worn area of the surface.
[0113] S3, integrate the damaged area texture, confidence and distance information to design the highlight repair priority function, and build a priority sorting mechanism for highlight area repair, such as Figure 8 As shown, the detected highlights and the matching search area are combined to achieve accurate restoration of the highlights in the damaged area of the worn surface.
[0114] S301, calculate the confidence item of the highlight block to be repaired in the damaged area of the worn surface, give priority to repairing from the non-highlight boundary, and improve the rationality of the repair result of the damaged highlight area of the worn surface. As shown in formula (7), the confidence can be used to measure the known information content, and the initial value of the confidence of each point in the highlight block is set.
[0115] Formula (7):
[0116]
[0117]
[0118] Among them, ψ p is the highlight block, S(ψ p ) is the area of the highlight block; C(p) is the confidence item of the highlight block, and the value range of C(p) is [0,1]. The larger the value, the greater the proportion of known information contained in the highlight block, and the higher the priority should be for repair; is the non-highlight area, and q is the point at the intersection of the highlight block and the non-highlight area.
[0119] S302, calculate the distance item of the highlight block to be repaired in the damaged area of the worn surface, and give priority to starting the repair from the point close to the highlight boundary of the damaged area to ensure the structural continuity between the repaired highlight area and the damaged area. To this end, the distance information between the center point of the sample block to be repaired and the damaged area is used as part of the priority function, as shown in formula (8), that is, the closer the p point is to the damaged area, the better it should be repaired.
[0120] Formula (8):
[0121]
[0122] Among them, x p and p Highlight border The horizontal and vertical coordinates of point p on the top; x q and g are the horizontal and vertical coordinates of point q in the damage area Θ; Dis(p) is used to represent the minimum distance constraint between point p and the damage area, and its value range is [0,1]. The larger the Dis(p) value, the closer the distance between point p and the damage area.
[0123] S303, calculating the texture structure item of the highlight block to be repaired in the damaged area of the worn surface, as shown in formula (9), giving priority to repairing the highlight block with complex texture structure information, and retaining the texture structure information of the worn surface itself to the greatest extent.
[0124] Formula (9):
[0125]
[0126] in, Is the highlight boundary The equal illumination direction at point p on the left represents the vertical direction of the gradient direction at point p; α is the normalization factor, and for grayscale images, α = 255; n p is point p perpendicular to the boundary The orthogonal vector of D(p); the value range of D(p) is [0,1]. The larger the value, the more complex the surface linear structure at that point is, and it should be repaired first.
[0127] S304, comprehensively considering the texture structure of the highlight area sample block, the known information content and the distance from the damaged area, and considering the problem that the texture structure information of the worn surface is destroyed due to the failure of the priority calculation in the later stage of highlight area repair, a priority function for repairing the highlight area of the worn surface is constructed, as shown in formula (10).
[0128] Formula (10):
[0129] P(p)=C(p)D(p)Dis(p)
[0130] +[(C(p)+D(p)+Dis(p)) / 3][1-C(p)D(p)Dis(p)] 2
[0131] Among them, P(p) is the priority function, ψ p is the highlight block, C(p), Dis(p), and D(p) are the confidence term, distance term, and texture structure term of the highlight block, respectively.
[0132] S305. Based on the repair order established by the priority function, the priority values of all highlight blocks on the boundary of the highlight area are calculated and sorted, as shown in formula (11). The repair process follows this sorting and gives priority to the highlight block with the largest priority value.
[0133] Formula (11):
[0134]
[0135] in, is the boundary of the highlight area, ψ p For the highlight block, is the highlight block with the largest priority value, and P(p) is the priority value.
[0136] S306: Calculate the similarity between the highlight block to be repaired and the matching block in the damaged area of the worn surface, as shown in formula (12), and determine the matching block with the largest similarity value to the highlight block.
[0137] Formula (12):
[0138]
[0139] in, is the highlight block, ψ q For matching blocks, Represents the similarity between the highlight block and the matching block, is the matching block with the largest similarity value to the highlight block; R, G, B are the three color component values of the worn surface under the RGB color channel; and Highlight border superior The horizontal and vertical coordinates of the point; x q and q are the horizontal and vertical coordinates of point q in the damaged area Θ.
[0140] S307 , fill the pixel points in the sample block in the damaged area with the highest similarity into the highlight part of the highlight block according to the corresponding relationship, and complete one repair.
[0141] S308, by continuously traversing the boundary points of the highlight area and iteratively replacing the highlight part in the highlight block, the highlight area is completely repaired. The confidence of the internal area of the repaired highlight block is updated, as shown in formula (13), so as to obtain the latest priority value, and then the priority of all subsequent highlight blocks to be repaired is updated in descending order of priority value.
[0142] Formula (13):
[0143]
[0144] Among them, C(p) is the confidence level, is the point p with the largest priority value, is the highlight block, and Ω is the surface highlight area.
[0145] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "platform".
[0146] In yet another embodiment of the present invention, a system for repairing highlights in damaged areas on a worn surface is provided. The system can be used to implement the above-mentioned method for repairing highlights in damaged areas on a worn surface. Specifically, the system for repairing highlights in damaged areas on a worn surface includes a clustering module, a building module, and a repair module.
[0147] Among them, the clustering module separates the highlight components of the worn surface based on the two-color reflection model, and uses fuzzy mean clustering guided by local information to separate the strong highlight areas;
[0148] The construction module builds a clustering-growth segmentation model of the damaged area based on the structural information graph of the worn surface, performs retrieval near the highlight area obtained by the clustering module, and realizes the matching area search in the repair process of the highlight area of the worn surface;
[0149] The repair module integrates the texture, confidence and distance information of the damaged area into the obtained damage area clustering-growth segmentation model to design a highlight repair priority function, build a priority sorting mechanism for highlight area repair, and realize the repair of highlights in damaged areas on worn surfaces.
[0150] In another embodiment of the present invention, a terminal device is provided, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of the highlight repair method of the damaged area of the worn surface, including:
[0151] The highlight components of the worn surface are separated based on the two-color reflection model, and the strong highlight areas are separated by fuzzy mean clustering guided by local information. Based on the structural information map of the worn surface, a clustering-growth segmentation model of the damaged area is constructed, and retrieval is performed near the obtained highlight area to realize the matching area search in the repair process of the highlight area of the worn surface. In the obtained clustering-growth segmentation model of the damaged area, the texture, confidence and distance information of the damaged area are integrated to design the highlight repair priority function, and a priority sorting mechanism for highlight area repair is constructed to realize the repair of the highlight in the damaged area of the worn surface.
[0152] In another embodiment of the present invention, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device for storing programs and data. It is understandable that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device, and can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that more specific examples (non-exhaustive list) of the computer-readable storage medium here include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0153] Computer readable storage media also include data signals propagated in baseband or as part of a carrier wave, which carry readable program codes. Such propagated data signals can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable storage medium can also be any readable medium other than a readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0154] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0155] The processor may load and execute one or more instructions stored in a computer-readable storage medium to implement the corresponding steps of the method for repairing highlights of damaged areas on a worn surface in the above embodiment; the processor may load and execute the following steps:
[0156] The highlight components of the worn surface are separated based on the two-color reflection model, and the strong highlight areas are separated by fuzzy mean clustering guided by local information. Based on the structural information map of the worn surface, a clustering-growth segmentation model of the damaged area is constructed, and retrieval is performed near the obtained highlight area to realize the matching area search in the repair process of the highlight area of the worn surface. In the obtained clustering-growth segmentation model of the damaged area, the texture, confidence and distance information of the damaged area are integrated to design the highlight repair priority function, and a priority sorting mechanism for highlight area repair is constructed to realize the repair of the highlight in the damaged area of the worn surface.
[0157] See also Fig. 9 , the terminal device is a computer device. The computer device 60 of this embodiment includes: a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61. When the computer program 63 is executed by the processor 61, the method for calculating the fluid composition in the reservoir transformation wellbore in the embodiment is realized. To avoid repetition, it is not described one by one here. Alternatively, when the computer program 63 is executed by the processor 61, the functions of each model / unit in the highlight repair system of the damaged area of the worn surface in the embodiment are realized. To avoid repetition, it is not described one by one here.
[0158] The computer device 60 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The computer device 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will appreciate that Fig. 9 This is only an example of the computer device 60 and does not constitute a limitation of the computer device 60. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.
[0159] The processor 61 may be a central processing unit (CPU), or other general-purpose processors, central processing units, graphics processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, data processing logic based on quantum computing, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0160] The memory 62 may be an internal storage unit of the computer device 60, such as a hard disk or memory of the computer device 60. The memory 62 may also be an external storage device of the computer device 60, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the computer device 60.
[0161] Furthermore, the memory 62 may include both an internal storage unit of the computer device 60 and an external storage device. The memory 62 is used to store computer programs and other programs and data required by the computer device. The memory 62 may also be used to temporarily store data that has been output or is to be output.
[0162] Any reference to memory, database or other media used in the embodiments provided in the present application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0163] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0164] See also Fig.10 The terminal device 600 is an electronic device, and the electronic device is in the form of a general computing device. The components of the electronic device may include but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0165] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention described in the above method section of this specification. For example, the processing unit 610 can perform the following steps: Figure 1 Follow the steps shown in .
[0166] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0167] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0168] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0169] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, etc.
[0170] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention described and shown in the drawings here can usually be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0171] The proposed method is compared with six typical highlight removal methods.
[0172] See also Fig.11 , the method of the present invention ( Fig.11 (h) effectively repairs the highlights in the damaged area, which is comparable to the reference image ( Fig.11 (i)) Very similar; contrast Fig.11 (j) and Fig.11 From the histogram in (k), it can be found that in the restored image, the intensity values in the range of 150 to 250 are significantly reduced, which quantitatively proves that the highlights have been removed by the method of the present invention.
[0173] However, the surface morphology information such as color and texture has changed greatly, and the highlights are not effectively removed in the restoration results obtained using the method based on the two-color reflection model, such as Fig.11 (b)-(f) This is mainly because the two-color reflection model is more suitable for non-conductive material surfaces with low reflection intensity. The two-color reflection model cannot accurately describe the imaging mode of highlights on metal surfaces, especially in high-saturation highlight areas. Fig.11 (g) corresponds to the Criminisi method (example-based method). Due to the mismatch problem of the damaged area, the repaired image is also not ideal.
[0174] In order to further verify the performance of the proposed method, a set of surface images with different highlights and damage sizes were randomly selected for restoration, such as Fig.12 As shown in Figure 2. These test images represent typical damage types of different scales, such as pits and scratches, and there are highlights in these damaged areas. From the restoration results, the proposed method can effectively remove the highlights in complex damaged areas, and the restored damaged areas are very similar to the damaged areas in the reference images.
[0175] In terms of quantitative analysis, the proposed method effectively solves the highlight problem in the damaged area of the metal surface, which helps to accurately reconstruct the three-dimensional morphology and detect the damaged area.
[0176] In summary, the present invention provides a method and system for repairing highlight information in damaged areas of worn surfaces, which can effectively repair highlight information in damaged areas of worn surfaces to improve the accuracy of surface damage detection and measurement, and solve the problem of repairing and detecting highlight areas of damaged surfaces.
[0177] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0178] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0179] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0180] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0181] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0182] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0183] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0184] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0185] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0186] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0187] The above contents are only for explaining the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.
Claims
1. A method for repairing highlights on damaged areas of a worn surface, characterized in that: The following steps are involved: S1. Separate the highlight component of the worn surface based on the two-color reflection model, and use fuzzy mean clustering guided by local information to separate the strong highlight area; S2. Based on the structure information graph of the worn surface, a clustering-growth segmentation model of the damaged area is constructed, and a search is performed near the highlight area obtained in step S1 to realize the matching area search in the repair process of the highlight area of the worn surface; S3. In the damaged area clustering-growth segmentation model obtained in step S2, the texture, confidence and distance information of the damaged area are integrated to design a highlight repair priority function, and a priority sorting mechanism for highlight area repair is constructed to achieve highlight repair in the damaged area of the worn surface.
2. The method for repairing the highlight of the damaged area on the worn surface according to claim 1, characterized in that: The specific detection of highlight area is as follows: S101, extracting the highlight component of the worn surface based on a two-color reflection model, and then extracting the dark channel of the worn image to reflect the distribution of the highlight area of the worn surface, and obtaining a rough de-highlighted image; S102, introducing the idea of fuzzy C-means clustering segmentation, constructing the objective function of highlight area segmentation based on the component information of the highlight point neighborhood, and realizing accurate segmentation of the highlight area of the worn surface through fuzzy clustering; S103, obtaining an optimized membership matrix of the worn surface based on Lagrange multiplication optimization solution iteration, and classifying the pixels of the worn surface using a maximum membership criterion of highlight pixels to different classes; S104. Identify the initial centers of weak highlight and strong highlight components based on K-means clustering, construct an initial clustering matrix, and obtain the highlight area segmentation result The adaptive threshold segmentation method is combined to constrain the segmentation of non-highlight areas, and the highlight area segmentation results are optimized through morphological reconstruction.
3. The method for repairing the highlight of the damaged area on the worn surface according to claim 2, characterized in that: The classification of pixels on the worn surface is realized by using the maximum membership criterion of highlight pixels to different classes as follows: Among them, u ik is pixel x i The membership degree of the kth class; c = 3 is the number of clusters; m is the fuzzy index; x i is the value of the i-th pixel; v k is the cluster center value of the kth class; v q is the cluster center value of the qth class; G ik , G iq is the local spatial information fuzzy factor.
4. The method for repairing the highlight of the damaged area on the worn surface according to claim 2, characterized in that: Final highlight area segmentation result for: Among them, I mask is the K-means clustering highlight area segmentation result, I bw is the highlight area segmentation result of Otsu threshold method, and & is the logical AND operation.
5. The method for repairing the highlight of the damaged area on the worn surface according to claim 1, characterized in that: The matching area search is as follows: S201. Construct a wear surface structure extraction model based on relative total variation to accurately strip the surface texture information in the original wear image, so as to effectively remove the interference of surface texture noise on the damage area detection, and use the L2 norm to represent the consistency of the wear surface structure map with the original wear image; S202, using guided filtering to establish a wear surface noise removal strategy, smoothing the texture noise of the wear surface image while retaining relatively clear structural edge information, thereby generating a more accurate wear surface structure image; S203, analyzing the grayscale information distribution characteristics in the search area, and accurately identifying the wear surface damage area with low grayscale value in the search area; S204: To ensure that there are no subsequent repair errors caused by missing damaged areas around the highlight area, a method based on the average contour coefficient is established. Strategy for testing the rationality of regional division; S205 , randomly selecting n pixel points in the damage area as growth seed points, and establishing a method for extracting highlight adjacent damage areas based on region growing.
6. The method for repairing the highlight of the damaged area on the worn surface according to claim 5, characterized in that: Mean Silhouette Coefficient The specific strategy for testing the rationality of regional division is as follows: Use x i After taking the average distance of all samples from a cluster as the distance between the point and the cluster, select the distance from x i The nearest cluster is taken as the nearest cluster; if the number of clusters C = 2 When the maximum value is obtained, there are damaged areas and normal areas in the search area, and the average silhouette coefficient S is specifically: in, is the average silhouette coefficient, N is the number of pixels in the search area; a i b is the cohesion degree; i is the separation degree; p is a cluster C k Samples in Cluster C k The number of sample points in .
7. The method for repairing the highlight of the damaged area on the worn surface according to claim 1, characterized in that: The specific highlight repair strategy is: S301, calculating the confidence item of the highlight block to be repaired in the damaged area of the worn surface, and repairing from the non-highlight boundary first; S302, calculating the distance item of the highlight block to be repaired in the damaged area of the worn surface, and preferentially starting the repair from the point close to the highlight boundary of the damaged area; S303, calculating the texture structure items of the highlight blocks to be repaired in the damaged area of the worn surface, and giving priority to repairing the highlight blocks with complex texture structure information; S304, constructing a repair priority function for the highlight area of the worn surface based on the texture structure of the highlight area sample block, the known information content, and the distance from the damaged area, and considering the problem that the texture structure information of the worn surface is destroyed due to the failure of the priority calculation in the late stage of repairing the highlight area; S305: Based on the repair order established by the priority function, the priority values of all highlight blocks on the boundary of the highlight area are calculated and sorted. The repair process follows this sorting and the highlight block with the largest priority value is processed first. S306: Calculate the similarity between the highlight block to be repaired and the matching block in the damaged area of the worn surface Determine the matching block with the largest similarity value to the highlight block S307, filling the pixel points in the sample block in the damaged area with the highest similarity into the highlight part of the highlight block according to the corresponding relationship, and completing one repair; S308. Based on the confidence C(p) of the internal area after the highlight block is repaired, the priority of all subsequent highlight blocks to be repaired is updated, and the highlight area is completely repaired by continuously traversing the boundary points of the highlight area and iteratively replacing the highlight part in the highlight block.
8. The method for repairing the highlight of the damaged area on the worn surface according to claim 7, characterized in that: The repair priority function of the highlight area of the worn surface is as follows: P(p)=C(p)D(p)Dis(p)+[(C(p)+D(p)+Dis(p)) / 3][1-C(p)D(p)Dis(p)] 2 Among them, C(p), Dis(p), and D(p) are the confidence term, distance term, and texture structure term of the highlight block, respectively.
9. The method for repairing the highlight of the damaged area on the worn surface according to claim 7, characterized in that: Similarity between highlight block and matching block The calculation is as follows: Among them, ψ q For the matching block, R, G, and B are the three color component values of the worn surface under the RGB color channel; and Highlight border superior The horizontal and vertical coordinates of the point; x q and q are the horizontal and vertical coordinates of point q in the damaged area Θ.
10. A system for repairing highlights on damaged areas of worn surfaces, characterized in that: include: Clustering module, which separates the highlight components of the worn surface based on the two-color reflection model, and separates the strong highlight areas using fuzzy mean clustering guided by local information; The construction module builds a clustering-growth segmentation model of the damaged area based on the structural information graph of the worn surface, performs retrieval near the highlight area obtained by the clustering module, and realizes the matching area search in the repair process of the highlight area of the worn surface; The repair module integrates the texture, confidence and distance information of the damaged area into the obtained damage area clustering-growth segmentation model to design a highlight repair priority function, build a priority sorting mechanism for highlight area repair, and realize the repair of highlights in damaged areas on worn surfaces.
Citation Information
Patent Citations
Method and system for eliminating highlight of image affected by highlight reflection on object surface
CN106650794A
Wear surface damage depth estimation method and system based on multi-attention mechanism
CN114972882A
Image local highlight area restoration method, system and device and storage medium
CN117132503A
Visual detection method for wind turbine generator blade surface damage in complex scene
CN117764979A
Cited By
Coastal zone remote sensing image information loss area restoration method based on improved Criminisi algorithm
CN120031761A
A method for repairing information loss areas in coastal remote sensing images based on an improved Criminisi algorithm
CN120031761B
Intelligent detection method for bending processing of aluminum alloy plate
CN120765649A
Intelligent detection method for bending processing of aluminum alloy plate
CN120765649B
