Paint surface roughness nondestructive testing method and system for industrial machine vision
By combining non-contact optical imaging and dark field illumination, a roughness-feature relationship model is established, which solves the problems of robustness and light sensitivity in paint surface roughness detection in existing technologies, and realizes rapid and accurate non-destructive testing, which is suitable for online inspection and on-site sampling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU HUICUI INTELLIGENT TECH CO LTD
- Filing Date
- 2026-01-31
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies have poor robustness in detecting paint surface roughness, are greatly affected by changes in lighting, and have insufficient generalization ability of deep learning models. Furthermore, the cost of obtaining labeled samples is high, making it difficult to meet the needs for fast and accurate online detection.
By employing non-contact optical imaging combined with dark-field illumination, and establishing a roughness-feature relationship model, the global grayscale average value is extracted using illumination parameters such as the incident angle, distance, and height of the light source. This roughness-feature relationship model is then used for prediction, enabling rapid and accurate non-destructive testing.
It enables stable and rapid detection of paint surface roughness under different lighting conditions, avoids physical damage, reduces the skill requirements for operators, and meets the needs of online inspection and on-site sampling.
Smart Images

Figure CN122023346A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology, specifically to a non-destructive testing method and system for paint surface roughness in industrial machine vision. Background Technology
[0002] In high-end manufacturing industries, such as automotive painting, consumer electronics casing treatment, and furniture surface treatment, the surface quality of paint coatings is a key indicator determining the product's appearance and durability. Among these, paint surface roughness (or texture, orange peel effect) is a core measurement parameter.
[0003] To more quickly detect paint surface roughness in industry, qualitative or semi-quantitative evaluation schemes based on machine vision have been designed:
[0004] Qualitative or semi-quantitative assessment based on machine vision: This typically involves using an industrial camera with uniform lighting to photograph the paint surface, followed by feature extraction using image processing algorithms. Common methods include:
[0005] Gray-scale statistical features: Calculate the overall gray-scale mean, variance, entropy, etc. of an image. This method is simple and fast, but it is extremely sensitive to changes in lighting and cannot effectively distinguish between textures caused by roughness and changes caused by irrelevant factors such as color and blemishes, resulting in poor robustness.
[0006] Texture analysis algorithms, such as the gray-level co-occurrence matrix (GLCM), characterize texture by calculating the spatial relationships between pixel pairs in an image. This method is more advanced than simple gray-level statistics, but it has a high feature dimension, is relatively computationally complex, and its effectiveness heavily depends on the uniformity and stability of illumination. In real-world factory environments, ensuring absolutely uniform global illumination is difficult and costly.
[0007] Deep learning models utilize convolutional neural networks to train on a large number of labeled paint surface images, learning the mapping from images to roughness values. This method has great potential, capable of learning complex features. However, its performance is highly dependent on the quantity and quality of the training data. Obtaining a large number of accurately labeled paint surface samples (i.e., each sample needs to have its true roughness pre-measured using contact or high-precision optical equipment) is costly and time-consuming. Furthermore, the model's generalization ability is uncertain for new colors, new substrates, or new lighting conditions.
[0008] Based on this, the present invention designs a non-destructive testing method and system for paint surface roughness for industrial machine vision to solve the above problems. Summary of the Invention
[0009] In view of the above-mentioned shortcomings of the existing technology, the present invention provides a non-destructive testing method and system for paint surface roughness for industrial machine vision.
[0010] To achieve the above objectives, the present invention provides the following technical solution:
[0011] A non-destructive testing method for paint surface roughness based on industrial machine vision includes the following steps:
[0012] Step 1: Select a set of standard paint test blocks with known true roughness values;
[0013] Step 2: Acquire images under different combinations of lighting parameters, define the lighting parameters as the file names of the images, and form an image training set;
[0014] Step 3: Preprocess the image training set, extract the global gray-scale average value from the preprocessed image, convert the lighting parameters of the preprocessed image into a lighting parameter vector, and then input the lighting parameter vector, the true roughness value, and the global gray-scale average value into the roughness-feature relationship model to train the roughness-feature relationship model;
[0015] Step 4: Using the trained roughness-feature relationship model, predict the roughness of the paint surface with unknown roughness, and determine whether the prediction result is less than the set threshold. If the prediction is yes, the paint surface is qualified; if the prediction is no, the paint surface is unqualified.
[0016] Furthermore, lighting parameters include the incident angle of the light source. Distance from the light source to the center and light source height .
[0017] Furthermore, the specific preprocessing operations for the image training set are as follows:
[0018] Step 1: Correct the original image;
[0019] Step 2: Enhance the flat-field corrected image by using contrast-limited adaptive histogram equalization;
[0020] Step 3: Perform relative reflectance normalization on the enhanced image based on the reference whiteboard;
[0021] Step 4: Use rotation-invariant Gabor filter banks or anisotropic diffusion filters to filter the normalized image to obtain the preprocessed image.
[0022] Furthermore, the specific steps for extracting the global grayscale average value from the preprocessed image are as follows:
[0023] Step 1: Decode the preprocessed image into a 3D array, which includes height... ,width and number of channels Number of channels The number is 3, representing red. ,green and blue ;
[0024] Step 2: Obtain a two-dimensional matrix of grayscale values by calculating the grayscale value of each pixel in the three-dimensional array using the grayscale calculation formula;
[0025] Step 3: Calculate the global average grayscale value using the grayscale values of the two-dimensional matrix.
[0026] Furthermore, the first grayscale value of each pixel The calculation is as follows:
[0027]
[0028] It is red. It is green. It is blue.
[0029] Furthermore, the global grayscale average value The calculation is as follows:
[0030]
[0031]
[0032] The total number of pixels in the preprocessed image.
[0033] Furthermore, the roughness-feature relationship model is calculated as follows:
[0034]
[0035] To predict the roughness value, , , and These are the fitting coefficients. This is the intercept term.
[0036] Furthermore, the training operation for the roughness-feature relationship model is as follows:
[0037] Step 1: Illumination parameter vector, true roughness value The global grayscale average value is input into the roughness-feature relationship model to calculate the predicted roughness value;
[0038] Step 2: Calculate the prediction error between the actual roughness value and the predicted roughness value for each group;
[0039] Step 3: Sum the squared prediction error values of all images to obtain the total error.
[0040] Step 4: Find the matrix operation method that minimizes the total error. , , , The b value is used until the mean square error of all images is less than the set value.
[0041] Furthermore, step 4 is described in detail below:
[0042] Step 41: Construct the matrix Parameter vector and the true value vector ;
[0043] Step 42: Solve the normal equation for the optimal parameter vector Optimal parameter vector within , , , The values of b and b minimize the total error.
[0044] A non-destructive testing system for paint surface roughness based on industrial machine vision includes:
[0045] Illumination supplementary lighting module: used for supplementary lighting during image acquisition, the incident angle of the light source can be adjusted as needed;
[0046] Image acquisition module: used for image acquisition;
[0047] Dark field and positioning module: used to shield the image acquisition module and the lighting module, and to determine the distance from the light source to the center and the height of the light source;
[0048] Processing and Control Module: Used to control the lighting and supplementary lighting module and the image acquisition module, then perform image feature extraction, and calculate the image roughness based on the extracted features and the paint surface roughness according to the roughness-feature relationship model.
[0049] Beneficial effects: This invention uses non-contact optical imaging to ensure that no physical damage is caused to the paint surface. It actively suppresses ambient light interference through dark field illumination and highlights the scattered light signal caused by surface micro-undulations (roughness), making the correlation between imaging features and roughness stronger and more stable. It establishes a roughness-feature relationship model to achieve rapid and accurate quantitative evaluation, which can meet the needs of online detection or rapid on-site sampling inspection, and has low skill requirements for operators. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0051] Figure 1 This is a flowchart of the paint surface roughness non-destructive testing system for industrial machine vision according to the present invention. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0053] The present invention will be further described below with reference to embodiments.
[0054] Example 1: Please refer to Figure 1 A non-destructive testing method for paint surface roughness based on industrial machine vision includes the following steps:
[0055] Step 1: Select a set of standard paint test blocks with known true roughness values;
[0056] Step 2: Acquire images under different combinations of lighting parameters, define the lighting parameters as the file names of the images, and form an image training set;
[0057] Step 3: Preprocess the image training set, extract the global gray-scale average value from the preprocessed image, convert the lighting parameters of the preprocessed image into a lighting parameter vector, and then input the lighting parameter vector, the true roughness value, and the global gray-scale average value into the roughness-feature relationship model to train the roughness-feature relationship model;
[0058] Step 4: Using the trained roughness-feature relationship model, predict the roughness of the paint surface with unknown roughness, and determine whether the prediction result is less than the set threshold. If the prediction is yes, the paint surface is qualified; if the prediction is no, the paint surface is unqualified.
[0059] Lighting parameters include the angle of incidence of the light source. Distance from the light source to the center and light source height ;
[0060] The specific steps for preprocessing the image training set are as follows:
[0061] Step 1: Correct the original image to eliminate vignetting and uneven lighting;
[0062] Step 2: Enhance the flat-field corrected image by using contrast-limited adaptive histogram equalization to enhance the local scattering contrast caused by roughness while suppressing noise;
[0063] Step 3: Perform relative reflectance normalization on the enhanced image based on the reference white board to ensure that the gray values of different color samples are comparable;
[0064] Step 4: Use rotation-invariant Gabor filter banks or anisotropic diffusion filters to filter the normalized image to obtain a preprocessed image, which enhances the texture features of the paint surface microstructure and avoids feature deviations caused by changes in shooting angle.
[0065] The specific steps for extracting the global grayscale average value from the preprocessed image are as follows:
[0066] Step 1: Decode the preprocessed image into a 3D array, which includes height... ,width and number of channels Number of channels The number is 3, representing red. ,green and blue ;
[0067] Step 2: Obtain a two-dimensional matrix of grayscale values by calculating the grayscale value of each pixel in the three-dimensional array using the grayscale calculation formula;
[0068] Step 3: Calculate the global average grayscale value using the grayscale values of the two-dimensional matrix.
[0069] No. grayscale value of each pixel The calculation is as follows:
[0070]
[0071] It is red. It is green. It is blue;
[0072] Global grayscale average The calculation is as follows:
[0073]
[0074]
[0075] The total number of pixels in the preprocessed image;
[0076] The roughness-feature relationship model is calculated as follows:
[0077]
[0078] To predict the roughness value, , , and These are the fitting coefficients. For the intercept term;
[0079] The training operation for the roughness-feature relationship model is as follows:
[0080] Step 1: Illumination parameter vector, true roughness value The global grayscale average value is input into the roughness-feature relationship model to calculate the predicted roughness value;
[0081] Step 2: Calculate the prediction error between the actual roughness value and the predicted roughness value for each group;
[0082] Step 3: Sum the squared prediction error values of all images to obtain the total error.
[0083] Step 4: Find the matrix operation method that minimizes the total error. , , , And b value, until the mean square error of all images is less than the set value;
[0084] The set value is 0.1
[0085] Step 4 is described in detail below:
[0086] Step 41: Construct the matrix Parameter vector and the true value vector ;
[0087]
[0088]
[0089]
[0090] Step 42: Solve the normal equation for the optimal parameter vector Optimal parameter vector within , , , The values of b and b minimize the total error.
[0091] Optimal parameter vector The calculation is as follows:
[0092]
[0093] For matrix The transpose of the matrix;
[0094] A non-destructive testing system for paint surface roughness based on industrial machine vision includes:
[0095] Illumination supplementary lighting module: used for supplementary lighting during image acquisition;
[0096] Image acquisition module: used for image acquisition;
[0097] Dark field and positioning module: used to shield the image acquisition module and the lighting module, and to determine the distance from the light source to the center and the height of the light source;
[0098] The dark field and positioning module is a sealed or semi-sealed dark chamber that encloses the illumination module and image acquisition module. There is an opening at the bottom of the housing; during detection, both the illumination module and the image acquisition module face this opening. A non-contact distance sensor can also be installed at the bottom of the housing to determine the distance from the light source to the center and the height of the light source during detection.
[0099] Processing and Control Module: Used to control the lighting and supplementary lighting module and the image acquisition module, then perform image feature extraction, and calculate the image roughness based on the extracted features and the paint surface roughness according to the roughness-feature relationship model.
[0100] This invention employs non-contact optical imaging to ensure no physical damage to the paint surface. It actively suppresses ambient light interference through dark-field illumination and highlights the scattered light signal caused by surface micro-undulations (roughness), making the correlation between imaging features and roughness stronger and more stable. It establishes a roughness-feature relationship model to achieve rapid and accurate quantitative evaluation, which can meet the needs of online inspection or rapid on-site sampling, and has low skill requirements for operators.
[0101] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A non-destructive testing method for paint surface roughness based on industrial machine vision, characterized in that, Includes the following steps: Step 1: Select a set of standard paint test blocks with known true roughness values; Step 2: Acquire images under different combinations of lighting parameters, define the lighting parameters as the file names of the images, and form an image training set; Step 3: Preprocess the image training set, extract the global gray-scale average value from the preprocessed image, convert the lighting parameters of the preprocessed image into a lighting parameter vector, and then input the lighting parameter vector, the true roughness value, and the global gray-scale average value into the roughness-feature relationship model to train the roughness-feature relationship model; Step 4: Using the trained roughness-feature relationship model, predict the roughness of the paint surface with unknown roughness, and determine whether the prediction result is less than the set threshold. If the prediction is yes, the paint surface is qualified; if the prediction is no, the paint surface is unqualified.
2. The detection method according to claim 1, characterized in that, Lighting parameters include the angle of incidence of the light source. Distance from the light source to the center and light source height .
3. The detection method according to claim 2, characterized in that, The specific steps for preprocessing the image training set are as follows: Step 1: Correct the original image; Step 2: Enhance the flat-field corrected image by using contrast-limited adaptive histogram equalization; Step 3: Perform relative reflectance normalization on the enhanced image based on the reference whiteboard; Step 4: Use rotation-invariant Gabor filter banks or anisotropic diffusion filters to filter the normalized image to obtain the preprocessed image.
4. The detection method according to claim 3, characterized in that, The specific steps for extracting the global grayscale average value from the preprocessed image are as follows: Step 1: Decode the preprocessed image into a 3D array, which includes height... ,width and number of channels Number of channels The number is 3, representing red. ,green and blue ; Step 2: Obtain a two-dimensional matrix of grayscale values by calculating the grayscale value of each pixel in the three-dimensional array using the grayscale calculation formula; Step 3: Calculate the global average grayscale value using the grayscale values of the two-dimensional matrix.
5. The detection method according to claim 4, characterized in that, No. grayscale value of each pixel The calculation is as follows: ; It is red. It is green. It is blue.
6. The detection method according to claim 5, characterized in that, Global grayscale average The calculation is as follows: ; ; The total number of pixels in the preprocessed image.
7. The detection method according to claim 6, characterized in that, The roughness-feature relationship model is calculated as follows: ; To predict the roughness value, , , and These are the fitting coefficients. This is the intercept term.
8. The detection method according to claim 2, characterized in that, The training operation for the roughness-feature relationship model is as follows: Step 1: Illumination parameter vector, true roughness value The global grayscale average value is input into the roughness-feature relationship model to calculate the predicted roughness value; Step 2: Calculate the prediction error between the actual roughness value and the predicted roughness value for each group; Step 3: Sum the squared prediction error values of all images to obtain the total error. Step 4: Find the matrix operation method that minimizes the total error. , , , The b value is used until the mean square error of all images is less than the set value.
9. The detection method according to claim 2, characterized in that, Step 4 is described in detail below: Step 41: Construct the matrix Parameter vector and the true value vector ; Step 42: Solve the normal equation for the optimal parameter vector Optimal parameter vector within , , , The values of b and b minimize the total error.
10. A non-destructive testing system for paint surface roughness based on industrial machine vision, characterized in that, include: Illumination supplementary lighting module: used for supplementary lighting during image acquisition, the incident angle of the light source can be adjusted as needed; Image acquisition module: used for image acquisition; Dark field and positioning module: used to shield the image acquisition module and the lighting module, and to determine the distance from the light source to the center and the height of the light source; Processing and Control Module: Used to control the lighting and supplementary lighting module and the image acquisition module, then perform image feature extraction, and calculate the image roughness based on the extracted features and the paint surface roughness according to the roughness-feature relationship model.