Simple generation method of soil-rock aggregate image model
By constructing a rock block image sample library and using a random placement algorithm to generate an earth-rock mixed image model, the problems of unreality and complex calculation of rock block geometric shape reduction in the existing technology are solved, and efficient and accurate earth-rock mixed image model generation is achieved.
Patent Information
- Application Number
- CN202510380398.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-01
AI Technical Summary
The prior art is difficult to truly reduce the geometric shape of the earth-rock mixed rock block, and the calculation is complicated and the parameter control is inaccurate, so it is impossible to systematically analyze the permeability characteristics of the earth-rock mixed.
By constructing a rock block image sample library, the images are processed using grayscale, binarization, noise reduction and morphological operations, and the rock blocks are extracted; then, based on the random placement algorithm, an earth-rock mixed image model that meets the target volume fraction is generated.
It realizes the real reduction of rock block geometry, simplifies the calculation process, improves parameter control accuracy, and can effectively capture the meticulous structure of earth and rock mixtures, which is suitable for analysis under different boundary conditions.
Smart Images

Figure CN120236015A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a simple method for generating an image model of soil-rock mixture, belonging to the technical fields of computational geotechnical engineering and numerical simulation of soil-rock mixture. Background Art
[0002] The soil-rock mixture is an important geological body that constitutes earth-rock dams, slopes, etc. Its mechanical and seepage characteristics are of great significance for the safety and stability of dams and slopes. Since such a medium system is mostly a mixture of "soil" and "rock blocks", the physical and mechanical properties of each component are very different, and there are extremely complex interactions at the same time. Its mechanical behavior and seepage characteristics are more complex than those of traditional rocks and soils. Generating a geometric model that can accurately characterize its complex geometric characteristics is a prerequisite for numerical simulation analysis of the mechanical behavior of soil-rock mixture, which is of great significance.
[0003] In constructing the mesoscopic structure model of soil-rock mixture, many numerical simulation methods still use the randomly generated soil-rock mixture model based on statistical probability. The model mainly consists of triangular, square, and circular rock blocks, which cannot truly restore the actual appearance of the rock blocks geometrically, and the corresponding numerical analysis accuracy will be greatly reduced. Although there are currently SRM mesoscopic structure models generated based on image models such as CT scans, the need for the image pixels to be exactly the same as the grid will greatly increase the calculation cost, and all are based on individual samples, lacking research on a large number of soil-rock mixture samples, and unable to systematically statistically analyze the seepage characteristics of soil-rock mixture.
[0004] In addition, in recent years, some researchers have also tried to use artificial intelligence methods such as generative adversarial neural networks to generate soil-rock mixture image models, but these methods are computationally complex, have high requirements for hardware, and have problems with insufficient accuracy in controlling key parameters such as volume fraction.
[0005] Therefore, how to develop a method for generating a soil-rock mixture image model that can truly restore the geometric shape of rock blocks, has computational simplicity, and has the ability to accurately control parameters has become a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0006] Based on the above background, the purpose of the present invention is to provide a simple method for generating an image model of soil-rock mixture to solve the problems described in the background art.
[0007] To achieve the above invention purpose, the present invention provides the following technical solutions:
[0008] A simple method for generating an image model of soil-rock mixture, the method comprising the following steps:
[0009] S1: Construct a rock block image sample library, including:
[0010] S1.1: Collect the real digital images of soil-rock mixtures;
[0011] S1.2: Perform grayscale processing on the digital images;
[0012] S1.3: Perform binarization processing on the processed images based on the grayscale histogram;
[0013] S1.4: Perform morphological closing operation on the binarized images after noise reduction;
[0014] S1.5: Perform connected component analysis on the processed images, and extract single-connected regions as rock blocks;
[0015] S1.6: Store the extracted rock blocks as a rock block image sample library;
[0016] S2: Synthesize a soil-rock mixture image model, including:
[0017] S2.1: Initialize parameters, and set the volume fraction of rock blocks and the size of the soil model;
[0018] S2.2: Set a random seed sequence to determine the selection order of rock blocks;
[0019] S2.3: Select rock blocks from the rock block image sample library, and perform size adjustment and random rotation on them;
[0020] S2.4: Randomly select positions on the soil model to place the rock blocks, and use morphological operations to determine overlap;
[0021] S2.5: If it is determined that there is no overlap, the placement is successful, and update the soil-rock mixture model;
[0022] S2.6: Repeat steps S2.3 to S2.5 until the set volume fraction of rock blocks is reached.
[0023] This method first extracts the shapes of rock blocks from real soil-rock mixture images to construct a rock block sample library, and then generates a soil-rock mixture image model that meets the target volume fraction through a random placement algorithm based on the real rock block shapes in the sample library. This method can truly restore the geometric shapes of rock blocks, effectively capture the mesoscopic structure of soil-rock mixtures, and at the same time, the calculation process is simple and efficient.
[0024] The method described in the present invention can be applied to the analysis of soil-rock mixtures under different boundary conditions, including the first type of boundary condition, the second type of boundary condition, and the mixed boundary condition; and the method can also be used to solve the temperature field or displacement field of soil-rock mixtures.
[0025] Preferably, the grayscale processing in step S1.2 includes converting a color image into a grayscale image using the rgb2gray function (MATLAB function); the binarization processing in step S1.3 includes analyzing the grayscale histogram, setting a critical grayscale value threshold, setting pixel values greater than this threshold to a first preset value, and pixel values less than this threshold to a second preset value, where the critical grayscale value threshold is adaptively determined according to the image characteristics; the noise reduction processing in step S1.4 includes using the median filter medfilt2 for noise reduction; the connected region analysis in step S1.5 is implemented using the bwlabel function (MATLAB function). Through these specific image processing techniques, it is possible to effectively extract clear and complete rock block shapes from complex backgrounds, providing high-quality sample materials for subsequent model synthesis. The analysis of the grayscale histogram and the setting of the adaptive threshold can meet the image processing requirements under different lighting and shooting conditions, improving the applicability and robustness of the method.
[0026] Preferably, the process of storing the extracted rock blocks in the rock block image sample library in step S1.6 includes: placing each rock block on a black bottom plate with a preset size and maintaining a preset distance from the edge, where the preset size is 256×256 pixels and the preset distance is 10 pixels. This standardized storage method makes the rock block samples easy to manage and call. The unified bottom plate size and edge distance ensure the integrity and operability of the rock blocks during subsequent random placement. At the same time, the 256×256 pixel size setting takes into account both image detail retention and storage efficiency.
[0027] Preferably, the size adjustment of the rock blocks in step S2.3 includes: scaling the rock block size to a preset ratio of the shortest side of the soil body model, where the preset ratio is 1 / 4. This size adjustment strategy ensures a reasonable ratio of the rock blocks in the soil body model, which can not only maintain the geometric characteristics of the rock blocks but also enable multiple rock blocks to be appropriately distributed in the model. Setting it to 1 / 4 of the shortest side is a balanced parameter obtained based on a large amount of practical experience, which can effectively balance the requirements of rock block detail performance and overall layout.
[0028] Preferably, the process of using morphological operations for overlap determination in step S2.4 includes: performing a morphological dilation operation on the rock block boundary and detecting the intersection of the dilated region and the already placed rock blocks. Traditional overlap determination methods usually use bounding boxes, which are computationally complex and inefficient. In contrast, this method innovatively uses morphological dilation operations for overlap determination, which not only has a simple and efficient algorithm but also can more precisely control the spacing between rock blocks, ensuring that the generated soil-rock mixture model is more in line with the actual distribution characteristics.
[0029] Preferably, in steps S2.4 to S2.5, there is an upper limit on the number of placement attempts for each rock block. When the number of attempts reaches the preset upper limit, the next rock block is selected for placement. This strategy avoids the algorithm wasting excessive computing resources on difficult-to-place rock blocks and improves the overall generation efficiency. At the same time, by setting a reasonable upper limit on the number of attempts, it ensures that rock blocks of different types and sizes have the opportunity to be selected and placed, enhancing the diversity and representativeness of the generation model.
[0030] Preferably, the method further includes a step of performing seepage analysis on the generated soil-rock mixture image model, and the seepage analysis uses the numerical manifold method. Combining the generated image model with seepage analysis realizes a full-process solution from model generation to performance analysis. The numerical manifold method can effectively handle seepage problems of complex geometric structures such as soil-rock mixtures. Based on the generated high-precision image model, more accurate seepage characteristic parameters can be obtained, providing a scientific basis for the safety assessment of projects such as earth-rock dams and slopes.
[0031] Compared with the prior art, the present invention has the following advantages:
[0032] 1. The method of the present invention is used to generate a soil-rock mixture image model. Compared with the traditional polygon model, the image model can truly restore the geometric shape of the rock block and effectively capture the mesoscopic structure of the soil-rock mixture;
[0033] 2. Compared with other image model generation methods, such as the generation method based on generative adversarial neural networks, the method of the present invention is more computationally concise and can more accurately control parameters such as volume fraction;
[0034] 3. The present invention can reconstruct the distribution structure of rock blocks based on existing real stone models, obtain more SRM statistic samples for analyzing their seepage characteristics, avoid small-probability events of individual samples, and improve the reliability and universality of the analysis results.
[0035] 4. The present invention innovatively uses morphological dilation operation for rock block overlap determination, which is more concise and efficient than the traditional bounding box algorithm, simplifies the calculation process, and improves the generation efficiency. Description of the Drawings
[0036] Figure 1 is the SRM digital image;
[0037] Figure 2 is the rock block extraction process;
[0038] Figure 3 is the schematic diagram of the working principle of the MATLAB median filter;
[0039] Figure 4 is the MATLAB single-connected region contour extraction;
[0040] Figure 5 is a rock block sample library;
[0041] Figure 6 is a conventional cross - overlap determination algorithm;
[0042] Figure 7 is to control the placement of rock masses;
[0043] Figure 8 is the generated soil - rock mixture;
[0044] Figure 9 is the seepage analysis result of the real SRM image model. Specific Embodiments
[0045] The following are specific descriptions of the technical solutions of the present invention through specific embodiments. It should be understood that the implementation of the present invention is not limited to the following embodiments, and any form of modification and / or change made to the present invention will fall within the protection scope of the present invention.
[0046] In the present invention, unless otherwise specified, all parts and percentages are in weight units, and the equipment and raw materials used can be purchased from the market or are commonly used in the art. The methods in the following embodiments are conventional methods in the art unless otherwise specified.
[0047] The reagents used in the following embodiments can be purchased from a conventional biochemical reagent store unless otherwise specified. Example:
[0048] A simple method for generating a soil - rock mixture image model, the specific steps of the method are as follows:
[0049] S1: Construct a rock block image sample library
[0050] S1.1: Collect real - shot digital images of the soil - rock mixture: Collect multiple representative real - shot digital images of the soil - rock mixture or other images that can approximate the meso - scale aggregate images of rock blocks (such as Figure 1 ). These images cover different types of rock blocks, surface features, and geometric shapes. Ensure that the images are taken under uniform lighting conditions to reduce the impact of shadows and reflections on the image quality.
[0051] S1.2: Perform grayscale processing on the digital images: Figure 2 (A) After image digitization, it is as shown in Equation (1). First, use the function rgb2gray in MATLAB to convert the color image into a grayscale image (such as Figure 2 (B)).
[0052] S1.3: Perform binary processing on the processed image based on the grayscale histogram:
[0053] Pair Figure 2 (B) Extract its grayscale histogram through the histogram function of MATLAB (as Figure 2 (C)). Set a critical grayscale value threshold from the histogram (the current threshold is 230), set the pixel values greater than this critical grayscale value to 233, and set those less than this value to 190, so as to implement the grayscale image ( Figure 2 (B)) binarization (as Figure 2 (D)).
[0054] S1.4: Perform morphological closing operation on the binarized image after noise reduction:
[0055] Apply the median filter function medfilt2 to the binarized image for noise reduction to remove noise and miscellaneous colors generated due to poor shooting conditions, and the result is as Figure 2 (E). The median filter algorithm (as Figure 3 shown) is to select a window containing an odd number of points, scan this window on the image, arrange the pixel points contained in the window in ascending or descending order of grayscale level, and take the grayscale value in the middle to replace the grayscale value of this point.
[0056] For the noise-reduced Figure 2 (E) Use MATLAB image morphological operations. The pseudocode is shown in Table 1. The closing operation is to first perform a dilation operation on the image and then an erosion operation. Its function is to bridge narrow cracks or holes, fill gaps in the contour, etc., and the effect is as Figure 2 (F) shown. For subsequent
[0057]
[0058] K is the pixel value of each point, and T is the critical threshold.
[0059] Table 1 MATLAB Image Morphological Operations
[0060] Read image img = imread('rice.png') Circular dilation with a radius of 2 se = strel('disk', 2); Erosion closing operation Img = imclose(img, se);
[0061] S1.5: Perform connected component analysis on the processed image, and extract single connected components as rock blocks;
[0062] Use the bwlabel function of MATLAB to perform connected component analysis on the binarized image to obtain single connected components (as Figure 4 ). The quantity num_regions and the label matrix labeled. Each single connected domain represents a rock block image model. Store each extracted rock block image model separately as a digital image file, named in the way of "rock_model_k.png" for subsequent calling.
[0063] S1.6: storing the extracted rock blocks as a rock block image sample library;
[0064] All rock image models are stored on a black background of 256*256 pixels (such as Figure 5 ), and keep a distance of 10 pixels from the edge so that it can be uniformly allocated when synthesizing soil-rock mixture. All processed rock block image models are aggregated into a rock block library to facilitate random extraction in the subsequent soil-rock mixture model generation process. Figure 5 shown.
[0065] S2: Synthetic soil-rock mixture image model
[0066] S2.1: Initialize parameters, set rock block volume fraction and soil model size;
[0067] Rock mass volume fraction: C R , soil model size S SRM A blank image with the same size as the soil model is created, and the background color is set to black as the unfilled soil.
[0068] S2.2: Set the random seed sequence to determine the order of rock selection;
[0069] To ensure that each rock block has a chance to be selected, a reproducible random seed sequence is set as the order of rock block candidates (as shown in Table 2).
[0070] Table 2 Pseudo code
[0071]
[0072]
[0073]
[0074] S2.3: Select a rock block from the rock block image sample library, resize it, and randomly rotate it;
[0075] Based on the rock block image model currently selected from the sample library, two random numbers are generated for the position and inclination on the unfilled soil. In terms of rock block size, the rock block image in the sample library is scaled to 1 / 4 of the shortest side of the new soil model; (the pseudo algorithm is shown in Table 2, the centroid calculation in Table 2 corresponds to equations (2) and (3), and the image rotation in Table 2 corresponds to equations (4)-(8)) In terms of rotation angle, the centroid of the rock block in each sample is calculated and used as the rotation center for random rotation.
[0076] S2.4: Place rock blocks at random locations on the soil model and use morphological operations to determine overlap;
[0077] In terms of the positions of rock blocks, instead of using separate bounding boxes for each rock block in the traditional way (as shown in Figure 6 ), the dilation operation of MATLAB is used for the boundaries of the rock blocks for the spatial positions of the rock blocks to achieve the purpose of non - overlap (as shown in Figure 7 ). This algorithm is more concise and efficient.
[0078] S2.5: If it is determined that there is no overlap, the placement is successful, and the soil - rock mixture model is updated;
[0079] In steps S2.4 to S2.5, there is an upper limit on the number of placement attempts for each rock block. When the number of attempts reaches the preset upper limit, the next rock block is selected for placement. The control condition set in this embodiment is that the maximum number of placement attempts for each rock block is 100 times. If it exceeds, the selection and placement of the next rock block are carried out.
[0080] S2.6: Repeat steps S2.3 to S2.5 until the set volume fraction of rock blocks is reached.
[0081] After each successful placement of a rock block, update the volume fraction of the rock blocks in the synthesized soil - rock mixture and update the image. Loop through steps 4 and 5 until the volume fraction of the synthesized soil - rock mixture reaches the set threshold to terminate the program (as shown in Figure 8 ).
[0082] For the Figure 4 generated SRM model, numerical methods, such as the numerical manifold method, are adopted. The seepage analysis results are as shown in Figure 9 . As shown in Figure 9 (A), the distribution of the head field shows obvious vertical gradient characteristics, gradually decreasing from the head value of 600 mm at the top to the head value of 0 mm at the bottom. The presence of rocks has a significant impact on the head field. The equipotential lines of the head bend around the rocks, indicating that the water flow needs to bypass these low - permeability regions. In the area where rocks are dense, the equipotential lines of the head are more dense, reflecting the increase in the local head gradient. This heterogeneous distribution directly reflects the complex structural characteristics of the soil - rock mixture.
[0083] As shown in Figure 9 (B), the hydraulic gradient field shows a more complex distribution pattern, with numerical ranges from - 0.14 to 3.5. At the interface between rocks and soil, especially at the upper and lower edges of the rocks, high - gradient regions (2.5 - 3.5) are formed, indicating that the water flow is strongly hindered in these regions. In contrast, lower hydraulic gradient values appear in the soil channels between the rocks. The negative gradient value (- 0.14) that appears in local areas may indicate the backflow phenomenon, which is a common complex water flow characteristic in the soil - rock mixture.
[0084] As shown in Figure 9(C) The seepage velocity field further reveals the movement characteristics of water flow in the soil-rock mixture. The velocity values range from -2.9 mm / s to 0.14 mm / s, and the rock area shows an extremely low seepage velocity (about 0.14 mm / s). It is worth noting that high-speed areas (about -2.9 mm / s) appear at the narrow channels formed between the rocks. This "bottleneck effect" is due to the increase in local flow velocity caused by the reduction of the flow area. The negative values in the velocity field indicate that the water flow direction is opposite to the reference direction of the coordinate system, which is consistent with the overall trend of water flow from top to bottom.
[0085] Comprehensive analysis shows that the rock content and its spatial distribution in the soil-rock mixture have a decisive influence on the seepage characteristics. The water flow mainly forms a tortuous path along the soil channels between the rocks. As a low-permeability material, the rocks significantly hinder the water flow, resulting in changes in the head gradient and flow velocity around them. This also indirectly indicates that the mesoscopic structural image model of the soil-rock mixture proposed above provides a reliable analysis object for the numerical simulation analysis of SRM permeability.
[0086] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts between the various embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method section.
Claims
1. A simple method for generating a soil-rock mixture image model, characterized in that: The Method The following steps are involved: S1: Build a rock image sample library, including: S1.1: Collect real digital images of soil-rock mixture; S1.2: grayscale the digital image; S1.3: Binarize the processed image based on the grayscale histogram; S1.4: Perform morphological closing operation on the binary image after denoising; S1.5: Perform connected region analysis on the processed image and extract the single connected region as the rock block; S1.6: storing the extracted rock blocks as a rock block image sample library; S2: Synthetic soil-rock mixture image model, including: S2.1: Initialize parameters, set rock block volume fraction and soil model size; S2.2: Set the random seed sequence to determine the order of rock selection; S2.3: Select a rock block from the rock block image sample library, resize it, and randomly rotate it; S2.4: Place rock blocks at random locations on the soil model and use morphological operations to determine overlap; S2.5: If it is determined that there is no overlap, the placement is successful and the soil-rock mixture model is updated; S2.6: Repeat steps S2.3 to S2.5 until the set rock block volume fraction is reached.
2. The simplified generation method according to claim 1, characterized in that: The grayscale processing in step S1.2 includes converting the color image into a grayscale image using the rgb2gray function; the binarization processing in step S1.3 includes analyzing the grayscale histogram, setting a critical grayscale value threshold, setting pixel values greater than the threshold to a first preset value, and setting pixel values less than the threshold to a second preset value, and the critical grayscale value threshold is adaptively determined according to image characteristics; the denoising processing in step S1.4 includes denoising using the median filter medfilt2; the connected region analysis in step S1.5 is implemented using the bwlabel function.
3. The simplified generation method according to claim 1, characterized in that: The process of storing the extracted rock blocks as a rock block image sample library in step S1.6 includes: placing each rock block on a black base plate of a preset size and keeping a preset distance from the edge, wherein the preset size is 256×256 pixels and the preset distance is 10 pixels.
4. The simplified generation method according to claim 1, characterized in that: The adjustment of the size of the rock block in step S2.3 includes: scaling the size of the rock block to a preset ratio of the shortest side of the soil model, wherein the preset ratio is 1 / 4.
5. The simplified generation method according to claim 1, characterized in that: The process of using morphological operations to perform overlap determination in step S2.4 includes: performing a morphological dilation operation on the rock block boundary, and detecting the intersection of the dilated area and the placed rock block.
6. The simplified generation method according to claim 1, characterized in that: In steps S2.4 to S2.5, an upper limit is set for the number of placement attempts for each rock block. When the number of attempts reaches the preset upper limit, the next rock block is selected for placement.
7. The simplified generation method according to claim 1, characterized in that: The method also includes the step of performing seepage analysis on the generated soil-rock mixture image model, wherein the seepage analysis adopts a numerical manifold method.
Citation Information
Cited By
Method for generating multi-component rock model and method for predicting breakdown channel of multi-component rock model
CN120542127A
A method for generating a multi-component rock model and a method for predicting its breakdown channel
CN120542127B