Method for identifying surface defects of precision part treated by aluminum alloy chemical nickel plating process

By combining pyramid downsampling and LBP algorithm, the problem of identifying plating defects in the electroless nickel plating process of aluminum alloy was solved, and the accurate detection of plating defects was achieved, improving the accuracy and reliability of the detection.

CN121582249APending Publication Date: 2026-02-27CHANGSHU ZHAOHENGZHONGLI PRECISION MASCH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202610098723.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-26
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately identify plating defects in the electroless nickel plating process of aluminum alloys, leading to missed and false detections, which affects the corrosion resistance and electrical properties of the parts.

Method used

A method combining pyramid downsampling and LBP algorithm is adopted to obtain the total texture feature value and texture structure index of nickel plating area through grayscale image processing and texture feature analysis, identify suspected unplated areas, and confirm the unplated areas through autocorrelation function and heat map analysis.

Benefits of technology

It improves the accuracy and reliability of detecting plating defects, effectively suppresses false alarms caused by complex background textures and lighting artifacts, and ensures accurate identification of plating defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121582249A_ABST
    Figure CN121582249A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a method for identifying surface defects of a precision part treated by an aluminum alloy chemical nickel plating process, which comprises the following steps: acquiring a grayscale image of a nickel-plated part to be detected, uniformly dividing the grayscale image into nickel-plated areas with preset sizes, performing pyramid down-sampling on any nickel-plated area, and calculating the surface defects of the nickel-plated part to be detected; a first preset number of scale images are obtained, the total texture feature value of any nickel plating area is obtained according to the texture distribution feature of each scale image, and whether a suspected skip plating area exists in the grayscale image or not is judged according to the total texture feature value of each nickel plating area; if the suspected skip plating areas exist in the gray level image, obtaining a defect judgment result of each suspected skip plating area according to the texture directivity feature and the texture periodic feature of each suspected skip plating area; the defect judgment result of each suspected skip plating area in the gray level image is utilized to perform defect identification on the to-be-detected nickel plating part, so that the accuracy and reliability of skip plating defect detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method for identifying surface defects in precision parts processed by electroless nickel plating of aluminum alloys. Background Technology

[0002] Precision parts treated with electroless nickel plating on aluminum alloys are widely used in aerospace, precision instruments, and other fields. The integrity of the surface coating directly determines the corrosion resistance, wear resistance, and electrical properties of the parts. During the electroless nickel plating process, due to factors such as incomplete pretreatment cleaning, activation process failure, or local shielding effects, plating defects can easily occur in specific areas on the surface of the parts. The essence of plating defects is that the chemical deposition reaction of nickel on the base metal surface fails to be successfully initiated, resulting in a complete lack of coating coverage in certain areas. The base aluminum alloy is directly exposed, and the unplated area directly damages the part's anti-corrosion barrier, becoming a priority site for pitting and electrochemical corrosion, seriously affecting product reliability and service life.

[0003] Existing technologies typically employ LBP algorithm-based defect identification techniques to visually identify such defects. The LBP algorithm encodes the image to reflect the texture structure information of the local area, and then, based on the method of extracting local texture features, it distinguishes the essential differences in microscopic morphology between the defective coating area and the normal coating.

[0004] However, existing technologies typically rely on local LBP histograms and single preset statistical features (such as uniformity or main peak morphology) for decision-making when extracting local texture features. This approach cannot effectively cover the true defect spectrum, ranging from uniform weak textures to complex multimodal distributions. Furthermore, electroless nickel plating is a gradual process, and early or weak plating defects do not have obvious texture features. Their histogram distribution is easily confused with the uniform pattern of normal plating, making it difficult for the algorithm to detect subtle degradations and causing missed detections. At the same time, machining marks on the surface of aluminum alloy substrates can cause the plating defects to exhibit anisotropic and complex microstructures. Their histograms may show a multi-peak distribution, making it easy to classify the plating defects as background noise, which also leads to missed detections.

[0005] Therefore, how to accurately identify the unplated areas on the surface of nickel-plated parts based on their complex texture features, and improve the accuracy and reliability of unplated defect detection, has become an urgent problem to be solved. Summary of the Invention

[0006] In view of this, embodiments of the present invention provide a method for identifying surface defects of precision parts processed by electroless nickel plating of aluminum alloys, in order to solve the problem of how to accurately identify the unplated areas on the surface of the parts based on the complex texture features of the nickel-plated parts, thereby improving the accuracy and reliability of unplated defect detection.

[0007] This invention provides a method for identifying surface defects in precision parts processed by electroless nickel plating of aluminum alloys. The method includes the following steps: In the process of electroless nickel plating of aluminum alloy, an initial image of the nickel-plated part to be inspected is acquired, and the initial image is processed into grayscale to obtain a grayscale image. The grayscale image is uniformly divided into at least two nickel-plated regions of a preset size. For any nickel-plated region, pyramid downsampling is performed on the nickel-plated region to obtain a first preset number of scale images. Based on the texture distribution characteristics of each scale image, the total texture feature value of any nickel-plated region is obtained. The total texture feature value of each nickel-plated region is obtained. Using the total texture feature value of each nickel-plated region, it is determined whether there are suspected unplated areas in the grayscale image. If there is at least one suspected plating defect area in the grayscale image, then for any suspected plating defect area, the texture structure index of the suspected plating defect area is obtained according to the texture directionality feature and texture periodicity feature of the suspected plating defect area, and the defect judgment result of the suspected plating defect area is obtained using the texture structure index. Obtain the defect determination result of each suspected unplated area in the grayscale image, and use the defect determination result of each suspected unplated area in the grayscale image to identify defects in the nickel-plated parts to be inspected.

[0008] Preferably, obtaining the total texture feature value of any nickel-plated region based on the texture distribution features of each scale image includes: For any scale image, the LBP algorithm is used to obtain the normalized LBP histogram of the image at any scale. The horizontal axis of the normalized LBP histogram is the LBP mode number, and the vertical axis is the frequency corresponding to the LBP mode number. Based on the frequency distribution characteristics of the normalized LBP histogram of the image at any scale, the texture feature value of the image at any scale is obtained. Obtain the texture feature value of each scale image, and obtain the total texture feature value of any nickel-plated area based on the texture feature value of each scale image.

[0009] Preferably, obtaining the texture feature value of the image at any scale based on the frequency distribution characteristics of the normalized LBP histogram of the image at any scale includes: Each LBP mode number in the normalized LBP histogram is combined with its corresponding frequency to form a coordinate point. All coordinate points are sorted in descending order of frequency. A preset proportion of high-frequency coordinate points are selected from all coordinate points to form a high-frequency coordinate point sequence. Obtain the absolute value of the difference between the frequency mean of the normalized LBP histogram and the frequency mean of the high-frequency coordinate point sequence to obtain the frequency deviation of the high-frequency coordinate points. Substitute the negative of the frequency deviation of the high-frequency coordinate points into an exponential function with the natural constant as the base to obtain the first texture feature value. In the high-frequency coordinate point sequence, the average value of the absolute difference between the LBP mode numbers of every two adjacent high-frequency coordinate points is obtained and recorded as the high-frequency coordinate point dispersion. The negative number of the high-frequency coordinate point dispersion is substituted into the exponential function with the natural constant as the base to obtain the second texture feature value. The first texture feature value and the second texture feature value are weighted and summed to obtain the texture feature value of the image at any scale.

[0010] Preferably, obtaining the total texture feature value of any nickel-plated region based on the texture feature value of each scale image includes: The texture feature values ​​of each scale image of any nickel-plated region are weighted and summed to obtain the total texture feature value of any nickel-plated region.

[0011] Preferably, determining whether there are suspected unplated areas in the grayscale image using the total texture feature value of each nickel-plated area includes: Set a total texture feature value threshold. For any nickel-plated area in the grayscale image, if the total texture feature value of any nickel-plated area is less than the total texture feature value threshold, then the nickel-plated area is confirmed as a suspected unplated area. The number of suspected plating defects in the grayscale image is obtained. If the number of suspected plating defects in the grayscale image is greater than or equal to 1, then it is confirmed that there are suspected plating defects in the grayscale image.

[0012] Preferably, obtaining the texture structure index of any suspected unplated area based on its texture directionality and texture periodicity features includes: In the grayscale image, based on the preset translation range of any suspected plating defect area, the autocorrelation function of any suspected plating defect area is obtained. The horizontal translation distance of any suspected plating defect area is used as the abscissa, the vertical translation distance of any suspected plating defect area is used as the ordinate, and the autocorrelation function value of any suspected plating defect area after translation is used as the brightness value of the pixel. A planar heatmap of the autocorrelation function is constructed. In the autocorrelation function plane heat map, starting from the origin, a second preset number of analysis directions are set, and the anisotropy index of any suspected uncoated area is obtained based on the difference in the brightness value of the pixel points in each analysis direction. Based on the brightness distribution characteristics of pixels in each analysis direction, the periodic index of any suspected unplated area is obtained. Based on the anisotropy index and periodicity index of any suspected unplated area, the texture structure index of any suspected unplated area is obtained.

[0013] Preferably, obtaining the anisotropy index of any suspected uncoated region based on the difference in brightness values ​​of pixels in each analysis direction includes: For any pixel in any analysis direction, the square of the brightness value of the pixel is obtained and recorded as the energy value of the pixel. The cumulative result of the energy values ​​of each pixel in any analysis direction is obtained to obtain the total energy value of the analysis direction. Obtain the total energy value for each analysis direction, calculate the ratio of the maximum total energy value to the minimum total energy value, and denot it as the significance of the texture dominant direction. Substitute the negative of the difference between the significance of the texture dominant direction and the constant 1 into an exponential function with the natural constant as the base to obtain the anisotropy index of any suspected unplated area.

[0014] Preferably, obtaining the periodic index of any suspected uncoated area based on the brightness distribution characteristics of pixels in each analysis direction includes: For any analysis direction, the brightness values ​​of the pixels in the analysis direction are arranged into a brightness value sequence. The maximum value in the brightness value sequence is obtained. The distance between each two adjacent maximum values ​​is calculated to obtain the mean distance. The absolute value of the difference between the distance between each two adjacent maximum values ​​and the mean distance is obtained to obtain the mean absolute value of the difference. The negative of the mean absolute value of the difference is substituted into an exponential function with the natural constant as the base to obtain the periodic intensity value of the analysis direction. Obtain the periodic intensity value for each analysis direction, and record the maximum periodic intensity value as the periodic index of any suspected uncoated area.

[0015] Preferably, obtaining the texture structure index of any suspected unplated area based on the anisotropy index and periodicity index of any suspected unplated area includes: The difference between the constant 1 and the anisotropy index of any suspected missing plating area is obtained to obtain the directional index of any suspected missing plating area. The arithmetic square root of the product of the directional index and the periodic index is obtained to obtain the texture structure index of any suspected missing plating area.

[0016] Preferably, obtaining the defect determination result of any suspected unplated area using the texture structure index includes: The defect determination result includes actual unplated areas and interference areas. A texture structure index threshold is set. If the texture structure index is less than the texture structure index threshold, the defect determination result of any suspected unplated area is confirmed as an actual unplated area.

[0017] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows: In this invention, pyramid downsampling is performed on the nickel-plated area to overcome the limitations of the traditional single-scale LBP histogram analysis method, thereby obtaining the total texture feature value of the nickel-plated area to characterize the complete texture statistical features and structural information of the nickel-plated area. This effectively suppresses false alarms caused by complex background textures, lighting artifacts, etc., and improves the accuracy of subsequent judgment of suspected missing plating areas. When there are suspected missing plating areas in the grayscale image, the texture structure index of the suspected missing plating area is obtained, and the intrinsic texture structure features of the suspected missing plating area are further analyzed. The accuracy of the suspected missing plating area is cross-validated, thereby improving the accuracy and reliability of missing plating defect detection. Attached Figure Description

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

[0019] Figure 1 This is a flowchart of a method for identifying surface defects in precision parts processed by electroless nickel plating of aluminum alloy, as provided in Embodiment 1 of the present invention. Detailed Implementation

[0020] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.

[0021] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0022] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0023] See Figure 1 This is a flowchart of a method for identifying surface defects in precision parts processed by electroless nickel plating of aluminum alloy, as provided in Embodiment 1 of the present invention. Figure 1 As shown, the method may include: Step S101: During the electroless nickel plating process of aluminum alloy, an initial image of the nickel-plated part to be inspected is acquired, and the initial image is processed into grayscale to obtain a grayscale image.

[0024] During the electroless nickel plating process of aluminum alloys, due to factors such as incomplete pretreatment cleaning, activation process failure, or local shielding effect, certain areas on the surface of the parts are prone to plating defects. Plating defects will directly damage the anti-corrosion barrier of the parts and become the priority points for pitting and electrochemical corrosion, which seriously affects the reliability and service life of the products.

[0025] In this embodiment, during the electroless nickel plating process on aluminum alloys, a high-resolution industrial area array camera (resolution ≥ 12MP) is used in conjunction with a coaxial light source or a low-angle ring light source to acquire initial images of the nickel-plated parts to be inspected in a dark environment. Image preprocessing is then performed to obtain grayscale images, which are used for identifying incomplete plating defects on the nickel-plated parts. Specifically, the light source needs to be obliquely incident to enhance the difference in diffuse reflection between the incomplete plating area (rough substrate) and the normal plating layer (smooth surface), while avoiding specular reflection interference caused by direct light. This ensures maximum grayscale contrast between the incomplete plating area and the background in the image, providing a clear image carrier for subsequent texture feature extraction.

[0026] Image preprocessing is an existing technology, and is briefly described here: (1) Geometric correction: Based on the pre-calibrated camera intrinsic parameters (focal length, principal point, distortion coefficient), the initial image is processed to remove distortion. For the curved surface features of the nickel-plated parts to be detected or the tilt angle that may exist during shooting, the image is corrected by perspective transformation algorithm to make the surface texture of the parts in the image closer to the real geometric shape, and avoid misjudgment of texture features due to image deformation; (2) Filtering and denoising: Gaussian filtering is used to smooth the initial image. While suppressing random noise, it retains as much detail information as possible that represents the texture; (3) Contrast enhancement: The initial image is processed by limiting contrast adaptive histogram equalization algorithm. While enhancing the local texture contrast of the missing plating area, it effectively suppresses the excessive enhancement of the normal plating area and avoids the background noise being amplified and forming a false defect; (4) Grayscale processing: The enhanced image is processed by RGB-HSV fusion weighting method to obtain a grayscale image.

[0027] Existing technologies typically employ LBP algorithm-based defect identification techniques for visual recognition of such defects. The LBP algorithm encodes the image to reflect the texture structure information of local areas, and then relies on the LBP histogram of the local image and its single preset statistical features (such as uniformity or dominant peak morphology) to make decisions, distinguishing the essential differences in microscopic morphology between the defective plating area and the normal plating layer. However, electroless nickel plating is a gradual process, and the texture features of early or weak defects are not obvious. Their histogram distribution can easily be confused with the uniform pattern of the normal plating layer, making it difficult for the algorithm to detect subtle degradations and resulting in missed detections. Simultaneously, machining marks on the aluminum alloy substrate surface can cause the defective plating area to exhibit anisotropic and complex microstructures, and its histogram may show a multi-peak distribution, easily classifying the defective plating area as background noise, also leading to missed detections.

[0028] Therefore, in this embodiment, after acquiring the grayscale image of the nickel-plated part to be inspected, the grayscale image is uniformly divided into at least two nickel-plating regions, and pyramid downsampling is performed on the nickel-plating regions to obtain the total texture feature value of the nickel-plating regions. It is then used to determine whether there are any suspected missing plating regions in the grayscale image. When there are suspected missing plating regions in the grayscale image, the texture structure index of the suspected missing plating regions is obtained, and the internal texture structure features of the suspected missing plating regions are further analyzed to obtain the defect judgment result of the suspected missing plating regions. Finally, the defect judgment result of each suspected missing plating region in the grayscale image is used to identify defects in the nickel-plated part to be inspected, overcoming the limitations of the traditional single-scale LBP histogram analysis method and improving the accuracy and reliability of missing plating defect detection.

[0029] Step S102: Divide the grayscale image evenly into at least two nickel-plated regions of a preset size. For any nickel-plated region, perform pyramid downsampling on the nickel-plated region to obtain a first preset number of scale images. Based on the texture distribution characteristics of each scale image, obtain the total texture feature value of the nickel-plated region. Obtain the total texture feature value of each nickel-plated region. Use the total texture feature value of each nickel-plated region to determine whether there are any suspected unplated regions in the grayscale image.

[0030] After obtaining the grayscale image of the nickel-plated part to be inspected, in order to perform local fine-grained analysis, the grayscale image is uniformly divided into at least two non-overlapping nickel-plated regions of a preset size of N×N pixels, and the nickel-plated regions are used as the basic units for subsequent analysis. In order to balance positioning accuracy and feature statistics stability, N=32 is set in this embodiment, but this is not a limitation and can be set according to the specific implementation scenario.

[0031] To overcome the limitations of traditional single-scale LBP histogram analysis methods, this embodiment performs pyramid downsampling on any nickel-plated area, using each nickel-plated area as the first layer of the pyramid. Through Gaussian smoothing and double downsampling, a first preset number of images at different resolutions are generated sequentially, forming a Gaussian image pyramid. Higher resolution layers (e.g., the first layer of the pyramid) are used to capture the microscopic texture details of plating defects, while lower resolution layers (e.g., the last layer of the pyramid) are used to capture macroscopic texture structures, achieving natural transitions between scales and ensuring that each layer covers a continuous target scale range. To avoid scale information loss due to too few layers and computational redundancy due to too many layers, this embodiment sets the first preset number to 3. This is not a limitation; in practical applications, the number of layers can be optimized based on the recognition accuracy. Gaussian smoothing effectively suppresses high-frequency noise during downsampling, avoids the generation of false textures, and ensures the authenticity of texture information at each level. Gaussian smoothing and pyramid downsampling are existing technologies and will not be elaborated upon here.

[0032] After obtaining scale images of any nickel-plated area at different resolutions, the total texture feature value of any nickel-plated area is obtained based on the texture distribution characteristics of each scale image. Then, the total texture feature value of each nickel-plated area is obtained. Using the total texture feature value of each nickel-plated area, it is determined whether there are suspected unplated areas in the grayscale image.

[0033] The method for obtaining the total texture feature value of any nickel-plated region based on the texture distribution characteristics of the image at each scale is as follows: (1) For any scale image, obtain the normalized LBP histogram of the image at any scale.

[0034] Specifically, the image at any scale is input into the LBP algorithm. Using the LBP algorithm, the LBP distribution pattern (i.e., LBP feature value) of all pixels within the image at any scale is calculated. The LBP patterns of all pixels within the image at any scale are numbered in ascending order of LBP feature value, constructing an LBP histogram for the image at any scale. Histogram normalization is then performed on the LBP histogram to obtain a normalized LBP histogram. The horizontal axis of the normalized LBP histogram represents the LBP pattern number, and the vertical axis represents the frequency corresponding to the LBP pattern number. Histogram normalization eliminates feature bias caused by differences in the number of pixels within images at different scales, making images at different resolutions and locations comparable, laying the foundation for subsequent analysis. The LBP algorithm and histogram normalization are existing technologies and will not be elaborated upon here.

[0035] (2) Obtain the texture feature value of the image at any scale based on the frequency distribution characteristics of the normalized LBP histogram of the image at any scale.

[0036] Specifically, in order to adaptively focus on the texture patterns that account for a significant proportion of the image at any scale and overcome the shortcomings of traditional single peak analysis which is prone to misjudgment, in this embodiment, each LBP pattern number in the normalized LBP histogram and its corresponding frequency are combined to form a coordinate point. All coordinate points are sorted in descending order of frequency. Among the coordinate points sorted in descending order, the top 10% of high-frequency coordinate points are selected to form a high-frequency coordinate point sequence. The setting of the preset ratio is not limited here and can be set according to the specific implementation scenario. Obtain the absolute value of the difference between the frequency mean of the normalized LBP histogram and the frequency mean of the high-frequency coordinate point sequence to obtain the frequency deviation of the high-frequency coordinate points. Substitute the negative of the frequency deviation of the high-frequency coordinate points into an exponential function with the natural constant as the base to obtain the first texture feature value. In the high-frequency coordinate point sequence, the average value of the absolute difference between the LBP mode numbers of every two adjacent high-frequency coordinate points is obtained and recorded as the high-frequency coordinate point dispersion. The negative number of the high-frequency coordinate point dispersion is substituted into the exponential function with the natural constant as the base to obtain the second texture feature value. The first texture feature value and the second texture feature value are weighted and summed to obtain the texture feature value of the image at any scale.

[0037] In one embodiment, taking the i-th scale image of any nickel-plated area as an example, the formula for calculating the texture feature value of the i-th scale image is: in, Let be the texture feature value of the i-th scale image of any nickel-plated area; The mean frequency of the normalized LBP histogram of the i-th scale image; c is the frequency of the k-th high-frequency coordinate point in the normalized LBP histogram of the i-th scale image; c is the number of high-frequency coordinate points in the normalized LBP histogram of the i-th scale image. The LBP mode number for the k-th high-frequency coordinate point in the high-frequency coordinate point sequence; The LBP mode number for the (k-1)th high-frequency coordinate point in the high-frequency coordinate point sequence; As the first weighting coefficient, As the second weighting coefficient, to avoid the feature bias caused by a single dimension dominating and to capture the essential texture difference between incomplete plating defects and normal plating layers, this embodiment sets... There are no restrictions here; the settings can be adjusted according to the specific implementation scenario. It is an exponential function with the natural constant as its base; It is the absolute value symbol.

[0038] It should be noted that, The first texture feature value, To quantify the frequency deviation of high-frequency coordinate points, the peak significance of the normalized LBP histogram was determined. The larger the value, the more likely the normalized LBP histogram will exhibit a distinct peak, which better matches the disordered texture characteristics of the uncoated area. The smaller it is, the more... The smaller it is; The smaller the value, the less pronounced the peak value of the normalized LBP histogram, which better reflects the uniform texture of a normal coating. The larger it is, the more... The larger it is; This is the second texture feature value. To measure the dispersion of high-frequency coordinate points, the dispersion of the dominant texture pattern in the LBP coding space was quantified. The larger the value, the wider and more discrete the pattern numbers corresponding to the high-frequency coordinate points in the normalized LBP histogram are, and the larger the difference in adjacent distances, which better matches the complex texture characteristics of the uncoated area. The smaller it is, the more... The smaller it is; The smaller the value, the more the LBP mode numbers corresponding to high-frequency coordinate points in the normalized LBP histogram will cluster within a smaller range, with smaller differences between adjacent distances, which better matches the simple texture characteristics of a normal coating. The larger it is, the more... The larger it is; The formula for calculating texture feature values ​​effectively covers single-peak or multi-peak texture features in the normalized LBP histogram through dual-dimensional quantization and weighted fusion. By fusing the peak significance in the frequency dimension and the pattern dispersion in the spatial dimension, it effectively covers texture scenarios with single-peak or multi-peak features. Whether it is a single-peak prominent texture or a complex texture with multiple peaks scattered in the missing plating area, or a uniform texture without obvious peaks in the normal plating layer, accurate quantization can be achieved through dual-dimensional feature complementarity, improving the accuracy and robustness of missing plating defect identification.

[0039] Similarly, the texture feature values ​​of each scale image of any nickel-plated area are obtained.

[0040] (3) Obtain the total texture feature value of any nickel-plated area based on the texture feature value of each scale image.

[0041] Specifically, the texture feature values ​​of each scale image of any nickel-plated region are weighted and summed to obtain the total texture feature value of any nickel-plated region.

[0042] In one embodiment, taking the s-th nickel-plated region as an example, the formula for calculating the total texture feature value of the s-th nickel-plated region is: in, This represents the total texture feature value of the s-th nickel-plated region; For the s-th nickel-plated region, the weighting coefficients are the image texture feature values ​​at the ith scale. is the texture feature value of the i-th scale image of the s-th nickel-plated region; n is the number of scale images of the s-th nickel-plated region, and in this embodiment, n=3.

[0043] It should be noted that, The larger the value, the more the image at scale i of the s-th nickel-plated region conforms to the simple and uniform texture characteristics of a normal plating layer. The larger it is; The weight coefficients of texture feature values ​​satisfy the normalization constraint, i.e. To reflect the relative importance of information at different scales in multi-resolution analysis, the distribution of weighting coefficients should follow... The principle (i.e., increasing with increasing layer) is that lower resolution layers (i.e., higher downsampled layers in the pyramid) correspond to the macroscopic structural information of the image, and their feature responses reflect the overall distribution trend of the texture pattern. They are more decisive and stable in determining whether a nickel-plated area is a significant anomaly, and therefore assigned higher weights. Higher resolution layers contain more microscopic details and local noise, and their weights decrease accordingly. In this embodiment, the following settings are used: , , There are no restrictions here; settings can be made according to the specific implementation scenario.

[0044] Furthermore, following the method for obtaining the total texture feature value of the s-th nickel plating region described above, the total texture feature value of each nickel plating region in the grayscale image is obtained, and a threshold for the total texture feature value is set. If the total texture feature value of any nickel plating region is less than the threshold, it indicates that the nickel plating region is more consistent with the disordered and complex texture features of the missing plating region, and thus the nickel plating region is confirmed as a suspected missing plating region. The number of suspected missing plating regions in the grayscale image is obtained. If the number of suspected missing plating regions in the grayscale image is greater than or equal to 1, then the presence of a suspected missing plating region in the grayscale image is confirmed.

[0045] To demonstrate a highly sensitive initial screening strategy and prioritize the capture of suspected plating defects, thereby minimizing the false negative rate, this embodiment sets the total texture feature value threshold to 0.4. This is not a limitation and can be set according to the specific implementation scenario.

[0046] Thus, we obtain the result of whether there are suspected areas of unplated metallization in the grayscale image.

[0047] Step S103: If there is at least one suspected plating defect area in the grayscale image, for any suspected plating defect area, according to the texture directionality feature and texture periodicity feature of the suspected plating defect area, the texture structure index of the suspected plating defect area is obtained, and the defect judgment result of the suspected plating defect area is obtained using the texture structure index.

[0048] Because the interference of regular machining textures is unavoidable in the electroless nickel plating process of aluminum alloys, these machining textures exhibit similar distribution characteristics to the unplated areas in the LBP histogram (e.g., some machining textures have a multi-peak distribution in the histogram due to periodic repetition). Therefore, if there are suspected unplated areas in the grayscale image, further analysis of the suspected unplated areas is needed to determine whether the suspected unplated areas belong to the actual unplated areas.

[0049] Regular machining textures are directional, periodic structures formed by tool cutting or grinding, with microgrooves exhibiting a highly consistent dominant direction and spatial periodicity. In contrast, plating defects arise from random failures in chemical deposition reactions. The exposed aluminum alloy substrate, due to grain anisotropy and the randomness of surface oxidation, is essentially a non-directional, non-periodic, rough structure. Therefore, for any suspected plating defect, texture structure indicators can be obtained based on its texture directionality and periodicity characteristics to determine whether the suspected defect is a true plating defect.

[0050] The method for obtaining the texture structure index of any suspected plating defect area based on its texture directionality and texture periodicity features is as follows: (1) Obtain the autocorrelation function and the planar heat map of any suspected unplated area.

[0051] In the grayscale image, a two-dimensional Cartesian coordinate system is constructed with the lower left corner as the origin, the horizontal direction as the abscissa, and the vertical direction as the ordinate. Based on the preset translation range of any suspected plating defect area, the autocorrelation function of that suspected plating defect area is obtained. ,in, and These represent the translational distances in the x and y directions for any suspected unplated area, respectively. The coordinates of any of the suspected uncoated areas are: The grayscale value of the pixel; To perform a translational distance of in any of the suspected uncoated areas and After translation, the coordinates of any suspected uncoated area are The grayscale value corresponding to the pixel, i.e., the coordinates are The grayscale value of the pixel is denoted by N; N is the pixel size of the nickel plating area. In this embodiment, the preset translation range is set to [-(N-1), (N-1)], which does not exceed the range of any suspected unplated area. The image autocorrelation function is existing technology and will not be described in detail here.

[0052] When the suspected missing plating area has periodic texture, that is, when the translation distance is an integer multiple of the texture period, the gray values ​​of the suspected missing plating area before and after the translation will be highly similar, and the autocorrelation function will show significant local peaks while decaying overall, indicating that the texture has a repeating pattern; when the suspected missing plating area is not periodic, the autocorrelation function only has peaks when there is no translation, and the correlation of other translation distances decays rapidly.

[0053] The horizontal translation distance of any suspected plating defect area is used as the abscissa, the vertical translation distance of any suspected plating defect area is used as the ordinate, and the autocorrelation function value corresponding to any suspected plating defect area after translation is used as the brightness value of the pixel, thus constructing a planar heatmap of the autocorrelation function.

[0054] (2) Obtain the anisotropy index of any suspected unplated area.

[0055] Specifically, in the autocorrelation function plane heatmap, starting from the origin, a second preset number of analysis directions are set. In order to effectively capture the structural features of the texture in the horizontal, vertical and diagonal directions, and thus comprehensively evaluate the directionality and periodicity of the texture, in this embodiment the second preset number is set to 4, and the four directions of 0°, 45°, 90° and 135° in the autocorrelation function plane heatmap are set as analysis directions. There is no limitation here, and it can be set according to the specific implementation scenario. For any pixel in any analysis direction, obtain the square of the brightness value of that pixel, and record it as the energy value of that pixel. Then, accumulate the energy values ​​of each pixel in any analysis direction to obtain the total energy value for that analysis direction. Taking the f-th analysis direction as an example, the total energy value for the f-th analysis direction is... ,in, Let R be the energy value of the r-th pixel in the f-th analysis direction, and R be the number of pixels in the f-th analysis direction. Obtain the total energy value for each analysis direction, calculate the ratio of the maximum total energy value to the minimum total energy value, and denot it as the significance of the texture dominant direction. Substitute the negative of the difference between the significance of the texture dominant direction and the constant 1 into an exponential function with the natural constant as the base to obtain the anisotropy index of any suspected unplated area.

[0056] In one embodiment, taking the t-th suspected plating defect area as an example, the formula for calculating the anisotropy index of the t-th suspected plating defect area is: in, Let be the anisotropy index of the t-th suspected uncoated region; This represents the maximum total energy value. This represents the minimum total energy value. Let f be the total energy in the f-th analysis direction; It is an exponential function with the natural constant as the base.

[0057] It should be noted that, The degree of significance of the dominant texture direction. The larger the value, the more significant the autocorrelation energy of the t-th suspected plating defect along the dominant texture direction, and the more consistent the characteristic of highly consistent dominant directions in machining textures. The smaller it is; The smaller the value, the more uniform the energy distribution of the t-th suspected plating defect in all analytical directions, which better matches the non-directional structural characteristics of the plating defect region. The larger it is.

[0058] (3) Based on the brightness distribution characteristics of pixels in each analysis direction, obtain the periodic index of any suspected unplated area.

[0059] Specifically, for any analysis direction, the brightness values ​​of the pixels in that analysis direction are arranged into a brightness value sequence, and the maximum value in the brightness value sequence is obtained. In the autocorrelation function plane heatmap, a two-dimensional rectangular coordinate system is constructed with the lower left corner as the origin, the horizontal direction as the abscissa, and the vertical direction as the ordinate. The Euclidean distance between every two adjacent maxima in the two-dimensional rectangular coordinate system is calculated, and the mean distance is obtained. The absolute value of the difference between the Euclidean distance between every two adjacent maxima and the mean distance is obtained, and the mean absolute value of the difference is obtained. The negative of the mean absolute value of the difference is substituted into an exponential function with the natural constant as the base to obtain the periodic intensity value of the analysis direction.

[0060] In one embodiment, taking the f-th analysis direction as an example, the formula for calculating the periodic intensity value of the f-th analysis direction is: in, Let f be the periodic intensity value in the f-th analysis direction; This represents the distance between the j-th maximum and the (j+1)-th maximum in the brightness value sequence corresponding to the f-th analysis direction. is the average distance between any two adjacent maxima in the luminance value sequence corresponding to the f-th analysis direction; M is the number of maxima in the luminance value sequence corresponding to the f-th analysis direction. It is an exponential function with the natural constant as its base; It is the absolute value symbol.

[0061] It should be noted that, The smaller the value, the closer the distance between any two maxima in the brightness value sequence corresponding to the f-th analysis direction is to the mean distance, which better matches the periodic characteristics of regular mechanically processed textures. The larger it is.

[0062] Specifically, since the distance between every two adjacent maxima cannot be calculated when the number of maxima in the luminance value sequence is less than 2, the periodic intensity value is set to 0 when the number of maxima in the luminance value sequence is less than 2.

[0063] According to the method for obtaining the periodic intensity value of the f-th analysis direction, the periodic intensity value of each analysis direction is obtained. In order to better capture the strongest periodicity of the texture of any suspected plating defect in the dominant direction, the maximum periodic intensity value is recorded as the periodic index of any suspected plating defect in this embodiment.

[0064] (4) Obtain the texture structure index of any suspected unplated area based on the anisotropy index and periodicity index of any suspected unplated area.

[0065] Specifically, the difference between the constant 1 and the anisotropy index of any suspected missing plating area is obtained to obtain the directional index of any suspected missing plating area. The arithmetic square root of the product of the directional index and the periodic index is obtained to obtain the texture structure index of any suspected missing plating area.

[0066] In one embodiment, taking the t-th suspected plating defect area as an example, the formula for calculating the texture structure index of the t-th suspected plating defect area is: in, The texture structure index of the t-th suspected unplated area; For the t-th suspected plating defect area, there is a periodicity indicator; Let be the anisotropy index of the t-th suspected unplated region.

[0067] It should be noted that, because regions with regular machined textures possess a highly consistent dominant direction and spatial periodicity—that is, they simultaneously exhibit high periodicity and strong directionality—therefore, The larger the value, the more the t-th suspected plating defect area conforms to the periodic texture characteristics of the regular machining texture area. The larger it is; This is the directional indicator for the t-th suspected plating defect area. The larger the value, the more the t-th suspected plating defect area conforms to the directional texture characteristics of the regular machining texture area. The larger it is.

[0068] Furthermore, a texture structure index threshold is set. If the texture structure index of any suspected plating defect area is less than the texture structure index threshold, then the defect determination result of any suspected plating defect area is confirmed as a real plating defect area. To ensure high sensitivity in screening real plating defect areas while effectively filtering out most regular background interference, the texture structure index threshold is set to 0.4 in this embodiment. This is not a limitation and can be set according to the specific implementation scenario.

[0069] Thus, the defect determination result for any suspected unplated area is obtained.

[0070] Step S104: Obtain the defect determination result of each suspected unplated area in the grayscale image, and use the defect determination result of each suspected unplated area in the grayscale image to identify defects in the nickel-plated parts to be inspected.

[0071] Following the method described above for obtaining the defect judgment result of any suspected plating omission area, the defect judgment result of each suspected plating omission area in the grayscale image is obtained. Then, using the defect judgment result of each suspected plating omission area in the grayscale image, defect identification is performed on the nickel-plated part to be inspected, the final defect judgment conclusion of the nickel-plated part to be inspected is output, and the corresponding quality control process is triggered. The use of the defect judgment result of each suspected plating omission area in the grayscale image to perform defect identification on the nickel-plated part to be inspected, output the final defect judgment conclusion of the nickel-plated part to be inspected, and trigger the corresponding quality control process are existing technologies and will not be elaborated upon here.

[0072] In summary, in this embodiment of the invention, pyramid downsampling of the nickel-plated area overcomes the limitations of the traditional single-scale LBP histogram analysis method, thereby obtaining the total texture feature value of the nickel-plated area to characterize the complete texture statistical features and structural information of the nickel-plated area. This effectively suppresses false alarms caused by complex background textures, lighting artifacts, etc., and improves the accuracy of subsequent judgment of suspected missing plating areas. When suspected missing plating areas exist in the grayscale image, the texture structure index of the suspected missing plating area is obtained, and the intrinsic texture structure features of the suspected missing plating area are further analyzed. The accuracy of the suspected missing plating area is cross-validated, thereby improving the accuracy and reliability of missing plating defect detection.

[0073] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for identifying surface defects in precision parts processed by electroless nickel plating of aluminum alloys, characterized in that, The method for identifying surface defects in precision parts processed by the aluminum alloy electroless nickel plating process includes: In the process of electroless nickel plating of aluminum alloy, an initial image of the nickel-plated part to be inspected is acquired, and the initial image is processed into grayscale to obtain a grayscale image. The grayscale image is uniformly divided into at least two nickel-plated regions of a preset size. For any nickel-plated region, pyramid downsampling is performed on the nickel-plated region to obtain a first preset number of scale images. Based on the texture distribution characteristics of each scale image, the total texture feature value of any nickel-plated region is obtained. The total texture feature value of each nickel-plated region is obtained. Using the total texture feature value of each nickel-plated region, it is determined whether there are suspected unplated areas in the grayscale image. If there is at least one suspected plating defect area in the grayscale image, then for any suspected plating defect area, the texture structure index of the suspected plating defect area is obtained according to the texture directionality feature and texture periodicity feature of the suspected plating defect area, and the defect judgment result of the suspected plating defect area is obtained using the texture structure index. Obtain the defect determination result of each suspected unplated area in the grayscale image, and use the defect determination result of each suspected unplated area in the grayscale image to identify defects in the nickel-plated parts to be inspected.

2. The method for identifying surface defects of precision parts processed by electroless nickel plating of aluminum alloy according to claim 1, characterized in that, The step of obtaining the total texture feature value of any nickel-plated region based on the texture distribution features of each scale image includes: For any scale image, the LBP algorithm is used to obtain the normalized LBP histogram of the image at any scale. The horizontal axis of the normalized LBP histogram is the LBP mode number, and the vertical axis is the frequency corresponding to the LBP mode number. Based on the frequency distribution characteristics of the normalized LBP histogram of the image at any scale, the texture feature value of the image at any scale is obtained. Obtain the texture feature value of each scale image, and obtain the total texture feature value of any nickel-plated area based on the texture feature value of each scale image.

3. The method for identifying surface defects of precision parts processed by electroless nickel plating of aluminum alloy according to claim 2, characterized in that, The step of obtaining the texture feature value of the image at any scale based on the frequency distribution characteristics of the normalized LBP histogram of the image at any scale includes: Each LBP mode number in the normalized LBP histogram is combined with its corresponding frequency to form a coordinate point. All coordinate points are sorted in descending order of frequency. A preset proportion of high-frequency coordinate points are selected from all coordinate points to form a high-frequency coordinate point sequence. Obtain the absolute value of the difference between the frequency mean of the normalized LBP histogram and the frequency mean of the high-frequency coordinate point sequence to obtain the frequency deviation of the high-frequency coordinate points. Substitute the negative of the frequency deviation of the high-frequency coordinate points into an exponential function with the natural constant as the base to obtain the first texture feature value. In the high-frequency coordinate point sequence, the average value of the absolute difference between the LBP mode numbers of every two adjacent high-frequency coordinate points is obtained and recorded as the high-frequency coordinate point dispersion. The negative number of the high-frequency coordinate point dispersion is substituted into the exponential function with the natural constant as the base to obtain the second texture feature value. The first texture feature value and the second texture feature value are weighted and summed to obtain the texture feature value of the image at any scale.

4. The method for identifying surface defects of precision parts processed by electroless nickel plating of aluminum alloy according to claim 2, characterized in that, The step of obtaining the total texture feature value of any nickel-plated region based on the texture feature value of each scale image includes: The texture feature values ​​of each scale image of any nickel-plated region are weighted and summed to obtain the total texture feature value of any nickel-plated region.

5. The method for identifying surface defects of precision parts processed by electroless nickel plating of aluminum alloy according to claim 1, characterized in that, The step of using the total texture feature value of each nickel-plated area to determine whether there are suspected unplated areas in the grayscale image includes: Set a total texture feature value threshold. For any nickel-plated area in the grayscale image, if the total texture feature value of any nickel-plated area is less than the total texture feature value threshold, then the nickel-plated area is confirmed as a suspected unplated area. The number of suspected plating defects in the grayscale image is obtained. If the number of suspected plating defects in the grayscale image is greater than or equal to 1, then it is confirmed that there are suspected plating defects in the grayscale image.

6. The method for identifying surface defects of precision parts processed by electroless nickel plating of aluminum alloy according to claim 1, characterized in that, The step of obtaining the texture structure index of any suspected plating defect area based on the texture directionality and texture periodicity characteristics of any suspected plating defect area includes: In the grayscale image, based on the preset translation range of any suspected plating defect area, the autocorrelation function of any suspected plating defect area is obtained. The horizontal translation distance of any suspected plating defect area is used as the abscissa, the vertical translation distance of any suspected plating defect area is used as the ordinate, and the autocorrelation function value of any suspected plating defect area after translation is used as the brightness value of the pixel. A planar heatmap of the autocorrelation function is constructed. In the autocorrelation function plane heat map, starting from the origin, a second preset number of analysis directions are set, and the anisotropy index of any suspected uncoated area is obtained based on the difference in the brightness value of the pixel points in each analysis direction. Based on the brightness distribution characteristics of pixels in each analysis direction, the periodic index of any suspected unplated area is obtained. Based on the anisotropy index and periodicity index of any suspected unplated area, the texture structure index of any suspected unplated area is obtained.

7. The method for identifying surface defects of precision parts processed by electroless nickel plating of aluminum alloy according to claim 6, characterized in that, The step of obtaining the anisotropy index of any suspected uncoated region based on the difference in brightness values ​​of pixels in each analysis direction includes: For any pixel in any analysis direction, the square of the brightness value of the pixel is obtained and recorded as the energy value of the pixel. The cumulative result of the energy values ​​of each pixel in any analysis direction is obtained to obtain the total energy value of the analysis direction. Obtain the total energy value for each analysis direction, calculate the ratio of the maximum total energy value to the minimum total energy value, and denot it as the significance of the texture dominant direction. Substitute the negative of the difference between the significance of the texture dominant direction and the constant 1 into an exponential function with the natural constant as the base to obtain the anisotropy index of any suspected unplated area.

8. The method for identifying surface defects of precision parts processed by electroless nickel plating of aluminum alloy according to claim 6, characterized in that, The step of obtaining the periodic index of any suspected unplated area based on the brightness distribution characteristics of pixels in each analysis direction includes: For any analysis direction, the brightness values ​​of the pixels in the analysis direction are arranged into a brightness value sequence. The maximum value in the brightness value sequence is obtained. The distance between each two adjacent maximum values ​​is calculated to obtain the mean distance. The absolute value of the difference between the distance between each two adjacent maximum values ​​and the mean distance is obtained to obtain the mean absolute value of the difference. The negative of the mean absolute value of the difference is substituted into an exponential function with the natural constant as the base to obtain the periodic intensity value of the analysis direction. Obtain the periodic intensity value for each analysis direction, and record the maximum periodic intensity value as the periodic index of any suspected uncoated area.

9. The method for identifying surface defects of precision parts processed by electroless nickel plating of aluminum alloy according to claim 6, characterized in that, The step of obtaining the texture structure index of any suspected unplated area based on the anisotropy index and periodicity index of any suspected unplated area includes: The difference between the constant 1 and the anisotropy index of any suspected missing plating area is obtained to obtain the directional index of any suspected missing plating area. The arithmetic square root of the product of the directional index and the periodic index is obtained to obtain the texture structure index of any suspected missing plating area.

10. The method for identifying surface defects of precision parts processed by electroless nickel plating of aluminum alloy according to claim 1, characterized in that, The step of using the texture structure index to obtain the defect determination result of any suspected unplated area includes: The defect determination result includes actual unplated areas and interference areas. A texture structure index threshold is set. If the texture structure index is less than the texture structure index threshold, the defect determination result of any suspected unplated area is confirmed as an actual unplated area.

Citation Information

Cited By

  • Abnormity detection method for coating of precision part treated by aluminum alloy chemical nickel plating process

    CN121837797A