Coating surface defect grade image recognition and evaluation method
Through image stitching and semantic segmentation models, combined with dynamic threshold ROI extraction and multi-scale feature fusion, the problem of efficient and accurate assessment of coating surface defect levels is solved, and high-precision and rapid defect detection is achieved.
Patent Information
- Application Number
- CN202510705979.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-09
AI Technical Summary
Existing technologies make it difficult to efficiently and accurately assess the level of coating surface defects, especially in the case of small-area defects, where there are problems of subjective errors and low detection efficiency.
An image stitching algorithm is used to generate high-resolution inspection images. Dynamic thresholding ROI extraction and an improved semantic segmentation model are combined to identify the location and area of coating defects. A multi-scale feature fusion model based on the attention mechanism is used to achieve automated and high-precision defect detection.
High-precision detection of coating defects is achieved, with a detection accuracy of 14 microns and a speed increased to 3-5 seconds per sample. The test results meet the standards, avoiding subjective errors and improving detection efficiency and accuracy.
Smart Images

Figure CN120612470A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of industrial image processing, and in particular relates to a coating surface defect grade image recognition and assessment method. Background Art
[0002] Coatings are generally manufactured and processed through a specific process using four major categories of materials: film-forming substances, pigments / fillers, dispersing media, and additives. The coatings industry plays an important role in supporting and supporting numerous sectors of the national economy, and coatings themselves are indispensable functional materials. Coating stability is a key performance indicator. Due to factors such as the coating manufacturing process, the temperature and humidity of the operating environment, and oxidation, surface defects often appear during use. These defects negatively impact the coating's appearance and its ability to protect the underlying material.
[0003] To assess a coating material's resistance to various adverse environmental factors, a substrate material is typically selected, onto which a suitable coating is applied to form a stable coating. This coating is then subjected to an "aging test," and the resulting sample may exhibit surface defects, such as blistering, rusting, flaking, and cracking. When testing coatings, rigorously quantifying and assessing defect levels is a challenge for many coating manufacturers. Coating defects are numerous and complex, making them difficult to quantify. They can be broadly categorized as blistering, rusting, cracking, flaking, scratching, and other man-made defects. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for image recognition and assessment of coating surface defect levels, aiming to solve the technical problems existing in the prior art identified in the background technology.
[0005] The present invention is achieved by providing a coating surface defect grade image recognition and assessment method, characterized in that the method comprises:
[0006] 1. Image stitching is performed on the images captured by the cameras. The images captured by the substrate are divided into blocks. An image stitching algorithm is used to calculate the feature points in each image. The feature points in the overlapping areas of adjacent images are matched. The image transformation matrix is then calculated based on the matched feature points to stitch the adjacent images together. The final inspection image is composed of 3-4 camera images, with a pixel value of up to 50 million and an inspection accuracy of up to 14 microns.
[0007] 2. After the image stitching is complete, perform ROI detection on the image, that is, extract the substrate area in the image and remove the useless area around the image. After the extraction is completed, perform image preprocessing before inputting the image into the model.
[0008] 3. After input preprocessing, the image enters the semantic segmentation model, which outputs a detection result mask. Based on the mask—a binary image that identifies the location and size of the defect—the defect grade is assessed according to the standard. Finally, upon completion of the inspection, the defect type, defect area percentage, and standard-based defect grade are determined.
[0009] The beneficial effects of the present invention are:
[0010] This invention uses an image stitching algorithm to generate high-resolution inspection images, combined with dynamic thresholding ROI extraction and an improved semantic segmentation model, to achieve automated, high-precision detection of coating defects. The detection accuracy reaches 14 microns, and the speed is increased to 3-5 seconds per sample, improving detection efficiency.
[0011] A multi-scale feature fusion model based on the attention mechanism is used to effectively identify the mask position and area ratio of defects such as rust, peeling, and blistering. The rating results strictly follow the GB / T 1766-2008 and ISO 4628-3:2016 standards to avoid subjective errors.
[0012] Especially for small area defects (<1%) after salt spray testing, accurate area values are output through pixel-level calculation to solve the controversial problem of traditional manual interval rating.
[0013] Morphological processing and dynamic thresholding technology further optimize the accuracy of ROI area extraction, ensuring the effective removal of substrate edge noise and useless areas, providing an efficient, reliable and standardized defect detection solution for the coating manufacturing industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 Provide a flowchart for the overall operation process and model operation;
[0015] Figure 2 Schematic diagram of the ROI area;
[0016] Figure 3 Schematic diagram of test results and ratings. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0018] like Figure 1 As shown, a coating surface defect grade image recognition and assessment method is characterized in that the method includes:
[0019] 1. Image stitching is performed on the images captured by the cameras. The images captured by the substrate are divided into blocks. An image stitching algorithm is used to calculate the feature points in each image. The feature points in the overlapping areas of adjacent images are matched. The image transformation matrix is then calculated based on the matched feature points to stitch the adjacent images together. The final inspection image is composed of 3-4 camera images, with a pixel value of up to 50 million and an inspection accuracy of up to 14 microns.
[0020] Among them, the specific steps of feature point detection are:
[0021] a. Image preprocessing: first convert the image from a color image to a single-channel grayscale image, and then use image filtering technology to remove high-frequency noise.
[0022] b. Using an improved corner detection algorithm and combining it with corner response value scoring, a feature point set containing scale and orientation information is generated in the multi-scale space of the image pyramid.
[0023] Specific steps for feature point matching:
[0024] a. For each key feature point, first use the improved binary feature descriptor to calculate the unique description vector of each feature point.
[0025] b. Based on the output of the descriptor, use the point pair distance and approximate nearest neighbor search method to match, and after the matching is completed, filter it by a certain threshold ratio.
[0026] 2. After the image stitching is completed, the ROI area detection is performed on the image, that is, the substrate area in the image is extracted and the useless area around the image is removed. The specific processing is as follows Figure 2 The green rectangle in the middle is the ROI area to be extracted. After the extraction is completed, the image is preprocessed before being input into the model.
[0027] Among them, the specific identification steps of the ROI area are:
[0028] a. First, preprocess the image, convert it into a grayscale image, and then perform mean filtering on the image.
[0029] b. Use the grayscale image and the filtered image to calculate the pixel value difference of each region, and then obtain the dynamic threshold of each region. Use this threshold to perform the thresholding operation on the image to obtain a binary image.
[0030] c. Use morphological processing to process the binary image, remove useless burrs and noise, and fill the void areas.
[0031] d. Use area size and rectangle similarity calculation to filter the region in the binary image, then perform inscribed rectangle fitting and indentation to obtain the desired ROI area.
[0032] 3. After the image is input preprocessed, it will enter the semantic segmentation model, and the model will output the mask of the detection result. Based on the mask, that is, the binary image that identifies the location and size of the defect, the defect level can be assessed according to the standard. After the final detection is completed, the corresponding defect type, defect area ratio and defect assessment level according to the standard will be given. Figure 3 As shown, the green mask area on the left is the detected rust area, and the right side shows the detected rust area and rating.
[0033] Among them, the semantic segmentation model adopts an improved semantic segmentation model based on attention mechanism and multi-scale feature fusion, and adds a lightweight hierarchical input encoding layer to improve the input resolution of the model.
[0034] After conducting salt spray tests on multiple samples, we obtained a number of samples with different rust areas and morphologies. According to GB / T30789.3-2014, we first conducted manual evaluation. After obtaining the results, we conducted machine evaluation within a short period of time to ensure that the rust situation of the samples remained unchanged. The results are shown in the following table:
[0035]
[0036]
[0037] As can be seen from the table above, there is a significant difference between manual and machine ratings, especially when the area is less than 1%. Manual ratings can only give a certain defect area range, not an accurate value, and the rating results are greatly influenced by subjectivity.
[0038] In actual salt spray testing, most samples have defects less than 1%, and samples with smaller defect areas are more controversial. Previous manual rating results were subject to significant uncertainty, while machine rating results, calculated based on the actual pixel area percentage, are stable, reliable, and convincing.
[0039] In terms of detection speed, manual detection speed is 5-30 seconds / sample, while machine detection speed is 3-5 seconds / sample, which is a significant improvement in detection speed.
[0040] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0041] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
[0042] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A coating surface defect grade image recognition and assessment method, characterized in that: The method comprises: The substrate is imaged in blocks, and the image stitching algorithm is used to calculate feature points, match overlapping areas, and stitch them together into a complete inspection image. Perform ROI detection on the stitched image, extract the substrate area and preprocess it; The preprocessed image is input into the semantic segmentation model, the defect mask is output, and the defect type, area ratio and grade assessment are calculated based on the defect mask.
2. The method according to claim 1, characterized in that The method of calculating feature points, matching overlapping areas and stitching them into a complete detection image by an image stitching algorithm specifically includes: Preprocess the images captured in blocks, convert the color images into single-channel grayscale images, and use image filtering technology to remove high-frequency noise; Using an improved corner detection algorithm and combining it with corner response value scoring, a feature point set containing scale and orientation information is generated in the multi-scale space of the image pyramid. An improved binary feature descriptor is used to calculate the unique description vector of each feature point. Feature points in the overlapping areas of adjacent images are matched using point pair distance and approximate nearest neighbor search method, and the matching results are filtered by threshold ratio. The image transformation matrix is calculated based on the matched feature points, the adjacent images are stitched together, and a complete detection image is generated.
3. The method according to claim 1, characterized in that The performing ROI region detection on the stitched image specifically includes: Convert the complete detection image into a grayscale image and perform mean filtering; Calculate the pixel value difference between the grayscale image and the filtered image, dynamically generate a threshold and perform a thresholding operation to obtain a binary image; Morphological processing is performed on the binary image to screen regions based on area size and rectangle similarity. The substrate ROI region is extracted by fitting and shrinking the inscribed rectangle, and the surrounding useless areas are removed.
4. The method according to claim 3, characterized in that The dynamically generated threshold value includes: According to the pixel value difference between the grayscale image and the mean filtered image, the local dynamic threshold of each region is calculated, and the binarization operation is performed based on the threshold.
5. The method according to claim 3, characterized in that The morphological processing includes: Perform erosion and dilation operations on the binary image to remove burrs and noise, fill the void areas, and optimize regional connectivity.
6. The method according to claim 1, characterized in that The output defect mask and the calculation of defect type, area ratio and grade assessment based on the defect mask specifically include: Adopting a multi-scale feature fusion structure based on the attention mechanism, adding a lightweight hierarchical input encoding layer, and establishing an improved semantic segmentation model Preprocess the ROI area image and input it into the improved semantic segmentation model; Obtain the binary mask image of the defect location output by the semantic segmentation model, and calculate the defect area ratio based on the mask; Assess the level of defects and area ratio, and output the test results and ratings.
7. The method according to claim 6, characterized in that Defect grade assessment is compatible with the standards GB / T1766-2008 and ISO 4628-3:2016, and outputs rating results based on the mask area ratio.
Citation Information
Patent Citations
Coating surface defect grade evaluation instrument and detection method
CN118533838A
Multi-mode DBC substrate surface defect detection method, device and system based on deep learning, medium and program product
CN119273668A
Flange surface defect detection algorithm based on traditional image processing
CN119379609A
Cited By
Industrial spliced image defect detection and duplicate removal method based on dynamic overlapping region
CN121600313A
Defect detection and de-duplication method for industrial mosaic images based on dynamic overlapping area
CN121600313B