Rockfill material gradation detection method and device based on image segmentation algorithm

The image segmentation algorithm-based method for detecting the gradation of riprap solves the problems of manual dependence and environmental limitations in traditional detection methods, and achieves rapid and stable three-dimensional gradation detection, which is suitable for engineering sites.

CN119477868BActive Publication Date: 2025-11-21HUBEI UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411602489.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-11-21
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

Traditional methods for detecting the gradation of stacked stone require a large amount of manual labor, have poor detection stability and low sampling rate, and existing machine vision methods require a stable detection environment and cannot effectively detect the gradation of stone in a stacked state, resulting in significant differences between the detection results and the screening results.

Method used

A method for detecting the gradation of paved aggregate based on image segmentation algorithm is adopted, including image preprocessing, instance segmentation, mask information extraction, shape feature parameter calculation and data fusion model. It can perform three-dimensional gradation detection of paved aggregate without special environment, adapt to a large particle size range, and the detection process is simple and fast.

Benefits of technology

It enables rapid and stable detection of riprap, is highly adaptable, and can detect stone with a particle size of 5-300mm in real time. The detection results are consistent with the screening results. It is suitable for engineering sites, reduces manual intervention, and simplifies the process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477868B_ABST
    Figure CN119477868B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of rockfill material gradation detection, and relates to a rockfill material gradation detection method and device based on an image segmentation algorithm, which comprises the following steps: 1) obtaining an image of rock particles after spreading; 2) pre-processing the rock image; 3) inputting the pre-processed image into an instance segmentation model to obtain mask information of the rock particles; 4) extracting mask quantization indicators and shape feature parameters in the mask information of the rock particles, and converting the mask quantization indicators and the shape feature parameters into particle sizes and total volumes of the rock particles in each particle size range; 5) converting the obtained rock particle sizes and volumes into a three-dimensional rock particle gradation and drawing a rock particle apparent gradation curve; and 6) correcting the obtained rock particle apparent gradation curve through a data fusion model to obtain a final three-dimensional overall gradation curve of the rock particles. The present application has the advantages of strong adaptability, no need for special detection environment, and high detection precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of rockfill gradation detection, and relates to a method and apparatus for rockfill gradation detection, particularly a method and apparatus for rockfill gradation detection based on an image segmentation algorithm. Background Technology

[0002] Concrete-faced rockfill dams are widely chosen as water-retaining structures in the water conservancy and hydropower industry due to their advantages such as low construction cost, good slope stability, and excellent water pressure resistance. As the most important filling material in the dam structure, the gradation of the rockfill significantly affects the physical properties and mechanical behavior of the dam body, and is crucial to the dam's construction quality and safe operation. Traditional gradation testing methods require a large amount of manual labor and suffer from poor testing stability, low sampling rate, and weak representativeness. Current machine vision-based gradation testing methods require numerous procedures or a relatively stable testing environment, making them inconvenient for on-site use. Furthermore, when the stones are in a stacked state, the testing process has certain limitations, only able to test the apparent gradation of the surface-exposed stones, and the test results differ significantly from the sieving results. Summary of the Invention

[0003] In order to solve the above-mentioned technical problems in the background art, the present invention provides a method and apparatus for detecting the gradation of riprap based on image segmentation algorithm, which is highly adaptable, requires no special detection environment, and has high detection accuracy.

[0004] To achieve the above objectives, the present invention adopts the following technical solution:

[0005] A method for detecting the gradation of riprap based on an image segmentation algorithm, characterized in that: the method for detecting the gradation of riprap based on an image segmentation algorithm includes the following steps:

[0006] 1) Obtain images of the stone particles after paving;

[0007] 2) Preprocess the stone image obtained in step 1);

[0008] 3) Input the preprocessed image into the instance segmentation model to obtain the mask information of the stone particles;

[0009] 4) Extract the mask quantification index and shape feature parameters from the mask information of stone particles, and convert the mask quantification index and shape feature parameters into particle size and total stone volume within each particle size range;

[0010] 5) Based on the stone particle size and volume obtained in step 4), convert them into three-dimensional stone particle size distribution and plot the apparent size distribution curve of the stone particles;

[0011] 6) The apparent gradation curve of the stone particles obtained in step 5) is corrected by the data fusion model to obtain the final three-dimensional overall gradation curve of the stone particles.

[0012] Preferably, the preprocessing in step 2) of the present invention includes histogram equalization, bilateral filtering, and grayscale conversion;

[0013] The histogram equalization can rearrange the brightness values ​​of overexposed or underexposed local areas in the stone image;

[0014] The grayscale conversion process involves using a weighted average method to convert the RGB color image to grayscale. The grayscale conversion method is as follows:

[0015] f(i,j)=0.3R(i,j)+0.59G(i,j)+0.11B(i,j)

[0016] in:

[0017] f(i,j) represents the gray value at position (i,j) after grayscale conversion;

[0018] R(i,j), G(i,j), and B(i,j) represent the values ​​of the three channels at position (i,j) in the color image of the stone, respectively.

[0019] The bilateral filtering is used to eliminate noise introduced during image digitization; the bilateral filtering process is as follows:

[0020] In bilateral filtering, the value g(i,j) at position (i,j) depends on the pixel value f(kl) at the neighboring point position (k,l) and the weighted combination of the weight coefficient ω between the corresponding neighboring point (k,l) and the center point (i,j):

[0021]

[0022] The weighting coefficient v(i, j, k, l) is the product of the spatial domain kernel d and the value domain kernel r. The expression for the weighting coefficient ω(i, j, k, l) is:

[0023] ω(i,j,k,l)=d(i,j,k,l)×r(i,j,k,l)

[0024] in:

[0025] The spatial kernel d is represented by the Euclidean distance between a point (k, l) in the neighborhood and the center point (i, j), where Set parameters:

[0026]

[0027] The range kernel r represents the absolute value of the difference between the gray value f(kl) of the neighboring point (k, l) and the gray value f(kl) of the center point (i, j), where Set parameters:

[0028]

[0029] Preferably, the instance segmentation model used in step 3) of this invention is Mask-RCNN.

[0030] Preferably, the specific implementation of step 4) in this invention is as follows:

[0031] 4.1) Extract the mask quantification index and shape feature parameters from the mask information of stone particles;

[0032] 4.2) The particle size and volume of the stone are converted by the mask quantization index and shape feature parameters obtained in step 4.1) using a particle size and volume conversion algorithm.

[0033] Preferably, the mask quantization indices used in step 4.1) of the present invention include the perimeter of the mask edge contour, the minimum bounding rectangle of the stone particles, and the convex hull of the stone particles.

[0034] In step 4.1), the shape characteristic parameters include flatness and elongation; the flatness is the ratio of the thickness of the stone particle to the width of the stone particle; the elongation is the ratio of the width of the stone particle to the length of the stone particle.

[0035] Preferably, the method for calculating the perimeter of the mask edge contour used in this invention is as follows: Assume there are n points constituting the edge contour, and the coordinates of the points are represented by (x... i y i If we use ) to represent the perimeter P of the stone particles, then the perimeter P can be expressed as:

[0036]

[0037] The method for calculating the area S of the stone particle mask is as follows:

[0038]

[0039] The minimum bounding rectangle of the stone particles is calculated as follows:

[0040] Suppose the point set of the stone outline is Q = {(x1, y1), (x2, y2), ..., (x...} n y n )}, calculate the convex hull of the stone profile, and obtain the point set Q′={(x′1,y′1), (x′2,y′2), …,(x′1,y′1), {(x′2,y′2), …,(x′2,y′2), { ... n y′ n)}, calculate the center of the convex hull set. in:

[0041] and These are the average values ​​of the x and y coordinates of all points, respectively.

[0042] Perform coordinate transformation on each point in the convex hull set to obtain a new point set Q″={(x″1,y″1), (x″2,y″2), …,(x″1,y″2) ,…,(x″2 ... n ,y″ n )},

[0043] in:

[0044]

[0045] Construct a new point set Q″ into a matrix M, where M is expressed as:

[0046]

[0047] Singular value decomposition of matrix M using the least squares method yields the right singular vector matrix V:

[0048] M=UΣV T

[0049] in:

[0050] U and V are orthogonal matrices;

[0051] ∑ is a diagonal matrix;

[0052] The last column of matrix V is the normal vector v for calculating the minimum bounding rectangle of the stone outline. The rotation angle angel is calculated using the normal vector v. Assuming θ is the polar coordinate angle of v, the rotation angle is:

[0053]

[0054] Calculate the width and height of the bounding rectangle of the convex hull point set in the rotated coordinate system, and then obtain the minimum bounding rectangle of the mask;

[0055] The shape characteristic parameters are obtained by dividing the stone into particle size ranges, using vernier calipers to measure the length, width, and thickness of stone particles in different particle size ranges, and calculating the average flatness and average elongation of stone particles in each particle size range based on the thickness, width, and thickness of stone particles in each particle size range.

[0056] Preferably, the specific method of measurement is as follows: find the plane where the maximum projected area of ​​the particle is located, measure the distance between the two largest points on the plane outline as the length of the stone particle; measure the distance between the two largest points in the direction perpendicular to the length within the outline as the width of the stone particle; and measure the distance between the two largest points of the particle perpendicular to this plane as the thickness of the stone particle.

[0057] Preferably, the specific implementation of the stone particle size conversion in step 4.2) of the present invention is as follows: the second length of the stone particle is taken as the particle size of the stone particle, wherein the second length of the stone particle is the width of the smallest bounding rectangle of the stone particle when it is placed in the manner of maximizing the horizontal projected area.

[0058] The specific implementation method for stone volume conversion in step 4.2) is as follows:

[0059] The volume conversion formula for each particle size range is as follows:

[0060]

[0061] in:

[0062] V i This represents the volume of the i-th stone particle within the current particle size range;

[0063] n represents the total number of stone particles within the current particle size range;

[0064] S i This represents the mask area of ​​the i-th stone particle within the current particle size range.

[0065] Preferably, the formula for calculating the gradation of three-dimensional stone particles in step 5) of the present invention is as follows:

[0066]

[0067] in:

[0068] GIR is the ratio of the total mass of stone particles in each particle size range to the total mass of all stone particles in the image;

[0069] ρ is the density of the stone particles;

[0070] N represents the total number of all stone particles;

[0071] n represents the total number of stone particles within the current particle size range;

[0072] V i This represents the volume of the i-th stone particle within the current particle size range;

[0073] V kThis represents the volume of the k-th stone particle across all particle sizes.

[0074] S i This represents the mask area of ​​the i-th stone particle within the current particle size range;

[0075] S k This represents the mask area of ​​the k-th stone particle across all particle sizes.

[0076] Preferably, the specific implementation of step 6) in this invention is as follows:

[0077] 6.1) The mass percentage at each characteristic particle size in the three-dimensional overall state is inferred by weighted summation of the mass percentages at each characteristic particle size in the apparent stone surface. The corrected formula for calculating the mass percentage of each characteristic particle size is as follows:

[0078]

[0079] in:

[0080] This is expressed as the corrected mass percentage for the characteristic particle size d0;

[0081] l represents the number of characteristic particle sizes;

[0082] λ i The weighting coefficient for the i-th feature particle size;

[0083] z i Characteristic particle size d i The mass percentage before correction;

[0084] Among them, the weighting coefficients are the predicted values ​​that satisfy the condition at d0. The set of optimal coefficients that minimizes the difference from the true value z0, i.e. Simultaneously satisfying unbiased estimation Where Var and E are the variance and expected value, respectively;

[0085] 6.2) Based on the constraints of minimizing variance and satisfying unbiased estimation, the weighting coefficient λ is obtained using the Lagrange multiplier method. i The calculation formula is:

[0086]

[0087] in:

[0088] r ij Let be the semivariance function, expressed as

[0089] λ is the Lagrange multiplier;

[0090] 6.3) Assume rij The particle size difference d with each characteristic particle size ij Regarding this, using a spherical model to fit this relationship yields the functional relationship r = r(d). Therefore, for any two points d... i d j By calculating the difference d between the two points ij The semivariance function r is calculated through functional relationships. ij Through the weighting coefficient λ i The calculation formula and the formula for calculating the mass percentage of each characteristic particle size after correction are used to obtain the corrected three-dimensional gradation curve of the stone.

[0091] A rockfill gradation detection device for implementing the image segmentation algorithm-based rockfill gradation detection method as described above, characterized in that: the rockfill gradation detection device includes an image acquisition module, an image recognition module, a conversion module, and a gradation curve drawing module.

[0092] The image acquisition module is used to acquire images of the stone particles to be detected;

[0093] The image recognition module is used to perform image preprocessing on the captured stone particle images and input them into the instance segmentation model to obtain stone particle images with mask information of stone particles through the instance segmentation model.

[0094] The conversion module is used to extract mask quantization indicators and shape feature parameters from stone particle images, and to convert the extracted feature parameters into particle size and total volume of stone within each particle size range.

[0095] The gradation curve plotting module converts the extracted shape feature parameters into stone particle size and volume, which are then converted into apparent gradation of the stone. The apparent gradation is then corrected using a data fusion model to obtain the three-dimensional overall gradation curve of the stone.

[0096] The beneficial effects of this invention are:

[0097] This invention provides a method and apparatus for detecting the gradation of riprap based on an image segmentation algorithm. The method includes: 1) acquiring an image of the stone particles after paving; 2) preprocessing the stone image acquired in step 1); 3) inputting the preprocessed image into an instance segmentation model to obtain the mask information of the stone particles; 4) extracting the mask quantization index and shape feature parameters from the mask information of the stone particles, and converting the mask quantization index and shape feature parameters into particle size and total volume of stone within each particle size range; 5) converting the stone particle size and volume obtained in step 4) into a three-dimensional stone particle gradation and plotting the apparent gradation curve of the stone particles; 6) correcting the apparent gradation curve of the stone particles obtained in step 5) through a data fusion model to obtain the final three-dimensional overall gradation curve of the stone particles. The image segmentation algorithm-based method for detecting gradation of riprap provided by this invention can standardize the paving process of stone materials, significantly improving detection stability. It exhibits good adaptability and stability for stone particles with a large size range, capable of detecting particles between 5-300mm in diameter. Furthermore, the entire detection process requires minimal manual intervention, is simple and quick, and enables real-time detection of stone materials without affecting the filling process. Simultaneously, the device provided by this invention overcomes the problem of stone materials being obscured in a stacked state. The detection process involved in this invention is simple, highly adaptable, requires no special detection environment, and can be fully applied to actual engineering sites. In summary, the image segmentation algorithm-based method and apparatus for detecting the gradation of riprap provided by this invention can achieve rapid gradation detection of riprap. For the problem that the segmentation model cannot simultaneously and accurately segment both large-diameter and small-diameter stones, a mask threshold fusion algorithm is used to fuse the accurately identified portions of stone images from different sampling resolutions, ultimately reflecting this in the detection results. Furthermore, a data fusion model is used to correct the apparent gradation of the stones, obtaining the overall three-dimensional gradation. Results show that the sieve analysis test verification group has a better fit. This invention can rapidly spread stacked stones and quickly standardize the spreading process, improving the stability of the recognition results of subsequent recognition and gradation conversion modules. Moreover, this apparatus requires minimal human intervention and has simple procedures throughout the entire process from image acquisition to gradation detection, enabling real-time stone spreading, detection, and loading without affecting the filling and transportation of riprap. Attached Figure Description

[0098] Figure 1 This is a flowchart of the gradation detection method for riprap based on image segmentation algorithm provided by the present invention.

[0099] Figure 2 This is a graph showing the gradation detection of riprap based on an image segmentation algorithm provided by the present invention. Detailed Implementation

[0100] See Figure 1This invention provides a method for detecting the gradation of riprap based on an image segmentation algorithm, comprising the following steps:

[0101] 1) Obtain images of the stone particles after paving;

[0102] 2) Preprocess the stone image obtained in step 1); the preprocessing includes histogram equalization, bilateral filtering and grayscale conversion; through preprocessing, the original image is freed from overly dark and overexposed parts, some features of the stone are unified and noise mixed in during image digitization is eliminated.

[0103] Histogram equalization can rearrange the brightness values ​​of overexposed or underexposed local areas in a stone image. Overexposure and underexposedness are caused by the excessive concentration of brightness values ​​of pixels in the area. This operation makes the brightness distribution more uniform, ultimately making the regional features more obvious.

[0104] To avoid interference from different stone characteristics on subsequent segmentation results, grayscale processing is performed on the RGB color image using a weighted average method. Since the human eye is most sensitive to green and least sensitive to blue, a more reasonable grayscale image is obtained by weighted averaging the RGB components using the following formula:

[0105] f(i,j)=0.3R(i,j)+0.59G(i,j)+0.11B(i,j)

[0106] in:

[0107] f(i,j) represents the gray value at position (i,j) after grayscale conversion;

[0108] R(i,j), G(i,j), and B(i,j) represent the values ​​of the three channels at position (i,j) in the color image of the stone, respectively.

[0109] Bilateral filtering is used to eliminate noise introduced during image digitization, meeting the requirements of image processing. Given the characteristics of stone images, it's necessary to denoise the image while preserving edge information. Therefore, bilateral filtering can remove noise while simultaneously preserving important edges, textures, and details. The processing method of bilateral filtering is as follows:

[0110] In bilateral filtering, the value g(i,j) at position (i,j) depends on the pixel value f(kl) at the neighboring point position (k,l) and the weighted combination of the weight coefficient ω between the corresponding neighboring point (k,l) and the center point (i,j):

[0111]

[0112] The weighting coefficient ω(i, j, k, l) is the product of the spatial domain kernel d and the range kernel r. The expression for the weighting coefficient ω(i, j, k, l) is:

[0113] ω(i,j,k,l)=d(i,j,k,l)×r(i,j,k,l)

[0114] in:

[0115] The spatial kernel d is represented by the Euclidean distance between a point (k, l) in the neighborhood and the center point (i, j), where Set parameters:

[0116]

[0117] The range kernel r represents the absolute value of the difference between the gray value f(kl) of the neighboring point (k, l) and the gray value f(kl) of the center point (i, j), where Set parameters:

[0118]

[0119] 3) Input the preprocessed image into the instance segmentation model to obtain the mask information of the stone particles, i.e., the image of the particle outline information; for example, the instance segmentation model can be Mask-RCNN. Due to the need for real-time detection of stone particle gradation, the speed requirement for rapid identification of stone outlines in stone images and generation of masks is high. Therefore, the Mask-RCNN model, which is suitable for instance segmentation, is selected because it meets the speed requirements and has high accuracy.

[0120] 4) Extract the mask quantization index and shape feature parameters from the mask information of the stone particles, and convert the mask quantization index and shape feature parameters to particle size and total stone volume within each particle size range; specifically:

[0121] 4.1) Extract the mask quantization index and shape feature parameters from the mask information of the stone particles; wherein, the mask quantization index includes the perimeter of the mask edge contour, the minimum bounding rectangle of the stone particles, and the convex hull of the stone particles; the shape feature parameters include flatness and elongation; flatness is the ratio of the thickness of the stone particles to the width of the stone particles; elongation is the ratio of the width of the stone particles to the length of the stone particles.

[0122] The perimeter of the mask edge contour is calculated as follows: Assume there are n points constituting the edge contour, and the coordinates of these points are represented by (x, y, y). i y i If we use ) to represent the perimeter p of the stone particles, then the perimeter p of the stone particles can be expressed as:

[0123]

[0124] The method for calculating the area S of the stone particle mask is as follows:

[0125]

[0126] The minimum bounding rectangle of the stone particles is calculated as follows:

[0127] Suppose the point set of the stone outline is Q = {(x1, y1), (x2, y2), ..., (x...} n y n )}, calculate the convex hull of the stone profile, and obtain the point set Q′={(x′1,y′1), (x′2,y′2), …,(x′1,y′1), {(x′2,y′2), …,(x′2,y′2), { ... n y′ n )}, calculate the center of the convex hull set. in:

[0128] and These are the average values ​​of the x and y coordinates of all points, respectively.

[0129] Perform coordinate transformation on each point in the convex hull set to obtain a new point set Q″={(x″1,y″1), (x″2,y″2), …,(x″1,y″2) ,…,(x″2 ... n ,y″ n )},

[0130] in:

[0131]

[0132] Construct the new point set W″ into a matrix M, and the expression for M is:

[0133]

[0134] Singular value decomposition of matrix M using the least squares method yields the right singular vector matrix V:

[0135] M=UΣV T

[0136] in:

[0137] U and V are orthogonal matrices;

[0138] ∑ is a diagonal matrix;

[0139] The last column of matrix V is the normal vector v for calculating the minimum bounding rectangle of the stone outline. The rotation angle angel is calculated using the normal vector v. Assuming θ is the polar coordinate angle of v, the rotation angle is:

[0140]

[0141] Calculate the width and height of the bounding rectangle of the convex hull point set in the rotated coordinate system, and then obtain the minimum bounding rectangle of the mask;

[0142] The shape characteristic parameters are obtained by dividing the stone into particle size ranges. This invention uses particle size ranges of 5–10 mm, 10–20 mm, 20–40 mm, 40–60 mm, 60–80 mm, 80–100 mm, 100–150 mm, and 150–300 mm. Vernier calipers are used to measure the length, width, and thickness of the stone particles within each particle size range. Based on the thickness, width, and thickness of the stone particles within each particle size range, the average flatness and average elongation of the stone particles within each range are calculated.

[0143] For example, the specific measurement method used in this invention is as follows: find the plane where the maximum projected area of ​​the particle is located, and measure the distance between the two largest points on the plane contour as the length of the stone particle; in the direction perpendicular to the length within the contour, measure the distance between the two largest points as the width of the stone particle; perpendicular to this plane, measure the distance between the two largest points of the particle as the thickness of the stone particle.

[0144] 4.2) The particle size and volume of the stone are converted by the mask quantization index and shape feature parameters obtained in step 4.1) using a particle size and volume conversion algorithm.

[0145] The specific implementation method for converting the particle size of stone is as follows: the second length of the stone particle is taken as the particle size of the stone particle. The second length of the stone particle is the width of the smallest bounding rectangle of the stone particle when it is placed in the way of maximizing the horizontal projected area.

[0146] The specific method for converting the volume of stone is as follows:

[0147] The volume conversion formula for each particle size range is as follows:

[0148]

[0149] in:

[0150] V i This represents the volume of the i-th stone particle within the current particle size range;

[0151] n represents the total number of stone particles within the current particle size range;

[0152] S i This represents the mask area of ​​the i-th stone particle within the current particle size range.

[0153] 5) Convert the stone particle size and volume obtained in step 4) into a three-dimensional stone particle size distribution and plot the apparent size distribution curve of the stone particles; wherein, the formula for calculating the size distribution of the three-dimensional stone particles is:

[0154]

[0155] in:

[0156] GIR is the ratio of the total mass of stone particles in each particle size range to the total mass of all stone particles in the image;

[0157] ρ is the density of the stone particles;

[0158] N represents the total number of all stone particles;

[0159] n represents the total number of stone particles within the current particle size range;

[0160] V i This represents the volume of the i-th stone particle within the current particle size range;

[0161] V k This represents the volume of the k-th stone particle across all particle sizes.

[0162] S i This represents the mask area of ​​the i-th stone particle within the current particle size range;

[0163] S k This represents the mask area of ​​the k-th stone particle across all particle sizes.

[0164] 6) Using the Kriging interpolation algorithm as the correction model and the spherical model as the fitting model, the apparent gradation curve of the stone particles obtained in step 5) is corrected to obtain the final three-dimensional overall gradation curve of the stone particles, specifically:

[0165] 6.1) The mass percentage at each characteristic particle size in the three-dimensional overall state is inferred by weighted summation of the mass percentages at each characteristic particle size in the apparent stone surface. The corrected formula for calculating the mass percentage of each characteristic particle size is as follows:

[0166] Specifically, calculate the difference d between all characteristic particle sizes. ij This method uses 9 feature particle sizes, resulting in 36 different differences. A scatter plot of the difference-semivariance is plotted, and a spherical model is used as the fitting model. The semivariance function value is calculated using the fitting model, and the weighting coefficients are calculated using the following formula:

[0167]

[0168] After obtaining the nine weighting coefficients, the pass rate at each characteristic particle size of the corrected stone is calculated using the following formula:

[0169]

[0170] in:

[0171] This is expressed as the corrected mass percentage for the characteristic particle size d0;

[0172] l represents the number of characteristic particle sizes;

[0173] λ i The weighting coefficient for the i-th feature particle size;

[0174] z i Characteristic particle size d i The mass percentage before correction;

[0175] Among them, the weighting coefficients are the predicted values ​​that satisfy the condition at d0. The set of optimal coefficients that minimizes the difference from the true value z0, i.e. Simultaneously satisfying unbiased estimation Where Var and E are the variance and expected value, respectively;

[0176] 6.2) Based on the constraints of minimizing variance and satisfying unbiased estimation, the weighting coefficient λ is obtained using the Lagrange multiplier method. i The calculation formula is:

[0177]

[0178] in:

[0179] r ij Let be the semivariance function, expressed as

[0180] λ is the Lagrange multiplier;

[0181] 6.3) Assume r ij The particle size difference d with each characteristic particle size ij Regarding this, using a spherical model to fit this relationship yields the functional relationship r = r(d). Therefore, for any two points d... i d j By calculating the difference d between the two points ij The semivariance function r is calculated through functional relationships. ij Through the weighting coefficient λ i The calculation formula and the formula for calculating the mass percentage of each characteristic particle size after correction are used to obtain the corrected three-dimensional gradation curve of the stone.

[0182] See Figure 2The gradation from the sieving test can be regarded as the standard value. The gradation directly obtained by surface image recognition is the apparent gradation. The gradation corrected by the Kriging interpolation algorithm is the data fusion corrected gradation. The corrected gradation matches the sieving results well.

[0183] Example 1:

[0184] The method for detecting the gradation of riprap provided by this invention specifically includes:

[0185] The image acquisition module of this device is used to acquire images of stone particles. Specifically, the baffle at the bottom of the chute is first fixed, and the piled stone slides down from the top until it stops stably at the bottom of the baffle. Then, the remote shooting program of the industrial camera is used to automatically acquire images of the piled stone.

[0186] The acquired stone particle images are preprocessed, specifically by performing histogram equalization, grayscale conversion, and bilateral filtering on the captured images to eliminate overly dark and overexposed parts of the original image, unify some features of the stone, and eliminate noise introduced during image digitization.

[0187] The preprocessed stone image is input into the instance segmentation model to obtain the mask information of the stone particles, i.e., the image of the particle contour information.

[0188] The contour information of the stone particles is analyzed using mask quantization metrics and shape feature parameters. Specifically, the shape feature parameters are measured and statistically analyzed using calipers to measure the length, width, and thickness of the stone particles. The measurement method is as follows: first, the plane containing the maximum projected area of ​​the particle is located, and the distance between the two largest points on the plane contour is measured as the particle length; then, the distance between the two largest points perpendicular to the length within the contour is measured as the particle width; finally, the distance between the two largest points perpendicular to this plane is measured as the particle thickness. The mask quantization metrics include: the perimeter of the stone particle mask, the convex hull of the stone particle mask, the length of the minimum bounding rectangle of the stone particle mask, the width of the minimum bounding rectangle of the stone particle mask, and the area of ​​the stone particle mask. The mask quantization metrics are extracted by traversing the stone particle masks in the image according to the calculation formula.

[0189] The extracted mask quantification indicators are converted to volume. The stone particle size and volume obtained after converting the extracted feature parameters to particle size and volume are converted into apparent stone gradation. Specifically, the stone particle size is arranged from largest to smallest. This invention uses 300mm, 150mm, 100mm, 80mm, 60mm, 40mm, 20mm, 10mm, and 5mm as boundaries, starting from the stone in sequence 1 and ending at each boundary. The volume of all stones within this range is summed and divided by the sum of all stone volumes to calculate the throughput of each particle size boundary point. The horizontal axis of the gradation curve represents the stone particle size, and the vertical axis represents the throughput of stones passing through that particle size. The positions of each boundary point can be plotted, and adjacent points can be connected with straight lines.

[0190] Kriging interpolation was used as the data fusion model, and a spherical model was used as the fitting model to correct the apparent gradation of the stone to obtain the true gradation. Specifically, the difference d between all characteristic particle sizes was calculated. ij This invention uses 9 characteristic particle sizes, resulting in 36 different differences. A scatter plot of the difference-semivariance is plotted, and a spherical model is used as the fitting model. The semivariance function value is calculated using the fitting model, and the weighting coefficients are calculated using the following formula:

[0191]

[0192] After obtaining the nine weighting coefficients, the pass rate at each characteristic particle size of the corrected stone is calculated using the following formula:

[0193]

[0194] Example 2:

[0195] The present invention also provides a riprap gradation detection device based on an image segmentation algorithm, the detection device comprising:

[0196] The image acquisition module uses an image acquisition device to acquire images of the stone particles to be detected;

[0197] This module mainly consists of a chute with a sliding rail and an industrial camera and its support frame. The support frame is placed on the sliding rail, allowing images to be captured from any position inside the chute. Stone slides out from the top of the chute, and a switchable baffle is located at the bottom. After settling at the bottom, it forms a distinctive pattern of paved stone, allowing images to be captured. After capturing the images, the stone can be collected through the bottom baffle switch. The conversion factor between the actual size of the stone and the pixel size of the stone image is automatically calculated based on the height of the shooting pole.

[0198] The image recognition module performs image preprocessing on the captured stone particle images and inputs them into the instance segmentation model. The model then obtains stone particle images with masks, i.e. stone particle images containing segmentation contours.

[0199] The industrial camera is connected to the computer via wired or wireless means. Depending on the needs of the engineering site, the image can be quickly transmitted to the computer and input into the instance segmentation model for contour recognition to obtain the mask information of the stone particles.

[0200] The particle size and volume conversion module performs mask quantization on the contour information of stone particles and extracts shape feature parameters, and converts the extracted feature parameters into particle size and total volume of stone within each particle size range.

[0201] Export the stone mask image, and calculate the particle size and volume of each stone in the image by running the program that performs the above-mentioned tasks.

[0202] The gradation curve plotting module converts the extracted feature parameters into stone particle size and volume, which are then converted into apparent gradation of the stone. The apparent gradation is then corrected by a data fusion model to obtain the three-dimensional overall gradation curve of the stone.

Claims

1. A method for detecting the gradation of riprap based on image segmentation algorithm, characterized in that: The method for detecting the gradation of riprap can detect stone particles with a particle size between 5-300 mm, and includes the following steps: 1) Obtain images of the stone particles after paving. The specific process is as follows: First, fix the switchable baffle plate at the bottom of the chute. The piled stone slides down from the top until it stops at the bottom of the baffle plate, forming a paved stone with certain characteristics. The stone image is automatically obtained using the remote photography program of the industrial camera. 2) Preprocess the stone image obtained in step 1); the preprocessing includes histogram equalization, bilateral filtering, and grayscale conversion; The histogram equalization can rearrange the brightness values ​​of overexposed or underexposed local areas in the stone image; The grayscale conversion process involves using a weighted average method to convert the RGB color image to grayscale. The grayscale conversion method is as follows: f(i,j)=0.3R(i,j)+0.59G(i,j)+0.11B(i,j) in: f(i,j) represents the gray value at position (i,j) after grayscale conversion; R(i,j), G(i,j), and B(i,j) represent the values ​​of the three channels at position (i,j) in the color image of the stone, respectively. The bilateral filtering is used to eliminate noise introduced during image digitization; the bilateral filtering process is as follows: In bilateral filtering, the value g(i,j) at position (i,j) depends on the pixel value f(k,l) within the neighborhood point (k,l) and the weighted combination of the weight coefficient ω between the corresponding neighborhood point (k,l) and the center point (i,j): The weighting coefficient ω(i, j, k, l) is the product of the spatial domain kernel d and the value domain kernel r. The expression for the weighting coefficient ω(i, j, k, l) is: ω(i,j,k,l)=d(i,j,k,l)×r(i,j,k,l) in: The spatial kernel d is represented by the Euclidean distance between a point (k,l) in the neighborhood and the center point (i,j), where To set parameters: The range kernel r represents the absolute value of the difference between the gray value f(kl) of the neighboring point (k, l) and the gray value f(kl) of the center point (i, j), where Set parameters: 3) Input the preprocessed image into the instance segmentation model to obtain the mask information of the stone particles; the instance segmentation model is Mask-RCNN; 4) Extract the mask quantization index and shape feature parameters from the mask information of the stone particles, and convert the mask quantization index and shape feature parameters into particle size and total stone volume within each particle size range; the specific implementation method is as follows: 4.1) Extract the mask quantization index and shape feature parameters from the mask information of the stone particles; the mask quantization index includes the perimeter of the mask edge contour, the minimum bounding rectangle of the stone particles, and the convex hull of the stone particles. The perimeter of the mask edge contour is calculated as follows: Assume there are n points constituting the edge contour, and the coordinates of the points are represented by (x, y, y). i y i If we use ) to represent the perimeter P of the stone particles, then the perimeter P can be expressed as: The method for calculating the area S of the stone particle mask is as follows: The minimum bounding rectangle of the stone particles is calculated as follows: Suppose the point set of the stone outline is Q = {(x1, y1), (x2, y2), ..., (x...} n y n )}, calculate the convex hull of the stone profile, and obtain the point set Q′={(x′1,y′1), (x′2,y′2), …,(x′1,y′1), {(x′2,y′2), …,(x′2,y′2), { ... n y′ n )}, calculate the center of the convex hull set. in: and These are the average values ​​of the x and y coordinates of all points, respectively. Perform coordinate transformation on each point in the convex hull set to obtain a new point set Q″={(x″1,y″1), (x″2,y″2), …,(x″1,y″2) ,…,(x″2 ... n ,y″ n )}, in: Construct a new point set Q″ into a matrix M, where M is expressed as: Singular value decomposition of matrix M using the least squares method yields the right singular vector matrix V: M=UΣV T in: U and V are orthogonal matrices; ∑ is a diagonal matrix; The last column of matrix V is the normal vector v for calculating the minimum bounding rectangle of the stone outline. The rotation angle angel is calculated using the normal vector v. Assuming θ is the polar coordinate angle of v, the rotation angle is: Calculate the width and height of the bounding rectangle of the convex hull point set in the rotated coordinate system, and then obtain the minimum bounding rectangle of the mask; The shape characteristic parameters include flatness and elongation; the flatness is the ratio of the thickness of the stone particle to the width of the stone particle; the elongation is the ratio of the width of the stone particle to the length of the stone particle; the shape characteristic parameters are obtained by dividing the stone particle size range, measuring the length, width and thickness of the stone particles in different size ranges using vernier calipers, and calculating the average flatness and average elongation of the stone particles in each size range based on the length, width and thickness of the stone particles in each size range. The specific measurement method is as follows: find the plane where the maximum projected area of ​​the particle is located, and measure the distance between the two largest points on the plane outline as the length of the stone particle; measure the distance between the two largest points in the direction perpendicular to the length within the outline as the width of the stone particle; measure the distance between the two largest points of the particle perpendicular to this plane as the thickness of the stone particle. 4.2) The mask quantization index and shape characteristic parameters obtained in step 4.1) are converted into stone particle size and volume using a particle size and volume conversion algorithm; the converted stone particle size and volume are the apparent gradation of the stone. The specific implementation method for converting the particle size of the stone is as follows: the second length of the stone particle is taken as the particle size of the stone particle. The second length of the stone particle is the width of the smallest bounding rectangle of the stone particle when it is placed in the manner of maximizing the horizontal projected area. The specific implementation method for stone volume conversion in step 4.2) is as follows: The volume conversion formula for each particle size range is as follows: in: V i This represents the volume of the i-th stone particle within the current particle size range; n represents the total number of stone particles within the current particle size range; S i This represents the mask area of ​​the i-th stone particle within the current particle size range; 5) Based on the stone particle size and volume obtained in step 4), convert them into three-dimensional stone particle size distribution and plot the apparent size distribution curve of the stone particles; The formula for calculating the three-dimensional stone particle size distribution is as follows: in: GIR is the ratio of the total mass of stone particles in each particle size range to the total mass of all stone particles in the image; ρ is the density of the stone particles; N represents the total number of all stone particles; n represents the total number of stone particles within the current particle size range; V k This represents the volume of the k-th stone particle across all particle sizes. S i This represents the mask area of ​​the i-th stone particle within the current particle size range; S k This represents the mask area of ​​the k-th stone particle across all particle sizes. 6) Using the Kriging interpolation algorithm as the correction model and the spherical model as the fitting model, the apparent gradation curve of the stone particles obtained in step 5) is corrected to obtain the final three-dimensional overall gradation curve of the stone particles; the specific implementation method is as follows: 6.1) The mass percentage at each characteristic particle size in the three-dimensional overall state is inferred by weighted summation of the mass percentages at each characteristic particle size in the apparent stone surface. The corrected formula for calculating the mass percentage of each characteristic particle size is as follows: Calculate the difference d for all characteristic particle sizes ij The aforementioned method for detecting the gradation of riprap aggregate uses nine characteristic particle sizes: 300mm, 150mm, 100mm, 80mm, 60mm, 40mm, 20mm, 10mm, and 5mm as boundaries, resulting in 36 different differences. A scatter plot of the differences versus semivariance is plotted, and a spherical model is used as the fitting model. The semivariance function value is calculated using the fitting model, and the weighting coefficients are calculated using the following formula: After obtaining the nine weighting coefficients, the pass rate at each characteristic particle size of the corrected stone is calculated using the following formula: in: This is expressed as the corrected mass percentage for the characteristic particle size d0; l represents the number of characteristic particle sizes; λ i The weighting coefficient for the i-th feature particle size; z is the characteristic particle size d i The mass percentage before correction; Among them, the weighting coefficients are the predicted values ​​that satisfy the condition at d0. The set of optimal coefficients that minimizes the difference from the true value z0, i.e. Simultaneously satisfying unbiased estimation Where Var and E are the variance and expected value, respectively; 6.2) Based on the constraints of minimizing variance and satisfying unbiased estimation, the formula for calculating the weighting coefficient λi using the Lagrange multiplier method is as follows: in: r ij Let be the semivariance function, expressed as λ is the Lagrange multiplier; 6.3) Assume r ij The particle size difference d with each characteristic particle size ij Regarding this, using a spherical model to fit this relationship yields the functional relationship r = r(d). Therefore, for any two points d... i d j By calculating the difference d between the two points ij The semivariance function r is calculated through functional relationships. ij Through the weighting coefficient λ i The calculation formula and the formula for calculating the mass percentage of each characteristic particle size after correction are used to obtain the corrected three-dimensional gradation curve of the stone.

2. A rockfill gradation detection device for implementing the image segmentation algorithm-based rockfill gradation detection method of claim 1, characterized in that: The gradation detection device for riprap includes an image acquisition module, an image recognition module, a conversion module, and a gradation curve plotting module; The image acquisition module is used to acquire images of the stone particles to be detected; The image recognition module is used to perform image preprocessing on the captured stone particle images and input them into the instance segmentation model to obtain stone particle images with mask information of stone particles through the instance segmentation model. The conversion module is used to extract mask quantization indicators and shape feature parameters from stone particle images, and to convert the extracted feature parameters into particle size and total volume of stone within each particle size range. The gradation curve plotting module converts the extracted shape feature parameters into stone particle size and volume, which are then converted into apparent gradation of the stone. The apparent gradation is then corrected using a data fusion model to obtain the three-dimensional overall gradation curve of the stone.

Citation Information

Patent Citations

  • Intelligent detection method for qualification of dam material of earth and rockfill dam based on digital image processing

    CN115147401A

  • Non-contact rockfill grain composition detection method and device based on machine vision

    CN117237303A

  • Stone grading detection method and device based on image recognition, medium and equipment

    CN118799349A