Method and device for threshold segmentation of carcass cords on tire side based on locally adaptive window

Through the threshold segmentation method of local adaptive windows, multi-scale window fusion technology is used to solve the impact of shadows and patterns in the sidewall cord detection of tire X-ray images, achieving better cord segmentation effect and detection accuracy.

CN117078712BActive Publication Date: 2025-07-18UNIV OF JINAN
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310287393.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2025-07-18
Estimated Expiration
2043-03-20

AI Technical Summary

Technical Problem

The traditional threshold segmentation method is affected by shadows and patterns in the cord detection of the sidewall area of the tire X-ray image, resulting in stickiness during the cord binarization process, and the segmentation effect is poor.

Method used

The threshold segmentation method based on local adaptive windows is adopted, and the average line distance of the sidewall area is calculated, the threshold segmentation threshold of small windows and large windows is determined, and the results of multi-scale windows are combined to suppress the influence of shadows and patterns, and the cord area is obtained.

Benefits of technology

Effectively suppress the impact of shadows and patterns on threshold segmentation, improve the segmentation effect of cords, enhance the adaptability and computing rate of the algorithm, and provide high-quality preprocessed images for subsequent defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117078712B_ABST
    Figure CN117078712B_ABST
Patent Text Reader

Abstract

The present invention discloses a sidewall cord threshold segmentation method and device based on a local adaptive window. The method includes the following steps: collecting a sidewall image and calculating the average line distance of the current sidewall region; determining the threshold segmentation thresholds of large and small window thresholds according to the average line distance, and calculating the thresholds of threshold segmentation corresponding to the coordinates of each point thereof; respectively performing threshold segmentation on the image by using the threshold of small window threshold segmentation and the threshold of large window threshold segmentation to obtain a binary image M s and M b ; performing an inverse color operation on the binary images M s and M b to obtain binary images #imgabs0# and #imgabs1#, and performing an intersection operation on the obtained binary images #imgabs2# and #imgabs3# to obtain a cord region. The method of the present invention is simple and easy to implement, greatly improves the sidewall cord threshold segmentation effect, and the adopted adaptive window method is suitable for various images with different line distances, increasing the practicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and device for threshold segmentation of sidewall cords based on a locally adaptive window, and belongs to the technical field of tire detection and image processing. Background Art

[0002] In the field of traditional industrial defect detection, traditional pattern recognition technology still has a wide range of applications. Threshold segmentation is one of the earliest studied and used methods in image segmentation. It has the characteristics of clear physical meaning, obvious effect, easy implementation, and good real-time performance. It is one of the most commonly used image segmentation methods in various image analysis, image recognition, and machine vision systems. However, the threshold segmentation of different regions is often affected by the shadows in that region. For example, during the defect detection process of the sidewall region in tire X-ray images, the threshold segmentation effect of the sidewall region is severely affected by the shadows and patterns in the two side boundary regions.

[0003] Currently, for the problem of image threshold segmentation, many scholars have proposed various solutions. These solutions can be roughly divided into two categories, namely global threshold segmentation and local threshold segmentation. Global threshold segmentation is the simplest image segmentation method, which selects the best threshold according to different targets. Since the gray distribution of tire X-ray images is uneven, if a global fixed threshold is directly used to distinguish the cords and the background, the effect will be very poor.

[0004] At present, scholars have proposed a variety of solutions to the problem of shadows affecting threshold segmentation. (I) In 1989, Abutaleb first proposed the concept of two-dimensional histogram, adding neighborhood average grayscale information on the basis of one-dimensional histogram, which not only considers the grayscale distribution of the image, but also takes into account the spatial relationship of pixels to a certain extent, which can enhance the resistance of the threshold selection process to image noise interference and become one of the most effective tools in the current image threshold selection method. (II) Otsu threshold selection method, also known as the maximum inter-class variance method, was first proposed by Japanese scholar Otsu Nobuyuki in 1978, so it is also called Otsu method. This method has been one of the most popular threshold selection methods for a long time and has been widely used. It selects the segmentation threshold based on the maximization of the variance between the target class and the background class. The Otsu method is suitable for situations where the areas occupied by the target and background in the image are close, and when the areas occupied by the two are relatively different, the Otsu segmentation method will fail. (iii) The maximum entropy method proposed by Kapur et al. in 1985 is another widely-watched threshold selection method. It was inspired by the work of Pun et al. and was obtained after some modifications. This method has become the most popular and most used entropy-based threshold selection method with its simple form and clear meaning. The threshold selection criterion of the maximum entropy method is that the total entropy value of the target class and the background class after segmentation is the largest, that is, the amount of information is the largest. (iv) In 1993, Li et al. introduced the concept of cross entropy into the field of image processing and proposed a minimum cross entropy threshold selection method based on a one-dimensional grayscale histogram. This method uses the minimum difference in the amount of information between the segmented image and the original image as the threshold selection criterion, which is essentially to minimize the Kullback divergence of the image before and after segmentation. In response to the problem of only using pixel grayscale probability information in the maximum entropy method, the concept of grayscale entropy was proposed. Unlike the maximum entropy, grayscale entropy combines the grayscale information of the pixel on the basis of considering the probability, which can make the grayscale distribution within the segmented image class more uniform. (V) In 1986, Kittler et al. first proposed a threshold selection method based on the minimum error criterion. This method assumes that the pixel grayscale distribution of the target and background in the image obeys the Gaussian distribution, thereby converting the threshold selection problem into a minimum error Gaussian fitting problem. (VI) When solving the optimal threshold under the one-dimensional Otsu criterion, Reddi et al. assumed that the grayscale histogram is a continuous probability density function and found the extreme point by differentiating the criterion function. In recent years, this method has been extended to two dimensions and applied to the optimization of criterion functions such as Otsu, maximum entropy and cross entropy. However, these traditional methods have sticking phenomena in the process of cord binarization in shadow and pattern areas. Summary of the invention

[0005] To solve the above problems, the present invention proposes a method and device for threshold segmentation of carcass cords based on a local adaptive window, which can greatly improve the threshold segmentation effect of carcass cords.

[0006] The technical solution adopted by the present invention to solve its technical problems is as follows:

[0007] On the one hand, a method for threshold segmentation of carcass cords based on a local adaptive window provided by an embodiment of the present invention includes the following steps:

[0008] Collect a carcass side image and calculate the average line distance l of the current carcass side area a ;

[0009] According to the average line distance l a Determine the threshold segmentation threshold of the small window and calculate the threshold θ s (i, j) corresponding to the threshold segmentation for each point coordinate (i, j) of the small window; the window center of the small window is (i, j), and the window size is l a ;

[0010] According to the average line distance l a Determine the binarization threshold of the large window and calculate the threshold θ b (i, j) corresponding to the threshold segmentation for each point coordinate (i, j) of the large window; the window center of the large window is (i, j), and the window size is 5l a ;

[0011] Respectively use the threshold θ s (i, j) of the small window threshold segmentation and the threshold θ b (i, j) of the large window threshold segmentation to perform threshold segmentation on the image to obtain a binary image M s and M b ;

[0012] Perform an inverse color operation on the binary images M s and M b to obtain binary images and and perform an intersection operation on the obtained binary images and to obtain the cord area.

[0013] As a possible implementation manner of this embodiment, the calculation of the average line distance l of the current carcass side area a , includes:

[0014] Perform a pre-threshold segmentation operation in the central area of the carcass side to obtain the pixel gray values of the threading area;

[0015] Use vertical threading in the central area of the carcass side to count the number n of horizontal cords in each column l ;

[0016] Calculate the average line distance l of the tire sidewall a :

[0017]

[0018] where l s represents the height of the entire tire sidewall, and n l represents the number of horizontal cord lines.

[0019] As a possible implementation of this embodiment, the pre-threshold segmentation operation in the central region of the tire sidewall to obtain the pixel gray value of the threading area includes:

[0020] First, divide the image into smaller windows, then calculate the gray histogram on each window respectively, calculate the threshold of the threshold segmentation of the corresponding window according to the histogram, and finally compare the gray value of each position with the threshold of the corresponding window respectively to obtain the pixel gray value of the threading area;

[0021] The threshold calculation formula for the corresponding window of each position is:

[0022]

[0023] The calculation formula for the pixel gray value of the threading area is:

[0024]

[0025] where T(n) represents the threshold of the threshold segmentation of the nth window, h represents the height of the segmentation window, w represents the width of the segmentation window, p(i, j) represents the pixel gray value at the position of the i-th row and j-th column in the small window of the image threshold segmentation, and f(i, j) represents the pixel gray value at the position of the i-th row and j-th column after the threshold segmentation.

[0026] As a possible implementation of this embodiment, the number n of horizontal cord lines in each column is statistically counted by vertical threading in the central region of the tire sidewall l , including: obtaining the number n of horizontal cord lines by judging the number of times of abnormal change of the pixel gray value of the threading area and according to the position of each intersection of the cord and the background l .

[0027] As a possible implementation of this embodiment, determining the threshold of the small window threshold segmentation according to the average line distance l a and calculating the threshold θ s (i, j) corresponding to the threshold segmentation of each point coordinate (i, j) of the small window, including:

[0028] Determine that the size, window height, and width of the opened small window are all the average line distance l of the tire sidewall area a, and perform an odd operation:

[0029]

[0030] In the formula, l a represents the average line distance, and L a represents the final line distance width;

[0031] Calculate the binarization threshold θ s (i, j) of each point in the sidewall image:

[0032]

[0033] In the formula, p(x, y) represents the pixel gray value at the position of the x-th row and the y-th column in the small window of image threshold segmentation.

[0034] As a possible implementation manner of this embodiment, the large window binarization threshold is determined according to the average line distance l a and the threshold θ of the threshold segmentation corresponding to the coordinates (i, j) of each point in the large window is calculated b (i, j), including:

[0035] Determine the size of the opened window, and both the window height and width are 5l, the average line distance of the sidewall area a , and perform an odd operation:

[0036]

[0037] In the formula, l a represents the average line distance, and L a represents the final line distance width. After the operation, it can be ensured that the line distance width must be odd;

[0038] Calculate the threshold θ of the threshold segmentation of each point in the sidewall image b (i, j).

[0039] As a possible implementation manner of this embodiment, the image is threshold-segmented by using the threshold θ s (i, j) of the small window threshold segmentation and the threshold θ b (i, j) of the large window threshold segmentation, including: judging whether the gray value of the current pixel value is greater than the threshold θ. If it is greater than θ, the current pixel value is set to 255, otherwise the current pixel value is set to 0; where θ is θ s (i, j) or θ b (i, j).

[0040] As a possible implementation manner of this embodiment, perform an inverse color operation on the binary images Ms and Mb to obtain binary images and During the process, ensure that the pixel value of the cord is 255 and the pixel value of the background is 0.

[0041] On the other hand, a sidewall cord threshold segmentation device based on a local adaptive window provided by an embodiment of the present invention includes:

[0042] An average line distance calculation module, configured to collect a sidewall image and calculate the average line distance l of the current sidewall area a ;

[0043] A small window threshold calculation module, configured to determine a small window threshold segmentation threshold according to the average line distance l a and calculate the threshold θ of threshold segmentation corresponding to each point coordinate (i, j) of the small window s (i, j); the window center of the small window is (i, j), and the window size is l a ;

[0044] A large window threshold calculation module, configured to determine a large window binarization threshold according to the average line distance l a and calculate the threshold θ of threshold segmentation corresponding to each point coordinate (i, j) of the large window b (i, j); the window center of the large window is (i, j), and the window size is 5l a ;

[0045] A threshold segmentation module, configured to perform threshold segmentation on the image by using the threshold θ s (i, j) of the small window threshold segmentation and the threshold θ b (i, j) of the large window threshold segmentation to obtain a binary image M s and M b ;

[0046] A sidewall cord acquisition module, configured to perform a color inversion operation on the binary images M s and M b , and perform an intersection operation on the obtained binary images and to obtain a cord area.

[0047] In a third aspect, a computer device provided by an embodiment of the present invention includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device runs, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to perform the steps of any of the above-mentioned sidewall cord threshold segmentation methods based on a local adaptive window.

[0048] Fourthly, an embodiment of the present invention provides a storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of any of the above-mentioned local adaptive window-based sidewall cord threshold segmentation methods.

[0049] The technical solutions of the embodiments of the present invention may have the following beneficial effects:

[0050] The present invention uses the sidewall horizontal cord distance as the threshold segmentation window size, which will not have a large difference due to different image or tire specifications and models, and ensures that there is at least one horizontal cord in the small threshold segmentation window, so that the horizontal cords in the small window can be better segmented.

[0051] The present invention uses the fusion of multi-scale window threshold segmentation results to weaken the problem of poor segmentation effect of a single threshold segmentation result in different situations, and can better handle the threshold segmentation of different cords through multi-scale.

[0052] The present invention can not only effectively suppress the influence of shadows and patterns on threshold segmentation, but also automatically adjust the window size according to the sparse situation of the cords in the specific image, enhance the effectiveness of the algorithm, improve the operation rate of the algorithm, and avoid the sticking phenomenon that occurs in the binarization of cords in the shadow and pattern areas in the traditional method. Thus, it greatly improves the binarization effect during the preprocessing of sidewall defect detection in tire X-ray images, and provides a good preprocessed image for subsequent sidewall defect detection.

[0053] The method of the present invention is simple and easy to implement, greatly improves the sidewall cord threshold segmentation effect, and the adopted adaptive window method is suitable for various images with different cord distances, increasing the practicability. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a flowchart of a local adaptive window-based sidewall cord threshold segmentation method shown according to an exemplary embodiment;

[0055] Figure 2 is a schematic diagram of a local adaptive window-based sidewall cord threshold segmentation device shown according to an exemplary embodiment;

[0056] Figure 3 is a flowchart of sidewall cord threshold segmentation using the device of the present invention shown according to an exemplary embodiment;

[0057] Figure 4 is a schematic diagram of a thread-passing method for calculating the average cord distance shown according to an exemplary embodiment;

[0058] Figure 5 and Figure 6The effect diagrams of the threshold segmentation of the tire sidewall with two different scale windows shown according to an exemplary embodiment (where, Figure 5 (a) and Figure 6 (a) is the original tire sidewall image, Figure 5 (b) and Figure 6 (b) is the effect diagram of the adaptive threshold segmentation using a small window, Figure 5 (c) and Figure 6 (c) is the effect diagram of the adaptive threshold segmentation using a large window);

[0059] Figure 7 And Figure 8 are the schematic diagrams of a tire sidewall cord image and the processing results of three threshold segmentations respectively shown according to an exemplary embodiment (where, Figure 7 (a) and Figure 8 (a) is the original tire sidewall image, Figure 7 (b) and Figure 8 (b) is the threshold processing result of the Otsu method, Figure 7 (c) and Figure 8 (c) is the processing result of the single-scale local adaptive threshold, Figure 7 (d) and Figure 8 (d) is the result diagram of the present invention). Detailed implementation manners

[0060] The present invention will be further described below in conjunction with the drawings and embodiments:

[0061] To clearly illustrate the technical features of the present solution, the present invention will be described in detail below through specific implementation manners and in conjunction with its drawings. The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, the components and settings of specific examples are described below. In addition, the present invention may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed. It should be noted that the components illustrated in the drawings are not necessarily drawn to scale. The present invention omits the description of well-known components and processing technologies and processes to avoid unnecessarily limiting the present invention.

[0062] As Figure 1 shown, a method for threshold segmentation of tire sidewall cords based on a local adaptive window provided by an embodiment of the present invention includes the following steps:

[0063] Collect a tire sidewall image and calculate the average line distance l of the current tire sidewall area a ;

[0064] According to the average line distance l aDetermine the threshold for small window threshold segmentation, and calculate the threshold θ for threshold segmentation corresponding to the coordinates (i, j) of each point in the small window s (i, j); the center of the small window is (i, j), and the window size is l a ;

[0065] According to the average line distance l a Determine the binarization threshold for the large window, and calculate the threshold θ for threshold segmentation corresponding to the coordinates (i, j) of each point in the large window b (i, j); the center of the large window is (i, j), and the window size is 5l a ;

[0066] Respectively use the threshold θ for small window threshold segmentation s (i, j) and the threshold θ for large window threshold segmentation b (i, j) to perform threshold segmentation on the image to obtain a binary image M s and M b ;

[0067] Perform an inverse color operation on the binary image M s and M b and perform an intersection operation on the obtained binary images and to obtain the cord area.

[0068] As a possible implementation of this embodiment, the calculation of the average line distance l of the current sidewall region a , includes:

[0069] Perform a pre-threshold segmentation operation in the central sidewall region to obtain the pixel gray values of the threading region;

[0070] Use vertical threading in the central sidewall region to count the number n of horizontal cords in each column l ;

[0071] Calculate the average line distance l of the sidewall a :

[0072]

[0073] where l s represents the height of the entire sidewall, and n l represents the number of horizontal cords.

[0074] As a possible implementation of this embodiment, the performing a pre-threshold segmentation operation in the central sidewall region to obtain the pixel gray values of the threading region includes:

[0075] First, the image is segmented into smaller windows, then the grayscale histograms are calculated for each window respectively, the threshold for threshold segmentation of the corresponding window is calculated based on the histogram, and finally the grayscale value of each position is compared with the threshold of the corresponding window to obtain the grayscale value of the pixels in the threading area;

[0076] The formula for calculating the threshold of the corresponding window for each position is:

[0077]

[0078] The formula for calculating the grayscale value of the pixels in the threading area is:

[0079]

[0080] Where, T(n) represents the threshold for threshold segmentation of the nth window, h represents the height of the segmentation window, w represents the width of the segmentation window, p(i, j) represents the grayscale value of the pixel at the position of the ith row and jth column in the small window of image threshold segmentation, and f(i, j) represents the grayscale value of the pixel at the position of the ith row and jth column after threshold segmentation.

[0081] As a possible implementation of this embodiment, in the central area of the sidewall, the number n of horizontal cord threads in each column is statistically counted using vertical threading l , including: by judging the number of times of abnormal changes in the grayscale value of the pixels in the threading area, the number n of horizontal cord threads is obtained according to the position of each intersection of the cord thread and the background l .

[0082] As a possible implementation of this embodiment, the threshold for threshold segmentation of the small window is determined according to the average line distance l a and the threshold θ s (i, j) for threshold segmentation corresponding to the coordinates (i, j) of each point in the small window is calculated, including:

[0083] Determine the size of the small window to be opened, and both the window height and width are the average line distance l of the sidewall area a , and an odd operation is performed:

[0084]

[0085] In the formula, l a represents the average line distance, and L a represents the final line distance width;

[0086] Calculate the binarization threshold θ s (i, j) for each point in the sidewall image:

[0087]

[0088] Wherein, p(x, y) represents the pixel gray value at the position of the x-th row and the y-th column in the small window of image threshold segmentation.

[0089] As a possible implementation manner of this embodiment, the determining the binarization threshold of the large window according to the average line distance l a and calculating the threshold θ of threshold segmentation corresponding to the coordinate (i, j) of each point in the large window b (i, j) includes:

[0090] Determine the size of the opened window, where both the window height and width are 5l, the average line distance of the tire side area a , and perform an odd operation:

[0091]

[0092] Wherein l a represents the average line distance, and L a represents the final line distance width. After the operation, it can be ensured that the line distance width must be odd;

[0093] Calculate the threshold θ of threshold segmentation for each point in the tire side image b (i, j).

[0094] As a possible implementation manner of this embodiment, the respectively using the threshold θ of small window threshold segmentation s (i, j) and the threshold θ of large window threshold segmentation b (i, j) to perform threshold segmentation on the image, including: judging whether the gray value of the current pixel value is greater than the threshold θ. If it is greater than θ, the current pixel value is set to 255, otherwise the current pixel value is set to 0; where θ is θ s (i, j) or θ b (i, j).

[0095] As a possible implementation manner of this embodiment, when performing an inversion operation on the binary images M s and M b to obtain binary images and during the process, ensure that the pixel value of the cord is 255 and the pixel value of the background is 0.

[0096] The present invention considers using local adaptive threshold segmentation to process tire cord and background; the local adaptive threshold is determined according to the gray value distribution of the pixel neighborhood block to obtain the binarization threshold at the pixel position, which can prevent the feature erasure by binarization in the regions with high and low brightness of the tire X-ray image. The binarization threshold at each pixel position is not fixed; the binarization threshold is usually higher in the region with higher brightness, while it will become smaller correspondingly in the region with lower brightness; different local image regions with different brightness, contrast, and texture will have corresponding binarization thresholds.

[0097] As Figure 2 shown, an apparatus for threshold segmentation of sidewall cord based on a local adaptive window provided by an embodiment of the present invention includes:

[0098] An average line distance calculation module, configured to collect a sidewall image and calculate the average line distance l of the current sidewall region a ;

[0099] A small window threshold calculation module, configured to determine the threshold segmentation threshold of the small window according to the average line distance l a and calculate the threshold θ of threshold segmentation corresponding to each point coordinate (i, j) of the small window s (i, j); the center of the small window is (i, j), and the window size is l a ;

[0100] A large window threshold calculation module, configured to determine the binarization threshold of the large window according to the average line distance l a and calculate the threshold θ of threshold segmentation corresponding to each point coordinate (i, j) of the large window b (i, j); the center of the large window is (i, j), and the window size is 5l a ;

[0101] A threshold segmentation module, configured to perform threshold segmentation on the image respectively by using the threshold θ s (i, j) of the small window threshold segmentation and the threshold θ b (i, j) of the large window threshold segmentation to obtain a binary image M s and M b ;

[0102] A sidewall cord acquisition module, configured to perform color inversion on the binary images M s and M b , and perform an intersection operation on the obtained binary images and to obtain a cord region.

[0103] As Figure 3 shown, after collecting relevant sidewall images, the process of performing sidewall cord threshold segmentation by using the apparatus of the present invention includes the following steps:

[0104] Step 1: Calculate the average line distance l of the current sidewall area using the thread-passing method a ;

[0105] First step, perform pre-threshold segmentation operation in the central area of the sidewall. Since there is no shadow or pattern interference in the central area, there is generally no problem with the threshold segmentation effect in this area. First, divide the image into smaller windows, then calculate the grayscale histogram for each window separately, calculate the threshold for threshold segmentation of the corresponding window based on the histogram, and finally compare the grayscale value of each position with the threshold of the corresponding window respectively. The formula is as follows:

[0106]

[0107]

[0108] Where T(n) represents the threshold for threshold segmentation of the nth window, h represents the height of the segmentation window, w represents the width of the segmentation window, p(i, j) represents the pixel grayscale value at the position of the ith row and jth column in the small window of image threshold segmentation, and f(i, j) represents the pixel grayscale value at the position of the ith row and jth column after threshold segmentation;

[0109] Second step, as Figure 4 shown, use vertical thread-passing in the central area of the sidewall to count the number n of horizontal cord threads in each column l . By judging the number of times the pixel value grayscale changes in the thread-passing area, the position where each cord thread intersects the background can be found, and the number n of horizontal cord threads can be counted l .

[0110] Third step, calculate the average line distance l of the sidewall a , and the formula is as follows:

[0111]

[0112] Where l s represents the height of the entire sidewall, and n l represents the number of horizontal cord threads.

[0113] Step 2: Calculate the threshold for threshold segmentation of the small window, and calculate the threshold θ s (i, j) for threshold segmentation corresponding to each point coordinate (i, j). The center of the window is (i, j), and the window size is l a ;

[0114] First step, first determine the size of the window to be opened. The height and width of the window are both the average line distance l of the sidewall area a . Since it is necessary to ensure that (i, j) must be the center point of the window, the width and height of the window must be odd numbers, and an odd number operation is required. The formula is as follows:

[0115]

[0116] where l a represents the average line distance, and L a represents the final line distance width. After the operation, it can be ensured that the line distance width must be an odd number;

[0117] Step 2: Calculate the binarization threshold θ s (i, j) of each point in the sidewall image. The formula is as follows:

[0118]

[0119] Step 3: Calculate the binarization threshold of the large window, and calculate the threshold θ b (i, j) corresponding to the threshold segmentation of each point coordinate (i, j). The window center is (i, j), and the window size is 5l a ;

[0120] First step: First determine the size of the window opened. Both the window height and width are the average line distance 5l of the sidewall area a , and since it is necessary to ensure that (i, j) must be the center point of the window, the width and height of the window must be odd numbers, and an odd number operation is required. The formula is as follows:

[0121]

[0122] where l a represents the average line distance, and L a represents the final line distance width. After the operation, it can be ensured that the line distance width must be an odd number;

[0123] Second step: Calculate the threshold θ b (i, j) of the threshold segmentation of each point in the sidewall image:

[0124]

[0125] The calculation formula is the same as the formula of θ s (i, j) above. The only difference is the window size L a .

[0126] Step 4: Respectively use the threshold θ s (i, j) of the small window threshold segmentation and the threshold θ b (i, j) of the large window threshold segmentation to perform threshold segmentation on the image to obtain the binary images M s 、M b, that is, it is determined whether the gray value of the current pixel value is greater than the threshold θ. If it is greater than θ, the current pixel value is set to 255; otherwise, the current pixel value is set to 0. Since the threshold values for threshold segmentation of different windows are different, two different binary images will be finally obtained, as Figure 5 and Figure 6 shown.

[0127] Step 5: Perform color inversion operations on the two binary images to ensure that the pixel value of the cord is 255 and the pixel value of the background is 0.

[0128] Step 6: Perform an intersection operation on the two images, that is, only the area considered to be the cord region in both threshold segmentation operations of different windows will be finally considered as the cord, as Figure 7 (d) and Figure 8 (d) shown.

[0129] Figure 7 (a) and Figure 8 (a) is the original sidewall image, Figure 7 (b) and Figure 8 (b) is the threshold processing result of the Otsu method, Figure 7 (c) and Figure 8 (c) is the processing result of the single-scale local adaptive threshold, Figure 7 (d) and Figure 8 (d) is the result graph of the present invention. It can be seen that, compared with the processing results of the existing Otsu method and the single-scale local adaptive threshold, the horizontal cord in the present invention obtains a better segmentation effect.

[0130] A computer device provided by an embodiment of the present invention includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the device runs, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to perform the steps of any of the above-mentioned sidewall cord threshold segmentation methods based on local adaptive windows.

[0131] Specifically, the above-mentioned memory and processor can be general memory and processor, and no specific limitation is made here. When the processor runs the computer program stored in the memory, it can execute the above-mentioned sidewall cord threshold segmentation method based on local adaptive windows.

[0132] Those skilled in the art can understand that the structure of the computer device does not constitute a limitation on the computer device, and it may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange different components.

[0133] In some embodiments, the computer device may further include a touch screen, which can be used to display a graphical user interface (e.g., the startup interface of an application) and receive user operations on the graphical user interface (e.g., the startup operation for an application). Specifically, the touch screen may include a display panel and a touch panel. Among them, the display panel can be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. The touch panel can collect contact or non-contact operations of the user on or near it and generate preset operation instructions. For example, the user uses any suitable object or accessory such as a finger, a stylus, etc. to operate on the touch panel or near the touch panel. In addition, the touch panel can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch orientation and posture of the user, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into information that the processor can process, then sends it to the processor, and can receive the commands sent by the processor and execute them. In addition, various types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch panel, and any technology developed in the future can also be used to implement the touch panel. Further, the touch panel can cover the display panel, and the user can operate on or near the touch panel covering the display panel according to the graphical user interface displayed on the display panel. After the touch panel detects the operation on or near it, it is transmitted to the processor to determine the user input, and then the processor provides a corresponding visual output on the display panel in response to the user input. In addition, the touch panel and the display panel can be implemented as two independent components or integrated.

[0134] Corresponding to the above application startup method, an embodiment of the present invention further provides a storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of any of the above-mentioned local adaptive window-based sidewall cord threshold segmentation methods.

[0135] The application startup device provided by the embodiments of the present application can be specific hardware on the device or software or firmware installed on the device, etc. The implementation principle and the technical effects generated by the device provided by the embodiments of the present application are the same as those of the foregoing method embodiments. For the sake of brief description, for the parts not mentioned in the device embodiments, reference can be made to the corresponding content in the foregoing method embodiments. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the foregoing-described systems, devices, and units can all refer to the corresponding processes in the above method embodiments, and will not be repeated here.

[0136] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0137] In the embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods. For another example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some communication interfaces. The indirect coupling or communication connection of devices or modules can be in electrical, mechanical, or other forms.

[0138] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they can be located in one place, or they can be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0139] In addition, the functional modules in the embodiments provided by the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0140] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0141] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one or more of the processes Figure 1 one or more processes and / or blocks Figure 1 specified in the block or blocks.

[0142] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the processes Figure 1 one or more processes and / or blocks Figure 1 specified in the block or blocks.

[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent substitutions can still be made to the specific embodiments of the present invention. Any modification or equivalent substitution without departing from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.

Claims

1. A method for threshold segmentation of sidewall cords based on a locally adaptive window, characterized in that, Including the following steps: Collect the sidewall image and calculate the average line distance of the current sidewall area ; According to the average line distance Determine the threshold for small window threshold segmentation and calculate the coordinates of each point in the small window The threshold for the corresponding threshold segmentation ; The window center of the small window is , the window size is ; According to the average line distance Determine the binarization threshold of the large window and calculate the coordinates of each point in the large window The threshold for the corresponding threshold segmentation ; The window center of the large window is , and the window size is ; The thresholds for small-window threshold segmentation and the thresholds for large-window threshold segmentation are used to perform threshold segmentation on the image to obtain a binary image and ; For a binary image and perform an inverse color operation to obtain a binary image and , and perform an intersection operation on the obtained binary images and to obtain the cord area; Calculating the average line distance of the current sidewall region , including: Perform a pre-threshold segmentation operation on the central area of the tire sidewall to obtain the pixel gray values of the thread-passing area; Count the number of horizontal cords in each column by using vertical threading in the central area of the tire sidewall ; Calculate the average line distance of the tire sidewall : Among them represents the height of the entire sidewall represents the number of horizontal cords 2. The method for threshold segmentation of carcass cords based on a locally adaptive window according to claim 1, wherein The step of performing a pre-threshold segmentation operation on the central area of the tire sidewall to obtain the pixel gray values of the thread-passing area includes: First, divide the image into smaller windows, then calculate the gray histogram for each window respectively, calculate the threshold for threshold segmentation of the corresponding window according to the histogram, and finally compare the gray value of each position with the threshold of the corresponding window to obtain the pixel gray values of the thread-passing area; The formula for calculating the threshold of the corresponding window for each position is: The formula for calculating the pixel gray values of the thread-passing area is: Among them, represents the threshold for threshold segmentation of the th window, represents the height of the segmentation window, represents the width of the segmentation window, represents the gray value of the pixel at the th row and th column position within the small window of image threshold segmentation, represents the gray value of the pixel at the th row and th column position after threshold segmentation.

3. The method for threshold segmentation of carcass cords based on a locally adaptive window according to claim 1, wherein Counting the number of horizontal cord plies in each column by using vertical threading in the central area of the tire side , including: judging the number of times of abnormal changes in the pixel gray value of the threading area, and obtaining the number of horizontal cord plies according to the position of each intersection of the cord plies and the background .

4. The method for threshold segmentation of carcass cords based on a locally adaptive window according to claim 1, wherein Said according to the average line distance Determine the threshold for small window threshold segmentation, and calculate the coordinates of each point in the small window The threshold for the corresponding threshold segmentation , including: Determine the size of the small window opened, with both the window height and width being the average line distance of the sidewall area , and perform an odd operation: wherein represents the average line pitch, represents the final line pitch width; Calculate the binarization threshold for each point in the sidewall image : In the formula, represents the pixel gray value at the position of the th row and the th column within the small window of image threshold segmentation.

5. The method for threshold segmentation of sidewall cord based on local adaptive window according to claim 1, characterized in that According to the average line distance Determine the binarization threshold of the large window and calculate the coordinates of each point in the large window The threshold of the corresponding threshold segmentation , including: Determine the size of the window opened, with both the height and width of the window being the average line distance of the sidewall area 5 , and perform an odd operation: In the formula represents the average line pitch, represents the final line pitch width. After the operation, it can be ensured that the line pitch width must be an odd number; Calculate the threshold for threshold segmentation of each point in the sidewall image .

6. The method for threshold segmentation of carcass cords based on a locally adaptive window according to claim 1, characterized in that The thresholds obtained by respectively using small-window threshold segmentation and the thresholds obtained by large-window threshold segmentation are used to perform threshold segmentation on the image, including: judging whether the gray value of the current pixel value is greater than the threshold , and if it is greater then setting the current pixel value to 255, otherwise setting the current pixel value to 0; where is or .

7. The method for threshold segmentation of sidewall cord based on a locally adaptive window according to any one of claims 1-6, wherein When performing an inversion operation on the binary image and to obtain the binary images and during the process, ensure that the pixel value of the cord is 255 and the pixel value of the background is 0.

8. A sidewall cord threshold segmentation device based on a locally adaptive window, characterized in that Including: An average line distance calculation module, configured to collect sidewall images and calculate the average line distance of the current sidewall area ; A small window threshold calculation module, which is used to determine the small window threshold segmentation threshold according to the average line distance and calculate the coordinate of each point in the small window corresponding to the threshold of threshold segmentation ; the window center of the small window is , and the window size is ; A large window threshold calculation module, which is used to determine the binarization threshold of the large window according to the average line distance and calculate the threshold of threshold segmentation corresponding to the coordinates of each point in the large window ; The window center of the large window is , and the window size is ; ; A threshold segmentation module for respectively using the thresholds of small-window threshold segmentation and the thresholds of large-window threshold segmentation to perform threshold segmentation on an image to obtain a binary image and ; A sidewall cord acquisition module for performing an inversion operation on a binary image and and performing an intersection operation on the obtained binary images and to obtain a cord region; Calculating the average line distance of the current sidewall area , including: Perform a pre-threshold segmentation operation on the central area of the tire sidewall to obtain the pixel gray values of the thread-passing area; Count the number of horizontal cords in each column using vertical threading in the central area of the sidewall ; Calculate the average line distance of the tire sidewall : Among them represents the height of the entire sidewall represents the number of horizontal cords 9. A computer device, characterized in that, It includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device runs, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to perform the steps of the method for threshold segmentation of tire sidewall cord based on local adaptive window as described in any one of claims 1-7.

Citation Information

Patent Citations

  • A water body microorganism image segmentation method based on self-adaptive local threshold binaryzation

    CN109816681A

  • Global and local binary pattern image crack segmentation method based on robot vision

    US11580647B1