Workpiece coating quality inspection method and system based on machine vision
By analyzing the gradient change values of each pixel point in the real-time image relative to the standard image, using a normal distribution model to filter out the optimal detection image, solving the problem of high consumption of image screening computing resources in industrial environments, and achieving efficient image screening and defect detection.
Patent Information
- Application Number
- CN202411730947.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-29
AI Technical Summary
In industrial environments with resource constraints, how to efficiently filter images to reduce the computing resource consumption input to the identification model, especially for a large number of images without defects.
By calculating the gradient change values of each pixel point in the real-time image relative to each pixel point in the standard image, constructing a histogram and normal distribution model, determining the threshold range, marking abnormal data, and filtering out the optimal detection image for defect detection and identification.
The precise screening of images is realized, reducing the calculation amount of subsequent image analysis, ensuring the screening effect while reducing the consumption of computing resources.
Smart Images

Figure CN119205790B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of coating quality inspection, and in particular to a method and system for workpiece coating quality inspection based on machine vision. Background Art
[0002] The quality of coating is directly related to the appearance and anti-corrosion performance of the car. The coating needs to have excellent anti-rust and anti-corrosion properties, and will not rust or fall off during long-term use. Due to various factors, the coating (film) may have the following common defects: blistering: bubbles are formed on the surface or inside the coating, usually due to moisture or moisture being trapped under the coating; flow marks: the paint sprayed on the vertical surface flows downward, making the paint surface uneven; wrinkling: wrinkles or creases appear on the surface of the coating, which may be caused by uneven evaporation of solvents during the drying process of the coating; pinholes: tiny holes appear in the coating, which may be caused by too fast evaporation of the solvent in the coating or too thick a coating; shrinkage: small pits appear on the surface of the coating, which may be caused by moisture or air bubbles in the coating.
[0003] After the coating process, the coating surface needs to be inspected for quality. In the prior art, defects on the coating surface of the workpiece can be identified by image processing, recognition technology and neural network models. For example, the patent document with announcement number CN112950584B discloses a coating surface defect recognition method based on deep learning, which includes the following steps: S1: Select feature extraction network; S2: Design inverted pyramid classifier; S3: Construct recognition model; S4: Use optimized and adjusted training method to train the recognition model; S5: Identify coating surface defects. The above scheme realizes fast and high-precision recognition of coating surface defects.
[0004] In resource-constrained industrial environments, how to screen the collected images before inputting them into the recognition model, reduce the input of a large number of images without defects, ensure the screening effect while reducing the consumption of computing resources has become an urgent problem that needs to be solved. Summary of the invention
[0005] In order to solve the technical problem of large amount of calculation caused by large number of images input into the recognition model, the present application provides a workpiece coating quality detection method and system based on machine vision.
[0006] In the first aspect, the present application provides a method for detecting the quality of workpiece coating based on machine vision, which adopts the following technical solution:
[0007] A workpiece coating quality inspection method based on machine vision comprises the steps of: screening a real-time image to obtain an optimal inspection image; identifying and marking defective areas in the optimal inspection image; the screening method is: calculating the gradient change value of each pixel point in the real-time image relative to each pixel point in the standard image, grouping the gradient change values, and treating the area composed of pixels with gradient change values in the same group and adjacent positions as a connected domain; constructing a histogram, in which the horizontal axis represents the gradient change value and the vertical axis represents the number of connected domains; calculating the proportion of each group of gradient change values, and the expression is: ,in, Indicates the histogram The proportion of group gradient change values, Indicates The left endpoint of the group gradient change value, Indicates The right endpoint of the group gradient change value, Indicates The step size of the group gradient change value, Indicates The number of connected domains corresponding to the group gradient change value, The number of groups representing the gradient change value is calculated; the mean and standard deviation of all proportions are calculated, a normal distribution model is constructed, a threshold range is determined according to the mean and standard deviation, and in response to a proportion being outside the threshold range, the proportion is marked as abnormal, and the gradient change value contained in the gradient change value group corresponding to the proportion marked as abnormal is used as the abnormal change value; a real-time image in which at least one gradient change value is equal to the abnormal change value is used as the optimal detection image.
[0008] The beneficial effect is: relative to the standard image, the pixel values of the collected real-time image may not be completely the same as the pixel values of the standard image due to environmental and other factors, but the degree of change of the gradient change value of the pixel points in the non-defective area in the gradient standard image and the real-time image should be similar. Therefore, the present application analyzes the gradient change value of each pixel point in the real-time image relative to the gradient change value of each pixel point in the standard image, distinguishes the defective area from the non-defective area, and then finds the abnormal data through the normal distribution, and uses the image with abnormal gradient change value as the optimal detection image for defect detection and identification, so as to achieve the purpose of accurately screening images, reduce the calculation amount of subsequent image analysis, and ensure the screening effect while reducing the consumption of computing resources.
[0009] Optionally, the left endpoint of the interval of the threshold range is the difference between the mean and three times the standard deviation, and the right endpoint is the sum of the mean and three times the standard deviation.
[0010] The beneficial effect is that in a normal distribution, about 99.7% of the data are within the mean. About 0.3% of the data will be considered abnormal. By setting such a threshold range, the vast majority of normal data can be effectively included while the very few abnormal data can be excluded.
[0011] Optionally, the gradient change values are grouped, including the steps of: using the Otsu threshold algorithm to determine the optimal threshold for grouping; dividing the gradient change values into two groups according to the optimal threshold, one group being the gradient change values of the defective area, and the other group being the change values of the normal coating area.
[0012] The beneficial effect is: the gradient change values are grouped by the Otsu threshold, and the optimal threshold is adaptively found, so that the grouping effect is more in line with the actual gradient change value.
[0013] Optionally, the gradient change value of each pixel in the real-time image relative to each pixel in the standard image is calculated, including the steps of: using a gradient operator to calculate the horizontal gradient and vertical gradient of the real-time image, and calculating the Euclidean norm of the horizontal gradient and the vertical gradient to obtain the gradient amplitude of each pixel; obtaining the gradient amplitude of the standard image in the same way as the method for obtaining the gradient amplitude of the real-time image; and taking the difference between pixels at corresponding positions between the real-time image and the standard image as the gradient change value of the pixel.
[0014] Optionally, screening the real-time image to obtain the optimal detection image also includes the steps of: setting standard light source parameters, obtaining a video stream of the coating surface shot under different light source parameters, extracting frames from the video stream to obtain a frame image; comparing the clarity of the frame images under different light source parameters, and using the light source parameters corresponding to the frame image with the highest clarity as the standard light source parameters.
[0015] The beneficial effect is that the standardized light source can reduce the phenomenon that the features of the collected images are not significant or clear due to lighting factors.
[0016] Optionally, the clarity of the frame images under different light source parameters is compared, and the light source parameters corresponding to the frame image with the maximum clarity are used as standard light source parameters, including the steps of: setting an objective function,
[0017] ,in Indicates the clarity of the frame image. represents the coefficient of one, represents the coefficient of two, represents coefficient three, represents coefficient four, represents the coefficient five, Indicates the light power, Indicates the lighting distance. Represents the angle of incidence of light; use the least squares method to estimate the regression coefficient and obtain the values of coefficient one, coefficient two, coefficient three, coefficient four and coefficient five; take the illumination power, illumination parameters and light incident angle corresponding to the maximum value of the objective function as the standard light source parameters.
[0018] The beneficial effects are: As an exponential term, the impact of image clarity first increases and then tends to saturation with the increase of light power. The exponential decay model can simulate this saturation effect. is a sine function term, lighting distance It has a periodic effect on image clarity. When the light source is too close or too far away, the image may not be clear enough. The sine function can simulate this periodic change. is a quadratic term, the incident angle of the light It has a nonlinear effect on image clarity, and the quadratic term can capture this nonlinear relationship.
[0019] Optionally, the clarity is information entropy or contrast of the frame image.
[0020] The beneficial effect is that information entropy can reflect the information content contained in the image. The greater the information entropy, the greater the information content in the image. Under the light source parameters at this time, the more defects can be displayed in the image, the clearer the image is, and vice versa, the more blurred the image is. Contrast can be used to evaluate the clarity of frame images under different light source parameters. By comparing the contrast of images under different light source parameters, the light source parameters that can make the coating surface image most clearly visible can be selected.
[0021] In the second aspect, the present application provides a workpiece coating quality inspection system based on machine vision, which adopts the following technical solution:
[0022] The system for detecting the quality of workpiece coating based on machine vision comprises: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for detecting the quality of workpiece coating based on machine vision is implemented.
[0023] The beneficial effect is: the above-mentioned workpiece coating quality detection method based on machine vision is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a system based on the memory and the processor for easy use.
[0024] This application has the following technical effects:
[0025] 1. Compared with the standard image, the pixel values of the collected real-time image may not be completely the same as those of the standard image due to environmental factors, but the degree of change of the gradient change value of the pixel points in the non-defective area in the gradient standard image and the real-time image should be similar. Therefore, this application analyzes the gradient change value of each pixel point in the real-time image relative to the gradient change value of each pixel point in the standard image to distinguish the defective area from the non-defective area, and then finds the abnormal data through the normal distribution, and uses the image with abnormal gradient change value as the optimal detection image for defect detection and identification, so as to achieve the purpose of accurately screening images, reduce the calculation amount of subsequent image analysis, and ensure the screening effect while reducing the consumption of computing resources.
[0026] 2. Standardized light sources can reduce the phenomenon of unclear or unclear features of captured images caused by lighting factors. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-restrictive manner, and the same or corresponding numbers represent the same or corresponding parts.
[0028] Figure 1 It is a method flow chart of a workpiece coating quality detection method based on machine vision in an embodiment of the present application.
[0029] Figure 2 It is a method flow chart of step S1 in the workpiece coating quality detection method based on machine vision in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0031] It should be understood that when the terms "first", "second", etc. are used in the claims, specification and drawings of the present application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.
[0032] The embodiment of the present application discloses a method for detecting the quality of workpiece coating based on machine vision. The present application is mainly used for detecting the coating surface of workpieces such as automobile bodies and exterior trims after spraying. Figure 1 , including steps S1-S2, which are as follows:
[0033] S1: Filter the real-time image to obtain the optimal detection image. Figure 2 , step S1 includes steps S10 to S16, which are specifically as follows:
[0034] S10: Setting standard light source parameters, obtaining video streams of the coating surface under different light source parameters, and extracting frames from the video streams to obtain frame images.
[0035] In one embodiment, a lighting lamp is set as a light source for lighting, and the light source parameters include lighting distance, light source power, light incident angle, etc. A camera is set to move to shoot a video of the coating surface of the workpiece to be inspected, and the light source can move synchronously with the camera, or multiple fixed light sources can be set to ensure that the coating surface in the captured video is clearly visible in the picture.
[0036] Extract frames from the captured video to obtain multiple frame images, and perform grayscale processing on the frame images. You can extract frames at fixed time intervals, extracting one frame within a fixed time interval. For example, if the frame rate of the video is 30 frames per second, choose to extract one frame per second, that is, extract one frame every 30 frames. You can also extract frames at fixed frame intervals, extracting one frame every fixed number of frames in the total number of frames in the video. For example, if the video has 900 frames, extract one frame every 30 frames.
[0037] S11: comparing the clarity of frame images under different light source parameters, taking the light source parameters corresponding to the frame image with the highest clarity as standard light source parameters, and taking the image collected under the standard light source parameters as the real-time image.
[0038] In one embodiment, the clarity is the information entropy or contrast of the frame image. The information entropy can reflect the information content contained in the image. The greater the information entropy, the greater the information content in the image. Under the light source parameters at this time, the more defects can be displayed in the image, the clearer the image, and vice versa, the more blurred the image.
[0039] The calculation formula of information entropy is: in, represents information entropy, Represents grayscale value The probability of appearing in the image, L is the number of gray levels of the image.
[0040] In one embodiment, contrast can be used to evaluate the clarity of frame images under different light source parameters. By comparing the contrast of images under different light source parameters, the light source parameters that can make the coating surface image most clearly visible can be selected. Contrast is an indicator to measure the difference between light and dark areas in an image, which describes the obviousness of the difference between light and dark areas in the image. High contrast means that there is a clear boundary between light and dark areas in the image. The higher the contrast, the clearer the details of the image and the easier it is to identify defects.
[0041] The calculation of contrast is known in the art. For example, the contrast may be the ratio of the difference between the maximum grayscale value and the minimum grayscale value to the sum of the maximum grayscale value and the minimum grayscale value. Other methods of contrast calculation in the prior art that are applicable to the present application may also be used, which will not be described in detail here.
[0042] Set the objective function, and take the illumination power, illumination parameters and light incident angle corresponding to the maximum value of the objective function as the standard light source parameters.
[0043] In one embodiment, the objective function is: ,in Indicates the clarity of the frame image. represents the coefficient of one, represents the coefficient of two, represents coefficient three, represents coefficient four, represents the coefficient five, Indicates the light power, Indicates the lighting distance. Represents the incident angle of the light.
[0044] As an exponential term, the impact of image clarity increases first and then tends to saturation with the increase of light power. The exponential decay model can simulate this saturation effect. When the image is sharper, It increases faster when it is smaller because the initial value of the exponential term is larger. Conversely, the clarity is When it is smaller, it increases more slowly. Affects the rate of exponential decay, when As the exponential increases, The faster the decay, the faster the As the exponential term increases, the image clarity tends to saturation faster. Conversely, the exponential term decays more slowly and the image clarity tends to saturation more slowly.
[0045] is a sine function term, lighting distance It has a periodic effect on image clarity. When the light source is too close or too far away, the image may not be clear enough. The sine function can simulate this periodic change. Controls the amplitude of the sine function, when As the value increases, the amplitude of the sine function increases, which means that the image clarity decreases with On the contrary, as the amplitude of the sine function decreases, the image clarity decreases. The changes are not significant. control The cycle, when As the period of the sine function decreases, the image clarity decreases. On the contrary, as the period of the sine function increases, the image clarity decreases. changes are less frequent.
[0046] is a quadratic term, the incident angle of the light has a nonlinear effect on image clarity, and the quadratic term can capture this nonlinear relationship, where Determines the opening direction and width of the curve. When it is positive, the quadratic term opens upward, and the image clarity increases with increases with the increase of , until it reaches the maximum value and then begins to decrease. When it is negative, the quadratic term opens downward, and the image clarity decreases with It decreases with the increase of , until it reaches a minimum value and then starts to increase. The larger the absolute value of the curve, the narrower the opening of the curve, and the image clarity increases. The image clarity is more sensitive to changes in is less sensitive to changes.
[0047] The regression coefficient is estimated by the least square method to obtain the values of coefficient one, coefficient two, coefficient three, coefficient four and coefficient five. Substitute coefficient one, coefficient two, coefficient three, coefficient four and coefficient five into the objective function formula. Solve the objective function. The method for solving the objective function is a prior art and will not be described here. Take the illumination power, illumination parameters and light incident angle corresponding to the maximum value of the objective function as standard light source parameters. The image collected under the standard light source parameters is taken as a real-time image.
[0048] S12: Calculate the gradient change value of each pixel in the real-time image relative to each pixel in the standard image, group the gradient change values, and regard the area consisting of pixels with gradient change values in the same group and adjacent positions as a connected domain.
[0049] A standard image refers to an image with the same acquisition angle and paint surface range as the real-time image but without coating defects. Compared with the standard image, the pixel values of the real-time image may not be completely the same as those of the standard image due to environmental factors, but the degree of change in the gradient change values of the pixels in the non-defective areas of the gradient standard image and the real-time image should be similar. Therefore, this application distinguishes defective areas from non-defective areas by analyzing the gradient change values of each pixel in the real-time image relative to each pixel in the standard image.
[0050] The horizontal gradient and vertical gradient of the real-time image are calculated using a gradient operator, and the Euclidean norm of the horizontal gradient and the vertical gradient is calculated to obtain the gradient amplitude of each pixel. The specific calculation method of the horizontal gradient and the vertical gradient is prior art and will not be described in detail here.
[0051] The gradient amplitude of the standard image is obtained in the same way as the method of obtaining the gradient amplitude of the real-time image. The difference between the pixels at the corresponding positions between the real-time image and the standard image is used as the gradient change value of the pixel point.
[0052] The optimal threshold for grouping is determined using the Otsu threshold algorithm; the gradient change values are divided into two groups according to the optimal threshold, one group is the gradient change values of the defective area, and the other group is the change values of the normal coating area. The Otsu threshold algorithm is a prior art and will not be described in detail here. The area composed of pixels with gradient change values in the same group and adjacent positions is regarded as a connected domain, and the connected domain is determined by comprehensively considering the two factors of gradient change and position change.
[0053] S13: construct a histogram, in which the horizontal axis represents the gradient change value, and the vertical axis represents the number of connected domains.
[0054] S14: Calculate the proportion of each group of gradient change values.
[0055] In one embodiment, the expression of the proportion is: ,in, Indicates the histogram The proportion of group gradient change values, Indicates The left endpoint of the group gradient change value, Indicates The right endpoint of the group gradient change value, Indicates The step size of the group gradient change value, Indicates The number of connected domains corresponding to the group gradient change value, The number of groups representing the gradient change value.
[0056] Specifically, It indicates the The area of the rectangular image corresponding to the set of gradient change values. It represents the area accumulation sum of the rectangular images corresponding to all gradient change values.
[0057] S15: Calculate the mean and standard deviation of all proportions, build a normal distribution model, determine the threshold range according to the mean and standard deviation, and in response to the proportion being outside the threshold range, mark the proportion as abnormal, and use the gradient change value contained in the gradient change value group corresponding to the proportion marked as abnormal as the abnormal change value.
[0058] In one embodiment, when setting the threshold range, the difference between the mean and three times the standard deviation is used as the left endpoint, and the sum of the mean and three times the standard deviation is used as the right endpoint. This is based on the characteristics of the normal distribution. The above three times the standard deviation can be replaced by two times the standard deviation or one times the standard deviation. The present application prefers three times the standard deviation. In a normal distribution, about 99.7% of the data are located at the mean. About 0.3% of the data will be considered abnormal. By setting such a threshold range, the vast majority of normal data can be effectively included while the very few abnormal data can be excluded.
[0059] The gradient change value contained in the gradient change value group corresponding to the proportion marked as abnormal is taken as the abnormal change value.
[0060] S16: taking a real-time image in which at least one gradient change value is equal to the abnormal change value as an optimal detection image.
[0061] For example, the gradient change value range [0, 5) is marked as an abnormal change value, that is, the abnormal change values are 0, 1, 2, 3, 4. If there is a gradient change value of 2 in the real-time image, it means that there may be one or more pixel points in the real-time image where the defect area is located. This image is selected as the optimal detection image to further identify the defect.
[0062] S2: Identify and mark defect areas in the optimal inspection image.
[0063] The optimal detection image is put into the existing recognition model, and the defect area is identified and marked in the optimal detection image. In one embodiment, the construction process of the recognition model can be: collecting and annotating training data, the training data includes normal images and images containing defects, and an existing defect detection data set can be used, or images can be obtained by actual shooting and defect areas are manually annotated. The neural network model is trained using the annotated training data. When the preset number of training times is reached or the loss function reaches a threshold, the training is stopped, and the trained model is tested using a verification data set to evaluate the accuracy and generalization ability of the model to obtain a recognition model. The training and verification of the model are existing technologies and will not be elaborated here.
[0064] For example, the neural network model may be a CNN (Convolutional Neural Networks) model. The number of training times may be 1000 times, the threshold of the loss function may be 0.01, and the loss function may be a cross entropy loss function.
[0065] An embodiment of the present application also discloses a workpiece coating quality detection system based on machine vision, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a workpiece coating quality detection method based on machine vision according to the present application is implemented.
[0066] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.
[0067] In the present application, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high bandwidth memory HBM (High Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.
[0068] Although this specification has shown and described a plurality of embodiments of the present application, it is obvious to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein may be adopted.
[0069] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A method for detecting the quality of workpiece coating based on machine vision, characterized in that: Includes steps: Filter the real-time image to obtain the optimal detection image; identify and mark the defect area in the optimal detection image; the screening method is: Calculate the gradient change value of each pixel in the real-time image relative to each pixel in the standard image, group the gradient change values, and regard the area composed of pixels with gradient change values in the same group and adjacent positions as a connected domain; Construct a histogram, in which the horizontal axis represents the gradient change value and the vertical axis represents the number of connected domains; Calculate the proportion of each group of gradient change values, the expression is: ,in, Indicates the histogram The proportion of group gradient change values, Indicates The left endpoint of the group gradient change value, Indicates The right endpoint of the group gradient change value, Indicates The step size of the group gradient change value, Indicates The number of connected domains corresponding to the group gradient change value, The number of groups representing the gradient change value; Calculate the mean and standard deviation of all proportions, build a normal distribution model, determine the threshold range according to the mean and standard deviation, and in response to the proportion being outside the threshold range, mark the proportion as abnormal, and use the gradient change value contained in the gradient change value group corresponding to the proportion marked as abnormal as the abnormal change value; A real-time image in which at least one gradient change value is equal to the abnormal change value is used as an optimal detection image.
2. The method for detecting workpiece coating quality based on machine vision according to claim 1, characterized in that: The left endpoint of the threshold range interval is the difference between the mean and three times the standard deviation, and the right endpoint is the sum of the mean and three times the standard deviation.
3. The method for detecting workpiece coating quality based on machine vision according to claim 1, characterized in that: Grouping gradient change values includes the following steps: The Otsu threshold algorithm is used to determine the optimal threshold for grouping; The gradient change values are divided into two groups according to the optimal threshold, one group is the gradient change values of the defect area, and the other group is the change values of the normal coating area.
4. The method for detecting workpiece coating quality based on machine vision according to claim 1, characterized in that: Calculating the gradient change value of each pixel in the real-time image relative to each pixel in the standard image includes the following steps: The horizontal gradient and vertical gradient of the real-time image are calculated using the gradient operator, and the Euclidean norm of the horizontal gradient and the vertical gradient is calculated to obtain the gradient amplitude of each pixel; The gradient amplitude of the standard image is obtained in the same way as the method of obtaining the gradient amplitude of the real-time image; The difference between the pixels at the corresponding positions of the real-time image and the standard image is taken as the gradient change value of the pixel point.
5. The method for detecting workpiece coating quality based on machine vision according to any one of claims 1 to 4, characterized in that: Screening the real-time image to obtain the optimal detection image also includes the following steps: Set standard light source parameters, obtain video streams of the coating surface under different light source parameters, and extract frames from the video streams to obtain frame images; The clarity of the frame images under different light source parameters is compared, and the light source parameters corresponding to the frame image with the highest clarity are taken as the standard light source parameters.
6. The method for detecting workpiece coating quality based on machine vision according to claim 5, characterized in that: Comparing the clarity of frame images under different light source parameters, and taking the light source parameters corresponding to the frame image with the highest clarity as standard light source parameters, including the following steps: Set the objective function, ,in Indicates the clarity of the frame image. represents the coefficient one, represents the coefficient of two, represents coefficient three, represents coefficient four, represents the coefficient five, Indicates the light power, Indicates the lighting distance. Indicates the incident angle of light; The regression coefficients were estimated using the least squares method to obtain the values of coefficients one, two, three, four and five; The illumination power, illumination parameters and light incident angle corresponding to the maximum value of the objective function are taken as standard light source parameters.
7. The method for detecting workpiece coating quality based on machine vision according to claim 5, characterized in that: Clarity is the information entropy or contrast of the frame image.
8. The workpiece coating quality inspection system based on machine vision is characterized by: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the workpiece coating quality detection method based on machine vision according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
A Deep Learning-Based Method for Identifying Defects on Coating Surfaces
CN112950584B
Fiberboard quality classification method based on machine vision
CN114445387A
Automatic spraying path optimization method and system
CN118115368A