A method for defect detection of coated plates based on image processing

By extracting the edge blur, color saturation and contrast information of the painted panel image, the image quality coefficient is generated, which solves the problems of low detection efficiency and poor image quality of the painted panel in traditional detection methods, and achieves efficient and accurate defect detection. .

CN118379300BActive Publication Date: 2024-10-15QINGDAO LINGJUN INTELLIGENT CONSTR NEW MATERIAL TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410840862.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-10-15
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

Traditional coating board defect detection methods are inefficient when inspecting a large number of high-quality coating boards, and poor image quality will affect the accuracy and efficiency of the detection results.

Method used

An image processing method for detecting coating board defects is proposed. By extracting edge blur information, color saturation information and contrast information from the image, the image quality coefficient is generated, high-quality and low-quality images are divided, and the processing time is adjusted according to the image quality. Or re-acquire images to determine image availability.

Benefits of technology

It improves the efficiency and accuracy of defect detection of painted panels, ensures the reliability of detection results, and at the same time judges the image quality, avoids unnecessary detailed analysis, and improves production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118379300B_ABST
    Figure CN118379300B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for defect detection of painted plates by image processing, and specifically relates to the technical field of defect detection of painted plates. The present invention extracts edge blur information, color saturation information and contrast information for distinguishing image quality from each image, regenerates an edge blur index, a color saturation deviation index and a contrast index, obtains an image quality coefficient of each image, and adjusts the image processing time according to data information in high-quality images and low-quality images, or re-captures the target painted plate image and issues an alarm. When a large number of high-quality painted plates need to be accurately and efficiently detected at the same time, the analysis and processing time can be adjusted according to the quality of the images collected about the painted plates, so that the defect detection is more accurate and the detection efficiency can be improved. At the same time, it can also be determined whether the collected images about the painted plates are usable, thereby ensuring the accuracy of the detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of coated plate defect detection, and in particular to a coated plate defect detection method using image processing. Background Art

[0002] Painted panels are a type of surface treated and painted panels that are widely used in industry and construction. The substrate of a painted panel can be metal (such as steel, aluminum) or other materials (such as wood, plastic). Through a series of processes such as pretreatment, painting and curing, its surface has specific functions and decorative effects. Especially in the high-end field, the quality requirements for painted panels are very strict, so defect detection must be carried out before leaving the factory to ensure that the product meets high standards and high quality requirements.

[0003] The traditional defect detection method is to obtain multiple images of the coated plate surface and analyze these images in detail to accurately detect the defects of the coated plate.

[0004] However, when a large number of high-quality painted panels need to be accurately and efficiently inspected at the same time, the traditional method of detailed processing of each image may lead to reduced inspection efficiency, thereby affecting production efficiency; in addition, if the quality of the collected painted panel images is poor, continuing detailed analysis will not only reduce the inspection efficiency, but also affect the accuracy of the inspection results. Summary of the invention

[0005] The purpose of the present invention is to solve the problem and propose a method for detecting defects of a coated plate by image processing.

[0006] The present invention proposes a method for detecting defects in a coated plate using image processing, the method comprising:

[0007] The following steps are involved:

[0008] Placing a plurality of target painted plates in the same image acquisition device and image acquisition environment respectively, and acquiring image sets of the corresponding target painted plates through the image acquisition device to obtain a plurality of preliminary image sets;

[0009] Preprocessing is performed on each preliminary image set to obtain a final image set; key features for distinguishing image quality are extracted from each image in the final image set, and analyzed, and each image in the final image set is divided into a high-quality image and a low-quality image according to the analysis result;

[0010] Dividing the final image set into a usable image set and an unusable image set according to data information in high-quality images and low-quality images in the final image set;

[0011] Adjusting the image processing time for data information in high-quality images and low-quality images in each available image set;

[0012] For each unusable image set, it is determined whether to recapture the target painted plate image or issue an alarm based on the data information in the high-quality image and the low-quality image of the unusable image set.

[0013] Optionally, extracting key features for distinguishing image quality from each image in the final image set, analyzing the features, and dividing each image in the final image set into high-quality images and low-quality images according to the analysis results includes:

[0014] The key features for distinguishing image quality include edge blur information, color saturation information, and contrast information. After obtaining, the edge blur index is generated by edge blur information, color saturation information, and contrast information. , Color Saturation Deviation Index and contrast index ;

[0015] According to the edge blur index , Color Saturation Deviation Index and contrast index generating an image quality coefficient, and comparing the image quality coefficient of each image with a preset image quality coefficient threshold;

[0016] When the image quality coefficient is not less than the preset image quality coefficient threshold, the image is classified as a low-quality image; when the image quality coefficient is less than the preset image quality coefficient threshold, the image is classified as a high-quality image.

[0017] Optionally, generating an edge blur index according to the edge blur information includes:

[0018] Each image in the final image set is recorded as an original image, and a gradient image of the original image is calculated;

[0019] For each pixel in the gradient image, calculate the blur value of its local area. The specific formula is as follows:

[0020]

[0021] In the formula, It's a pixel The fuzziness value at is the original image at position The pixel value at is the mean value of the pixels in the local area, is the number of pixels in the local area, is the radius of the local region;

[0022] For the entire original image, the blur values ​​of each pixel are averaged to obtain the average blur value of the entire original image as the edge blur index. The specific formula is as follows:

[0023]

[0024] in, is the edge blur index, and are the width and height of the image respectively.

[0025] Optionally, generating a color saturation deviation index according to the color saturation information includes:

[0026] Convert each image in the final image set to a suitable color space and calculate the corresponding histogram;

[0027] Normalize the histogram of each color channel so that the histogram of each color channel is between 0 and 1;

[0028] For each color channel, the saturation is calculated using the following formula:

[0029]

[0030] in: are the pixel values ​​of the red, green, and blue channels respectively. is the maximum value among the three channels, is the minimum value among the three channels, is saturation;

[0031] For the saturation value of each color channel, calculate its mean and standard deviation, and calculate the ratio of the standard deviation to the mean, that is, the color saturation deviation index of the channel. Add the color saturation deviation coefficients of all color channels to get the color saturation deviation index. .

[0032] Optionally, generating a contrast index according to the contrast information includes:

[0033] Grayscale the image, convert the color image into a grayscale image, count the number of pixels at each grayscale level in the image, and obtain a grayscale histogram;

[0034] Normalize the grayscale histogram so that the sum of the histogram is 1, that is, the number of pixels at each grayscale level divided by the total number of pixels in the image;

[0035] The contrast of the image is calculated using the normalized grayscale histogram.

[0036] The formula for calculating contrast is:

[0037]

[0038] In the formula, is the contrast, It is The normalized number of pixels at each gray level, is the mean of the normalized histogram, is the center value of the normalized histogram, is the number of gray levels;

[0039] The obtained contrast value is normalized to obtain the contrast index of the image. The calculation formula of the contrast index is:

[0040]

[0041] in, is the contrast index, is the maximum possible contrast.

[0042] Optionally, according to the edge blur index , Color Saturation Deviation Index and contrast index Generating image quality coefficients includes:

[0043] The edge blur index , Color Saturation Deviation Index and contrast index Calculate and get the image quality coefficient, the calculation formula is:

[0044]

[0045] In the formula, is the image quality coefficient, , , are preset proportional coefficients for edge blur index, color saturation deviation index, and contrast index, respectively, and , , Both are greater than 0.

[0046] Optionally, adjusting the image processing time for data information in the high-quality image and the low-quality image in each available image set includes:

[0047] Extracting image quality coefficients corresponding to all low-quality images in each available image set, and calculating differences between all low-quality images and a preset image quality coefficient threshold to obtain a difference sequence of the available image set;

[0048] According to the values ​​in the difference sequence, the image processing and analysis time of the corresponding low-quality image is reduced. The specific formula is:

[0049]

[0050] In the formula, To reduce the image processing analysis time of low-quality images, is the time initially set for fine processing of each image, is the preset image quality coefficient threshold, and The minimum value is 0.

[0051] Optionally, for each unusable image set, judging whether to re-acquire the target painted plate image corresponding to the unusable image set or issue an alarm according to data information in the high-quality image and the low-quality image of the unusable image set includes:

[0052] For each unusable image set, extract image quality coefficients corresponding to all low-quality images in the unusable image set to obtain a target low-quality image coefficient set;

[0053] Calculate the standard deviation of the target low-quality image coefficient set, and compare the standard deviation with a preset standard deviation value;

[0054] The target low-quality image coefficient set is calibrated as ,but ,in, , is a positive integer;

[0055] Calculate the standard deviation of the target low-quality image coefficient set and calibrate the standard deviation of the target low-quality image coefficient set as , and the standard deviation The preset standard deviation threshold Make a comparison;

[0056] If the standard deviation Less than the preset standard deviation threshold , then re-collect the target painted plate image corresponding to the unavailable image set until the final image set of the target painted plate is a available image set;

[0057] If the standard deviation Not less than the preset standard deviation threshold , an alarm signal is issued.

[0058] Beneficial effects of the present invention:

[0059] The present invention proposes an image processing method for defect detection of painted plates, which extracts edge blur information, color saturation information and contrast information for distinguishing image quality from each image, and then generates an edge blur index, a color saturation deviation index and a contrast index through the edge blur information, color saturation information and contrast information to obtain an image quality coefficient of each image, and adjusts the image processing time according to the data information in the high-quality image and the low-quality image, or re-captures the target painted plate image and issues an alarm. In the above manner, when a large number of high-quality painted plates need to be accurately and efficiently detected at the same time, the analysis and processing time can be adjusted according to the quality of the images collected about the painted plates, so that the defect detection is more accurate and the detection efficiency can be improved. At the same time, it can also be determined whether the collected images of the painted plates are usable, which improves the detection efficiency and ensures the accuracy of the detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The present invention will be further described below in conjunction with the accompanying drawings.

[0061] Figure 1 A flowchart of a method for detecting defects in a coated plate using image processing provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making any creative work shall fall within the scope of protection of the present invention.

[0064] The embodiment of the present invention provides a method for detecting defects in a coated plate using image processing. Figure 1 , Figure 1 A flowchart of a method for detecting defects in a coated plate using image processing is provided in an embodiment of the present invention. The method comprises the following steps:

[0065] Placing a plurality of target painted plates in the same image acquisition device and image acquisition environment respectively, and acquiring image sets of the corresponding target painted plates through the image acquisition device to obtain a plurality of preliminary image sets;

[0066] Preprocessing is performed on each preliminary image set to obtain a final image set; key features for distinguishing image quality are extracted from each image in the final image set, and analyzed, and each image in the final image set is divided into a high-quality image and a low-quality image according to the analysis result;

[0067] Dividing the final image set into a usable image set and an unusable image set according to data information in high-quality images and low-quality images in the final image set;

[0068] Adjusting the image processing time for data information in high-quality images and low-quality images in each available image set;

[0069] For each unusable image set, it is determined whether to recapture the target painted plate image or issue an alarm based on the data information in the high-quality image and the low-quality image of the unusable image set.

[0070] Based on an image processing method for defect detection of painted plates provided in an embodiment of the present invention, through the above-mentioned method, when a large number of high-quality painted plates need to be accurately and efficiently inspected at the same time, the analysis and processing time can be adjusted according to the quality of the collected images of the painted plates, so that while the defect detection is more accurate, the detection efficiency can also be improved. At the same time, it can also be determined whether the collected images of the painted plates are usable, which improves the detection efficiency and ensures the accuracy of the detection results.

[0071] It should be noted that several target painted plates are placed in the same image acquisition device and image acquisition environment, and the image acquisition device is used to acquire image sets of the corresponding target painted plates to obtain several preliminary image sets;

[0072] Ensuring the same image acquisition equipment and environment is to establish and adjust the physical and technical conditions suitable for the defect detection of the target coated board to ensure the quality and consistency of the image data. This means selecting a suitable image acquisition device (such as a high-resolution camera) and adjusting the equipment settings, such as focal length, exposure time, and light source direction, according to the needs of each target coated board detection. In addition, it is also necessary to ensure the stability of the acquisition environment, such as controlling factors such as light, temperature, and vibration in the room to prevent external factors from interfering with the image acquisition process. By accurately configuring these parameters, the clarity and detail capture of the image can be optimized, allowing for more accurate subsequent image processing and defect detection. In addition, in order to facilitate subsequent analysis, the image acquisition equipment and environment of each coated board should be consistent. Before acquiring images of the coated board surface, appropriate adjustments can be made according to the actual situation to ensure that they are in the same acquisition equipment and environment.

[0073] By simultaneously starting to acquire images of the surfaces of the placed painted panels under the same image acquisition device and image acquisition environment, and by consistent acquisition time and frequency, a preliminary image set of each target painted panel is obtained for subsequent analysis.

[0074] It should be noted that each preliminary image set is preprocessed to obtain the final image set;

[0075] The main purpose of preprocessing is to optimize the quality of the image, remove noise and interference, so as to better carry out subsequent defect detection and analysis. Through preprocessing, the quality and clarity of the image can be effectively improved, and more reliable image data can be provided for subsequent painted plate defect detection, thereby ensuring the accuracy and reliability of the detection results; the preprocessing of the image is an existing technology and will not be described in detail here; through preprocessing, the final image set is obtained.

[0076] In one embodiment, extracting key features for distinguishing image quality from each image in the final image set, analyzing the key features, and dividing each image in the final image set into high-quality images and low-quality images according to the analysis results includes:

[0077] The key features for distinguishing image quality include edge blur information, color saturation information, and contrast information. After obtaining, the edge blur index is generated by edge blur information, color saturation information, and contrast information. , Color Saturation Deviation Index and contrast index ;

[0078] According to the edge blur index , Color Saturation Deviation Index and contrast index generating an image quality coefficient, and comparing the image quality coefficient of each image with a preset image quality coefficient threshold;

[0079] When the image quality coefficient is not less than the preset image quality coefficient threshold, the image is classified as a low-quality image; when the image quality coefficient is less than the preset image quality coefficient threshold, the image is classified as a high-quality image.

[0080] In one embodiment, generating an edge blur index according to edge blur information includes:

[0081] Each image in the final image set is recorded as an original image, and the gradient image of the original image is calculated; usually, the Sobel operator or other gradient operators can be used for calculation, and the gradient image represents the edge strength of each pixel in the image.

[0082] For each pixel in the gradient image, calculate the blur value of its local area. The specific formula is as follows:

[0083]

[0084] In the formula, It's a pixel The fuzziness value at is the original image at position The pixel value at is the mean value of the pixels in the local area, is the number of pixels in the local area, is the radius of the local region;

[0085] For the entire original image, the blur values ​​of each pixel are averaged to obtain the average blur value of the entire original image as the edge blur index. The specific formula is as follows:

[0086]

[0087] in, is the edge blur index, and are the width and height of the image respectively.

[0088] It should be noted that the edge blur index refers to the blur degree of the edge in the image, which is usually used to evaluate the clarity and quality of the image. The greater the degree of edge blur, the less clear and obvious the edge contour in the image is. Since edge blur may cause missing or unclear image details, the careful analysis of the image can be appropriately reduced during image analysis to save time. Therefore, the image can be regarded as a low-quality image at this time, and a faster and simplified image analysis process can be adopted to quickly and accurately detect defects in the entire coated plate image. This can improve the efficiency and accuracy of detection and make the defect detection process faster.

[0089] In one embodiment, generating a color saturation deviation index according to color saturation information includes:

[0090] Convert each image in the final image set to a suitable color space, such as RGB or HSV, and for each color channel, such as red (R), green (G), blue (B) or hue (H), saturation (S), brightness (V), calculate the corresponding histogram; this can be done by counting the number of occurrences of each pixel value in each color channel;

[0091] Normalize the histogram of each color channel so that the histogram of each color channel is between 0 and 1;

[0092] For each color channel, the saturation is calculated using the following formula:

[0093]

[0094] in: are the pixel values ​​of the red, green, and blue channels respectively. is the maximum value among the three channels, is the minimum value among the three channels, is saturation;

[0095] For the saturation value of each color channel, calculate its mean and standard deviation, and calculate the ratio of the standard deviation to the mean, that is, the color saturation deviation index of the channel. Add the color saturation deviation coefficients of all color channels to get the color saturation deviation index. ;

[0096] It should be noted that it refers to the degree of deviation of color saturation, that is, the degree of difference between the color saturation of different areas in the image. If the degree of deviation of the color saturation of the image is greater, it means that the difference in color saturation of different areas in the image is more obvious. In image processing and image quality assessment, the degree of color saturation deviation usually reflects the color uniformity and consistency of the image; if the color saturation of different areas in the image is very different, it may lead to poor visual effects and uneven color distribution of the image, thus affecting the quality of the image. Therefore, the image can be regarded as a low-quality image at this time, and a faster and simplified image analysis process can be adopted to quickly and accurately detect defects in the entire coated plate image. This can improve the efficiency and accuracy of detection and make the defect detection process faster.

[0097] In one embodiment, generating a contrast index according to contrast information includes:

[0098] Grayscale the image, convert the color image into a grayscale image, count the number of pixels at each grayscale level in the image, and obtain a grayscale histogram;

[0099] The grayscale histogram shows the distribution of pixels at each grayscale level in the image;

[0100] Normalize the grayscale histogram so that the sum of the histogram is 1, that is, the number of pixels at each grayscale level divided by the total number of pixels in the image;

[0101] The normalized histogram reflects the relative distribution of each gray level in the image.

[0102] The contrast of the image is calculated using the normalized grayscale histogram.

[0103] The formula for calculating contrast is:

[0104]

[0105] In the formula, is the contrast, It is The normalized number of pixels at each gray level, is the mean of the normalized histogram, is the center value of the normalized histogram, is the number of gray levels;

[0106] The obtained contrast value is normalized to obtain the contrast index of the image. The calculation formula of the contrast index is:

[0107]

[0108] in, is the contrast index, is the maximum possible contrast.

[0109] It should be noted that the maximum possible contrast depends on the number of gray levels in the image. This is because the contrast of an image is determined by the difference between different gray levels in the image. When the number of gray levels is limited, the maximum possible contrast of the image is limited, because it is impossible to produce infinitely high contrast within a limited gray level range. For example, in an 8-bit grayscale image, the gray level range is 0 to 255, which means that the darkest pixel is black (0) and the brightest pixel is white (255). Therefore, within this range, the maximum possible contrast is 255. When the number of gray levels in the image increases, the range of grayscale changes that can be represented will also increase, so the maximum possible contrast will also increase. For example, for a 16-bit grayscale image, its gray level range is 0 to 65535, so the maximum possible contrast is even higher.

[0110] It should be noted that the contrast index refers to the degree of difference between the different gray levels of the contrast of the collected images on the surface of the coated board. If the contrast of the image is higher, that is, the difference between the gray levels is greater, it may mean that the image quality is lower. Because high contrast may cause the image to be overexposed or too dark, details to be lost or exaggerated, thus affecting the visualization and quality of the image, in the surface defect detection of the coated board, if the image contrast is high, it usually means that there may be problems such as overexposure or too dark, which may affect the accuracy of defect detection. Therefore, on images with higher contrast, it may not take too much time to conduct detailed analysis, and a faster method can be used for defect detection, thereby improving the efficiency of detection.

[0111] In one embodiment, generating an image quality coefficient according to an edge blur index, a color saturation deviation index, and a contrast index includes:

[0112] The edge blur index, color saturation deviation index and contrast index are calculated to obtain the image quality coefficient. The calculation formula is:

[0113]

[0114] In the formula, is the image quality coefficient, , , are preset proportional coefficients for edge blur index, color saturation deviation index, and contrast index, respectively, and , , Both are greater than 0.

[0115] It can be seen from the calculation formula that the higher the edge blur index, the higher the color saturation deviation index and the higher the contrast index, that is, the larger the performance value of the generated image quality coefficient, indicating that the quality of the collected image of the painted plate surface is lower, and vice versa, it indicates that the quality of the collected image of the painted plate surface is higher.

[0116] The image quality coefficient of each image is compared with a preset image quality coefficient threshold. When the image quality coefficient is not less than the preset image quality coefficient threshold, the image is classified as a low-quality image. When the image quality coefficient is less than the preset image quality coefficient threshold, the image is classified as a high-quality image.

[0117] In one embodiment, dividing the final image set into a usable image set and an unusable image set according to data information in high-quality images and low-quality images in the final image set includes:

[0118] Calculate the ratio of the number of low-quality images in each final image set to the number of all images in the entire final image set to obtain the proportion of low-quality images;

[0119] The proportion of low-quality images in each final image set is compared with a preset low-quality image proportion threshold. If the proportion of low-quality images is less than the preset low-quality image proportion threshold, the final image set is recorded as a usable image set.

[0120] If the proportion of low-quality images is not less than a preset low-quality image proportion threshold, the final image set is recorded as an unusable image set.

[0121] In this way, the calculation method of distinguishing whether the final image set is a usable image set or an unusable image set according to the proportion of low-quality images is both simple and accurate.

[0122] In one embodiment, adjusting the image processing time for data information in high-quality images and low-quality images in each available image set includes:

[0123] Extracting image quality coefficients corresponding to all low-quality images in each available image set, and calculating differences between all low-quality images and a preset image quality coefficient threshold to obtain a difference sequence of the available image set;

[0124] According to the specific values ​​in the difference sequence, the image processing and analysis time of the corresponding low-quality image is reduced. The specific formula is:

[0125]

[0126] In the formula, To reduce the image processing analysis time of low-quality images, is the time initially set for fine processing of each image, is the preset image quality coefficient threshold, and The minimum value is 0.

[0127] It should be noted that the initial setting time for fine processing of each image is the time set at the beginning for careful analysis of the image obtained about the painted plate. This specific initial setting time for fine processing of each image is set by professional staff according to actual circumstances, and there is no specific restriction or elaboration.

[0128] In one embodiment, for each unavailable image set, judging whether to re-acquire the target painted plate image corresponding to the unavailable image set or to issue an alarm according to the data information in the high-quality image and the low-quality image of the unavailable image set includes:

[0129] For each unusable image set, extract image quality coefficients corresponding to all low-quality images in the unusable image set to obtain a target low-quality image coefficient set;

[0130] Calculate the standard deviation of the target low-quality image coefficient set, and compare the standard deviation with a preset standard deviation value;

[0131] The target low-quality image coefficient set is calibrated as ,but ,in, , is a positive integer;

[0132] Calculate the standard deviation of the target low-quality image coefficient set and calibrate the standard deviation of the target low-quality image coefficient set as , and the standard deviation The preset standard deviation threshold Make a comparison;

[0133] If the standard deviation Less than the preset standard deviation threshold , then re-collect the target painted plate image corresponding to the unavailable image set until the final image set of the target painted plate is a available image set;

[0134] If the standard deviation Not less than the preset standard deviation threshold , an alarm signal is issued.

[0135] It should be noted that when the standard deviation Less than the preset standard deviation threshold When , it means that the image acquisition device and image acquisition environment of the painted plate corresponding to the unusable image set are both available. The final image set acquired is an unusable image set, which may be caused by accidental errors. At this time, it is only necessary to re-acquire the target painted plate image corresponding to the unusable image set until the final image set of the target painted plate is an available image set. When the standard deviation Not less than the preset standard deviation threshold When the image acquisition device and image acquisition environment of the painted plate corresponding to the unusable image set may have problems or other problems, even if the target painted plate image corresponding to the unusable image set is re-captured, the final image set of the target painted plate cannot be an available image set. At this time, an alarm is issued to remind the staff to focus on the image acquisition device and image acquisition environment or other aspects of the target painted plate corresponding to the unusable image set and take corresponding measures to ensure accurate acquisition of accurate images for detecting surface defects of the painted plate. In this way, the detection efficiency is improved while the accuracy of the detection results is ensured.

[0136] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. A method for detecting defects in coated plates using image processing. It is characterized in that The following steps are involved: Placing a plurality of target painted plates in the same image acquisition device and image acquisition environment respectively, and acquiring image sets of the corresponding target painted plates through the image acquisition device to obtain a plurality of preliminary image sets; Preprocess each preliminary image set to obtain a final image set; and extracting key features for distinguishing image quality from each image in the final image set, analyzing the features, and dividing each image in the final image set into a high-quality image and a low-quality image according to the analysis results; Dividing the final image set into a usable image set and an unusable image set according to data information in high-quality images and low-quality images in the final image set; Adjusting the image processing time for data information in high-quality images and low-quality images in each available image set; For each unusable image set, judging whether to re-capture the target painted plate image or issue an alarm based on the data information in the high-quality image and the low-quality image of the unusable image set; Extracting key features for distinguishing image quality from each image in the final image set and analyzing them, and dividing each image in the final image set into high-quality images and low-quality images according to the analysis results, including: The key features for distinguishing image quality include edge blur information, color saturation information, and contrast information. After obtaining the edge blur information, color saturation information, and contrast information, the edge blur index Blur is generated. avg , Color saturation deviation index Qx W and contrast index Dlgt; According to the edge blur index Blur avg , Color saturation deviation index Qx W and contrast index Dlgt to generate an image quality coefficient, and compare the image quality coefficient of each image with a preset image quality coefficient threshold; When the image quality coefficient is not less than the preset image quality coefficient threshold, the image is classified as a low-quality image; when the image quality coefficient is less than the preset image quality coefficient threshold, the image is classified as a high-quality image; According to the edge blur index Blur avg , Color saturation deviation index Qx w The image quality coefficients generated by the contrast index Dlgt include: Blur the edge avg , Color saturation deviation index Qx w Calculate the image quality coefficient by comparing with the contrast index Dlgt. The calculation formula is: Where Rsag is the image quality coefficient, z1, z2, and z3 are the preset proportional coefficients of the edge blur index, color saturation deviation index, and contrast index, respectively, and z1, z2, and z3 are all greater than 0; Adjusting the image processing time for data information in high-quality images and low-quality images in each available image set includes: Extracting image quality coefficients corresponding to all low-quality images in each available image set, and calculating differences between all low-quality images and a preset image quality coefficient threshold to obtain a difference sequence of the available image set; According to the values ​​in the difference sequence, the image processing and analysis time of the corresponding low-quality image is reduced. The specific formula is: Where T is the image processing and analysis time of the reduced low-quality image, T 初 is the time initially set for fine processing of each image, Rse is the preset image quality coefficient threshold, and T is at least 0; For each unusable image set, judging whether to re-acquire the target painted plate image corresponding to the unusable image set or to issue an alarm according to the data information in the high-quality image and the low-quality image of the unusable image set includes: For each unusable image set, extract image quality coefficients corresponding to all low-quality images in the unusable image set to obtain a target low-quality image coefficient set; Calculate the standard deviation of the target low-quality image coefficient set, and compare the standard deviation with a preset standard deviation value; The target low-quality image coefficient set is calibrated as Y, then Y = {HJ d }, where d = {1, 2, 3…v}, v is a positive integer; Calculate the standard deviation of the target low-quality image coefficient set, calibrate the standard deviation of the target low-quality image coefficient set as tgf, and compare the standard deviation tgf with a preset standard deviation threshold tyu; If the standard deviation tgf is less than the preset standard deviation threshold tyu, the target painted plate image corresponding to the unusable image set is re-collected until the final image set of the target painted plate is a usable image set; If the standard deviation tgf is not less than the preset standard deviation threshold tyu, an alarm signal is issued.

2. According to the method for detecting defects of a coated plate by image processing according to claim 1, It is characterized in that Generating an edge blur index according to edge blur information includes: Each image in the final image set is recorded as an original image, and a gradient image of the original image is calculated; For each pixel in the gradient image, calculate the blur value of its local area. The specific formula is as follows: Where Blur(i,j) is the blur value at pixel point (i,j), I(x,y) is the pixel value of the original image at position (x,y), μ is the mean of the pixel values ​​in the local area, N is the number of pixels in the local area, and w is the radius of the local area; For the entire original image, the blur values ​​of each pixel are averaged to obtain the average blur value of the entire original image as the edge blur index. The specific formula is as follows: Among them, Blur avg is the edge blur index, M and N are the width and height of the image respectively.

3. According to the method for detecting defects of a coated plate by image processing according to claim 1, It is characterized in that Generating a color saturation deviation index according to color saturation information includes: Convert each image in the final image set to color space and calculate the corresponding histogram; Normalize the histogram of each color channel so that the histogram of each color channel is between 0 and 1; For each color channel, the saturation is calculated using the following formula: Where: R, G, B are the pixel values ​​of the red, green, and blue channels respectively, max(R,G,B) is the maximum value of the three channels, min(R,G,B) is the minimum value of the three channels, and S is the saturation; For the saturation value of each color channel, calculate its mean and standard deviation, and calculate the ratio of the standard deviation to the mean, that is, the color saturation deviation index of the channel. Add the color saturation deviation coefficients of all color channels to get the color saturation deviation index Qx w .

4. The method for detecting defects of a coated plate by image processing according to claim 1, It is characterized in that Generating a contrast index based on contrast information includes: Grayscale the image, convert the color image into a grayscale image, count the number of pixels at each grayscale level in the image, and obtain a grayscale histogram; Normalize the grayscale histogram so that the sum of the histogram is 1, that is, the number of pixels at each grayscale level divided by the total number of pixels in the image; The contrast of the image is calculated using the normalized grayscale histogram. The formula for calculating contrast is: Where Edsw is the contrast, p a is the normalized number of pixels at the ath gray level, is the mean of the normalized histogram, is the center value of the normalized histogram, and L is the number of gray levels; The obtained contrast value is normalized to obtain the contrast index of the image. The calculation formula of the contrast index is: Where Dlgt is the contrast index and Edsf is the maximum possible contrast.

Citation Information

Patent Citations

  • White balance processing method and device based on RGB space

    CN106131526A

  • Kitchen ventilator cooking fume recognition method and kitchen ventilator

    CN111351078A

  • Image quality model generation method and system, image quality model evaluation method and system, equipment and medium

    CN113850785A

  • Mechanical component defect detection method based on image processing

    CN115018853A

  • Integrated circuit wafer surface defect detection method based on artificial intelligence

    CN115035122A