Background
The coarse-grained soil filler is used as an important component of a railway ballast bed and a roadbed and consists of coarse and fine particles with different sizes, the particle size range of the particles is large, the characteristic difference of the coarse and fine particles is large, the coarse and fine particles are generally in a single-particle structure, small particles fill gaps formed by large particles, the coarse-grained soil with good gradation has higher compactness than coarse-grained soil with poor gradation, and the coarse-grained soil is easier to compact during filling and rolling construction. The grading of coarse-grained soil greatly influences the service performances such as strength, stability, deformability, durability and the like of the railway track bed and the roadbed. Along with the rapid development of railway transportation industry, the aspects of construction, operation management, maintenance and repair of railway infrastructure tend to be more and more intelligent, grading is used as an important physical index of coarse-grained soil filler and is mainly determined by a manual or mechanical screening method for a long time, and along with the gradual introduction of an intelligent rolling technology and equipment in the filling process of a railway roadbed, how to identify the grading of the coarse-grained soil filler before and after rolling in real time, rapidly, intelligently, efficiently and accurately and predict the modulus, damping and other mechanical parameters of the coarse-grained soil filler, so that the real-time, intelligent and accurate evaluation of the rolling quality during filling construction is the key of the intelligent rolling and filling technology.
Currently, the grading of coarse-grained soil is mainly determined by a screening method, the coarse-grained soil needing to be graded is screened according to the size and the combination of sieve pores given by specifications, and the grading curve of the coarse-grained soil is determined according to the mass ratio of particles left on each sieve pore. Although the method is mature in technology, wide in application and simple in operation, the method is time-consuming and low in efficiency, coarse soil needs to be sampled and sieved, and the abrasion and crushing of coarse particles and the deformation of sieve pores in the sieving process can change the original grading of the coarse soil. During manual or mechanical screening, the filler is screened one by one according to the size sequence of the screen holes, the filler is required to continuously vibrate on the screen surface in the horizontal and vertical directions simultaneously, and filler particles smaller than the size of the screen holes pass through the screen holes until the mass of the filler particles passing through the screen holes is less than 0.1 percent of the residual mass on the screen surface within 1 min. When the sieve shaker is used for sieving, after the sieve shaker is used for sieving, the sieve is supplemented manually one by one, the sieved particles are merged into the next sieve and sieved together with the sample in the next sieve, and the sieving is sequentially carried out until all the sieves are sieved. It should be confirmed that the mass passing through the sieve holes within 1min is actually less than 0.1% of the residue on the sieve, the sieve residue on each sieve is weighed to the nearest 0.1% of the total mass, the percent of the net residue on the basis of the total mass is nearest 0.1%, the cumulative percent of the net residue is nearest 0.1%, and the percent passing through each sieve is nearest 0.1%. Grading is plotted against the cumulative percent pass of each mesh to determine the grading of the coarse soil. The screening method mainly has the following disadvantages:
(1) the conventional screening test needs to collect soil samples at different positions on the site for testing, can destroy the integrity and working state of the soil body on the site, is time-consuming and labor-consuming, and therefore cannot realize real-time, quick, efficient and intelligent identification of coarse-grained soil gradation during intelligent rolling of the railway roadbed.
(2) The screening test has long time consumption and low efficiency, and can not realize intelligent, automatic and quick identification and analysis.
(3) During the screening process, due to the vibration of the vibrating screen, part of coarse particles are broken, and the accuracy of the result is affected.
(4) The sieve mesh can take place certain degree deformation in long-time use, causes the experimental error.
With the continuous development of the technology, some filler gradation determination methods based on digital image recognition also appear. An image analysis method represented by Wipfrag software is generally used for measuring the particle size of the crushed stone, and finally, a grading curve is directly output. The main reason for the low precision is that the existence of more fine-grained soil causes certain interference to the analysis of coarse-grained soil. The ImageJ software can also perform image segmentation, and then calculate the particle size of each particle by using Excel, but the accuracy of the result is low, mainly because the image segmentation has large errors. In addition, the grading curve describes the relationship between the particle size and the particle mass, and the image analysis obtains the direct relationship between the particle size or the two-dimensional area of the particle and the number of the particles, and how to realize the conversion between the two relationships still needs to be solved.
The digital image analysis method is highly dependent on the precision of image processing algorithms (such as denoising, segmentation and the like), is easily influenced by complex and variable conditions (such as particle color, particle overlapping, particle shielding, illumination conditions, particle shadow, water-containing state and the like) of field filling, and still has the technical problem of universality and precision. Therefore, in order to avoid the problems, the patent innovatively provides an image matching method independent of an image processing algorithm, and automatic identification of coarse-grained soil filler gradation is achieved.
Disclosure of Invention
Aiming at the problems of long time consumption, field state disturbance, need of manual intervention or dependence on an accurate image processing algorithm and the like in the existing grading determination, the invention provides an automatic identification method and system for grading of coarse-grained soil fillers based on image matching, so that the grading of the coarse-grained soil fillers before and after roadbed filling and rolling can be identified rapidly, intelligently, efficiently and accurately in real time.
In order to achieve the aim, the invention provides an automatic identification method of coarse-grained soil roadbed filler gradation based on image matching, which comprises the following steps:
s1, collecting filler images containing coarse soil particles with various particle sizes, forming coarse soil particle identification templates with various particle sizes, and constructing a template library;
s2, collecting filler images containing various grades, matching each filler image with the coarse-grained soil particle identification template in the template library to obtain the grain size, distribution and shape category of coarse-grained soil particles in the filler images, drawing a grading curve, and storing filler information and the grades into the grading library;
s3 packaging the grading library and executing the program of S2;
s4, collecting the filling image of roadbed filling and rolling construction site roadbed, and obtaining the grading result and grading curve of filling image of construction site after processing by packaging program.
Further, the coarse soil grain identification templates of various grain sizes are circular templates generated by a Gimp open source program.
Further, the particle size and grading and shape classification of the coarse soil particles in the filler image are obtained in S2, including:
s21, detecting the optimal matching position of the filler image and each coarse-grained soil particle recognition template in the template library by adopting an OpenCV function, matching, deleting and storing a matching area from the filler image if matching is successful, and recording the position of the matching area and the particle size of the matched coarse-grained soil particles;
s22 judging whether each filler image is enlarged to the maximum size, if yes, entering the step S23, and if not, enlarging the filler image and returning to the step S21;
s23, dividing the matched coarse-grained soil particle images into different shape types according to the shapes;
s24, counting the two-dimensional size of the single particle, estimating the third-dimensional size of the single particle according to the shape class, obtaining the volume of the single particle, and obtaining the mass of the single particle;
s25, calculating the size and mass distribution of all the particles, and outputting grading results and grading curves.
Further, S21 includes matching the new image generated after each particle size image is rotated by each angle with each coarse-grained soil particle recognition template, and selecting the template with the highest matching degree as the matching result.
Further, S21 further includes, if the matching is successful, acquiring more enlarged templates for matching, determining whether the acquired region overlaps with the additional storage region, if so, removing the overlapping portion, and enlarging the region; if the extracted region is visually observable without including a single intact grain, the culled region is retained and the portion of the expanded region is removed and the region is optimally filled with an open source Gimp program.
Further, S21 is preceded by detecting and excluding non-single particles or incompletely visible particles using the first neural network model; the first neural network model is trained by adopting a plurality of single complete particle samples and non-single complete particle samples which are labeled manually until the precision requirement of excluding non-single particles or incompletely visible particles in the image is met.
Further, the classification of S23 into different shape categories includes: adopting a second neural network model to divide the matched coarse soil particle images into different shape categories; the training of the second neural network model comprises: carrying out secondary manual marking on the matched particle images, and marking the shape types of the particles to form a type sample library; and training the second neural network model according to the arrangement of various coarse-grained soil particle images in the class sample library according to the particle size.
The invention provides a coarse-grained soil filler gradation automatic identification system based on image matching, which comprises an acquisition module and an identification module;
the acquisition module acquires a filler image of a roadbed filling and rolling construction site;
the identification module is used for automatically identifying the grading of the filler based on the image acquired by the acquisition module; the identification module comprises a template library, a first neural network model unit, a template matching unit, a second neural network model unit, a statistical unit, a grading calculation unit and a grading library; the template library is an identification template constructed by coarse soil particle images with various particle sizes; the first neural network model unit detects and excludes non-single particles or incompletely visible particles in the filler image; the template matching unit matches the filler image with templates in a template library, and if the matching is successful, the matching successful area is deleted from the filler image to obtain the particle size and distribution of coarse soil particles in the area; the second neural network model unit divides the matched coarse soil particle images into different shape categories; the statistical unit is used for counting the two-dimensional size of the single particle, estimating the third-dimensional size of the single particle according to the shape type, obtaining the volume of the single particle and solving the mass of the single particle; the grading calculation unit calculates and outputs a grading result and a grading curve corresponding to the filler image, and the grading result is stored in a grading library.
Further, the template in the template library is a circular template generated by adopting an open source Gimp program, and is used for matching and identifying various particle size particles in the coarse-grained soil filler image.
Further, the identification module construction includes:
s100, detecting the optimal matching position of the filler image and each coarse-grained soil identification template in a template library by adopting an OpenCV function, matching, deleting and storing a matching area from the filler image if matching is successful, and recording the position of the matching area and the grain size of the matched coarse-grained soil particles;
s200, judging whether each filler image is amplified to the maximum size, if so, entering the step S300, otherwise, amplifying the filler images and returning to the step S100;
s300, dividing the matched coarse soil particle images into different shape types according to the shapes;
s400, counting the two-dimensional size of the single particle, estimating the third-dimensional size of the single particle according to the shape class, obtaining the volume of the single particle, and solving the mass of the single particle;
s500, calculating the size and mass distribution of all particles, and outputting a grading result and a grading curve; s600, packaging all the execution programs of the S100 to the S500 to form the identification module.
The technical scheme of the invention has the following beneficial technical effects: the method and the system for automatically identifying the coarse-grained soil subgrade filler gradation based on image matching realize the segmentation and identification of single grains by establishing the matching template, have high automation degree, do not need to depend on a complex image processing algorithm, do not need human intervention, do not depend on the experience of operators, and have strong environmental adaptability and high precision.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings in conjunction with the following detailed description. It should be understood that the description is intended to be exemplary only, and is not intended to limit the scope of the present invention. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present invention.
The invention relates to an automatic identification method of coarse-grained soil filler gradation based on image matching, which is used for evaluating the distribution (namely gradation) of the size and the mass of all particles of coarse-grained soil filler. Grading is depicted in fig. 4 as a typical grading graph with the abscissa being the mesh size (or particle size) and the ordinate being the mass fraction of particles passing through (or having a particle size smaller than) each mesh. With reference to fig. 1, the automatic grading identification method specifically includes the following steps:
s1, collecting images of the coarse-grained soil filler with various grain size ranges, forming coarse-grained soil grain identification templates with various grain sizes, and constructing a template library.
Collecting images of coarse-grained soil fillers with different grades, and shooting the coarse-grained soil fillers with the same grade from different angles; images of the coarse-grained soil fillers with various gradations are shot according to different angles respectively, and an image library containing the coarse-grained soil fillers with various gradations and different angles is formed. Different parts of the same image may also be divided into a plurality of sub-images. Each picture (including the original picture and the segmented picture) contains reference information (e.g., a ruler, etc.) that can be used to calibrate the actual size of the picture area, identifying the true particle size of the particles. And (3) storing the real gradation of the coarse-grained soil filler and the three-dimensional size of the particles obtained by a screening test in advance before photographing, and verifying whether the model identification result is accurate or not in the follow-up process. In addition, images of coarse-grained soil fillers at different angles can also be obtained in a rotating manner.
The template used for image matching is manually generated by using an open source Gimp program, and after multiple tests, a circular template with circular symmetry characteristics is finally selected to eliminate directional influence; the circular templates collectively constitute source data in the template library.
S2, collecting filler images containing various grades, matching each filler image with the coarse-grained soil particle identification template in the template library to obtain the grain size, distribution and shape category of coarse-grained soil particles in the filler images, drawing a grading curve, and storing filler information and the grades into the grading library;
and shooting images of the coarse-grained soil fillers with various gradations according to different angles to form a coarse-grained soil filler image library containing various gradations and different angles. Different parts of the same image may also be divided into a plurality of sub-images. Each picture, including the original picture as well as the segmented picture, contains reference information, such as a ruler, that can be used to calibrate the actual size of the picture area.
Each identifiable particle in the image must be marked as a "single whole particle" or a "non-single whole particle" or "indeterminate". Once labeling is complete, the sample images required for subsequent machine learning model training can be simulated by rotation to take into account the orientation of the particles. And constructing an ML (maximum likelihood) model by adopting a machine learning technology, training the ML model through the marked image, automatically identifying all matched particle images into single complete particles or non-single complete particles by the trained ML model, and carrying out shape classification.
With reference to fig. 2, the specific steps of the template matching algorithm include:
s21, detecting the optimal matching position of the filler image and each coarse-grained soil particle recognition template in the template library by adopting an OpenCV function, matching, deleting the matching area from the image of the filler on the construction site and storing the matching area for other purposes if the matching is successful, and recording the position of the matching area and the particle size of the matched coarse-grained soil particles; further, S21 includes matching each particle size particle recognition template with each coarse-grained soil particle image in the filler image after rotating each particle size particle recognition template by each angle, and selecting the template with the highest matching degree as the matching result.
Further, S21 includes acquiring more enlarged template areas for matching if matching is successful, determining whether the acquired area overlaps with an earlier additionally stored area, and if so, removing the saved overlapping portion and classifying it as a larger area;
further, S21 includes if the extracted region has obvious deformity, i.e. the region can be judged by naked eyes not to be a single complete particle, keeping the removed region, deleting the part in the larger region, and optimally filling the region by using the open source Gimp program. Since the malformation of the particles indicates that the small particles are not part of the large particles but are a complete particle, the small particles removed in the upper operation are retained, while the incomplete part of the large particles is completed by the Gimp program.
The template matching process is performed by OpenCV functions. Each time the function is used, it detects the best matching position in the current image with the template, and returns a best matching position information corresponding to the template (for extracting the template from the template library) and a "matching quality" value. The "match quality" measures the degree of similarity between the particle in the current image and the matched template particle.
If the template match is successful, the matching regions (i.e., the individual particles that may match successfully) must be copied into the document and deleted in the image. Since if it is not deleted it will be found again in the next round of matching and the match repeated, the calculation will repeat this step forever.
This method does not find particles with a significantly smaller pixel count than the template pixel count, which limits the size of the smallest particle that can be found at a given image resolution.
Further, S21 is preceded by constructing a first neural network model using machine learning techniques to detect and exclude non-single particles or incompletely visible particles. The method comprises the specific steps of firstly establishing a machine learning first neural network model, firstly manually classifying and marking single particle images matched by a template as single complete particles or non-single complete particles, and then establishing a sample library required by a training model, wherein the trained first neural network model can be used for screening all matched particle images, so that the particle images of the non-single complete particles are ignored.
S22 judging whether each filler image is enlarged to the maximum size, if yes, entering the step S23, and if not, enlarging the filler image and returning to the step S21;
the filler image is gradually enlarged using the OpenCV function, and step S21 is repeated for each enlarged filler image until the filler image size is enlarged to the maximum possible size.
The enlarged maximum size of the filler image may specify a maximum value for the image (i.e., the maximum size of the coarse soil particles in the image) that may vary from input filler image to input filler image.
Enlarging the filler image ensures that identifiable particles in the image (i.e. larger than the minimum particle size as mentioned in 3) determined by resolution are all identified, i.e. any template size that is enlarged above the maximum enlargement size will not match any filler particles.
S23, dividing the matched coarse-grained soil particle images into different shape types according to the shapes;
further, S23 includes constructing a second neural network model using machine learning techniques, and classifying the filler particles matched by the template into different shape classes, where the shape classes are a classification method for describing and characterizing the appearance shape of the particles; the filler particles identified by template matching are arranged according to particle size, and the oversize screen size (i.e. the maximum screen size that the particles cannot pass through) of the particles is estimated according to particle size and shape classification. Firstly, the matched particles are artificially marked for the second time in the training process of the second neural network model, namely the shape categories of the particles are marked, such as circles, triangles, rectangles, slender shapes and the like, so that the trained second neural network model can accurately classify the shapes of the particles.
S24, counting the two-dimensional size of the single particle, estimating the third-dimensional size of the single particle according to the shape class, obtaining the volume of the single particle, and obtaining the mass of the single particle. The size of each particle is assigned a size according to the size of the matching template found, resulting in a two-dimensional size of the individual particles, the specific shape of the matched particles not being considered here. And estimating the size of the third dimension of the single particle according to the shape class to obtain the volume of the single particle. It should be noted that for long fine particles, this size will be the major axis length. When the particles are virtually screened, the size of the screen hole is assumed to be the third size of the particles, and the size is the short axis length of the major axis ellipse of the ellipsoid (the two major radii of the ellipsoid are both the diameter of a circle). (this procedure is a virtual sieving of the particles in order to estimate the mesh size and thus the particle size of the corresponding filler particles).
The volume of the particles is further calculated based on the estimated oversize screen size of the particles, and the mass of the particles is then determined based on the specific gravity of the particulate material (a typical value such as 2.67 can be used without measured data), and the grading curve (or size distribution) of all particles in the filler image is obtained.
The volume of the particles is calculated as a hexahedral volume, and the specific gravity of the particles is assigned to an accurately measured value, and if there is no actual measurement value, the mass is calculated assuming a representative value of the filler (for example, 2.7), and the gradation distribution is obtained.
Comparing the calculated particle size and particle size distribution with the known particle size and particle size distribution in the filler image area, and verifying the accuracy of an image matching algorithm; the algorithm and ML model parameters are further adjusted and optimized, if necessary, until the error between the calculated and measured grading is within acceptable tolerances.
S25, calculating the size and mass distribution of all the particles, and outputting grading results and grading curves.
Further, the unit programs described in S21 to S25 and the trained first and second neural network models are packaged to form a packaged program which can be operated independently for field test. The packaged procedure can be directly utilized on the roadbed filling and rolling construction site, and the filler grading result can be output by inputting the filler images before and after compaction into the packaged procedure.
S3 packaging the grading library and executing the program of S2; uniformly packaging the filler images into programs capable of running independently for processing the filler images collected on the construction site.
S4, collecting the filling image of the roadbed filling and rolling construction site, matching the filling image with the particle recognition template in the template library, processing the filling image by the trained packaging program to obtain the particle size and the distribution of coarse soil particles in the filling image of the construction site, and calculating and outputting the grading corresponding to the filling image of the construction site. The method specifically comprises the following steps:
s41, collecting a filler image of a roadbed filling and rolling construction site; using a first neural network model to eliminate non-single particles or incompletely visible particles in a filler image of a roadbed at a construction site;
and S42, obtaining the particle size, distribution, shape type, grading result and grading curve of coarse soil particles in the filler image of the construction site after the processing of the packaging program, and outputting the grading result and the grading curve.
The invention provides an automatic identification application system of coarse-grained soil subgrade filler gradation based on image matching, which comprises an acquisition module and an identification module, and is combined with the graph 3;
the acquisition module acquires a filler image of a roadbed filling and rolling construction site;
the identification module is used for automatically identifying the grading of the filler based on the image acquired by the acquisition module; the identification module comprises a template library, a first neural network model unit, a template matching unit, a second neural network model unit, a statistical unit, a grading calculation unit and a grading library; the template library is an identification template constructed by coarse soil particle images with various particle sizes; the first neural network model unit detects and excludes non-single particles or incompletely visible particles in the filler image; the template matching unit matches the filler image with templates in a template library, and if the matching is successful, the matching successful area is deleted from the filler image to obtain the particle size and distribution of coarse soil particles in the area; the second neural network model unit divides the matched coarse soil particle images into different shape categories; the statistical unit is used for counting the two-dimensional size of the single particle, estimating the third-dimensional size of the single particle according to the shape type, obtaining the volume of the single particle and solving the mass of the single particle; the grading calculation unit calculates and outputs a grading result and a grading curve corresponding to the filler image, and the grading result is stored in a grading library.
The identification module automatically identifies the grading of the filler based on the image acquired by the acquisition module. Therefore, the processing work of the first model and the second model is packaged into the program, and only the program needs to be operated on site to process the image to obtain the grading result and display the grading curve. The result can be sent to an experimenter, or the field device can acquire and send the image and the result through a wireless network, and the analysis process can also realize real-time automatic processing based on a server, so that the real-time performance of particle distribution visualization is realized.
The identification module construction comprises:
s100, detecting the optimal matching position of the filler image and each coarse-grained soil identification template in a template library by adopting an OpenCV function, matching, deleting and storing a matching area from the filler image if matching is successful, and recording the position of the matching area and the grain size of the matched coarse-grained soil particles;
s200, judging whether each filler image is amplified to the maximum size, if so, entering the step S300, otherwise, amplifying the filler images and returning to the step S100;
s300, dividing the matched coarse soil particle images into different shape types according to the shapes;
s400, counting the two-dimensional size of the single particle, estimating the third-dimensional size of the single particle according to the shape class, obtaining the volume of the single particle, and solving the mass of the single particle;
s500, calculating the size and mass distribution of all particles, and outputting a grading result and a grading curve;
s600, packaging all the execution programs of the S100 to the S500 to form the identification module.
In summary, the invention provides an automatic identification method and an application system for coarse-grained soil subgrade filler gradation based on image matching, which comprises the steps of collecting images of coarse-grained soil fillers with various particle sizes, forming identification templates of coarse-grained soil particles with various particle sizes, and constructing a template library; collecting filler images covering various gradations, identifying and matching each filler image with the template in the template library to obtain the particle size, distribution and shape category of coarse soil particles in the filler images, and storing a gradation result into the constructed gradation library; and collecting a filler image of a roadbed filling and rolling construction site, identifying and matching the filler image with the templates in the template library to obtain the particle size and grading of the fillers in the construction site, obtaining the grading of the fillers in the construction site, and storing the grading result in the constructed grading library. The method realizes efficient and accurate segmentation and identification of single particles by establishing the matching template, has high automation degree, does not need complex image processing algorithm, does not need human intervention, does not depend on experience of operators, and has strong environmental adaptability and high precision.
It is to be understood that the above-described embodiments of the present invention are merely illustrative of or explaining the principles of the invention and are not to be construed as limiting the invention. Therefore, any modification, equivalent replacement, improvement and the like made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. Further, it is intended that the appended claims cover all such variations and modifications as fall within the scope and boundaries of the appended claims or the equivalents of such scope and boundaries.