Method for detecting content of marked glass beads
Through image acquisition and data processing technology, the quantity and quality content of glass beads in the marking lines are identified and calculated, which solves the problems of cumbersome and inaccurate detection in the prior art, and achieves fast and accurate detection of glass bead content.
Patent Information
- Application Number
- CN202411748580.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art winning mark glass bead detection method is complicated to operate, has a long detection time, requires damage to mark marks and use of chemical reagents, resulting in low repeatability and low accuracy of the test results.
Using image acquisition and data processing methods, the positions and radius of glass beads and peeled glass beads are identified by acquiring the reticle images, preprocessing images, and Hoff gradient transformation, and the number of glass beads per unit area of the average reticle is counted and calculated. Finally, the average mass content of glass beads is fitted with a linear formula.
The non-destructive, fast and accurate detection of the content of the beaded glass beads is achieved, which greatly improves the detection efficiency and safety, and avoids the use of chemical reagents and the destruction of the beads.
Smart Images

Figure CN119991769A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a method for detecting the content of marking glass beads. Background Art
[0002] The reflective performance of road markings affects the safety of road traffic at night and in bad weather conditions. In order to make the road markings reflective, reflective glass beads are usually pre-mixed in the marking paint, or glass beads are sprinkled on the pre-mixed glass beads, or glass beads are sprinkled separately. The mass content of glass beads in road markings is usually between 18% and 30%. Too little glass beads will lead to insufficient reflective performance of the markings; too much glass beads will cause intensive refraction, causing the light to deviate from the incident direction after reflection, and it will not achieve the reflective effect required by the markings. In order to ensure the construction quality of road markings and prevent the occurrence of irregular addition of glass beads during actual construction, it is very important to accurately measure the content of glass beads in the markings.
[0003] The existing road marking glass bead detection method is mainly the chemical reagent removal method, that is, the marking sample is dissolved with a chemical reagent, the paint in the marking sample is removed, the glass beads are retained, and then the glass beads are weighed to calculate the glass bead content. There is also a method that uses heating of the marking sample to dissolve it, and then purifies the glass beads to calculate the glass bead content. These methods have the disadvantages of cumbersome operation, long detection time, the need to destroy the marking and the use of chemical reagents; because they all involve glass bead cleaning, it is difficult to avoid the loss of glass beads during the cleaning and drying process, resulting in low repeatability of the test results and affecting the accuracy of the results. Summary of the invention
[0004] The implementation of the present invention provides a method for detecting the content of glass beads in a marking line, which is used to solve the problems existing in the prior art.
[0005] In order to achieve the above object, the present invention adopts the following technical scheme.
[0006] A method for detecting the content of marking glass beads, comprising:
[0007] Draw a line or use a line image template to determine the image area m of the captured line;
[0008] Acquire a marking line image, and preprocess the marking line image to obtain a marking line grayscale image;
[0009] The Hough gradient transform is used on the grayscale image of the marking line to identify the position and radius of the glass beads and the fallen glass beads;
[0010] Read the array obtained by Hough gradient transformation, and count the total number n of recognized glass beads and fallen glass beads;
[0011] By x=n / m, calculate the number of glass beads x per unit area of the average marking line;
[0012] The average mass content y of the glass beads in the marking line is fitted using the linear formula y=ax+b, where a and b are constants related to the type of marking paint and the density of the glass beads. A sample with known y is prepared and obtained by solving the formula S6 through steps S1-S5.
[0013] Preferably, the markings are road markings.
[0014] Preferably, the glass beads include premixed glass beads and / or surface-dusted glass beads.
[0015] Preferably, acquiring a marking line image and preprocessing the marking line image to obtain a marking line grayscale image includes:
[0016] Read the graticule image;
[0017] Convert the read graticule image into a grayscale image;
[0018] Denoise the converted grayscale image.
[0019] Preferably, converting the graticule image into a grayscale image comprises:
[0020] Calculate the gray value of each pixel by weighted average method;
[0021] Through the following formula:
[0022] H=a1R+a2G+a3B (1)
[0023] Calculate the grayscale value of each pixel, where H is the grayscale value of the pixel, R, G, and B are the values of the red, green, and blue components corresponding to the pixel, respectively; a1, a2, and a3 are weights, satisfying 0≤a1≤1, 0≤a2≤1, 0≤a3≤1, and a1+a2+a3=1.
[0024] Preferably, denoising the grayscale image obtained by conversion includes:
[0025] Use bilateral filtering algorithm to reduce image noise;
[0026] Through the following formula:
[0027]
[0028] Among them, (i, j) is the pixel coordinate of the center point P, (k, l) is the pixel coordinate of any point Q in the neighborhood S centered on point P, f(k, l) is the grayscale value of point Q, f(i, j) is the grayscale value of the center point P, σ d , σ ris a number not equal to 0, w(i, j, k, l) is the weight of point Q relative to the center point P;
[0029] The new pixel value g(i, j) of the center pixel point P is
[0030]
[0031] Calculate g(i, j) point by point in the entire grayscale image domain to obtain the denoised grayscale image.
[0032] Preferably, the grayscale image is subjected to Hough gradient transformation to identify the position and radius of the glass beads and the fallen glass beads, including:
[0033] The canny operator is used to detect the edge of the grayscale image to obtain the edge binary image;
[0034] Execute the Sobel operator on the grayscale image to calculate the neighborhood gradient values of all pixels;
[0035] Initialize the circle center space N(a, b), set all N(a, b) = 0, where a and b are the width and height of the grayscale image respectively;
[0036] Traverse all non-zero pixel points in the edge binary image, apply the Hough gradient method along the neighborhood gradient direction to find the potential center position, and count it into the center space N(a, b);
[0037] Set the upper and lower limits of the circle radius search range;
[0038] For a certain circle center, calculate the distance from all edge points to the circle center, and record the distance with the larger frequency as the radius value;
[0039] The center position and radius of the circle whose radius value falls within the circle radius search range are counted into the center and radius arrays to obtain the Hough gradient transform array.
[0040] Preferably, the array obtained by Hough gradient transformation is read, and the total number n of identified glass beads and fallen glass beads is counted, specifically by using a circular accumulator to calculate the number of circle centers and radii in the array obtained by Hough gradient transformation.
[0041] Preferably, the linear formula y=ax+b is used to fit the average mass content y of the glass beads in the marking line, wherein a and b are constants related to the type of marking paint and the density of the glass beads, and a sample with known y is prepared, and the formula S6 is solved through steps S1-S5 to obtain the sample. Specifically, for the known types of marking paint and glass beads, samples with glass bead contents y1, y2, ..., y are prepared respectively. n The marking line sample is obtained by steps S1-S5 to obtain the corresponding x1, x2, ... x n The value of a and b is determined by the least squares method.
[0042] It can be seen from the technical solutions provided by the embodiments of the present invention that the present invention provides a method for detecting the content of glass beads in a road marking. First, the road marking image is obtained and preprocessed. Then, the position and radius of the glass beads and the fallen glass beads are identified by Hough gradient transform, and the array obtained by Hough gradient transform is read. The total number of the identified glass beads and the fallen glass beads is counted. Finally, the average mass content of the glass beads in the given road marking paint is calculated by linear formula fitting. Since the glass beads added to the road marking are standardized glass beads with sphericity and diameter requirements, the premixed glass beads in the road marking paint also need to ensure the uniformity of mixing during construction. Therefore, for road markings that do not include surface-sprinkled glass beads, regardless of whether the road marking is worn or not, when imaging it using an imaging device, the glass beads or the fallen parts of the glass beads in the obtained road marking image present a circular boundary relative to the road marking background. The Hough gradient transform can be used to clearly identify the center position and radius of the glass beads within the specified radius range in the image. The Hough gradient transform results can be read cyclically and accumulated to obtain the number of glass beads on the surface layer of the road marking. The glass bead content in the road marking is the ratio of the mass of glass beads per unit mass of the road marking to the total mass of the road marking. Since the glass beads are evenly mixed in the road marking, although the image method obtains the number of glass beads on the surface of the road marking and the number of fallen glass beads, it has a good linear relationship with the glass bead content. Although the slope value and constant value in the linear fitting formula vary according to the type of paint used for the road marking, for the same type of paint and glass beads, the slope value and constant value in the linear fitting formula are fixed. After determining the slope value and constant value in the linear fitting formula through preliminary experiments, the method can be applied to test the actual glass bead content of the road marking of the corresponding paint after it is put into use or during construction. The advantages and positive effects of the method provided by the present invention are: it solves the problems of cumbersome operation, long detection time, need to destroy the road marking and use chemical reagents in the field of traditional road marking glass bead content detection, and proposes a method for detecting the road marking glass bead content by using image acquisition and data processing, so as to achieve non-destructive, rapid and accurate detection of the road marking glass bead content, and greatly improve the detection efficiency and safety.
[0043] Additional aspects and advantages of the present invention will be given in part in the following description, which will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0045] Figure 1 A processing flow chart of a method for detecting the content of glass beads in a marking line provided by the present invention;
[0046] Figure 2 is a schematic diagram of a marking image template;
[0047] Figure 3 This is a graph showing the result of preprocessing a marking image of a method for detecting the content of glass beads in a marking line;
[0048] Figure 4 A method for detecting the content of glass beads in a marking line is provided, which uses Hough gradient transform to identify the position and radius of the glass beads;
[0049] Figure 5 A graph showing the number of glass beads identified in a marking line sample under different glass bead contents in a method for detecting the content of glass beads in a marking line;
[0050] Figure 6 A method for detecting the content of glass beads in a marking line is provided, which is a graph of the content of glass beads in the marking line obtained by fitting a formula;
[0051] Figure 7 This is a graph showing the glass bead content detection results of a method for detecting the content of glass beads in a marking line. DETAILED DESCRIPTION
[0052] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.
[0053] like Figure 1 As shown, the present invention provides a method for detecting the content of marking glass beads, characterized by comprising:
[0054] Draw a line or use a line image template to determine the image area m of the captured line;
[0055] Acquire a marking line image, and preprocess the marking line image to obtain a marking line grayscale image;
[0056] The Hough gradient transform is used on the grayscale image of the marking line to identify the position and radius of the glass beads and the fallen glass beads;
[0057] Read the array obtained by Hough gradient transformation, and count the total number n of recognized glass beads and fallen glass beads;
[0058] By x=n / m, calculate the number of glass beads x per unit area of the average marking line;
[0059] The average mass content y of the glass beads in the marking line is fitted using the linear formula y=ax+b, where a and b are constants related to the type of marking paint and the density of the glass beads. A sample with known y is prepared and obtained by solving the formula S6 through steps S1-S5.
[0060] Furthermore, in the first step, the image area m of the captured marking line is determined by drawing a line or using a marking line image template in order to clarify the specific marking line area corresponding to the processed marking line image. Figure 2 The method shown is to draw lines on the marking line to determine the image area or use the marking line image template, place the marking line image template on the measured marking line, and try to capture the image perpendicular to the marking line surface. Figure 2 The a and b shown in the figure are the apparent dimensions of the image finally determined; the dimensions can be obtained by measuring the lines drawn, or determined by a predetermined marking line image template.
[0061] Furthermore, in the second step, obtaining the marking line image is to obtain image data of the marking line area by conventional means such as taking photos or videos.
[0062] Furthermore, in the second step, preprocessing the marking image to obtain a grayscale image includes the following sub-steps:
[0063] Convert the read graticule image into a grayscale image;
[0064] Denoise the converted grayscale image.
[0065] In some preferred embodiments, the first sub-step specifically includes:
[0066] The gray value of each pixel is calculated by weighted average method, using the following formula:
[0067] H=a1R+a2G+a3B (1)
[0068] Calculate the grayscale value of each pixel, where H is the grayscale value of the pixel, R, G, and B are the values of the red, green, and blue components corresponding to the pixel, respectively; a1, a2, and a3 are weights, satisfying 0≤a1≤1, 0≤a2≤1, 0≤a3≤1, and a1+a2+a3=1.
[0069] In some preferred embodiments, the second sub-step specifically includes:
[0070] Use bilateral filtering algorithm to reduce image noise;
[0071] Through the following formula:
[0072]
[0073] Among them, (i, j) is the pixel coordinate of the center point P, (k, l) is the pixel coordinate of any point Q in the neighborhood S centered on point P, f(k, l) is the grayscale value of point Q, f(i, j) is the grayscale value of the center point P, σ d , σ ris a number not equal to 0, w(i, j, k, l) is the weight of point Q relative to the center point P;
[0074] The new pixel value g(i, j) of the central pixel point P is:
[0075]
[0076] Calculate g(i, j) point by point in the entire grayscale image domain to obtain the denoised grayscale image, such as Figure 3 shown.
[0077] Furthermore, in the third step, the step of using Hough gradient transform to identify the position and radius of glass beads and fallen glass beads on the grayscale image of the marking line specifically includes the following sub-steps:
[0078] The Canny operator is used to perform edge detection on the target area image to obtain an edge binary image;
[0079] Execute the Sobel operator on the target area image to calculate the neighborhood gradient values of all pixels;
[0080] Initialize the circle center space N(a, b), set all N(a, b) = 0, where a and b are the width and height of the target area image respectively;
[0081] Traverse all non-zero pixel points in the edge binary image, apply the Hough gradient method along the neighborhood gradient direction to find the potential center position, and count it into the center space N(a, b);
[0082] Set the upper and lower limits of the circle radius search range;
[0083] For a certain circle center, calculate the distance from all edge points to the circle center, and record the distance with the larger frequency as the radius value;
[0084] The center position and radius of the circle whose radius value falls within the circle radius search range are counted into the center and radius arrays to obtain the Hough gradient transform array.
[0085] The above is the calculation process of Hough gradient transformation using Hough gradient method. The result is as follows Figure 4 shown.
[0086] Furthermore, in the fourth step, the array obtained by the Hough gradient transform is read, and the total number n of the identified glass beads and the fallen glass beads is counted, specifically, the number of circle centers and radii in the array obtained by the Hough gradient transform is calculated using a circular accumulator.
[0087] Furthermore, in the sixth step, the linear formula y=ax+b is used to fit the average mass content y of the glass beads in the marking line, where a and b are constants related to the type of marking paint and the density of the glass beads. A sample with a known y is prepared, and the formula S6 is solved through steps S1-S5 to obtain the sample. Specifically, for the known types of marking paint and glass beads, samples with glass bead contents of y1, y2, ..., y are prepared respectively. n The marking line sample is obtained by steps S1-S5 to obtain the corresponding x1, x2, ... x n The value of a and b is determined by the least squares method.
[0088] Furthermore, the constants a and b in the above fitting formula are obtained by making sample experiments, and the experimental process is exemplified as follows:
[0089] First, weigh the road marking paint with a mass of m10 and place it in a stirring container; then weigh the glass beads with a mass of m11; stir and mix the glass beads with a mass of m11 evenly into the weighed road marking paint to form a road marking sample, and calculate the glass bead content y1=m 11 / (m10+m 11 ); repeat the above steps to make marking samples with glass bead contents of y2, y3, ..., yn; perform the following steps on each marking sample:
[0090] Then scrape and apply a marking sample with uniform thickness on the sample plate, and let it air dry naturally or in an oven;
[0091] Then grind the surface of the marking sample to remove the surface marking paint and expose the glass beads. In this step, you can first grind with coarse sandpaper and then with finer sandpaper. The shedding of some glass beads during the grinding process will not affect the test results.
[0092] Finally, a 1 cm × 1 cm area is marked on the polished sample surface, the sample is photographed, and the image of the 1 cm × 1 cm area is captured in the photo. Steps 1 to 3 of claim 1 of the present invention are applied to the image of the area to obtain the number of glass beads, which are recorded as x1, x2, ..., x n ;
[0093] The experimental results show that the data x1, x2, ..., x n and y2, y3, ..., y n There is a good linear relationship between them. The number of glass beads changes only with their content and is not affected by the thickness of the marking sample. Figure 5 shown.
[0094] Figure 6The relationship between the fitted glass bead content and the number of glass beads per square centimeter identified by the image is shown in the figure. The fitting results show that under the current experimental road marking paint, the glass bead content and the number of glass beads on the surface layer have a linear relationship, which is expressed by the following formula:
[0095] y=0.0024x+0.001 (4)
[0096] Figure 7 In order to adopt the method of the present invention, five groups of samples of the same model were tested, and the predicted results of glass bead content were obtained. The absolute error percentage of the predicted results was about 2.6%, which exceeded the accuracy of the existing detection methods, indicating that this method is not only efficient and convenient in glass bead content detection, but also has the characteristics of high precision, and has obvious practical application value.
[0097] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A method for detecting the content of marking glass beads, characterized in that: include: S1, draw a line or use a line image template to determine the image area m of the captured line; S2, obtaining a marking line image, and preprocessing the marking line image to obtain a marking line grayscale image; S3, using Hough gradient transform on the grayscale image of the marking line to identify the position and radius of the glass beads and the fallen glass beads; S4, reading the array obtained by Hough gradient transformation, and counting the total number n of recognized glass beads and fallen glass beads; S5. Calculate the number x of glass beads per unit area of the average marking line by x=n / m; S6. Use the linear formula y=ax+b to fit the average mass content y of the glass beads in the marking line, where a and b are constants related to the type of marking paint and the density of the glass beads. Make a sample with known y and solve the formula S6 through steps S1-S5 to obtain it.
2. A method for detecting the content of marking glass beads according to claim 1, characterized in that: The markings described herein refer to road markings.
3. A method for detecting the content of marking glass beads according to claim 1, characterized in that: The glass beads include premixed glass beads and / or surface-sprinkled glass beads.
4. A method for detecting the content of marking glass beads according to claim 1, characterized in that: The step S2 acquires the marking line image and preprocesses the marking line image to obtain the marking line grayscale image, including: Read the graticule image; Convert the read graticule image into a grayscale image; Denoise the converted grayscale image.
5. A method for detecting the content of marking glass beads according to claim 2, characterized in that: The step of converting the marking line image into a grayscale image comprises: Calculate the gray value of each pixel by weighted average method; Through the following formula H=a1R+a2G+a3B (1) Calculate the grayscale value of each pixel, where H is the grayscale value of the pixel, R, G, and B are the values of the red, green, and blue components corresponding to the pixel, respectively; a1, a2, and a3 are weights, satisfying 0≤a1≤1, 0≤a2≤1, 0≤a3≤1, and a1+a2+a3=1.
6. A method for detecting the content of marking glass beads according to claim 4, characterized in that: The denoising of the grayscale image obtained by conversion comprises: Use bilateral filtering algorithm to reduce image noise; Through the following formula Among them, (i, j) is the pixel coordinate of the center point P, (k, l) is the pixel coordinate of any point Q in the neighborhood S centered on point P, f(k, l) is the grayscale value of point Q, f(i, j) is the grayscale value of the center point P, σ d , σ r is a number not equal to 0, w(i,j,k,l) is the weight of point Q relative to the center point P; The new pixel value g(i,j) of the center pixel P is Calculate g(i,j) point by point in the entire grayscale image domain to obtain the denoised grayscale image.
7. A method for detecting the content of marking glass beads according to claim 1, characterized in that: The S3 uses Hough gradient transformation to identify the position and radius of glass beads and fallen glass beads on the target area image, including: The canny operator is used to perform edge detection on the target area image to obtain an edge binary image; Execute the Sobel operator on the target area image to calculate the neighborhood gradient values of all pixels; Initialize the circle center space N(a,b), set all N(a,b)=0, where a and b are the width and height of the target area image respectively; Traverse all non-zero pixel points in the edge binary image, apply the Hough gradient method along the neighborhood gradient direction to find the potential center position, and accumulate them into the center space N(a,b); Set the upper and lower limits of the circle radius search range; For a certain circle center, calculate the distance from all edge points to the circle center, and record the distance with the larger frequency as the radius value; The center position and radius of the circle whose radius value falls within the circle radius search range are counted into the center and radius arrays to obtain the Hough gradient transform array.
8. A method for detecting the content of marking glass beads according to claim 1, characterized in that: The S4 reads the array obtained by Hough gradient transformation, and counts the total number n of recognized glass beads and fallen glass beads, specifically, using a circular accumulator to calculate the number of circle centers and radii in the array obtained by Hough gradient transformation.
9. A method for detecting the content of marking glass beads according to claim 1, characterized in that: The S6 uses the linear formula y=ax+b to fit the average mass content y of the glass beads in the marking line, where a and b are constants related to the type of marking paint and the density of the glass beads. A sample with known y is prepared, and the formula S6 is solved through steps S1-S5 to obtain the sample. Specifically, for the known types of marking paint and glass beads, samples with glass bead contents y1, y2, ..., y are prepared respectively. n The marking line sample is obtained by steps S1-S5 to obtain the corresponding x1, x2, ... x n The value of a and b is determined by the least squares method.
Citation Information
Cited By
A method for detecting the content of premixed glass beads in a pavement marking paint
CN122753943A