Air conditioner panel injection surface micro-defect detection method based on multi-scale feature fusion

By employing a multi-scale feature fusion method, combined with the Laplacian pyramid algorithm and local neighborhood gray-level deviation and orthogonal direction gradient, the true defect value of the injection-molded surface of the air conditioner panel is calculated. This solves the problem of insufficient recognition accuracy in single-scale feature extraction methods and achieves high-precision micro-defect detection and closed-loop control.

CN122115455APending Publication Date: 2026-05-29WUHAN JUYAMEI NEW MATERIAL CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN JUYAMEI NEW MATERIAL CO LTD
Filing Date
2026-04-29
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In the detection of micro-defects on the injection-molded surface of air conditioner panels, the existing single-scale feature extraction method results in insufficient recognition accuracy, making it difficult to effectively distinguish between extremely small defects and normal injection-molded textures, and thus introducing errors.

Method used

A multi-scale feature fusion method is adopted. The image is decomposed by the Laplacian pyramid algorithm. The initial defect value and morphological filtering coefficient are calculated by combining the local neighborhood gray-level deviation and orthogonal direction gradient to obtain the true defect value. Finally, the cross-scale resonance information and environmental offset are used to calculate the final probability score. Finally, binarization and connected component labeling are performed.

Benefits of technology

It improves the accuracy of micro-defect detection on the injection-molded surface of air conditioner panels, reduces the risk of false alarms due to environmental factors such as light fluctuations, and achieves efficient quality judgment and closed-loop control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115455A_ABST
    Figure CN122115455A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of image processing, and particularly relates to an air conditioner panel injection molding surface micro-defect detection method based on multi-scale feature fusion, which comprises the following steps: collecting an original color image of an air conditioner panel injection molding surface, preprocessing to obtain a reference image, and decomposing to obtain multi-scale residual images; calculating an initial defect value according to the deviation degree of the pixel gray from the local background, calculating a morphological filtering coefficient combined with the collaborative change intensity of the orthogonal direction gradient, and obtaining a true defect value combined with the initial defect value and the morphological filtering coefficient; calculating a final probability score according to the true defect value; performing binarization and connected domain analysis on the final probability score, and outputting a detection signal according to the number of independent micro-defect connected regions obtained. The application improves the micro-defect detail loss problem caused by single-scale feature extraction, and improves the micro-defect positioning accuracy in a complex normal injection molding texture background.
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. More specifically, this invention relates to a method for detecting micro-defects on the injection-molded surface of air conditioner panels based on multi-scale feature fusion. Background Technology

[0002] In the injection molding production process of air conditioner panels, surface quality inspection is a key step to ensure the aesthetics and functionality of the product. With the increasing demands for precision in the appearance of modern home appliances, industrial cameras are currently used to acquire images of the injection-molded surface of air conditioner panels, and target features are extracted using single-scale operators. The aim is to automatically identify and label micro-defects on the injection-molded surface of air conditioner panels, thereby ensuring the overall quality of the products leaving the factory.

[0003] Currently, the industry generally uses fixed-size image processing operators to perform edge extraction or contrast analysis on the collected images of the injection-molded surface of air conditioning panels. These existing technologies usually rely on a preset global grayscale threshold or a single spatial resolution scale. Based on this, the local grayscale change amplitude of each pixel in the image is used as the only reference benchmark to determine whether micro-defects exist. Subsequently, a binarized judgment result containing the suspected defect area is output through single-scale connected component analysis.

[0004] Existing single-scale feature extraction methods still have room for improvement when dealing with micro-defects on the injection-molded surface of air conditioner panels. Because micro-defects are small in size and often deeply hidden within complex normal injection-molded textures, fixed-size image feature extraction operators are ineffective at both suppressing normal injection-molded textures and highlighting micro-defects. When the selected detection scale is large, the retention rate of micro-defect features is low; while when the scale is small, normal injection-molded textures easily introduce pseudo-edge interference. This results in insufficient accuracy of existing techniques for identifying extremely small defects, leading to a certain degree of error in the overall detection results. Summary of the Invention

[0005] To address the aforementioned technical problem of low accuracy in micro-defect identification, this invention provides a method for detecting micro-defects on the injection-molded surface of air conditioner panels based on multi-scale feature fusion, comprising: The original color image of the injection-molded surface of the air conditioner panel is acquired, converted into a grayscale image, and subjected to noise reduction and segmentation processing to obtain a preprocessed reference image. The reference image is decomposed using the Laplacian pyramid algorithm to obtain multi-scale residual maps at multiple scales. A local neighborhood is set centered on any pixel, and the initial defect value of each pixel in each multi-scale residual map is calculated based on the degree of deviation of the pixel's grayscale from its local background. An analysis window is divided centered on any pixel, and the morphological filtering coefficient of each pixel in each multi-scale residual map is calculated based on the intensity of the cooperative change of the pixel's gradient in the orthogonal direction within the analysis window. The true defect value of each pixel is obtained by combining the initial defect value and the morphological filtering coefficient. The final probability score of each pixel is calculated based on the cross-scale positional resonance information of the true defect value and the environmental offset of the preprocessed reference image. A judgment threshold is set to binarize the final probability score to obtain a defect mask binary map. Connected component labeling is performed on the defect mask binary map, and the presence of micro-defects on the injection-molded surface of the air conditioner panel is determined based on the number of independent micro-defect connected regions, and a detection signal is output.

[0006] This invention obtains true defect values ​​by combining the deviation of pixel grayscale values ​​from their local background in multi-scale residual images with the intensity of coordinated changes in orthogonal gradients. This suppresses false edge interference caused by normal injection molding textures on the injection-molded surface of air conditioner panels during the feature extraction stage. Furthermore, based on the cross-scale positional resonance information of the true defect values ​​and the environmental offset of the preprocessed reference image, a final probability score is derived. This allows for the selection of true anomaly locations with continuous responses at multiple spatial resolution levels. Simultaneously, the score probability is adaptively adjusted according to the current environmental deviation, reducing the risk of false alarms caused by environmental factors such as production line lighting fluctuations. Finally, by setting a judgment threshold for binarization and connected component labeling, the continuous probability distribution is converted into a discrete detection signal containing the number of independent micro-defect connected regions. This guides downstream actuators to complete closed-loop control for quality judgment and improves the overall micro-defect detection accuracy.

[0007] Preferably, the acquisition of the multi-scale residual map includes: The original color image of the injection molded surface of the air conditioner panel is acquired using an industrial area scan camera mounted on the production line automated inspection platform. The original color image is converted into a grayscale image, and then the grayscale image is subjected to noise reduction processing. The smooth injection molded surface, which removes the surrounding non-detection background, is segmented by the U-Net semantic segmentation model and used as the reference image after preprocessing. The reference image is subjected to continuous Gaussian kernel convolution filtering using the Laplacian pyramid algorithm, and spatial downsampling is performed to construct a multi-level Gaussian pyramid containing multiple levels of images. Then, by upsampling and subtracting adjacent levels of images in the multi-level Gaussian pyramid, a multi-scale residual map of the reference image at multiple scales is obtained.

[0008] Preferably, the initial defect value satisfies the following relationship: ; In the formula, Indicates the first Multi-scale residual maps at various scales at pixel points Initial defect value at the location; Indicates the first Multi-scale residual maps at various scales at pixel points The grayscale value at that location; Indicates the first Multi-scale residual maps at various scales at pixel points The average pixel value within the local neighborhood; Indicates the first Multi-scale residual maps at various scales at pixel points The standard deviation within the local neighborhood; Indicates the first Multi-scale residual maps at various scales at pixel points local neighborhood pixels The grayscale value at that location; Represents the maximum value function; Describes the minimum value function; Indicates the first preset minute value; This represents the natural exponential function.

[0009] This invention introduces a natural exponential decay logic that includes the average pixel value and the standard deviation of pixels within the local neighborhood when calculating the initial defect value. This allows for the evaluation of the relative difference between the gray value of the center pixel and the background of the local neighborhood. Furthermore, the local extreme value difference is normalized and adjusted using the standard deviation of pixels within the local neighborhood. This adapts to the uneven global illumination phenomenon in different areas of the injection-molded surface of the air conditioner panel, reduces the interference caused by large-area normal gradient shadows or light spots on the extraction of local abnormal features, and makes the final initial defect value more consistent with the real gray-scale change physical properties of minor flaws, while improving the feature anti-interference ability under complex backgrounds.

[0010] Preferably, the morphological filtering coefficient satisfies the following relationship: ; In the formula, Indicates the first Multi-scale residual maps at various scales at pixel points The morphological filtering coefficient at the location; Indicates the first Multi-scale residual maps at various scales at pixel points Within the analysis window, the weighted sum of the squared gradients in the horizontal direction; Indicates the first Multi-scale residual maps at various scales at pixel points Within the analysis window, the weighted sum of the squared gradients in the vertical direction; Indicates the first Multi-scale residual maps at various scales at pixel points Within the analysis window, the weighted sum of the gradient products in the horizontal and vertical directions; Indicates the first Gradient energy reference threshold for multi-scale residual maps at multiple scales; This represents the second preset micro value.

[0011] In obtaining the morphology filtering coefficient, this invention extracts the weighted sum of the squared gradients in the horizontal direction and the weighted sum of the squared gradients in the vertical direction within the analysis window, and the weighted sum of the products of the horizontal and vertical gradients. This yields an algebraic relationship reflecting the isotropic degree of gradient distribution in a local area. Furthermore, by utilizing the physical characteristic that point-like micro-defects have similar gradient responses in various orthogonal directions, a secondary filtering is performed on the initial defect values ​​obtained earlier. This suppresses high-gradient features generated by normal injection-molded texture backgrounds with unidirectional linear structures. Simultaneously, a gradient energy reference threshold is introduced as a global energy benchmark constraint to reduce the proportion of low-energy background noise in morphology determination, thereby improving the accuracy of the obtained morphology filtering coefficient in the recognition of complex air conditioner panel injection-molded surface textures.

[0012] Preferably, the step of combining the initial defect value and the morphological filtering coefficient to obtain the true defect value of each pixel in each multi-scale residual image includes: The morphological filtering coefficients of each pixel in the multi-scale residual map of any scale are multiplied pixel by pixel with the corresponding initial defect value to obtain the true defect value of each pixel in the multi-scale residual map of the corresponding scale.

[0013] Preferably, the final probability score satisfies the following relationship: ; In the formula, Represents pixels The final probability score at the location; Indicates the total number of layers in the scale; Indicates the first Multi-scale residual maps at various scales at pixel points The actual defect value at the location; Indicates the first Multi-scale residual maps at various scales at pixel points The actual defect value at the location; Indicates the first The importance weight of each scale; Indicates the first The global Euclidean distance between the multi-scale residual map at each scale and the preprocessed reference image; Indicates the normalized reference distance; This represents the natural exponential function.

[0014] When calculating the final probability score, this invention multiplies and accumulates the real defect values ​​on adjacent multi-scale residual maps layer by layer. This utilizes the cross-scale positional resonance information characteristics of real micro-defects, which exhibit consistent positions between adjacent scales. In the fusion process, it reduces the weight of random image noise that only appears in isolation at a single resolution level, reduces the judgment bias caused by unstable environmental fluctuations such as sudden changes in production line lighting or camera shake, and improves the detection stability in industrial settings. This allows the detection model to better adapt to the changing physical conditions in actual production lines.

[0015] Preferably, the step of setting a judgment threshold to binarize the final probability score to obtain a defect mask binary image includes: Set a judgment threshold, iterate through the final probability scores of all pixels, and when the final probability score is greater than or equal to the judgment threshold, the corresponding pixel is binarized and marked as 1, indicating the existence of a micro-defect; when the final probability score is less than the judgment threshold, the corresponding pixel is binarized and marked as 0, indicating a normal surface, thus obtaining a complete defect mask binary image.

[0016] Preferably, the step of marking connected components in the defect mask binary map, determining whether micro-defects exist on the injection-molded surface of the air conditioner panel based on the number of independent micro-defect connected regions obtained, and outputting a detection signal includes: Connectivity is marked on the binary image of the defect mask to obtain independent micro-defect connected regions. The area and centroid physical coordinates of each independent micro-defect connected region are counted. When the total number of detected independent micro-defect connected regions is greater than zero, it is determined that there is a micro-defect on the injection molding surface of the current air conditioner panel. A high-level unqualified signal and a list of data containing the centroid physical coordinates are output through the industrial field communication interface. If the total number of independent micro-defect connected regions is zero, the air conditioner panel is determined to be of qualified quality.

[0017] This invention marks the connected components of the defect mask binary image and counts the area and centroid physical coordinates of each independent micro-defect connected region. The final probability score obtained by multi-scale feature fusion is converted into a signal that can be directly recognized by the downstream mechanical actuator. When the number of independent micro-defect connected regions is greater than zero, a high-level unqualified signal and a list of data containing the centroid physical coordinates are directly output through the industrial field communication interface. This completes the logical closed-loop judgment from image feature processing to production line action execution, thereby helping the production line sorting equipment to locate the specific location of micro-defects on the injection molding surface of the air conditioner panel and perform rejection actions to improve the continuity of automated inspection operations.

[0018] Preferably, obtaining the gradient energy reference threshold includes: Edge detection is performed on each multi-scale residual map to obtain the horizontal and vertical gradients of each pixel in each multi-scale residual map. An analysis window is divided with any pixel in any multi-scale residual map as the center, and a local structure tensor matrix is ​​constructed for the corresponding pixel. The elements of the local structure tensor matrix include the weighted sum of the squares of the horizontal gradients, the weighted sum of the squares of the vertical gradients, and the weighted sum of the products of the horizontal and vertical gradients within the analysis window. Calculate the sum of the squares of the horizontal and vertical gradients of each pixel in the multi-scale residual map at any scale to obtain the gradient energy of each pixel. Calculate the average value of the sum of the gradient energies of all pixels in the multi-scale residual map at any scale to obtain the gradient energy reference threshold at the corresponding scale.

[0019] Preferably, obtaining the global Euclidean distance includes: Upsample and restore the multi-scale residual image of arbitrary scale to make its pixel resolution consistent with the preprocessed reference image; calculate the square of the difference between the gray value of the corresponding sampled and restored multi-scale residual image and the reference image at the same pixel point; sum the squares of the gray value differences of all pixels and perform a square root operation to obtain the global Euclidean distance between the multi-scale residual image of the corresponding scale and the preprocessed reference image.

[0020] The beneficial effects of this invention are as follows: This invention obtains initial defect values ​​by extracting the degree of deviation of pixel grayscale values ​​from their local background in multi-scale residual images, thereby assessing local abnormal grayscale fluctuations to reduce interference caused by uneven global illumination. Combined with feature filtering using morphological filtering coefficients that reflect the intensity of coordinated changes in orthogonal gradients, the true defect values ​​are obtained. The isotropic nature of micro-defects is utilized to suppress false edges generated by normal injection molding textures. Furthermore, the cross-scale positional resonance information of the true defect values ​​and the environmental offset of the preprocessed reference image are fused to obtain the final probability score. Cross-scale multiplication operations reduce isolated noise interference, and the degree of feature deviation from the reference image is used to correct the calculation weights, thereby reducing judgment bias caused by production line environmental fluctuations. Finally, the continuous probability scores are converted into the number of independent micro-defect connected regions that can be identified by field equipment, achieving a balance between suppressing texture interference and highlighting defects in the detection process, thus improving the reliability of air conditioner panel quality judgment. Attached Figure Description

[0021] Figure 1 The flowchart of the method for detecting micro-defects on the injection-molded surface of an air conditioner panel based on multi-scale feature fusion in this invention is illustrated in the schematic diagram. Figure 2 This diagram illustrates the final probability score distribution. Figure 3 A schematic diagram illustrating the binary image of the defect mask is shown. Figure 4 A schematic diagram illustrating the annotation of the final test results is shown. Detailed Implementation

[0022] This invention discloses a method for detecting micro-defects on the injection-molded surface of air conditioner panels based on multi-scale feature fusion, referring to... Figure 1 This includes steps S100-S400: S100. Acquire the original color image of the injection-molded surface of the air conditioner panel, convert it into a grayscale image, and perform noise reduction and segmentation processing to obtain a preprocessed reference image; use the Laplacian pyramid algorithm to decompose the reference image to obtain multi-scale residual maps of multiple scales.

[0023] It should be noted that, in order to capture the overall background features while preserving the details of micro-defects, and considering that the Gaussian pyramid decomposition model can reflect the image residual information at a specific spatial frequency, the lower scale focuses on representing the micro-texture and point-like micro-defects on the injection-molded surface of the air conditioner panel, while the higher scale reflects the macroscopic illumination distribution. Therefore, this invention introduces the Laplacian pyramid algorithm to separate and extract the original data after noise reduction, thereby improving the phenomenon that detailed features are easily confused with high-frequency noise or low-frequency illumination at a single resolution.

[0024] Specifically, an industrial area scan camera mounted on an automated production line inspection platform acquires the original color image of the injection-molded surface of the air conditioner panel. This original color image is then converted to a grayscale image. Noise reduction processing is performed on the grayscale image, and the smooth injection-molded surface, after removing surrounding non-detection background, is segmented using the U-Net semantic segmentation model. This smoothed surface is then used as the preprocessed baseline image. For example, the noise reduction process employs a Gaussian filtering algorithm, which is existing technology and will not be elaborated upon here.

[0025] The reference image is subjected to continuous Gaussian kernel convolution filtering using the Laplacian pyramid algorithm, and spatial downsampling is performed to construct a multi-level Gaussian pyramid containing multiple image layers. Subsequently, by upsampling and subtracting adjacent layer images in the multi-level Gaussian pyramid, a multi-scale residual map of the reference image at multiple scales is obtained. It should be noted that the Laplacian pyramid algorithm is existing technology and will not be described in detail here.

[0026] Thus, multi-scale residual maps of the reference image at multiple scales were obtained.

[0027] S200. Taking any pixel as the center, set a local neighborhood. Based on the degree of deviation of the pixel's grayscale from its local background, calculate the initial defect value of each pixel in the multi-scale residual map. Taking any pixel as the center, divide the analysis window. Based on the intensity of the cooperative change of the gradient in the orthogonal direction of the pixel within the analysis window, calculate the morphological filtering coefficient of each pixel in the multi-scale residual map. Combine the initial defect value and the morphological filtering coefficient to obtain the true defect value of each pixel.

[0028] It should be noted that the response intensity of micro-defects on the injection-molded surface of an air conditioner panel at a specific scale is closely related to the contrast of the surrounding normal injection-molded texture. Considering that the difference in grayscale distribution within a local neighborhood can reflect the severity of abnormal fluctuations in that area, this invention calculates the response variance of the local neighborhood and normalizes the contrast using the local standard deviation to obtain dimensionless weight parameters. This is to assess the severity of each pixel's deviation from its local background characteristics, thereby reducing the interference caused by global illumination unevenness on the feature extraction of abnormally bright or dark areas.

[0029] Specifically, based on the degree of deviation of the pixel grayscale value from its local background in the multi-scale residual image, the initial defect value of each pixel in each multi-scale residual image is calculated, including: A local neighborhood of a preset size is set, centered on any pixel in the multi-scale residual map of any scale. For example, the size of the local neighborhood is 5×5 pixels to fully cover the typical area of ​​the micro-defect and include enough background reference pixels. If the local neighborhood is too large, for example, 15×15 pixels, it is easy to introduce too much normal injection molding texture, which will dilute the local contrast. If the local neighborhood is too small, for example, 3×3 pixels, it is difficult to include enough background reference pixels, which will lead to distortion of the deviation evaluation.

[0030] The initial defect value of any pixel in an arbitrary multi-scale residual image satisfies the following relationship: ; In the formula, Indicates the first Multi-scale residual maps at various scales at pixel points Initial defect value at the location; Indicates the first Multi-scale residual maps at various scales at pixel points The grayscale value at that location; Indicates the first Multi-scale residual maps at various scales at pixel points The average pixel value within the local neighborhood; Indicates the first Multi-scale residual maps at various scales at pixel points The standard deviation within the local neighborhood; Indicates the first Multi-scale residual maps at various scales at pixel points local neighborhood pixels The grayscale value at that location; Represents the maximum value function; Describes the minimum value function; This represents the first preset microvalue, used to prevent the denominator from being 0, and can be set to 0.001; This represents the natural exponential function.

[0031] In this relation, Represents pixels The local deviation, the larger the local deviation, the more significant the pixel deviation. The higher the consistency with the surrounding background, the smoother the background region; conversely, the smaller the local deviation, the better the pixel. The higher the degree of abnormality deviating from the background mean, the more likely it is to be an abnormally abruptly changed pixel. Represents pixels The normalized contrast reflects the difference in the dynamic range within a local neighborhood relative to the overall fluctuation. The larger the normalized contrast, the greater the extreme value fluctuation within the local neighborhood is compared to its average dispersion. Conversely, the smaller the normalized contrast, the closer the extreme value fluctuation within the local neighborhood is to its average dispersion, indicating a smooth background lacking abrupt changes.

[0032] Thus, the initial defect values ​​of each pixel in the multi-scale residual maps are obtained.

[0033] It should be noted that since the high-energy initial region obtained still contains normal injection molding texture, and considering the differences in the directional distribution of gradients in the local region, which can reflect the geometric morphological characteristics of the object, this invention establishes a local structure tensor. By utilizing the characteristic that point-like micro-defects have similar gradient responses in various directions, the initial defect values ​​obtained in the early stage are filtered a second time, thereby suppressing the pseudo-edge interference generated by the anisotropic normal injection molding texture background.

[0034] Preferably, based on the cooperative change intensity of the orthogonal direction gradients in the multi-scale residual maps, the morphological filtering coefficients of each pixel in each multi-scale residual map are calculated, including: Edge detection is performed on the multi-scale residual maps to obtain the horizontal and vertical gradients of each pixel in each residual map. An analysis window is then defined centered on any pixel in the multi-scale residual map, and a local structure tensor matrix is ​​constructed for each corresponding pixel. It should be noted that the elements of the local structure tensor matrix include the weighted sum of the squares of the horizontal gradients, the weighted sum of the squares of the vertical gradients, and the weighted sum of the products of the horizontal and vertical gradients within the analysis window. For example, the edge detection uses the Sobel operator, which is existing technology and will not be elaborated upon here. The analysis window is set to 3×3 pixels to capture the isotropic gradient distribution within the neighborhood, reduce interference from irrelevant pixels, and lower the computational complexity of the weighted summation of the local structure tensor matrix elements.

[0035] Calculate the sum of the squares of the horizontal and vertical gradients of each pixel in the multi-scale residual map at any scale to obtain the gradient energy of each pixel. Calculate the average value of the sum of the gradient energies of all pixels in the multi-scale residual map at any scale to obtain the gradient energy reference threshold at the corresponding scale.

[0036] The morphological filtering coefficients of any pixel in an arbitrary multi-scale residual image satisfy the following relationship: ; In the formula, Indicates the first Multi-scale residual maps at various scales at pixel points The morphological filtering coefficient at the location; Indicates the first Multi-scale residual maps at various scales at pixel points Within the analysis window, the weighted sum of the squared gradients in the horizontal direction; Indicates the first Multi-scale residual maps at various scales at pixel points Within the analysis window, the weighted sum of the squared gradients in the vertical direction; Indicates the first Multi-scale residual maps at various scales at pixel points Within the analysis window, the weighted sum of the gradient products in the horizontal and vertical directions; Indicates the first Gradient energy reference threshold for multi-scale residual maps at multiple scales; This represents the second preset microvalue, used to prevent the denominator from being 0, and can be set to 0.001.

[0037] In this relation, This indicates the anisotropy intensity of the gradient distribution and the structural coherence. The larger the value, the more pixels there are. Significant and uncorrelated gradient changes exist simultaneously in two orthogonal directions, which is consistent with the geometric and physical properties of point-like micro-defects; otherwise, it indicates that the local gradient is mainly concentrated in a single direction, or the gradients in the two directions are highly correlated, which belongs to the normal injection molding texture or smooth area of ​​line. Represents pixels The relative significance intensity of the local total gradient energy at a given point; the greater the relative significance intensity, the stronger the significance intensity of the pixel. The grayscale change at a certain point is more drastic than the average level of the image at the current scale, representing a pixel. It is a high-energy signal mutation point, possessing the physical basis to become a real defect; conversely, it indicates that the pixel... The grayscale change at this location is gradual, close to the average fluctuation level of the background, indicating a smooth background or a region with weak noise.

[0038] Preferably, the morphological filtering coefficients of each pixel in the multi-scale residual map of any scale are multiplied pixel by pixel with the corresponding initial defect value to obtain the true defect value of each pixel in the multi-scale residual map of the corresponding scale. It should be noted that by numerically weighting the initial defect value according to the morphological filtering coefficients, structured normal injection molding texture response signals can be filtered out.

[0039] Thus, the true defect values ​​of each pixel in the multi-scale residual maps were obtained.

[0040] S300. Based on the cross-scale positional resonance information of the true defect value and the environmental offset of the preprocessed reference image, calculate the final probability score of each pixel.

[0041] It should be noted that since tiny random noises usually appear in isolation at a single resolution scale, while real micro-defects will exhibit a consistent resonance response at adjacent scales, considering the cross-scale positional correlation and the degree of global environmental offset, which can reflect the authenticity and reliability of features, this invention introduces a product operation model that includes a normalized Euclidean distance penalty term to fuse information from multiple scales, thereby reducing the risk of misjudgment caused by isolated noise and improving the confidence of output results under unstable environments such as abnormal lighting.

[0042] Specifically, based on the cross-scale location resonance information of the true defect values ​​and the environmental offset of the preprocessed reference image, the final probability score of each pixel is calculated, including: Upsample and restore the multi-scale residual image of arbitrary scale to make its pixel resolution consistent with the preprocessed reference image; calculate the square of the difference between the gray value of the corresponding sampled and restored multi-scale residual image and the reference image at the same pixel point; sum the squares of the gray value differences of all pixels and perform a square root operation to obtain the global Euclidean distance between the multi-scale residual image of the corresponding scale and the preprocessed reference image.

[0043] The final probability score of any pixel satisfies the following relationship: ; In the formula, Represents pixels The final probability score at the location; Indicates the total number of layers in the scale; Indicates the first Multi-scale residual maps at various scales at pixel points The actual defect value at the location; Indicates the first Multi-scale residual maps at various scales at pixel points The actual defect value at the location; Indicates the first The importance weights for each scale are set as follows: The reciprocal of gives the lower-level scale, which carries more high-frequency details, a greater weight during fusion computation; Indicates the first The global Euclidean distance between the multi-scale residual map at each scale and the preprocessed reference image; The normalized reference distance is the expected value of the maximum permissible deviation obtained by statistically analyzing the global Euclidean distances between a large number of normal surface samples and the standard template image. This represents the natural exponential function.

[0044] In this relation, It represents the local characteristic resonance intensity between adjacent spatial frequency scales. Represents pixels The cumulative defect confidence level across the entire decomposition space is considered. A higher cumulative defect confidence level indicates a higher pixel confidence level. The defect features at a certain location resonate across most adjacent scales, suggesting the possible presence of a real defect; conversely, it indicates that the pixel does not resonate. The lack of sustained characteristic response throughout the entire scale evolution process indicates that it belongs to background fluctuations or non-structural disturbances. Indicates the first The degree to which the residual features at each scale deviate from the information in the reference image, and the degree of deviation of the residual features at the first scale from the information in the second scale. The product of the importance of each scale. This indicates the system's overall trust level in the current image acquisition environment. The higher the overall trust level, the lower the environmental offset at each scale and the weaker the exponential decay, indicating that the system considers the imaging environment to be in a stable state. Conversely, it indicates that the environmental fluctuations are severe, leading to an increase in global deviation and exponential decay, thereby achieving adaptive range scaling for the final score.

[0045] For example, Figure 2 This is a schematic diagram of the final probability score distribution. The diagram shows the final probability score distribution after feature fusion calculation. It can be seen that the interference generated by normal injection molding texture is effectively suppressed, and the suspected micro-defect area shows a high score response.

[0046] At this point, the final probability score for each pixel is obtained.

[0047] S400. Set a judgment threshold to perform binarization processing on the final probability score to obtain a defect mask binary map; mark the connected components of the defect mask binary map, and determine whether there are micro-defects on the injection molding surface of the air conditioner panel based on the number of independent micro-defect connected regions obtained, and output a detection signal.

[0048] It should be noted that the final probability scores of each pixel constitute a continuous probability distribution, which must be converted into discrete quality conclusions that can be recognized by hardware control equipment in order to complete the closed loop of production line control logic. Considering that the spatial clustering characteristics of discrete points can reflect the actual physical coordinates of abnormal objects, this invention converts the probability scores of the mathematical dimension into control instructions for guiding the action judgment of downstream mechanical mechanisms by performing threshold segmentation and connected region labeling.

[0049] Specifically, a judgment threshold is set, and the final probability scores of all pixels are iterated. When the final probability score is greater than or equal to the judgment threshold, the corresponding pixel is binarized and marked as 1, indicating the presence of a micro-defect; when the final probability score is less than the judgment threshold, the corresponding pixel is binarized and marked as 0, indicating a normal surface, thus obtaining a complete defect mask binary image. For example, the judgment threshold is set to 0.75. If the judgment threshold is too large, for example, a value of 1.5, some minor defects with low contrast or only a few adjacent scales that produce weak resonance responses will be filtered out by the system as normal areas, resulting in the underreporting of real micro-defects. If the judgment threshold is too small, for example, a value of 0.1, the feature sensitivity of the system will be too high, and some local normal injection molding textures remaining in the early filtering stage, or slight random high-frequency noise, will also cross the judgment threshold boundary, thus marking normal surfaces as abnormal, easily generating a large number of false defect false alarms.

[0050] The defect mask binary image is labeled with connected components to obtain independent micro-defect connected regions. The area and centroid physical coordinates of each independent micro-defect connected region are counted. When the total number of detected independent micro-defect connected regions is greater than zero, it is determined that there is a micro-defect on the injection molding surface of the current air conditioner panel. A high-level non-compliance signal and a list of data containing the centroid physical coordinates are output through the industrial field communication interface. If the total number of independent micro-defect connected regions is zero, the air conditioner panel is determined to be of acceptable quality. It should be noted that the high-level non-compliance signal is used to trigger the programmable logic controller on the downstream production line to drive the sorting robot arm to perform the action of rejecting non-compliant panel products.

[0051] For example, Figure 3 This is a schematic diagram of the binary image of the defect mask. The image shows the discrete distribution result after processing the final probability score using the decision threshold. It can be seen that the background noise is removed, and only the independent regions representing the existence of micro-defects are retained.

[0052] For example, Figure 4 This is a schematic diagram of the final detection results. The diagram shows the independent micro-defect connected regions extracted after the connected component marking. It can be seen that the system has locked the actual micro-defect location on the surface of the air conditioner panel based on the extracted centroid physical coordinates.

[0053] This completes the closed-loop detection of defects on the injection-molded surface of the air conditioner panel.

[0054] While various embodiments of the invention have been shown and described in this specification, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention.

Claims

1. A method for detecting micro-defects on the injection-molded surface of air conditioner panels based on multi-scale feature fusion, characterized in that, include: The original color image of the injection-molded surface of the air conditioner panel is acquired, converted into a grayscale image, and subjected to noise reduction and segmentation processing to obtain the preprocessed reference image; The Laplacian pyramid algorithm is used to decompose the baseline image to obtain multi-scale residual maps at multiple scales; A local neighborhood is set with any pixel as the center. Based on the degree of deviation of the pixel's grayscale from its local background, the initial defect value of each pixel in the multi-scale residual map is calculated. An analysis window is divided with any pixel as the center. Based on the intensity of the cooperative change of the gradient in the orthogonal direction within the analysis window, the morphological filtering coefficient of each pixel in the multi-scale residual map is calculated. The true defect value of each pixel is obtained by combining the initial defect value and the morphological filtering coefficient. Based on the cross-scale positional resonance information of the actual defect value and the environmental offset of the preprocessed reference image, the final probability score of each pixel is calculated. Set a judgment threshold to perform binarization on the final probability score to obtain a defect mask binary image; Connectivity regions are marked on the binary image of the defect mask. Based on the number of independent micro-defect connected regions obtained, it is determined whether there are micro-defects on the injection-molded surface of the air conditioner panel and a detection signal is output.

2. The method for detecting micro-defects on the injection-molded surface of an air conditioner panel based on multi-scale feature fusion according to claim 1, characterized in that, The acquisition of the multi-scale residual map includes: The original color image of the injection molded surface of the air conditioner panel is acquired using an industrial area scan camera mounted on the production line automated inspection platform. The original color image is converted into a grayscale image, and then the grayscale image is subjected to noise reduction processing. The smooth injection molded surface, which removes the surrounding non-detection background, is segmented by the U-Net semantic segmentation model and used as the reference image after preprocessing. The reference image is subjected to continuous Gaussian kernel convolution filtering using the Laplacian pyramid algorithm, and spatial downsampling is performed to construct a multi-level Gaussian pyramid containing multiple levels of images. Then, by upsampling and subtracting adjacent levels of images in the multi-level Gaussian pyramid, a multi-scale residual map of the reference image at multiple scales is obtained.

3. The method for detecting micro-defects on the injection-molded surface of an air conditioner panel based on multi-scale feature fusion according to claim 1, characterized in that, The initial defect value satisfies the following relationship: ; In the formula, Indicates the first Multi-scale residual maps at various scales at pixel points Initial defect value at; Indicates the first Multi-scale residual maps at various scales at pixel points The grayscale value at that location; Indicates the first Multi-scale residual maps at various scales at pixel points The average pixel value within the local neighborhood; Indicates the first Multi-scale residual maps at various scales at pixel points The standard deviation within the local neighborhood; Indicates the first Multi-scale residual maps at various scales at pixel points local neighborhood pixels The grayscale value at that location; Represents the maximum value function; Describes the minimum value function; Indicates the first preset minute value; This represents the natural exponential function.

4. The method for detecting micro-defects on the injection-molded surface of an air conditioner panel based on multi-scale feature fusion according to claim 1, characterized in that, The morphological filtering coefficients satisfy the following relationship: ; In the formula, Indicates the first Multi-scale residual maps at various scales at pixel points The morphological filtering coefficient at the location; Indicates the first Multi-scale residual maps at various scales at pixel points Within the analysis window, the weighted sum of the squared gradients in the horizontal direction; Indicates the first Multi-scale residual maps at various scales at pixel points Within the analysis window, the weighted sum of the squared gradients in the vertical direction; Indicates the first Multi-scale residual maps at various scales at pixel points Within the analysis window, the weighted sum of the gradient products in the horizontal and vertical directions; Indicates the first Gradient energy reference threshold for multi-scale residual maps at multiple scales; This represents the second preset micro value.

5. The method for detecting micro-defects on the injection-molded surface of an air conditioner panel based on multi-scale feature fusion according to claim 1, characterized in that, The process of combining the initial defect value and the morphological filtering coefficient to obtain the true defect value of each pixel in each multi-scale residual image includes: The morphological filtering coefficients of each pixel in the multi-scale residual map of any scale are multiplied pixel by pixel with the corresponding initial defect value to obtain the true defect value of each pixel in the multi-scale residual map of the corresponding scale.

6. The method for detecting micro-defects on the injection-molded surface of an air conditioner panel based on multi-scale feature fusion according to claim 1, characterized in that, The final probability score satisfies the following relationship: ; In the formula, Represents pixels The final probability score at the location; Indicates the total number of layers in the scale; Indicates the first Multi-scale residual maps at various scales at pixel points The actual defect value at the location; Indicates the first Multi-scale residual maps at various scales at pixel points The actual defect value at the location; Indicates the first The importance weight of each scale; Indicates the first The global Euclidean distance between the multi-scale residual map at each scale and the preprocessed reference image; Indicates the normalized reference distance; This represents the natural exponential function.

7. The method for detecting micro-defects on the injection-molded surface of an air conditioner panel based on multi-scale feature fusion according to claim 1, characterized in that, The step of setting a judgment threshold to binarize the final probability score to obtain a defect mask binary image includes: Set a judgment threshold, iterate through the final probability scores of all pixels, and when the final probability score is greater than or equal to the judgment threshold, the corresponding pixel is binarized and marked as 1, indicating the existence of a micro-defect; when the final probability score is less than the judgment threshold, the corresponding pixel is binarized and marked as 0, indicating a normal surface, thus obtaining a complete defect mask binary image.

8. The method for detecting micro-defects on the injection-molded surface of an air conditioner panel based on multi-scale feature fusion according to claim 1, characterized in that, The process of marking connected components in the binary image of the defect mask, determining whether micro-defects exist on the injection-molded surface of the air conditioner panel based on the number of independent micro-defect connected regions obtained, and outputting a detection signal includes: Connectivity is marked on the binary image of the defect mask to obtain independent micro-defect connected regions. The area and centroid physical coordinates of each independent micro-defect connected region are counted. When the total number of detected independent micro-defect connected regions is greater than zero, it is determined that there is a micro-defect on the injection molding surface of the current air conditioner panel. A high-level unqualified signal and a list of data containing the centroid physical coordinates are output through the industrial field communication interface. If the total number of independent micro-defect connected regions is zero, the air conditioner panel is determined to be of qualified quality.

9. The method for detecting micro-defects on the injection-molded surface of an air conditioner panel based on multi-scale feature fusion according to claim 4, characterized in that, The acquisition of the gradient energy reference threshold includes: Edge detection is performed on each multi-scale residual map to obtain the horizontal and vertical gradients of each pixel in each multi-scale residual map. An analysis window is divided with any pixel in any multi-scale residual map as the center, and a local structure tensor matrix is ​​constructed for the corresponding pixel. The elements of the local structure tensor matrix include the weighted sum of the squares of the horizontal gradients, the weighted sum of the squares of the vertical gradients, and the weighted sum of the products of the horizontal and vertical gradients within the analysis window. Calculate the sum of the squares of the horizontal and vertical gradients of each pixel in the multi-scale residual map at any scale to obtain the gradient energy of each pixel. Calculate the average value of the sum of the gradient energies of all pixels in the multi-scale residual map at any scale to obtain the gradient energy reference threshold at the corresponding scale.

10. The method for detecting micro-defects on the injection-molded surface of an air conditioner panel based on multi-scale feature fusion according to claim 6, characterized in that, The acquisition of the global Euclidean distance includes: Upsample and restore the multi-scale residual image of arbitrary scale to make its pixel resolution consistent with the preprocessed reference image; calculate the square of the difference between the gray value of the corresponding sampled and restored multi-scale residual image and the reference image at the same pixel point; sum the squares of the gray value differences of all pixels and perform a square root operation to obtain the global Euclidean distance between the multi-scale residual image of the corresponding scale and the preprocessed reference image.