Method and system for detecting surface defects of sheet metal part before coating

Through the surface image processing of sheet metal parts and the sequential oil stain analysis technology, the surface defect detection before sheet metal parts is automated and high-precision, solving the problems of low detection efficiency and poor accuracy in the existing technology, and ensuring the quality of the coating process.

CN119688698AActive Publication Date: 2025-03-25JIANGSU WEIHANG METAL TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411891749.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-03-25
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

In the prior art, the oil stain detection efficiency and poor accuracy of the surface of sheet metal parts are low, making it difficult to realize automated and high-precision surface defect detection before sheet metal parts are painted.

Method used

A method and system for detecting surface defects before coating of sheet metal parts is provided. By obtaining the surface image of sheet metal parts, performing grid slice pre-treatment, and activating the surface oil stain sequencer to conduct oil stain analysis. When the detection result meets the predetermined surface oil stain constraint, the coating control is carried out.

Benefits of technology

Automatic control of oil stain detection on the surface of sheet metal parts is realized, the accuracy and efficiency of inspection are improved, and the product quality during the coating process is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119688698A_ABST
    Figure CN119688698A_ABST
Patent Text Reader

Abstract

The invention discloses a surface defect detection method and system before coating of a sheet metal part, and relates to the technical field related to surface defect detection.The method comprises the steps that a preset sheet metal part is obtained; processing the predetermined sheet metal part according to the water film test plan to obtain a rear water film sheet metal part, and acquiring a surface image of the rear water film sheet metal part; performing grid slice preprocessing on the surface image to obtain an image preprocessing result; activating a surface oil stain successive research and judgment device to carry out oil stain research and judgment on the first grid slice to obtain a first oil stain research and judgment result; and when the first oil contamination study and judgment result meets the preset surface oil contamination constraint, coating control execution is conducted on the preset sheet metal part. The technical problems that in the prior art, oil stain detection on the surface of the sheet metal part is low in efficiency and poor in accuracy are solved, automatic control over oil stain detection on the surface of the sheet metal part is achieved, and the technical effect of improving the oil stain detection precision and detection efficiency on the surface of the sheet metal part is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field related to surface defect detection, and specifically to a method and system for detecting surface defects of sheet metal parts before painting. Background Art

[0002] Sheet metal parts are widely used in the automotive, aviation and other industries. Their surface quality directly affects the appearance of the product and its subsequent painting, assembly and other processes. Surface defects, especially oil stains before painting, not only affect the painting effect, but may also affect the corrosion resistance, wear resistance and other physical properties of the product. However, traditional sheet metal surface defect detection mainly relies on manual visual inspection, touch method or some simple mechanical detection methods. Although obvious surface defects such as oil stains can be detected, they are often limited by the subjectivity and accuracy of manual detection. The detection efficiency is low, the error is large, and it is difficult to apply to large-scale automated production. Especially before painting, minor defects such as oil stains on the surface of sheet metal parts are key factors affecting the quality of the coating. How to achieve automated and high-precision surface defect detection of sheet metal parts before painting has become a problem that needs to be solved urgently.

[0003] Therefore, in the current relevant technologies, there are technical problems such as low efficiency and poor accuracy in detecting oil stains on the surface of sheet metal parts. Summary of the invention

[0004] The present application solves the technical problems of low efficiency and poor accuracy in detecting oil stains on the surface of sheet metal parts in the prior art by providing a method and system for detecting surface defects of sheet metal parts before painting, realizes automatic control of detecting oil stains on the surface of sheet metal parts, and achieves the technical effect of improving the accuracy and efficiency of detecting oil stains on the surface of sheet metal parts.

[0005] The present application provides a method for detecting surface defects of sheet metal parts before painting, the method comprising: obtaining a predetermined sheet metal part, wherein the predetermined sheet metal part refers to any sheet metal part that has been processed by an oil cleaning plan; processing the predetermined sheet metal part according to a water film test plan to obtain a post-water film sheet metal part, and obtaining a surface image of the post-water film sheet metal part; performing grid slicing preprocessing on the surface image to obtain an image preprocessing result, wherein the image preprocessing result includes a first grid slice; activating a surface oil successive analyzer to perform oil analysis on the first grid slice to obtain a first oil analysis result; when the first oil analysis result meets a predetermined surface oil constraint, performing painting control on the predetermined sheet metal part.

[0006] In a possible implementation, the predetermined sheet metal part is processed according to the water film test plan to obtain a post-water film sheet metal part, and a surface image of the post-water film sheet metal part is obtained, and the following processing is also performed: image acquisition is performed on the predetermined sheet metal part to obtain an initial surface image; sampling pixel points of the initial surface image are obtained based on a random sampling principle; sampling pixel color feature values ​​corresponding to the sampling pixel points are obtained; the opposite color of the sampling pixel color corresponding to the sampling pixel color feature value is obtained, wherein the opposite color has an opposite color feature value; predetermined distilled water is prepared with the opposite color feature value, and the water film test plan is designed based on the predetermined distilled water.

[0007] In a possible implementation, the surface oil pollution successive judge is activated to perform oil pollution judgment on the first grid slice to obtain a first oil pollution judgment result, and the following processing is also performed: a target sheet metal part is screened from similar sheet metal parts of the predetermined sheet metal part; a target historical oil pollution detection record of the target sheet metal part is obtained, and the target historical oil pollution detection record includes multiple historical grid slices with oil pollution status identification; a first historical grid slice and a second historical grid slice are extracted from the multiple historical grid slices with oil pollution status identification in sequence, and the first historical grid slice and the second historical grid slice meet the predetermined extraction constraints; a first training data group is formed based on the first historical slice feature information of the first historical grid slice and the first historical oil pollution status identification; a second training data group is formed based on the second historical slice feature information of the second historical grid slice and the second historical oil pollution status identification; and classification learning training is performed on the training data group composed of the first training data group and the second training data group to obtain the surface oil pollution successive judge.

[0008] In a possible implementation, the surface oil pollution successive analyzer is activated to perform oil pollution analysis on the first grid slice to obtain a first oil pollution analysis result, and the following processing is also performed: discrete cosine transform processing is performed on the first grid slice to obtain a first discrete cosine transform coefficient; a slice eigenvalue estimation function is introduced to estimate and analyze the first discrete cosine transform coefficient to obtain a first eigenvalue; a local binary conversion is performed on the first grid slice to obtain a first conversion code, and the first slice feature information is constructed in combination with the first eigenvalue; the first slice feature information is used as input data of the surface oil pollution successive analyzer, and the first oil pollution analysis result is obtained through the surface oil pollution successive analyzer.

[0009] In a possible implementation, a slice eigenvalue estimation function is introduced to estimate and analyze the first discrete cosine transform coefficient to obtain a first eigenvalue, and the following processing is performed: obtaining a weight allocation plan; based on the slice eigenvalue estimation function, the first slice DC coefficient and the first slice AC coefficient in the first discrete cosine transform coefficient are weighted in combination with the weight allocation plan to obtain the first eigenvalue; wherein the expression of the slice eigenvalue estimation function is as follows: ; in, refers to the first eigenvalue, refers to the first slice DC coefficient of the first grid slice n, is the first slice AC coefficient of the first grid slice n, refers to the first grid slice n sub-blocks, a refers to the influence factor of the first slice DC coefficient on the first eigenvalue, b refers to the influence factor of the first slice AC coefficient on the first eigenvalue, where a+b=1, and a is much larger than b.

[0010] In a possible implementation, when the first oil stain assessment result satisfies a predetermined surface oil stain constraint, painting control is executed on the predetermined sheet metal part, and the following processing is also performed: the number of grid slices whose oil stain status is marked as oil-free in the first oil stain assessment result is counted; the ratio of the number of grid slices to the total number of grid slices in the image preprocessing result is obtained, which is recorded as the first oil stain ratio; when the first oil stain ratio reaches a predetermined ratio threshold in the predetermined surface oil stain constraint, the first oil stain assessment result satisfies the predetermined surface oil stain constraint.

[0011] In a possible implementation, the method for detecting surface defects of sheet metal parts before painting further performs the following processing: when the first oil pollution assessment result does not meet the predetermined surface oil pollution constraint, the oil pollution cleaning plan is retrieved to re-clean the predetermined sheet metal part.

[0012] The present application also provides a system for detecting surface defects of sheet metal parts before painting, comprising: a predetermined sheet metal part acquisition module, used to acquire a predetermined sheet metal part, wherein the predetermined sheet metal part refers to any sheet metal part that has been processed by an oil cleaning plan; a sheet metal part surface image acquisition module, used to process the predetermined sheet metal part according to a water film test plan to obtain a post-water film sheet metal part, and acquire a surface image of the post-water film sheet metal part; a grid slice preprocessing module, used to perform grid slice preprocessing on the surface image to obtain an image preprocessing result, wherein the image preprocessing result includes a first grid slice; an oil stain judgment module, used to activate a surface oil stain successive judger to perform oil stain judgment on the first grid slice to obtain a first oil stain judgment result; and a painting control execution module, used to perform painting control execution on the predetermined sheet metal part when the first oil stain judgment result meets a predetermined surface oil stain constraint.

[0013] The method and system for detecting surface defects of sheet metal parts before painting proposed in this application are intended to obtain predetermined sheet metal parts; process the predetermined sheet metal parts according to the water film test plan to obtain the sheet metal parts after water film, and obtain the surface image of the sheet metal parts after water film; perform grid slice preprocessing on the surface image to obtain the image preprocessing result; activate the surface oil stain successive judgement device to perform oil stain judgment on the first grid slice to obtain the first oil stain judgment result; when the first oil stain judgment result meets the predetermined surface oil stain constraint, the predetermined sheet metal parts are subjected to painting control execution. The technical problems of low efficiency and poor accuracy in detecting oil stains on the surface of sheet metal parts existing in the prior art are solved, and the automatic control of detecting oil stains on the surface of sheet metal parts is realized, achieving the technical effect of improving the accuracy and efficiency of detecting oil stains on the surface of sheet metal parts. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solution of the embodiment of the present disclosure, the accompanying drawings of the embodiment of the present disclosure will be briefly introduced below. A flow chart is used in the present application to illustrate the operations performed by the system according to the embodiment of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, various steps can be processed in reverse order or simultaneously as needed. At the same time, other operations can also be added to these processes, or one or more operations can be removed from these processes.

[0015] Figure 1 A schematic flow chart of a method for detecting surface defects of sheet metal parts before painting provided in an embodiment of the present application.

[0016] Figure 2 A schematic diagram of the structure of a system for detecting surface defects of sheet metal parts before painting provided in an embodiment of the present application.

[0017] Explanation of the reference numerals: predetermined sheet metal part acquisition module 10 , sheet metal part surface image acquisition module 20 , grid slicing preprocessing module 30 , oil pollution assessment module 40 , coating control execution module 50 . DETAILED DESCRIPTION

[0018] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below.

[0019] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0020] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict, and the terms "first\second" involved are merely to distinguish similar objects and do not represent a specific ordering of objects. The terms "including" and "having" and any variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products, or devices. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field of this application. The terms used herein are for the purpose of describing the embodiments of the present application only.

[0021] The present application embodiment provides a method for detecting surface defects of sheet metal parts before painting. Figure 1 As shown, the method includes: Step S100, obtaining a predetermined sheet metal part, wherein the predetermined sheet metal part refers to any sheet metal part that has been processed by the oil cleaning plan.

[0022] Preferably, a predetermined sheet metal part is obtained, wherein the predetermined sheet metal part refers to a target sheet metal part in the entire coating process, and the predetermined sheet metal part refers to any sheet metal part that has been treated by an oil cleaning plan, wherein the oil cleaning plan treatment refers to the oil cleaning treatment of the surface of the sheet metal part. Specifically, in the production and processing of sheet metal parts, substances such as oil, fat, and lubricating fluids are often attached to the surface, which will affect the subsequent coating effect and even cause poor adhesion of the coating. The surface is cleaned and treated by an oil cleaning plan to remove excess oil to ensure the coating quality. The oil cleaning plan may include different cleaning methods, such as mechanical cleaning, chemical cleaning, etc.; any sheet metal part indicates that the predetermined sheet metal part is randomly selected from multiple sheet metal parts that have been treated with oil cleaning as the object to be detected, so as to perform subsequent defect detection or coating control.

[0023] Step S200: Process the predetermined sheet metal part according to the water film test plan to obtain a post-water film sheet metal part, and obtain a surface image of the post-water film sheet metal part.

[0024] Preferably, the water film test plan refers to a specific test plan for detecting oil stains or contaminants on the surface of sheet metal parts, wherein the predetermined sheet metal parts need to undergo multi-step processing, that is, using water film test technology to enhance the visibility of oil stains on the surface of the sheet metal parts, specifically including water film formation, by uniformly spraying or coating water or a water-based solution on the surface of the sheet metal parts to form a thin water film; the interaction between oil stains and water film, the oil stains on the surface of the sheet metal parts (if any) will interact with the water film, and the oil stains in the water film usually form visible marks different from the clean surface, and can leave different textures or stains on the water film; the water film test makes the surface oil stains more visible, thereby providing a clearer basis for subsequent defect detection. After the water film test, a layer of water film is formed on the surface of the sheet metal. Through the reaction of the water film with oil and pollutants, surface defects such as oil are more clearly displayed. The sheet metal after the water film test is the post-water film sheet metal. Then the surface image of the post-water film sheet metal is obtained. Specifically, the surface of the sheet metal is photographed or scanned by a high-definition image acquisition device (such as a camera or a scanner) to obtain clear image data of the surface of the sheet metal. These images contain defect information such as oil and stains on the surface of the sheet metal. For example, the specific location and shape of the oil or other defects will be shown in the image.

[0025] Furthermore, step S200 also includes step S210, performing image acquisition on the predetermined sheet metal part to obtain an initial surface image; step S220, obtaining sampling pixel points of the initial surface image based on the principle of random sampling; step S230, obtaining sampling pixel color feature values ​​corresponding to the sampling pixel points; step S240, obtaining the opposite color of the sampling pixel color corresponding to the sampling pixel color feature value, wherein the opposite color has an opposite color feature value; step S250, preparing predetermined distilled water with the opposite color feature value, and designing the water film test plan based on the predetermined distilled water.

[0026] Preferably, initial surface image data of a predetermined sheet metal part is acquired through an image acquisition device (such as a camera, a scanner, etc.). The initial surface image is an original image of the surface of the sheet metal part, which contains information such as possible defects, oil stains, scratches, etc. on the surface of the sheet metal part. Sampling pixel points of the initial surface image are acquired based on the principle of random sampling. The sampling pixel points refer to some pixel positions randomly selected from the image. Specifically, a certain number of pixel points are randomly selected from the initial surface image for analysis. Random sampling is to reduce the amount of calculation and quickly evaluate the overall characteristics of the image. In particular, when the image content is large and all pixel points cannot be processed, this method can effectively represent the characteristics of the overall image. Then, the sampling pixel color feature values ​​corresponding to the sampling pixel points are acquired, that is, the sampling pixel points are subjected to color analysis. The color information of each pixel point can be represented by a color space (such as RGB, HSV, etc.), and then the color feature value (that is, the quantitative representation of the color of each sampling pixel point) is obtained. For example, the RGB model represents the red, green, and blue components, respectively, or the HSV model represents the hue, saturation, etc. and brightness; then obtain the opposite color of the sampled pixel color corresponding to the sampled pixel color feature value. The opposite color refers to the color that is in an opposite position to the original color in the color space, and the opposite color has an opposite color feature value. The core is to enhance the detection of oil stains or defects based on the contrast of colors. For example, in the RGB color model, the opposite color of red is cyan, the opposite color of green is magenta, and the opposite color of blue is yellow. By generating opposite colors, the visibility of specific color areas in the image (such as oil stains and stains) can be enhanced, which helps to more clearly identify defects such as oil stains; prepare a predetermined distilled water with the opposite color feature value, that is, by combining the opposite color feature value with distilled water to modulate an image processing reagent (such as a simulated water film test), distilled water is used as a reagent or carrier to help generate a water film, which is used in the process of forming a certain water film on the surface of the sheet metal to enhance the effect of oil stain detection. Finally, a water film test plan is designed based on the predetermined distilled water. By forming a thin layer of water film on the surface, the interaction between oil stains and water will make the oil stains more visible and improve the accuracy and detection effect of oil stains or other surface defects.

[0027] Step S300, performing grid slice preprocessing on the surface image to obtain an image preprocessing result, wherein the image preprocessing result includes a first grid slice.

[0028] Preferably, the surface image is preprocessed by grid slicing to obtain an image preprocessing result, that is, the obtained surface image of the sheet metal is divided into multiple small and regular areas (i.e., several uniform grid slices) through a certain grid division method, and each grid slice represents a local area in the image, wherein the grid refers to dividing the image according to a certain grid, for example, the image is divided into several rectangular areas of equal size, and each rectangular area is a grid; the slice refers to each area after the image is divided, and each slice contains a part of the image information and represents a local area in the image. For example, if the surface image of the sheet metal is large and contains many details and possible defects (such as oil stains, scratches, etc.), it may be difficult to directly analyze the entire image. The grid slicing method is used to divide the entire image into several small blocks, and each small block can be processed and analyzed separately, thereby improving the processing accuracy and efficiency. The image preprocessing result is a plurality of grid slices obtained by grid slicing preprocessing of the surface image, wherein the first grid slice is any one of the image preprocessing results. The main function of the grid slicing preprocessing is to divide the large-size surface image into multiple small blocks so as to facilitate a more detailed analysis of each small block, more easily detect small defects or contaminants in a certain area, and make separate judgments and analyses on defects such as oil stains and scratches in each area of ​​the sheet metal surface. It can also reduce the complexity of calculation and processing, and improve the accuracy and efficiency of defect detection.

[0029] Step S400, activating the surface oil pollution successive analysis device to perform oil pollution analysis on the first grid slice to obtain a first oil pollution analysis result.

[0030] Preferably, the surface oil stain successive judge is activated to perform oil stain judgement on the first grid slice, wherein the surface oil stain successive judge is a trained machine learning model for automatically analyzing each grid slice in the surface image of the sheet metal part, identifying the oil stains, stains or other pollutants in the image, and determining the state of the oil stains in each area. Specifically, the surface oil stain successive judge will analyze each part of the image one by one (successive judgement) and gradually check each detail area in the image to ensure that the oil stains are accurately detected. Oil stain judgement refers to judging the oil stains in the surface image, that is, judging whether a part of the image contains oil stains or other pollutants, and giving a judgment result; using the table The surface oil stain successive judgement device performs oil stain judgment on the first grid slice, that is, analyzes the image content in the first grid slice to determine whether there is oil stain in this area, including using image analysis algorithms (such as edge detection, color change analysis, texture recognition, etc.) to identify possible oil stain areas on the surface and obtain the first oil stain judgment result. The first oil stain judgment result is the analysis result of the oil stain situation in the slice area, for example, whether there is oil stain, the result is "yes" or "no"; or quantifies the area and distribution of oil stains through oil stain coverage, oil stain severity, etc., aiming to accurately identify whether there is oil stain on the surface of the sheet metal, so as to ensure the surface is clean and the coating effect is excellent before painting.

[0031] Furthermore, step S400 also includes step S410, screening out a target sheet metal part from similar sheet metal parts of the predetermined sheet metal part; step S420, obtaining a target historical oil pollution detection record of the target sheet metal part, wherein the target historical oil pollution detection record includes multiple historical grid slices with oil pollution status identification; step S430, extracting a first historical grid slice and a second historical grid slice from the multiple historical grid slices with oil pollution status identification in sequence, and the first historical grid slice and the second historical grid slice meet the predetermined extraction constraints; step S440, forming a first training data group based on the first historical slice feature information of the first historical grid slice and the first historical oil pollution status identification; step S450, forming a second training data group based on the second historical slice feature information of the second historical grid slice and the second historical oil pollution status identification; step S460, performing classification learning training on the training data group composed of the first training data group and the second training data group to obtain the surface oil pollution successive analyzer.

[0032] Preferably, a target sheet metal part is screened out from similar sheet metal parts of the predetermined sheet metal part, which may be a sheet metal part with similar size, material, processing technology and other characteristics, and then a target historical oil stain detection record of the target sheet metal part is obtained, each target sheet metal part has a historical oil stain detection record, which includes multiple historical grid slices and their corresponding oil stain status identifications, that is, in the target historical oil stain detection record, whether each grid slice contains oil stains, or the severity and type of the oil stains are all identified, and the past oil stain status of the sheet metal part can be understood through the target historical oil stain detection record; then, from the multiple historical grid slices with oil stain status identifications, the first historical grid slice and the second historical grid slice are extracted in sequence according to the predetermined extraction constraints, corresponding to the image area detected in the past, and each grid slice has its corresponding oil stain status identification, wherein the predetermined extraction constraints are some preset conditions, such as the position of the grid, the state of the oil stain, the quality of the slice, etc.

[0033] Preferably, the characteristic information of each historical grid slice (such as the color, texture, shape, etc. of the image) is combined with the corresponding oil pollution state identification (such as "with oil pollution" or "without oil pollution", or the degree and type of oil pollution, etc.) to construct a training data group. Specifically, based on the characteristic information of the first historical grid slice and the corresponding oil pollution state identification, a first group of training data, i.e., the first training data group, is constructed; based on the characteristic information of the second historical grid slice and the corresponding oil pollution state identification, a second group of training data, i.e., the second training data group, is constructed; these two training data groups are used as input data of the machine learning model to help the model understand images of different oil pollution states, i.e., the first training data group is constructed. The first training data set and the second training data set are combined into one data set for classification training. For example, supervised learning algorithms (such as support vector machines, decision trees, neural networks, etc.) are used to train the data, so that the system can predict the oil pollution status based on image features. During the training process, the system continuously adjusts the parameters of the model to minimize the prediction error, and finally obtains a surface oil pollution successive judgement device, which can judge the oil pollution status of the sheet metal surface (such as whether there is oil pollution, the severity of the oil pollution, etc.) according to image features (such as texture, color, shape, etc. in the image), and then can automatically and accurately identify and analyze oil pollution in the subsequent production or inspection process of the sheet metal, to ensure the smooth progress of the coating process.

[0034] Furthermore, step S400 also includes step S470, performing discrete cosine transform processing on the first grid slice to obtain a first discrete cosine transform coefficient; step S480, introducing a slice eigenvalue estimation function to estimate and analyze the first discrete cosine transform coefficient to obtain a first eigenvalue; step S490, performing local binary conversion on the first grid slice to obtain a first conversion code, and forming first slice feature information in combination with the first eigenvalue; step S4100, using the first slice feature information as input data of the surface oil pollution successive analyzer, and obtaining the first oil pollution assessment result through the surface oil pollution successive analyzer.

[0035] Preferably, the first grid slice is processed and its feature information is used as input data, and the surface oil pollution successive judgement device obtained by training is used to judge the oil pollution, and the first oil pollution judgment result is obtained. Specifically, the first grid slice is processed by discrete cosine transform. Discrete cosine transform (DCT) is a commonly used signal processing technology, which is often used in image processing to extract the frequency domain information of the part of the image, that is, to convert the image data from the spatial domain to the frequency domain, which is used to analyze the frequency characteristics of the image, and then obtain the first discrete cosine transform coefficient, which reflects the information distribution of the image at different frequencies. The high-frequency discrete cosine transform coefficient represents The slice eigenvalue estimation function is used to extract meaningful eigenvalues ​​from the discrete cosine transform coefficients, that is, by performing some form of statistical analysis or transformation on the first discrete cosine transform coefficients, the key features in the image (the first eigenvalue) are extracted, which represents some important features of the image raster slice, which may include image contrast, texture features, edge information, etc., which helps to identify the difference between oily and clean surfaces.

[0036] Preferably, the first grid slice is subjected to local binary conversion to obtain a first conversion code. Local binary conversion (LBP) is a commonly used texture description method for extracting local texture information from an image. Specifically, the image of the first grid slice is subjected to binary processing, such as generating a binary pattern (conversion code) by comparing the relationship between the pixel value and the neighboring pixel to obtain a first conversion code, which represents the local texture feature in the image. Then, the first feature value (obtained by DCT analysis) and the first conversion code (obtained by LBP processing) are combined to form a complete feature set, namely, the first slice feature information, which includes the texture and frequency domain features of the grid slice, and is helpful for subsequent oil pollution detection. Finally, the first slice feature information is used as input data of the surface oil pollution successive judgement device, and is input into the surface oil pollution successive judgement device for analysis, and a judgment is made on the oil pollution situation, and the first oil pollution judgment result is output, such as "oil pollution" or "no oil pollution", or the type and degree of oil pollution. Through image processing and pattern recognition technology, it is automatically analyzed whether there is oil pollution on the surface of the sheet metal part, and a judgment is made, thereby improving the detection efficiency and accuracy.

[0037] Further, step S480 also includes step S481, obtaining a weight allocation plan; step S482, based on the slice eigenvalue estimation function, combining the weight allocation plan to weight the first slice DC coefficient and the first slice AC coefficient in the first discrete cosine transform coefficient to obtain the first eigenvalue; step S483, wherein the expression of the slice eigenvalue estimation function is as follows: ; in, refers to the first eigenvalue, refers to the first slice DC coefficient of the first grid slice n, is the first slice AC coefficient of the first grid slice n, refers to the first grid slice n sub-blocks, a refers to the influence factor of the first slice DC coefficient on the first eigenvalue, b refers to the influence factor of the first slice AC coefficient on the first eigenvalue, where a+b=1, and a is much larger than b.

[0038] Preferably, the weight allocation plan refers to a plan for determining how to allocate weights of different parts of data when calculating eigenvalues. The weight allocation determines the contribution of different parts (DC coefficients and AC coefficients) to the eigenvalues. For example, in discrete cosine transform (DCT), DC coefficients and AC coefficients represent different frequency characteristics of the image, respectively. The DC coefficient usually represents the low-frequency information of the image, while the AC coefficient represents the high-frequency detail information of the image. The DC coefficient represents the overall brightness or average grayscale information of the image, and the AC coefficient represents the detail information in the image, especially the high-frequency part, including edges, textures, etc. The weight allocation plan allocates different weights to the DC coefficient and the AC coefficient to reflect their contribution to the final eigenvalue; then, the first discrete cosine transform coefficient of the first grid slice is weighted by the slice eigenvalue estimation function in combination with the weight allocation plan to obtain the first eigenvalue. The expression of the slice eigenvalue estimation function is as follows: ; in, refers to the first eigenvalue, refers to the first slice DC coefficient of the first grid slice n, is the first slice AC coefficient of the first grid slice n, refers to the first grid slice n sub-blocks, a refers to the influence factor of the DC coefficient of the first slice on the first eigenvalue, b refers to the influence factor of the AC coefficient of the first slice on the first eigenvalue, where a+b=1, and a is much larger than b. a+b=1 means that the weighted sum of the DC coefficient and the AC coefficient is 1, and a is much larger than b, indicating that the DC coefficient has a greater impact on the eigenvalue, because the DC coefficient contains the main structural information of the image (such as brightness, overall shape, etc.), while the AC coefficient represents more detailed information of the image; sub-blocks refer to dividing the grid slice into multiple smaller areas for analysis, and each sub-block undergoes an independent discrete cosine transform to obtain the DC coefficient and the AC coefficient, which are weighted and combined to form the final eigenvalue.

[0039] Step S500: When the first oil pollution assessment result satisfies the predetermined surface oil pollution constraint, painting control is performed on the predetermined sheet metal part.

[0040] Preferably, the predetermined surface oil contamination constraint refers to the tolerance or acceptable range of oil contamination on the surface of the sheet metal during the painting process, which is used to determine whether the surface oil contamination reaches or exceeds the allowable range, and may include the oil contamination area. For example, if the oil contamination area exceeds a certain predetermined proportion (such as 10% of the surface area), painting cannot continue; the severity of the oil contamination. If the oil contamination is very obvious or dense, it may affect the adhesion of the coating; the type of oil contamination, such as whether the type of oil contamination (such as grease, paint residue, stains, etc.) meets the painting requirements; specifically, if the first oil contamination assessment result meets the predetermined surface oil contamination limit, the oil contamination limit is 10%. Constraints, that is, after the oil pollution judgment, the oil pollution on the surface of the sheet metal meets the predetermined standards, the sheet metal can be subsequently painted. In other words, the oil pollution on the surface of the sheet metal does not exceed the acceptable range, and enters the formal coating process control stage, including starting the coating process of the sheet metal when the oil pollution judgment results meet the predetermined constraints; if there is an intelligent coating system, it will automatically adjust the parameters of the coating equipment (such as coating type, coating thickness, etc.) according to the oil pollution detection results to ensure the coating quality; ensure that the coating has good adhesion and there is no phenomenon that the coating quality is affected by excessive oil pollution on the surface. Through automated oil pollution detection and coating control execution, production efficiency can be effectively improved and product quality can be ensured.

[0041] Furthermore, step S500 also includes step S510, counting the number of grid slices whose oil pollution status is marked as oil-free in the first oil pollution assessment result; step S520, obtaining the ratio of the number of grid slices to the total number of grid slices in the image preprocessing result, recorded as the first oil pollution ratio; step S530, when the first oil pollution ratio reaches a predetermined ratio threshold in the predetermined surface oil pollution constraint, the first oil pollution assessment result satisfies the predetermined surface oil pollution constraint.

[0042] Preferably, the number of grid slices whose oil pollution status is marked as oil-free in the first oil pollution assessment result is counted, and then the ratio of the number of grid slices without oil pollution to the total number of grid slices in the image preprocessing result is calculated as the first oil pollution ratio, wherein the total number of grid slices refers to the total number of all slices obtained after the grid slice preprocessing of the entire sheet metal surface image, and the first oil pollution ratio represents the proportion of the area without oil pollution in the image, which is expressed by the formula: First oil pollution ratio = ×100%; Among them, the first oil stain ratio reflects the overall oil stain distribution on the surface of the sheet metal. If this ratio is high, it means that there is less oil stain on the surface of the sheet metal and it may meet the painting requirements; otherwise, further cleaning may be required.

[0043] Preferably, the predetermined ratio threshold refers to the maximum value of the oil pollution ratio allowed during the painting process, which is usually set according to the surface quality requirements of the sheet metal. For example, the predetermined threshold may be 95%, indicating that if more than 5% of the area on the surface of the sheet metal is oily, painting cannot be performed. When the calculated first oil pollution ratio reaches the predetermined ratio threshold, it means that the degree of oil pollution on the surface of the sheet metal meets the predetermined requirements, and it is considered that the oil pollution problem has been solved or is small enough and will not affect the painting effect. The sheet metal can enter the subsequent painting process. If the oil pollution ratio exceeds the threshold, it means that there is too much oil pollution, which may lead to problems such as poor coating adhesion and poor painting effect, and further cleaning is required. Through automated image processing and oil pollution analysis methods, production efficiency can be effectively improved, the workload of manual inspection can be reduced, and the high quality of products can be ensured.

[0044] Furthermore, step S500 also includes step S540, when the first oil pollution assessment result does not meet the predetermined surface oil pollution constraint, calling the oil pollution cleaning plan to re-clean the predetermined sheet metal part.

[0045] Preferably, if the first oil pollution assessment result does not meet the predetermined surface oil pollution constraint, it means that the state of the oil pollution exceeds the allowable range. The oil pollution area may be too large, the severity is too high, or the oil pollution concentration in some areas is too high to meet the coating requirements. The oil pollution cleaning plan is called up to re-clean the predetermined sheet metal parts. That is, after the first cleaning of the sheet metal parts, if the predetermined oil pollution standard is still not met, it is cleaned again, which may include reusing the cleaning agent, increasing the cleaning time or taking more powerful cleaning methods to completely remove the oil pollution until the surface oil pollution reaches the allowable standard, to ensure that the surface of the sheet metal parts meets the coating requirements and to avoid oil pollution affecting the coating adhesion and coating effect.

[0046] In the above, refer to Figure 1 A method for detecting surface defects of sheet metal parts before painting according to an embodiment of the present invention is described in detail. Figure 2 A system for detecting surface defects of a sheet metal part before painting according to an embodiment of the present invention is described.

[0047] According to an embodiment of the present invention, a sheet metal surface defect detection system before painting is used to solve the technical problems of low efficiency and poor accuracy in the detection of oil stains on the surface of sheet metal parts in the prior art, realize the automatic control of the detection of oil stains on the surface of sheet metal parts, and achieve the technical effect of improving the accuracy and efficiency of the detection of oil stains on the surface of sheet metal parts. A sheet metal surface defect detection system before painting includes: a predetermined sheet metal part acquisition module 10, a sheet metal part surface image acquisition module 20, a grid slice preprocessing module 30, an oil stain analysis module 40, and a painting control execution module 50.

[0048] A predetermined sheet metal part acquisition module 10 is used to acquire a predetermined sheet metal part, wherein the predetermined sheet metal part refers to any sheet metal part that has been processed by an oil cleaning plan; a sheet metal part surface image acquisition module 20 is used to process the predetermined sheet metal part according to a water film test plan to obtain a post-water film sheet metal part, and to acquire a surface image of the post-water film sheet metal part; a grid slice preprocessing module 30 is used to perform grid slice preprocessing on the surface image to obtain an image preprocessing result, wherein the image preprocessing result includes a first grid slice; an oil pollution assessment module 40 is used to activate a surface oil pollution successive assessor to perform oil pollution assessment on the first grid slice to obtain a first oil pollution assessment result; a coating control execution module 50 is used to perform coating control execution on the predetermined sheet metal part when the first oil pollution assessment result meets a predetermined surface oil pollution constraint.

[0049] The specific configuration of the sheet metal surface image acquisition module 20 will be described in detail below. The sheet metal surface image acquisition module 20 further includes: performing image acquisition on the predetermined sheet metal to obtain an initial surface image; acquiring sampling pixel points of the initial surface image based on the random sampling principle; acquiring sampling pixel color feature values ​​corresponding to the sampling pixel points; acquiring the opposite color of the sampling pixel color corresponding to the sampling pixel color feature value, wherein the opposite color has an opposite color feature value; preparing predetermined distilled water with the opposite color feature value, and designing the water film test plan based on the predetermined distilled water.

[0050] The specific configuration of the oil pollution judgment module 40 will be described in detail below. The oil pollution judgment module 40 further includes: screening the target sheet metal part from the same type of sheet metal parts of the predetermined sheet metal part; obtaining the target historical oil pollution detection record of the target sheet metal part, the target historical oil pollution detection record includes multiple historical grid slices with oil pollution status identification; sequentially extracting the first historical grid slice and the second historical grid slice from the multiple historical grid slices with oil pollution status identification, and the first historical grid slice and the second historical grid slice meet the predetermined extraction constraints; forming a first training data group based on the first historical slice feature information of the first historical grid slice and the first historical oil pollution status identification; forming a second training data group based on the second historical slice feature information of the second historical grid slice and the second historical oil pollution status identification; performing classification learning training on the training data group composed of the first training data group and the second training data group to obtain the surface oil pollution successive judgement device.

[0051] The specific configuration of the oil pollution judgment module 40 will be described in detail below. The oil pollution judgment module 40 further includes: performing discrete cosine transform processing on the first grid slice to obtain a first discrete cosine transform coefficient; introducing a slice eigenvalue estimation function to estimate and analyze the first discrete cosine transform coefficient to obtain a first eigenvalue; performing local binary conversion on the first grid slice to obtain a first conversion code, and combining the first eigenvalue to form first slice feature information; using the first slice feature information as input data of the surface oil pollution successive judgement device, and obtaining the first oil pollution judgment result through the surface oil pollution successive judgement device.

[0052] The specific configuration of the oil pollution judgment module 40 will be described in detail below. The oil pollution judgment module 40 further includes: obtaining a weight allocation plan; based on the slice eigenvalue estimation function, the first slice DC coefficient and the first slice AC coefficient in the first discrete cosine transform coefficient are weighted in combination with the weight allocation plan to obtain the first eigenvalue; wherein the expression of the slice eigenvalue estimation function is as follows: ; in, refers to the first eigenvalue, refers to the first slice DC coefficient of the first grid slice n, is the first slice AC coefficient of the first grid slice n, refers to the first grid slice n sub-blocks, a refers to the influence factor of the first slice DC coefficient on the first eigenvalue, b refers to the influence factor of the first slice AC coefficient on the first eigenvalue, where a+b=1, and a is much larger than b.

[0053] The specific configuration of the coating control execution module 50 will be described in detail below. The coating control execution module 50 further includes: counting the number of grid slices whose oil pollution status is marked as oil-free in the first oil pollution assessment result; obtaining the ratio of the number of grid slices to the total number of grid slices in the image preprocessing result, recorded as the first oil pollution ratio; when the first oil pollution ratio reaches the predetermined ratio threshold in the predetermined surface oil pollution constraint, the first oil pollution assessment result satisfies the predetermined surface oil pollution constraint.

[0054] The specific configuration of the coating control execution module 50 will be described in detail below. The coating control execution module 50 further includes: when the first oil pollution assessment result does not meet the predetermined surface oil pollution constraint, calling the oil pollution cleaning plan to re-clean the predetermined sheet metal part.

[0055] A sheet metal part surface defect detection system before painting provided in an embodiment of the present invention can execute a sheet metal part surface defect detection method before painting provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0056] Although the present application makes various references to certain modules in the system according to the embodiments of the present application, any number of different modules may be used and run on the user terminal and / or server, and the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0057] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method for detecting surface defects of sheet metal parts before painting, characterized in that: The method comprises: Obtaining a predetermined sheet metal part, wherein the predetermined sheet metal part refers to any sheet metal part that has been processed by the oil cleaning plan; Processing the predetermined sheet metal part according to the water film test plan to obtain a post-water film sheet metal part, and acquiring a surface image of the post-water film sheet metal part; Performing grid slice preprocessing on the surface image to obtain an image preprocessing result, wherein the image preprocessing result includes a first grid slice; activating the surface oil pollution successive judgement device to perform oil pollution judgment on the first grid slice to obtain a first oil pollution judgment result; When the first oil pollution assessment result meets the predetermined surface oil pollution constraint, painting control is executed on the predetermined sheet metal part.

2. A method for detecting surface defects of sheet metal parts before painting according to claim 1, characterized in that: The predetermined sheet metal part is processed according to the water film test plan to obtain a post-water film sheet metal part, and a surface image of the post-water film sheet metal part is obtained, including: Capturing an image of the predetermined sheet metal part to obtain an initial surface image; Acquire sampling pixel points of the initial surface image based on a random sampling principle; Obtaining a color characteristic value of a sampling pixel corresponding to the sampling pixel point; Obtaining an opposite color of the sampled pixel color corresponding to the sampled pixel color characteristic value, wherein the opposite color has an opposite color characteristic value; The predetermined distilled water is prepared with the opposite color characteristic value, and the water film test plan is designed based on the predetermined distilled water.

3. A method for detecting surface defects of sheet metal parts before painting according to claim 1, characterized in that: Activating the surface oil pollution successive judgement device to perform oil pollution judgment on the first grid slice to obtain a first oil pollution judgment result, including: Screening out a target sheet metal part from sheet metal parts of the same type as the predetermined sheet metal part; Acquire a target historical oil stain detection record of the target sheet metal part, wherein the target historical oil stain detection record includes a plurality of historical grid slices with oil stain status identifiers; Sequentially extracting a first historical raster slice and a second historical raster slice from the plurality of historical raster slices having oil pollution status identifiers, wherein the first historical raster slice and the second historical raster slice meet predetermined extraction constraints; Forming a first training data group based on the first historical slice feature information of the first historical grid slice and the first historical oil pollution state identifier; Forming a second training data set based on the second historical slice feature information of the second historical grid slice and the second historical oil pollution state identifier; The training data group composed of the first training data group and the second training data group is subjected to classification learning training to obtain the surface oil pollution successive analysis device.

4. A method for detecting surface defects of sheet metal parts before painting according to claim 1, characterized in that: Activating the surface oil pollution successive judgement device to perform oil pollution judgment on the first grid slice to obtain a first oil pollution judgment result, including: Performing discrete cosine transform processing on the first grid slice to obtain first discrete cosine transform coefficients; Introducing a slice eigenvalue estimation function to estimate and analyze the first discrete cosine transform coefficient to obtain a first eigenvalue; Performing local binary conversion on the first grid slice to obtain a first conversion code, and combining the first feature value to form first slice feature information; The first slice feature information is used as input data of the surface oil pollution successive analysis device, and the first oil pollution analysis result is obtained through the surface oil pollution successive analysis device.

5. A method for detecting surface defects of sheet metal parts before painting according to claim 4, characterized in that: Introducing a slice eigenvalue estimation function to estimate and analyze the first discrete cosine transform coefficient to obtain a first eigenvalue, including: Get the weight distribution plan; Based on the slice eigenvalue estimation function and in combination with the weight allocation plan, weighting the first slice DC coefficient and the first slice AC coefficient in the first discrete cosine transform coefficient to obtain the first eigenvalue; Wherein, the expression of the slice eigenvalue estimation function is as follows: ; in, refers to the first eigenvalue, refers to the first slice DC coefficient of the first grid slice n, is the first slice AC coefficient of the first grid slice n, refers to the first grid slice n sub-blocks, a refers to the influence factor of the first slice DC coefficient on the first eigenvalue, b refers to the influence factor of the first slice AC coefficient on the first eigenvalue, where a+b=1, and a is much larger than b.

6. A method for detecting surface defects of sheet metal parts before painting according to claim 1, characterized in that: When the first oil pollution assessment result meets the predetermined surface oil pollution constraint, the predetermined sheet metal part is subjected to coating control execution, including: Counting the number of grid slices in the first oil pollution assessment result whose oil pollution status is marked as no oil pollution; Obtaining a ratio of the number of grid slices to the total number of grid slices in the image preprocessing result, and recording it as a first oil pollution ratio; When the first oil pollution ratio reaches a predetermined ratio threshold in the predetermined surface oil pollution constraint, the first oil pollution assessment result satisfies the predetermined surface oil pollution constraint.

7. A method for detecting surface defects of sheet metal parts before painting according to claim 6, characterized in that: When the first oil pollution assessment result does not satisfy the predetermined surface oil pollution constraint, the oil pollution cleaning plan is retrieved to re-clean the predetermined sheet metal part.

8. A sheet metal surface defect detection system before painting, characterized in that: The system is used to implement a method for detecting surface defects of sheet metal parts before painting according to any one of claims 1 to 7, and the system comprises: A predetermined sheet metal part acquisition module is used to acquire a predetermined sheet metal part, wherein the predetermined sheet metal part refers to any sheet metal part that has been processed by the oil cleaning plan; A sheet metal surface image acquisition module is used to process the predetermined sheet metal according to the water film test plan to obtain a post-water film sheet metal, and acquire a surface image of the post-water film sheet metal; A grid slice preprocessing module, used for performing grid slice preprocessing on the surface image to obtain an image preprocessing result, wherein the image preprocessing result includes a first grid slice; An oil pollution judgment module is used to activate the surface oil pollution successive judgment device to perform oil pollution judgment on the first grid slice to obtain a first oil pollution judgment result; The coating control execution module is used to execute coating control on the predetermined sheet metal part when the first oil pollution analysis result meets the predetermined surface oil pollution constraint.

Citation Information

Patent Citations

  • Visual inspection method and system for surface defects of automobile sheet metal parts

    CN116402742A

  • Product defect detection method, device, equipment, system and readable storage medium

    CN117173107A

  • Aluminum alloy profile surface defect detection device

    CN117825386A

  • Welding method for sheet metal part machining

    CN118218762A

  • Part surface quality detection method and system based on machine vision

    CN119151951A