Tire quality detection method based on computer vision
By constructing a grayscale histogram and iterative clustering analysis, the first and second eigenvalues of the tire surface are calculated, and the segmentation quality of the tire is evaluated, which solves the problem of increased detection difficulty due to complex tire texture, and achieves more efficient and accurate tire defect detection.
Patent Information
- Application Number
- CN202411179917.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-27
AI Technical Summary
With the advancement of tire manufacturing technology, the texture and patterns of tire surfaces are becoming more and more complex, resulting in increased difficulty in image segmentation and feature extraction, affecting the accuracy of detection results.
By obtaining the grayscale image of the tire surface, a grayscale histogram is constructed, any peak point in the grayscale histogram is selected as the clustering center, and iteratively clusters the pixel points, and the first and second eigenvalues are calculated to evaluate The segmentation quality of the cluster clusters and the defects of the tire are judged based on the quality score.
It improves the accuracy and automation of tire defect detection, and can detect defective tires more accurately.
Smart Images

Figure CN118710638B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing and a tire quality detection method based on computer vision. Background Art
[0002] One of the challenges facing the modern tire manufacturing industry is how to maintain consistent product quality in large-scale production. In such large-scale production, manual inspection alone is not only time-consuming and labor-intensive, but also difficult to achieve high standards of consistency and accuracy. Therefore, the introduction of intelligent defect detection systems is particularly important.
[0003] At present, the patent application document with the publication number CN118269516A discloses a method for monitoring tire tread wear. The method includes: obtaining a number of tire images, extracting a number of tire area images from them, and dividing the tire area images into a groove area and a pattern surface area; wherein the tire image includes images of each angle of the tire, and each angle image can form a complete three-dimensional tire shape; analyzing the pixel difference between the pixel grayscale value of the groove area and the pixel grayscale value of the normal groove area; analyzing the depth difference between the depth of the groove area and the depth of the normal groove area; analyzing the crack pixel ratio between the pattern surface area and the normal pattern surface area; analyzing the wear index of the tire pattern based on the pixel difference, depth difference and crack pixel ratio; analyzing the wear degree according to the wear index of the tire pattern, and taking corresponding measures.
[0004] The above operation can comprehensively reflect the wear condition of tire tread from multiple dimensions by collecting images of tires at different angles and analyzing the three core elements of pixel difference, depth difference and crack pixel ratio in the tire tread groove area. However, with the continuous advancement of tire manufacturing technology, the texture and pattern of the tire surface are becoming more and more complex, which may increase the difficulty of image segmentation and feature extraction, affecting the accuracy of the detection results. Summary of the invention
[0005] In order to solve the above-mentioned technical problems that may increase the difficulty of image segmentation and feature extraction and affect the accuracy of detection results, the present invention provides the following technical solutions.
[0006] The tire quality detection method based on computer vision includes:
[0007] Obtain a grayscale image of the tire surface and construct a grayscale histogram;
[0008] Select any peak point in the grayscale histogram as the cluster center, and iterate the pixel points to obtain the final clustering result; the final clustering result includes the number of clusters and the segmentation quality corresponding to the clusters; the segmentation quality is the product of the first eigenvalue and the second eigenvalue of the cluster, the first eigenvalue is used to characterize the discrete degree of the pixel point distribution inside the cluster, and the second eigenvalue is used to characterize the difference of the grayscale value of the pixel point inside the cluster;
[0009] The quality score of the tire is calculated. When the quality score is lower than the quality score threshold, it is determined that the tire has defects. The quality score is: ; In the formula, Rate the quality, For the The segmentation quality of clusters, For the The average gray value of the clusters, is the number of clusters, It is an exponential function with the natural constant e as its base.
[0010] By using the peak point of the grayscale histogram as the clustering center, the image features are effectively extracted. Through iterative clustering analysis, the tire surface is divided into multiple clusters with similar characteristics. In the iterative process, the first eigenvalue and the second eigenvalue are repeatedly calculated to update the segmentation quality of the cluster and introduced into the quality score, making tire defect detection more efficient, accurate and automated.
[0011] Preferably, before constructing the grayscale histogram, the method further includes:
[0012] Calculate the sum of the absolute values of the grayscale value differences between each pixel in the grayscale image and other pixels in its neighborhood;
[0013] Calculate the gradient amplitude of each pixel in the grayscale image;
[0014] The product of the sum of the absolute values of the gray value differences and the gradient amplitude is taken as the edge degree of the pixel point; wherein the pixel point whose edge degree is greater than a set threshold is taken as the edge pixel point.
[0015] By identifying edge pixels before clustering analysis, it helps to divide regions more accurately during the clustering process and improve clustering quality.
[0016] Preferably, the process of continuously iterating the pixel points includes:
[0017] Step 1: After a clustering, multiple initial clusters are obtained; the initial first eigenvalue and the initial second eigenvalue of the initial cluster are calculated, and the product of the initial first eigenvalue and the initial second eigenvalue is used as the initial segmentation quality;
[0018] Step 2: Mark the initial clusters whose initial segmentation quality is greater than the segmentation threshold and perform secondary clustering;
[0019] Step 3: Repeat steps 1 and 2 until the segmentation quality after iteration is less than the segmentation threshold, and then stop the iteration.
[0020] Preferably, the process of continuously iterating the pixel points further includes:
[0021] Update the cluster center; the updating of the cluster center is to use the grayscale mean of the pixels in the current cluster as the new cluster center after clustering.
[0022] Through iteration, the first eigenvalue and the second eigenvalue are continuously optimized to make the characteristics of the clusters more obvious and consistent. During the iteration process, the data distribution may change, and the dynamic update of the cluster center can adapt to these changes.
[0023] Preferably, the initial first eigenvalue satisfies the relationship:
[0024] ; In the formula, For the The initial first eigenvalue of the initial clusters, is the number of edge pixels in the initial cluster, For the The total number of pixels in the initial clusters, For the The first The sum of squared deviations of the distances between a pixel and all other pixels. For the The standard deviation of the grayscale values of all pixels in the initial clusters.
[0025] By calculating the proportion of edge pixels, the deviation of the distance between pixels, and the standard deviation of the grayscale value, the shape of the clusters and the discreteness of the grayscale distribution are emphasized.
[0026] Preferably, the initial first eigenvalue also satisfies the relationship:
[0027] , where For the The initial first eigenvalue of the initial clusters, is the number of initial clusters, For the The sum of squared distances from all pixels in the initial cluster to the cluster center.
[0028] By calculating the sum of the squares of the distances from all pixels to the cluster center, the compactness within the cluster and the regularity of the shape are emphasized.
[0029] Preferably, the initial second eigenvalue satisfies the relationship:
[0030] ; In the formula, For the The initial second eigenvalues of the initial clusters, For the The contrast of the initial clusters, For the The first The gray value of a pixel and its neighbors The difference between the average values of the gray values of pixels. For the All pixels in the initial cluster and their neighbors The mean of the difference between the average values of the gray values of pixels, For the The total number of pixels in the initial clusters.
[0031] By calculating the second eigenvalue, combined with contrast and local grayscale changes, the eigenvalue can be used for feature fusion to improve the comprehensiveness of clustering analysis.
[0032] Preferably, the The contrast of the initial clusters is The difference between the maximum grayscale value and the minimum grayscale value in the initial cluster or the The variance of the grayscale values of the initial clusters.
[0033] The present invention has the following beneficial effects:
[0034] The present invention can reflect the distribution of samples within the cluster and the separation between clusters by calculating the first eigenvalue and the second eigenvalue, thereby capturing the subtle differences in grayscale features between normal texture areas and defective areas in tire images, and calculating the segmentation quality of clusters based on these eigenvalues, which can more accurately judge the quality of clustering results. In addition, the grayscale value mean of the cluster is used as the new cluster center for iteration, and the clustering results are gradually optimized, so that the clustering results are more in line with the actual situation, so that defective tires can be detected more accurately when performing tire quality inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0036] Figure 1 It is a method flow chart of steps S1 to S3 in the tire quality detection method based on computer vision in an embodiment of the present invention. DETAILED DESCRIPTION
[0037] 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0038] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0039] Reference Figure 1 The tire quality detection method based on computer vision includes steps S1 to S3, which are as follows:
[0040] S1: Obtain a grayscale image of the tire surface and construct a grayscale histogram.
[0041] In the embodiment of the present invention, a high-resolution camera is used to capture partial images of the tire, ensuring that each image contains sufficient overlapping areas and each image is aligned horizontally or vertically, performing a stitching operation, merging the partial images into a complete tire image, and smoothing the edges of the stitched images to eliminate seam marks. In addition, the color and brightness of the stitched image can be adjusted to ensure overall consistency.
[0042] After obtaining the complete tire image, it is converted into a grayscale image and preprocessed, such as filtering denoising, contrast enhancement, etc., to improve the image quality.
[0043] In the process of analyzing grayscale images, edges often represent the boundaries of textures or regions. By calculating the difference between each pixel and the pixels in its neighborhood, the edge degree of the pixel can be determined, thereby better understanding and analyzing the characteristics of the tire surface.
[0044] Specifically, the sum of the absolute values of the grayscale value differences between each pixel in the grayscale image and other pixels in its neighborhood (in the embodiment of the present invention, the neighborhood may be set to eight) is calculated; and the gradient amplitude of each pixel in the grayscale image is calculated;
[0045] The product of the sum of the absolute values of the gray value differences calculated above and the gradient amplitude is taken as the edge degree of the corresponding pixel point.
[0046] Then the edge degree of the above pixel points satisfies the following relationship:
[0047]
[0048] In the formula, For the The edge degree of each pixel, For the The gradient amplitude of each pixel in the horizontal direction, No. The gradient amplitude of each pixel in the vertical direction, For the The gray value of a pixel, For other The gray value of a pixel.
[0049] Among them, the pixel points whose edge degree is greater than the set threshold are regarded as edge pixels.
[0050] Traverse all pixels of the grayscale image to construct a grayscale histogram.
[0051] S2: Select any peak point in the grayscale histogram as the cluster center, and continuously iterate the pixel points to obtain the final clustering result; the final clustering result includes the number of clusters and the segmentation quality corresponding to the clusters; the segmentation quality is the product of the first eigenvalue and the second eigenvalue of the cluster, the first eigenvalue is used to characterize the discrete degree of the pixel point distribution inside the cluster, and the second eigenvalue is used to characterize the difference in the grayscale values of the pixel points inside the cluster.
[0052] In the embodiment of the present invention, a clustering algorithm is used to automatically divide pixels or regions in a grayscale image into different categories, thereby distinguishing between normal texture regions and defect regions.
[0053] In the grayscale histogram, since the grayscale value distribution of different textures and regions is different, there will be multiple peaks on the grayscale histogram. The grayscale values corresponding to these peak points often represent the typical grayscale values of different textures or regions in the image.
[0054] Step 1: After a clustering, multiple initial clusters are obtained; the initial first eigenvalue and the initial second eigenvalue of the initial cluster are calculated, and the product of the initial first eigenvalue and the initial second eigenvalue is used as the initial segmentation quality.
[0055] In the embodiment of the present invention, the peak point in the grayscale histogram is selected as the clustering center, that is, the starting point of the clustering algorithm, and clustering is performed once. After clustering, multiple initial clustering clusters are obtained, and the number of initial clustering clusters is counted and marked as , and then calculate the initial first eigenvalue and the initial second eigenvalue of the initial cluster to evaluate the discrete degree of pixel distribution inside the initial cluster and the difference of grayscale values.
[0056] Specifically, first, the number of edge pixels and the number of all pixels in any initial cluster are obtained, and then the standard deviation of the grayscale values of all pixels in the initial cluster and the sum of square deviations of the distances between any pixel and all other pixels in the initial cluster are calculated.
[0057] For example, select initial clusters, then The first eigenvalue of the initial clusters satisfies the following relationship:
[0058]
[0059] In the formula, For the The initial first eigenvalue of the initial clusters, is the number of edge pixels in the initial cluster, For the The number of all pixels in the initial clusters, For the The first The sum of squared deviations of the distances between a pixel and all other pixels. For the The standard deviation of the grayscale values of all pixels in the initial clusters.
[0060] in, The larger it is, the more edge pixels are distributed within the cluster. The larger the value is, the more discrete the distribution of pixels in the cluster is, which means that the distribution between pixels is more discrete, that is, the shape of the cluster may be irregular, with multiple edges or sub-regions. The larger the value, the greater the difference in the grayscale values of the pixels in the cluster, and the greater the fluctuation in the grayscale value distribution, which means that the confidence that there may be multiple edge areas in the cluster is higher.
[0061] in, The relationship is as follows:
[0062]
[0063] In the formula, For the The first The sum of squared deviations of the distances between a pixel and all other pixels. For the The total number of pixels in the initial clusters, For the The pixel is the first pixel among all other pixels The Euclidean distance between pixels, For the The mean sum of squared differences between the mean Euclidean distances of a pixel and all other pixels.
[0064] In another embodiment, the The initial first eigenvalue of the initial clusters also satisfies the relationship:
[0065]
[0066] In the formula, For the The initial first eigenvalue of the initial clusters, is the number of initial clusters, For the The sum of squared distances from all pixels in the initial cluster to the cluster center.
[0067] Secondly, obtain the The first The gray value of a pixel and its neighbors (In the embodiment of the present invention, set ) pixel grayscale values. And calculate the difference between the average values of the grayscale values of the pixels. The contrast of the initial clusters.
[0068] The first The second eigenvalue of the initial clusters satisfies the following relationship:
[0069]
[0070] In the formula, For the The initial second eigenvalues of the initial clusters, For the The contrast of the initial clusters, For the The first The gray value of a pixel and its neighbors The difference between the average values of the gray values of pixels. For the All pixels in the initial cluster and their neighbors The mean of the difference between the average values of the gray values of pixels, For the The total number of pixels in the initial clusters.
[0071] in, The larger it is, the greater the difference in the grayscale values of the pixels in the cluster. The larger the value is, the more it means that the local grayscale difference of the pixels in the cluster deviates greatly from the average grayscale difference of the entire cluster, which means that there are some areas in the cluster where the local grayscale changes are particularly drastic or particularly gentle, that is, the grayscale distribution is uneven.
[0072] Among them, The contrast of the initial clusters is The difference between the maximum grayscale value and the minimum grayscale value in the initial cluster or the The variance of the grayscale values of the initial clusters.
[0073] According to the above The initial first eigenvalue and the initial second eigenvalue of the initial clustering clusters can be obtained in the same way as described above.
[0074] Finally, the initial first eigenvalue and the initial second eigenvalue are used as the initial segmentation quality of the initial clustering cluster.
[0075] Step 2: Mark the initial clusters whose initial segmentation quality is greater than the segmentation threshold and perform secondary clustering.
[0076] After the initial segmentation qualities of all initial clusters are obtained in the above step S2, normalization processing may be performed.
[0077] Set the segmentation threshold. In the embodiment of the present invention, the segmentation threshold is set to 0.8, mark the initial clusters whose initial segmentation quality is greater than the segmentation threshold, and cluster these marked initial clusters again. It should be noted that when performing a new clustering operation, the grayscale mean of the pixels in the current cluster is used as the new cluster center. Due to noise or changes in the image (such as differences in brightness / color in the image), the initial clustering will produce unstable or inaccurate results. By setting the threshold and re-clustering, the possibility of misjudgment can be reduced.
[0078] Step 3: Repeat steps 1 and 2 until the segmentation quality after iteration is less than the segmentation threshold, and then stop the iteration.
[0079] Through continuous iteration, the first and second eigenvalues and segmentation quality are repeatedly calculated, and the clusters that meet the conditions are re-clustered until the clustering results are stable.
[0080] After the iteration, the final clustering results can be obtained, including the number of clusters and the segmentation quality corresponding to the clusters.
[0081] S3: Calculate the quality score of the tire, and when the quality score is lower than a quality score threshold, determine that the tire has defects.
[0082] After the clustering iteration in step S2 above, multiple clusters and the segmentation quality of the clusters are obtained, and the quality score of the tire satisfies the following relationship:
[0083]
[0084] In the formula, Rate the quality of the tires. For the The segmentation quality of clusters, For the The average gray value of the clusters, is the number of clusters, It is an exponential function with the natural constant e as its base.
[0085] in, The larger the value, the better the segmentation quality of the cluster, which means that the data points within the cluster are very similar and the data points between the clusters are very different, that is, the pixel features of the cluster are more consistent; in fact, tire defects are often caused by scratches or cracks, which will lead to low grayscale values in the defective area. The smaller it is, the darker the area corresponding to the cluster is. The characteristics of the cluster may be the characteristics of the defective area, that is, the greater the degree of defect of the cluster is. Therefore, The larger the value is, the greater the defect degree of the cluster is.
[0086] A quality score threshold is set (in the implementation of the present invention, the quality score threshold is set to 0.3). When the quality score of the tire is lower than the quality score threshold, the tire is determined to be defective. Subsequently, relevant technicians can be notified to handle the tire.
[0087] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0088] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
Claims
1. A tire quality detection method based on computer vision, characterized in that: include: Obtain a grayscale image of the tire surface and construct a grayscale histogram; Select any peak point in the grayscale histogram as the cluster center, and iterate the pixels to obtain the final clustering result, including: Step 1: After a clustering, multiple initial clusters are obtained; the initial first eigenvalue and the initial second eigenvalue of the initial cluster are calculated, and the initial first eigenvalue satisfies the relationship: ; In the formula, For the The initial first eigenvalue of the initial clusters, is the number of edge pixels in the initial cluster, For the The number of all pixels in the initial clusters, For the The first The sum of squared deviations of the distances between a pixel and all other pixels. For the The standard deviation of the grayscale values of all pixels in the initial clusters; The initial first eigenvalue also satisfies the relationship: , where is the number of initial clusters, For the The sum of squared distances from all pixels in the initial cluster to the cluster center; The initial second eigenvalue satisfies the relationship: ; In the formula, For the The initial second eigenvalues of the initial clusters, For the The contrast of the initial clusters, For the The first The gray value of a pixel and its neighbors The difference between the average values of the gray values of pixels. For the All pixels in the initial cluster and their neighbors The mean of the difference between the average values of the gray values of pixels; The product of the initial first eigenvalue and the initial second eigenvalue is taken as the initial segmentation quality; Step 2: Mark the initial clusters whose initial segmentation quality is greater than the segmentation threshold and perform secondary clustering; when performing a new clustering operation, the grayscale mean of the pixels in the current cluster is used as the new cluster center; Step 3: Repeat the first and second steps until the segmentation quality after iteration is less than the segmentation threshold, and then stop the iteration; The final clustering result includes the number of clusters and the segmentation quality corresponding to the clusters; the segmentation quality is the product of the first eigenvalue and the second eigenvalue of the cluster, the first eigenvalue is used to characterize the discrete degree of the pixel distribution inside the cluster, and the second eigenvalue is used to characterize the difference of the grayscale value of the pixel inside the cluster; The quality score of the tire is calculated. When the quality score is lower than the quality score threshold, it is determined that the tire has defects. The quality score is: ; In the formula, Rate the quality, For the The segmentation quality of clusters, For the The average gray value of the clusters, is the number of clusters, It is an exponential function with the natural constant e as its base.
2. The tire quality detection method based on computer vision according to claim 1, characterized in that: Before constructing the grayscale histogram, the method further includes: Calculate the sum of the absolute values of the grayscale value differences between each pixel in the grayscale image and other pixels in its neighborhood; Calculate the gradient amplitude of each pixel in the grayscale image; The product of the sum of the absolute values of the gray value differences and the gradient amplitude is taken as the edge degree of the pixel point; wherein the pixel point whose edge degree is greater than a set threshold is taken as the edge pixel point.
3. The tire quality detection method based on computer vision according to claim 2, characterized in that: The said The contrast of the initial clusters is The difference between the maximum grayscale value and the minimum grayscale value in the initial cluster or the The variance of the grayscale values of the initial clusters.
