A soil body simulation image generation method and system
By constructing a simulated image library of soil particles and applying processing strategies such as illumination, noise, and translation, simulated images similar to real soil are generated, solving the problem of inaccurate evaluation of existing simulated speckle images and improving the evaluation accuracy of image deformation analysis technology for soil deformation measurement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INST OF ENG MECHANICS CHINA EARTHQUAKE ADMINISTRATION
- Filing Date
- 2023-02-13
- Publication Date
- 2026-06-12
AI Technical Summary
Existing simulated speckle images differ significantly from real soil images, making it difficult to accurately assess the accuracy of image deformation analysis techniques for soil deformation measurement.
By constructing a soil particle simulation image library, initial soil simulation images are generated. Then, image processing strategies such as lighting, noise, translation, rotation, and shearing are used to simulate various environmental influences and generate simulation images similar to real soil images.
It improves the accuracy of image deformation analysis technology for soil deformation measurement, and can provide more accurate references in terms of image texture and color value distribution.
Smart Images

Figure CN116051680B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image technology, and in particular to a method and system for generating simulated soil images. Background Technology
[0002] In the field of soil deformation measurement, image deformation analysis is a commonly used technique. Image deformation analysis involves using camera equipment to capture a sequence of images during the deformation process of an observed object, searching and matching relevant features, and identifying the deformation trajectory. Through the conversion and correction of pixel coordinates and observation surface coordinates, information on the deformation field and motion field of the observed object, such as displacement, strain, velocity, and acceleration, is obtained. In application scenarios, the reliability of image deformation analysis technology needs to be evaluated to better facilitate soil deformation analysis.
[0003] Since the actual values of the analysis parameters in real soil images are unknown, simulated images are typically used as the image material for reliability assessment in image deformation analysis techniques. Currently, simulated images are usually generated based on simulated speckle image technology to evaluate the performance of image deformation analysis techniques.
[0004] In the evaluation of image deformation analysis technology for soil deformation measurement, image texture features and color value distribution are important evaluation factors. Based on existing methods of generating simulated images, the generated images are simulated speckle images. Simulated speckle images are images with a black background and composed of discrete bright spots, which differ significantly from real soil images. Therefore, they cannot provide a reference for evaluating image deformation analysis technology based on image texture and color value distribution, easily leading to poor accuracy in the evaluation of image deformation analysis technology for soil deformation measurement. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a method for generating simulated soil images to solve the problem that the simulated images generated by existing methods differ greatly from real soil images, making it difficult to accurately evaluate image deformation analysis techniques for soil deformation measurements.
[0006] This invention also provides a soil simulation image generation system to ensure the practical implementation and application of the above method.
[0007] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0008] A method for generating soil simulation images, comprising:
[0009] When an image generation instruction sent by a user is received, the number of soil particles, image information, and particle distribution information corresponding to the image generation instruction are determined; the image information includes image size and image resolution, and the particle distribution information includes multiple sets of particle morphology data and the particle ratio corresponding to each set of particle morphology data.
[0010] Based on the number of soil particles, the particle distribution information, and a pre-set soil particle simulation image library, multiple target soil particle simulation images are determined; the soil particle simulation image library contains multiple pre-constructed soil particle simulation images.
[0011] An image space is created, and according to a preset distribution function, the simulated images of each target soil particle are filled into the image space to obtain the filled image space.
[0012] Based on the image information, an initial soil simulation image corresponding to the filled image space is generated; the initial soil simulation image contains simulation images of each of the target soil particles;
[0013] Based on a set of pre-set image processing strategies, a set of application strategies corresponding to the image generation instruction is determined; the set of application strategies includes at least one of the multiple image processing strategies.
[0014] Based on the image processing strategies in the application strategy set, the initial soil simulation image is processed to obtain the simulation image corresponding to the initial soil simulation image, and the simulation image is used as the final soil simulation image.
[0015] Optionally, in the above method, the multiple image processing strategies include an illumination processing strategy, the application strategy set includes the illumination processing strategy, and the process of processing the initial soil simulation image according to the illumination processing strategy includes:
[0016] Determine the illumination intensity and illumination mode corresponding to the image generation command;
[0017] Determine the image matrix corresponding to the initial soil simulation image;
[0018] Based on the light intensity and the light pattern, the image matrix is processed by adding light values to perform image processing on the initial soil simulation image.
[0019] Optionally, the above method includes a noise processing strategy among the various image processing strategies, the application strategy set includes the noise processing strategy, and the process of processing the initial soil simulation image according to the noise processing strategy includes:
[0020] Among a variety of preset noise types, the target noise type corresponding to the image generation instruction is determined; the various noise types include dark noise, shot noise, readout noise, and impulse noise.
[0021] Based on the preset noise addition strategy corresponding to the target noise type, image noise corresponding to the target noise type is added to the initial soil simulation image to perform image processing on the initial soil simulation image.
[0022] Optionally, the above method includes a translation processing strategy among the various image processing strategies, the application strategy set includes the translation processing strategy, and the process of processing the initial soil simulation image according to the translation processing strategy includes:
[0023] Based on a preset translation function, the translational deformation coordinates corresponding to each target soil particle simulation image in the initial soil simulation image are determined;
[0024] Based on the respective translational deformation coordinates, the coordinates of each target soil particle simulation image in the initial soil simulation image are adjusted to perform image processing on the initial soil simulation image.
[0025] Optionally, the above method includes a rotation processing strategy among the various image processing strategies, and the application strategy set includes the rotation processing strategy. The process of processing the initial soil simulation image according to the rotation processing strategy includes:
[0026] Determine the rotation angle corresponding to the image generation instruction;
[0027] Based on the preset rotational motion function, the preset rotation center point, and the rotation angle, the rotational deformation coordinates corresponding to each target soil particle simulation image in the initial soil simulation image are determined;
[0028] Based on the respective rotational deformation coordinates, the coordinates of each target soil particle simulation image in the initial soil simulation image are adjusted to perform image processing on the initial soil simulation image.
[0029] Optionally, the above method includes a compression processing strategy among the various image processing strategies, the application strategy set includes the compression processing strategy, and the process of processing the initial soil simulation image according to the compression processing strategy includes:
[0030] Determine the compression amount corresponding to the image generation instruction;
[0031] Based on the compression amount and the preset compression deformation function, determine the compression deformation coordinates corresponding to the simulated image of each target soil particle in the initial soil simulation image;
[0032] Based on the respective compression deformation coordinates, the coordinates of each target soil particle simulation image in the initial soil simulation image are adjusted to perform image processing on the initial soil simulation image.
[0033] Optionally, the above method includes a cropping strategy among the various image processing strategies, the application strategy set includes the cropping strategy, and the process of processing the initial soil simulation image according to the cropping strategy includes:
[0034] Determine the amount of shearing corresponding to the image generation instruction;
[0035] Based on the preset shear strain function and the shear amount, the shear deformation coordinates corresponding to the simulated image of each target soil particle in the initial soil simulation image are determined;
[0036] Based on the shear deformation coordinates, the coordinates of the simulated images of each target soil particle in the initial soil simulation image are adjusted to perform image processing on the initial soil simulation image.
[0037] A soil simulation image generation system, comprising:
[0038] The first determining unit is used to determine the number of soil particles, image information, and particle distribution information corresponding to the image generation instruction when it receives an image generation instruction sent by a user; the image information includes image size and image resolution, and the particle distribution information includes multiple sets of particle morphology data and the particle ratio corresponding to each set of particle morphology data.
[0039] The second determining unit is used to determine multiple target soil particle simulation images based on the number of soil particles, the particle distribution information, and a preset soil particle simulation image library; the soil particle simulation image library contains multiple pre-constructed soil particle simulation images.
[0040] A filling unit is used to create an image space and fill the image space with simulated images of each target soil particle according to a preset distribution function to obtain a filled image space.
[0041] An image generation unit is configured to generate an initial soil simulation image corresponding to the filled image space based on the image information; the initial soil simulation image includes simulation images of each of the target soil particles;
[0042] The third determining unit is used to determine the set of application strategies corresponding to the image generation instruction based on a set of preset image processing strategies; the set of application strategies includes at least one of the multiple image processing strategies.
[0043] The image processing unit is used to perform image processing on the initial soil simulation image according to the image processing strategy in the application strategy set, to obtain a simulation image corresponding to the initial soil simulation image, and to use the simulation image as the final soil simulation image.
[0044] Optionally, in the above system, the multiple image processing strategies include an illumination processing strategy, the application strategy set includes the illumination processing strategy, and the image processing unit includes:
[0045] The first determining subunit is used to determine the illumination intensity and illumination mode corresponding to the image generation instruction;
[0046] The second determining subunit is used to determine the image matrix corresponding to the initial soil simulation image;
[0047] The first processing subunit is used to add illumination values to the image matrix according to the illumination intensity and the illumination mode, so as to perform image processing on the initial soil simulation image.
[0048] Optionally, in the above system, the multiple image processing strategies include a noise processing strategy, the application strategy set includes the noise processing strategy, and the image processing unit includes:
[0049] The third determining subunit is used to determine the target noise type corresponding to the image generation instruction from a preset variety of noise types; the variety of noise types includes dark noise, shot noise, readout noise, and impulse noise;
[0050] The second processing subunit is used to add image noise corresponding to the target noise type to the initial soil simulation image according to the preset noise addition strategy corresponding to the target noise type, so as to perform image processing on the initial soil simulation image.
[0051] A soil simulation image generation and storage medium includes stored instructions, wherein, when the instructions are executed, the device where the soil simulation image generation and storage medium is located is controlled to perform the soil simulation image generation method as described above.
[0052] An electronic device for generating soil simulation images includes a memory and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors as described above in the soil simulation image generation method.
[0053] A method for generating a soil simulation image based on the above embodiments of the present invention includes: when receiving an image generation instruction sent by a user, determining the number of soil particles, image information, and particle distribution information corresponding to the instruction; the image information includes image size and image resolution, and the particle distribution information includes multiple sets of particle morphology data and the particle ratio corresponding to each set of particle morphology data; determining multiple target soil particle simulation images based on the number of soil particles, particle distribution information, and a preset soil particle simulation image library; the soil particle simulation image library contains multiple pre-constructed soil particle simulation images; creating an image space and filling the image space with each target soil particle simulation image according to a preset distribution function to obtain a filled image space; generating an initial soil simulation image corresponding to the image space based on the image information; determining an application strategy set corresponding to the image generation instruction based on a set of preset image processing strategies, including at least one image processing strategy; performing image processing on the initial soil simulation image according to the image processing strategy in the application strategy set to obtain a simulation image corresponding to the initial soil simulation image, which is then used as the final soil simulation image. The method provided in this invention allows for the generation of an initial soil simulation image based on a simulated soil particle image, specifying the number of soil particles, image size, image resolution, and particle distribution. This initial soil simulation image can then be processed using a specified image processing strategy to obtain the final soil simulation image. The basic unit in the generated soil simulation image is the simulated soil particle image, which exhibits high similarity to real soil images. This provides a reference for evaluating image deformation analysis techniques for soil deformation measurement, considering aspects such as image texture and color value distribution. Furthermore, image processing can simulate environmental influences such as illumination and deformation. The soil simulation image can be used to assess the impact of observation conditions on image deformation analysis techniques, thereby improving the accuracy of evaluations for soil deformation measurement image deformation analysis techniques. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0055] Figure 1 A flowchart of a method for generating a soil simulation image provided in an embodiment of the present invention;
[0056] Figure 2 This is a schematic diagram of a simulated image of soil particles provided in an embodiment of the present invention;
[0057] Figure 3An example diagram illustrating a soil simulation image generation process provided in an embodiment of the present invention;
[0058] Figure 4 A statistical example diagram of soil particle size distribution provided in an embodiment of the present invention;
[0059] Figure 5 A statistical example diagram of soil particle roundness distribution provided for an embodiment of the present invention;
[0060] Figure 6 A statistical example diagram of the two-dimensional spatial distribution of soil particles provided in an embodiment of the present invention;
[0061] Figure 7 This is a schematic diagram of the structure of a soil simulation image generation system provided in an embodiment of the present invention;
[0062] Figure 8 This is a schematic diagram of the structure of an electronic device for generating soil simulation images, provided in an embodiment of the present invention. Detailed Implementation
[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0064] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0065] As the background technology indicates, in the reliability assessment of image deformation analysis technology for soil deformation measurement, the image material used to simulate real soil images is simulated speckle images. However, this type of image cannot actually reflect the image characteristics of real soil images in terms of texture, color values, etc. Secondly, the circular speckles in simulated speckle images are rotationally indeformable, making it difficult to reflect the particle rotation process of soil deformation. Furthermore, this type of image cannot simulate the influence of environmental factors such as lighting. Therefore, using simulated speckle images to evaluate image deformation analysis technology is insufficient to meet various assessment needs, resulting in poor assessment accuracy.
[0066] Therefore, this invention provides a method for generating simulated soil images. The method generates images based on pre-constructed simulated soil particle images and simulates various deformations through image processing. Finally, it generates simulated soil images with high similarity to real soil images, thereby evaluating image deformation analysis technology and improving the evaluation accuracy of image deformation analysis technology.
[0067] This invention provides a method for generating soil simulation images. The method can be applied to a soil simulation image generation system, and its execution entity can be the system's server. The method flowchart is shown below. Figure 1 As shown, it includes:
[0068] S101: When an image generation instruction sent by a user is received, the number of soil particles, image information, and particle distribution information corresponding to the image generation instruction are determined; the image information includes image size and image resolution, and the particle distribution information includes multiple sets of particle morphology data and the particle ratio corresponding to each set of particle morphology data.
[0069] In the method provided by this invention, when a user needs to generate a soil simulation image, they can input the relevant data required for image generation through the system front-end to send an image generation command to the server. The user-input data includes the number of soil particles to be filled, the image size and resolution of the image to be generated, and the particle morphology data of the soil particles to be filled and their corresponding particle proportions. The particle morphology data includes the size of the soil particles, the radius ratio reflecting the roundness of the soil particles (the ratio of the orthogonal major axis to the minor axis), particle color value, and particle pose. Soil particle roundness refers to the degree to which the cross-section of sand particles is close to a circle, based on the formula 4πS / C. 2 Here, S represents the cross-sectional area of the sand particles, and C represents the perimeter of the cross-section. The particle proportion corresponding to each set of particle morphology data refers to the percentage of soil particles corresponding to that set of particle morphology data among all soil particles in the filled image. Users can determine the relevant data to be input based on the analysis of real soil images; that is, the number and distribution information of soil particles input by the user can be information presented in the real soil image.
[0070] In the method provided by this embodiment of the invention, when the server receives an image generation instruction, it can parse the image generation instruction to obtain relevant data input by the user, including information such as the number of soil particles, image information, and particle distribution information.
[0071] S102: Based on the number of soil particles, the particle distribution information, and a preset soil particle simulation image library, determine multiple target soil particle simulation images; the soil particle simulation image library contains multiple pre-constructed soil particle simulation images.
[0072] In the method provided by this invention, multiple simulated soil particle images are pre-constructed based on captured images of real soil particles through image modeling. A simulated soil particle image library is pre-set based on each pre-constructed simulated soil particle image. A schematic diagram of the simulated soil particle images is shown below. Figure 2 As shown in the image, the soil particles can be approximated as elliptical in shape. Figure 2 The ellipse shown can be interpreted as a simulated image of soil particles. In practical applications, it can be filled with color according to the actual soil particle color, for example, it can be filled with ochre. Here, R is the minor axis radius, reflecting particle size; e is the ratio of the orthogonal major axis to the minor axis radius, reflecting particle roundness; θ is the angle between the major axis and the horizontal direction, reflecting the pose; C(r, g, b) is the fill color; and the subscript n in the figure represents the nth particle, x... n y n This represents the centroid coordinates of the nth particle.
[0073] In the method provided by this invention, multiple soil particle simulation images that meet the requirements can be selected from a soil particle simulation image library based on the number and distribution information of soil particles to obtain multiple target soil particle simulation images. The total number of target soil particle simulation images matches the number of soil particles, and the particle morphology data corresponding to the target soil particle simulation images matches the particle distribution information.
[0074] S103: Create an image space, and fill the image space with simulated images of each target soil particle according to a preset distribution function to obtain an image space after filling.
[0075] In the method provided by the embodiments of the present invention, the particle distribution in the real soil image can be analyzed in advance, and the distribution function can be set by fitting the soil particle distribution in the real soil image with a function.
[0076] In the method provided by the embodiments of the present invention, a blank image space can be created, and then image filling processing is performed on the image space based on a preset distribution function. The simulated images of each target soil particle are filled into the image space according to the distribution function, thereby obtaining the filled image space.
[0077] S104: Based on the image information, generate an initial soil simulation image corresponding to the filled image space; the initial soil simulation image contains simulation images of each of the target soil particles;
[0078] In the method provided by this embodiment of the invention, the filled image space is rasterized according to the image size and image resolution specified in the image information to generate a corresponding image, which is used as the initial soil simulation image. It can be understood that the generated initial soil simulation image is composed of simulation images of each target soil particle filled into the image space.
[0079] S105: Based on a set of pre-set image processing strategies, determine the set of application strategies corresponding to the image generation instruction; the set of application strategies includes at least one of the multiple image processing strategies.
[0080] In the method provided by this invention, the system pre-sets multiple image processing strategies, each corresponding to the simulation requirements of various environmental influencing factors. For example, environmental influencing factors include elements such as illumination, noise, translational deformation, and shearing deformation. The pre-set image processing strategies can be used to add illumination to the image, add noise to the image, perform translational deformation on the image, and perform shearing deformation on the image, respectively.
[0081] In the method provided by this invention, the user can specify environmental impact factors to be added to the generated soil simulation image through the system front-end, such as adding illumination, noise, or translational deformation. The user can select only one environmental impact factor or multiple factors. The environmental impact factors selected by the user can be sent to the server through an image generation command. When responding to the image generation command, the server can select an image processing strategy that matches the environmental impact factor specified in the image generation command from a variety of pre-set image processing strategies, and combine the selected image processing strategies into an application strategy set corresponding to the image generation command.
[0082] S106: Based on the image processing strategy in the application strategy set, perform image processing on the initial soil simulation image to obtain the simulation image corresponding to the initial soil simulation image, and use the simulation image as the final soil simulation image.
[0083] In the method provided by this invention, an initial soil simulation image is processed using all image processing strategies in an application strategy set. The initial soil simulation image processed by the application strategy set is then used as the corresponding simulation image. Processing the initial soil simulation image according to the image processing strategies in the application strategy set means processing the initial soil simulation image sequentially using each image processing strategy in the application strategy set. The image processing effects are cumulative; that is, the simulation image is the result of processing the initial soil simulation image using the application strategy set. This simulation image is then used as the final generated soil simulation image.
[0084] Based on the method provided in this embodiment of the invention, when an image generation command sent by a user is received, the number of soil particles, image information, and particle distribution information corresponding to the image generation command are determined; multiple target soil particle simulation images are determined based on the number of soil particles, particle distribution information, and a preset soil particle simulation image library; an image space is created, and each target soil particle simulation image is filled into the image space according to a preset distribution function to obtain a filled image space; an initial soil simulation image corresponding to the filled image space is generated based on the image information; an application strategy set corresponding to the image generation command is determined based on a set of preset image processing strategies; the initial soil simulation image is processed according to the image processing strategies in the application strategy set to obtain a simulation image corresponding to the initial soil simulation image, and this simulation image is used as the final soil simulation image. By applying the method provided in this embodiment of the invention, an initial soil simulation image can be generated based on a soil particle simulation image constructed from simulated soil particles, according to a specified number of soil particles, image size, image resolution, and particle distribution; and the initial soil simulation image can be processed using a specified image processing strategy to obtain the final soil simulation image. The basic unit in the generated soil simulation image is the soil particle simulation image, which has a high similarity to the real soil image. It can provide a reference for the evaluation of image deformation analysis technology for soil deformation measurement from aspects such as image texture and color value distribution. Furthermore, through image processing, it can simulate environmental effects such as illumination and deformation. The soil simulation image can be used to evaluate the impact of observation conditions on image deformation analysis technology, which is conducive to improving the evaluation accuracy of image deformation analysis technology for soil deformation measurement.
[0085] exist Figure 1 Based on the method shown, in the method provided by this embodiment of the invention, the multiple image processing strategies mentioned in step S105 include a lighting processing strategy, and the application strategy set includes the lighting processing strategy. Therefore, the image processing of the initial soil simulation image according to the image processing strategy in the application strategy set mentioned in step S106 includes the process of processing the initial soil simulation image according to the lighting processing strategy. This process includes:
[0086] Determine the illumination intensity and illumination mode corresponding to the image generation command;
[0087] In the method provided by this invention, the illumination processing strategy refers to an image processing strategy for adding illumination to an image. When a user selects to add illumination as an environmental influence factor to an image, the application strategy set includes illumination processing strategies. When a user selects to add illumination as an environmental influence factor, they can select the illumination intensity and illumination mode to be added through the system front end. Illumination intensity can be represented as a percentage, and illumination mode can be uniform illumination or non-uniform illumination, etc. The illumination intensity and illumination mode selected by the user can be sent to the server through an image generation command. The server can obtain the illumination intensity and illumination mode corresponding to the command by parsing the image generation command.
[0088] Determine the image matrix corresponding to the initial soil simulation image;
[0089] Based on the light intensity and the light pattern, the image matrix is processed by adding light values to perform image processing on the initial soil simulation image.
[0090] In the method provided by this invention, image processing of the initial soil simulation image is achieved by adding illumination values corresponding to the illumination intensity to the image matrix of the initial soil simulation image. The image corresponding to the new image matrix after adding the illumination values is the processed image. If the illumination mode is uniform illumination, uniform illumination needs to be added to the image. In this case, the change in illumination intensity is achieved by adding the same illumination value to the entire image matrix simultaneously, thereby ensuring the relative stability of illumination intensity over time and in space. For example, if I0 is the base image brightness, then the image with added illumination intensity j is: I j =I0+255j, where -I0 / 255≤j≤(255-I0) / 255.
[0091] In the method provided by this embodiment of the invention, if the lighting mode is non-uniform lighting, non-uniform lighting needs to be added to the image. Assuming the non-uniform lighting is f(x), the non-uniform lighting is expanded by adding zero elements to form a matrix I with the same order as the original image matrix. f ,Right now:
[0092]
[0093] The simulated image after adding uneven lighting is I k The coefficient k adjusts the light brightness, that is: I k =I0+255k·I f .
[0094] Based on the method provided in the embodiments of the present invention, an image can be processed to add illumination to obtain a simulated soil image after adding illumination.
[0095] exist Figure 1Based on the method shown, in the method provided by this embodiment of the invention, the various image processing strategies mentioned in step S105 include a noise processing strategy, and the application strategy set includes the noise processing strategy. Therefore, the image processing of the initial soil simulation image according to the image processing strategy in the application strategy set mentioned in step S106 includes the process of processing the initial soil simulation image according to the noise processing strategy. This process includes:
[0096] Among a variety of preset noise types, the target noise type corresponding to the image generation instruction is determined; the various noise types include dark noise, shot noise, readout noise, and impulse noise.
[0097] In the method provided by this invention, multiple noise types are pre-set according to the actual soil image shooting scenario, including dark noise, shot noise, readout noise, and impulse noise. The noise processing strategy refers to the image processing strategy for adding noise to the image. When the user selects to add noise as an environmental influencing factor, they can select the desired noise type from the preset multiple noise types through the system front-end. The noise type selected by the user can be sent to the server via an image generation command. The server can obtain the noise type selected by the user by parsing the image generation command and use that noise type as the target noise type.
[0098] It should be noted that in practical applications, users can select only one noise type or multiple noise types. That is, there can be only one target noise type or multiple target noise types. If there are multiple target noise types, then each target noise type can be processed in subsequent steps, which means adding the image noise corresponding to all target noise types to the initial soil simulation image.
[0099] Based on the preset noise addition strategy corresponding to the target noise type, image noise corresponding to the target noise type is added to the initial soil simulation image to perform image processing on the initial soil simulation image.
[0100] In the method provided by this invention, a preset noise addition strategy is pre-set for each noise type. Specifically, dark noise and shot noise follow a Poisson distribution, readout noise follows a Gaussian distribution, and impulse noise is randomly distributed. The Poisson distribution can be approximated as a Gaussian distribution under certain conditions. Gaussian white noise can be used to simulate dark noise, shot noise, and readout noise, while salt-and-pepper noise can be used to simulate impulse noise. Based on this, preset noise addition strategies are set for each noise type. Gaussian noise refers to a type of noise whose probability density function follows a Gaussian distribution (i.e., a normal distribution). Gaussian noise affects almost every pixel in an image. Salt-and-pepper noise is noise that appears at random locations in an image with a relatively fixed noise depth.
[0101] In the method provided by the embodiments of the present invention, a preset noise addition strategy corresponding to the target noise type is used to add corresponding image noise to the initial soil simulation image to obtain an image with added image noise, thereby realizing image processing.
[0102] Based on the method provided in the embodiments of the present invention, noise can be added to an image to obtain a simulated image of soil with noise.
[0103] exist Figure 1 Based on the method shown, in the method provided by this embodiment of the invention, the multiple image processing strategies mentioned in step S105 include a translation processing strategy, and the application strategy set includes the translation processing strategy. Therefore, the image processing of the initial soil simulation image according to the image processing strategy in the application strategy set mentioned in step S106 includes the process of processing the initial soil simulation image according to the translation processing strategy. This process includes:
[0104] Based on a preset translation function, the translational deformation coordinates corresponding to each target soil particle simulation image in the initial soil simulation image are determined;
[0105] In the method provided by this invention, the translation processing strategy refers to the image processing strategy of translating and deforming the image. When the user selects to add the environmental influence factor of translation deformation to the image, the server can calculate the coordinates corresponding to each target soil particle simulation image in the initial soil simulation image after translation deformation, i.e., translation deformation coordinates, according to the preset translation function and the current coordinates of each target soil particle simulation image in the initial soil simulation image.
[0106] Based on the respective translational deformation coordinates, the coordinates of each target soil particle simulation image in the initial soil simulation image are adjusted to perform image processing on the initial soil simulation image.
[0107] In the method provided by the embodiments of the present invention, for each target soil particle simulation image in the initial soil simulation image, its corresponding translational deformation coordinates are used as its new position coordinates, thereby adjusting the position of each target soil particle simulation image in the initial soil simulation image to obtain the adjusted image, so as to realize image processing.
[0108] For example, let Let be the initial position coordinates of the simulated image of the nth target soil particle. Let be the coordinates of the position reached at time t after the simulated image of the nth target soil particle is translated. Let the translation functions of the soil particles in the x and y directions be u(t) and v(t), respectively. Then the position of the simulated image of the nth target soil particle after translation deformation at time t is:
[0109]
[0110] Assuming soil particles move only in the x-direction, and the translation function is u(t) = Asin(ωt), where A represents the displacement amplitude (taken as 1.5 mm) and ω represents the angular frequency (taken as [0, π]), the translational deformation coordinates of the simulated images of each target soil particle at a specified time point are generated based on this translation function. Then, the simulated images of each target soil particle are refilled according to these translational deformation coordinates to obtain the processed image. In practical applications, the translational deformation coordinates of the simulated images of each target soil particle at different time points can be generated according to the preset translation function, resulting in translated deformation processed images at different time points, and thus a sequence of simulated images.
[0111] It should be noted that in the various formulas mentioned below The meaning of is the same as that of the corresponding character in Equation 2, and will not be repeated hereafter.
[0112] Based on the method provided in the embodiments of the present invention, an image can be subjected to translational deformation processing to obtain a simulated image of soil with translational deformation.
[0113] exist Figure 1 Based on the method shown, in the method provided by this embodiment of the invention, the multiple image processing strategies mentioned in step S105 include a rotation processing strategy, and the application strategy set includes the rotation processing strategy. Therefore, the image processing of the initial soil simulation image according to the image processing strategy in the application strategy set mentioned in step S106 includes the process of processing the initial soil simulation image according to the rotation processing strategy. This process includes:
[0114] Determine the rotation angle corresponding to the image generation instruction;
[0115] In the method provided by this invention, the rotation processing strategy refers to an image processing strategy that performs rotational deformation processing on the image. When a user selects to add rotational deformation as an environmental influence factor to the image, the user can input the rotation angle through the system front end. The user-input rotation angle can be sent to the server through image generation instructions. During processing, the server can obtain the rotation angle by parsing the image generation instructions.
[0116] Based on the preset rotational motion function, the preset rotation center point, and the rotation angle, the rotational deformation coordinates corresponding to each target soil particle simulation image in the initial soil simulation image are determined;
[0117] In the method provided by the embodiments of the present invention, a rotational motion function and a rotation center point can be preset. When performing rotational deformation processing, the rotation angle is substituted into the rotational motion function. Combined with the coordinates of the rotation center point, the position coordinates of each target soil particle simulation image in the initial soil simulation image after rotating around the rotation center point based on the rotational motion function can be calculated, that is, the rotational deformation coordinates.
[0118] Based on the respective rotational deformation coordinates, the coordinates of each target soil particle simulation image in the initial soil simulation image are adjusted to perform image processing on the initial soil simulation image.
[0119] In the method provided by the embodiments of the present invention, for each target soil particle simulation image in the initial soil simulation image, its corresponding rotation deformation coordinates are used as its new position coordinates, thereby adjusting the position of each target soil particle simulation image in the initial soil simulation image to achieve image processing.
[0120] For example, suppose the soil deformation is a planar rotational motion of particle clusters about point O. Let the rotational motion function about point O be θ(t), and the function value of this function is the rotation angle in this planar rotational motion. The coordinates of point O are (x...). c y c Given that the positional relationships and the radius of rotation remain unchanged, the position of the simulated image of the nth target soil particle at time t after rotation is:
[0121]
[0122] In practical applications, it can be assumed that the rotation is around the center point, and the rotation angle θ(t) = [0, π / 4]. Based on the above rotation deformation processing, images after rotation deformation processing at different time points can be generated, and then a set of simulated image sequences after rotation deformation can be generated.
[0123] Based on the method provided in the embodiments of the present invention, an image can be rotated and deformed to obtain a simulated image of soil with rotational deformation.
[0124] exist Figure 1 Based on the method shown, in the method provided by this embodiment of the invention, the multiple image processing strategies mentioned in step S105 include a compression processing strategy, and the application strategy set includes the compression processing strategy. Therefore, the image processing of the initial soil simulation image according to the image processing strategy in the application strategy set mentioned in step S106 includes the process of processing the initial soil simulation image according to the compression processing strategy. This process includes:
[0125] Determine the compression amount corresponding to the image generation instruction;
[0126] In the method provided by this invention, the compression processing strategy refers to an image processing strategy that performs compression and deformation processing on the image. When a user selects to add the environmental impact factor of compression and deformation to the image, they can input the compression amount through the system front end. The compression amount can be specifically expressed as a percentage. The compression amount input by the user can be sent to the server through an image generation command. The server can obtain the compression amount input by the user, that is, the compression amount corresponding to the image generation command, by parsing the image generation command.
[0127] Based on the compression amount and the preset compression deformation function, determine the compression deformation coordinates corresponding to the simulated image of each target soil particle in the initial soil simulation image;
[0128] In the method provided by this embodiment of the invention, the compression amount is substituted into a preset compression deformation function, and combined with the current coordinates of each target soil particle simulation image in the initial soil simulation image, the position coordinates of each target soil particle simulation image after compression deformation can be calculated, that is, the compression deformation coordinates.
[0129] Based on the respective compression deformation coordinates, the coordinates of each target soil particle simulation image in the initial soil simulation image are adjusted to perform image processing on the initial soil simulation image.
[0130] In the method provided by this embodiment of the invention, for each target soil particle simulation image in the initial soil simulation image, the compression deformation coordinates corresponding to the target soil particle simulation image are used as the new position coordinates of the target soil particle simulation image, thereby adjusting the position of each target soil particle simulation image in the initial soil simulation image and realizing image processing.
[0131] For example, assuming the total compression deformation function of the soil is k(T), and the compression is linearly distributed with respect to the distance from the bottom edge (i.e., the compression is 0 at the bottom and maximum at the top), and assuming the height of the simulated image plane is h. y Then, the position of the simulated image of the nth target soil particle at time t after compression deformation is:
[0132]
[0133] In practical applications, compression deformation processing can be used to generate compression deformation coordinates of simulated images of each target soil particle at different time points, thereby obtaining images after compression deformation at different time points, and finally obtaining a set of simulated image sequences.
[0134] Based on the method provided in the embodiments of the present invention, an image can be compressed and deformed to obtain a simulated image of soil with compression deformation.
[0135] exist Figure 1Based on the method shown, in the method provided by this embodiment of the invention, the multiple image processing strategies mentioned in step S105 include a cropping strategy, and the application strategy set includes the cropping strategy. Therefore, the image processing of the initial soil simulation image according to the image processing strategy in the application strategy set mentioned in step S106 includes the process of processing the initial soil simulation image according to the cropping strategy. This process includes:
[0136] Determine the amount of shearing corresponding to the image generation instruction;
[0137] In the method provided by this invention, the shearing processing strategy refers to an image processing strategy that performs shear deformation processing on the image. Shear deformation in soil deformation measurement refers to the deformation form in which soil particles undergo relative displacement when subjected to an external force with parallel, closely spaced, and opposite directions. When a user selects to add shear deformation as an environmental influence factor to the image, they can input the shearing amount through the system front end. The shearing amount can be specifically expressed as a percentage. The user-inputted shearing amount is sent to the server via image generation instructions. The server can determine the corresponding shearing amount through instruction parsing.
[0138] Based on the preset shear strain function and the shear amount, the shear deformation coordinates corresponding to the simulated image of each target soil particle in the initial soil simulation image are determined;
[0139] In the method provided by the embodiments of the present invention, the shear amount is substituted into a preset shear strain function, and combined with the current position of the target soil particle simulation image in the initial soil simulation image, the position coordinates of each target soil particle simulation image after shear deformation can be calculated, that is, the shear deformation coordinates.
[0140] Based on the shear deformation coordinates, the coordinates of the simulated images of each target soil particle in the initial soil simulation image are adjusted to perform image processing on the initial soil simulation image.
[0141] In the method provided by this embodiment of the invention, for each target soil particle simulation image in the initial soil simulation image, the shear deformation coordinates corresponding to the target soil particle simulation image are used as the new position coordinates of the target soil particle simulation image, thereby adjusting the position of each target soil particle simulation image in the initial soil simulation image and realizing image processing.
[0142] For example, suppose the soil undergoes shear deformation along the x-axis, with the nth soil particle located at the center of the deformation element. The deformation element has a length Δl and a height Δh, and its volume remains constant during deformation. The deformation element has a uniform and equal shear strain. If the shear strain is represented by the motion of the central particle, the motion will be divided into two parts: the motion relative to the element and the overall motion of the element. The motion relative to the element is the shear strain function, which can be denoted as... The overall motion of the unit can be set as a function. That is, the lower boundary of the element moves, then the position of the simulated image of the nth target soil particle at time t after shear deformation is:
[0143]
[0144] In practical applications, images at different time points after shear deformation can be generated based on shear deformation processing to obtain a set of simulated image sequences.
[0145] Based on the method provided in the embodiments of the present invention, images can be sheared and deformed to obtain simulated images of soil with shear deformation.
[0146] It should be noted that in the various embodiments of image processing strategies provided above for the application strategy set, each embodiment is only an example of one specific image processing strategy. In the actual implementation process, the generation of soil simulation images may involve multiple image processing strategies mentioned in the above embodiments.
[0147] To better illustrate the method provided in the embodiments of the present invention, and in conjunction with practical application scenarios, the embodiments of the present invention provide yet another method for generating soil simulation images. The method provided in the embodiments of the present invention can be understood as an artificial image generation method based on particle features and preset deformation calibration image deformation analysis technology. The soil simulation image generation process provided in the embodiments of the present invention can be as follows: Figure 3 As shown, it mainly includes:
[0148] Digital soil particle modeling;
[0149] In the method provided by this invention, Fujian standard sand is used as the simulation target. Real soil particle images are captured using equipment such as a super depth-of-field microscope. Based on the captured images, the soil particle shape is approximated as elliptical, and data such as particle size, particle roundness, particle major axis angle, and particle color are set to perform image modeling. The simulated soil particle image is shown below. Figure 2 As shown.
[0150] Given space, fill with particles;
[0151] In the method provided by this embodiment of the invention, 1750 sand particles are photographed, and the particle group distribution, color value distribution, roundness distribution, and two-dimensional spatial position distribution of the soil particles in the real soil images taken for this type of sand are comprehensively analyzed. The particle group distribution is as follows: Color value distribution is Roundness distribution The two-dimensional spatial distribution is P{x n ≤L, y n ≤W}, b in each formula n b, c, L, and W are constants set according to actual statistical conditions, μ represents the mean of the corresponding statistic, σ represents the standard deviation of the corresponding statistic, and x and y represent the positions of the corresponding soil particles. The statistical distribution of particle size distribution can be shown as follows: Figure 4 As shown in the figure, the horizontal axis represents the diameter of soil particles, and the vertical axis represents the percentage of soil particles with a diameter smaller than the corresponding diameter. The statistical distribution of soil particle roundness can be seen as follows: Figure 5 As shown in the figure, the horizontal axis represents the roundness of soil particles, and the vertical axis represents the cumulative percentage of soil particles. The statistical distribution of soil particles in two dimensions can be seen as follows: Figure 6 As shown in the figure, the horizontal axis represents the position of soil particles in the x-direction, and the vertical axis represents the number of soil particles at the corresponding position. Based on the particle distribution of a real soil image, a pre-constructed simulated image of soil particles is used to represent the soil particles, and particles are then used to fill a given space.
[0152] Rasterized image generation;
[0153] In the method provided by this invention, a given space filled with particles is subjected to gridding processing to generate an artificial soil image with a preset image resolution, pixel size (physical size), and particle size to pixel ratio. Factors such as light intensity, uneven lighting, and environmental noise are also introduced. For the addition of light and noise, please refer to the descriptions of the light processing strategy and noise processing strategy in the previous embodiments, which will not be repeated here.
[0154] Deformation simulation;
[0155] The method provided in this invention can introduce arbitrary deformation functions to generate simulated images of static and dynamic deformation of soil, while maintaining the rigidity of the particles during this process. It incorporates translational motion, rotational deformation, compression deformation, and shear deformation processing. Specific processing methods can be found in the preceding descriptions of the translational, rotational, compression, and shear processing strategies, and will not be repeated here.
[0156] The overall processing can be understood as follows: First, images of sand and soil are acquired using equipment such as ultra-depth-of-field microscopes. Image analysis is then used to obtain information such as the size, roundness, and color of individual soil particles. Particle angles are randomly set according to a uniform distribution to digitally model the soil particles. Second, the entire image containing thousands of soil particles is analyzed to obtain the global particle group distribution, color value distribution, roundness distribution, and two-dimensional spatial position distribution. Distribution functions are fitted, and a specified space is filled based on the soil particle model and the distribution functions. Then, the image is rasterized into a simulated soil particle image of a specified size and resolution. Parameters can be adjusted to obtain images with different lighting intensities, or to add noise, uneven lighting, lens distortion, and other factors. Finally, an arbitrary deformation function is introduced to change the coordinates of the soil particles according to a predetermined deformation method, and the image is rasterized back into a simulated image according to the original parameters; this is the deformed simulated image.
[0157] The pseudocode for the method implementation can be shown below:
[0158]
[0159]
[0160]
[0161] Next, we will briefly describe the calibration results of two image deformation analysis techniques for the soil simulation image obtained by applying the deformation processing method mentioned in the embodiments of this invention. The calibrated image deformation analysis techniques are PIVlab and RG-DIC, both of which are existing image deformation analysis techniques and will not be described in detail here.
[0162] Regarding the processing of translational motion, by modifying the amplitude A and repeatedly generating translational deformation images, the two image deformation techniques were evaluated using simulated image sequences generated based on the method provided in this embodiment and speckle images from the prior art. The analysis error gradually increases as the amplitude decreases. Meanwhile, the analysis error of the speckle image is significantly smaller than that of the soil simulation image generated based on the method provided in this embodiment, indicating that the speckle image method overestimates the analysis accuracy when evaluating image deformation analysis methods. Furthermore, the analysis error of the RG-DIC method is smaller than that of the PIVlab method. When A = 0.1 mm, the errors are 1.5% and 5.5% respectively; when A = 0.01 mm, the errors are 18.7% and 40.6% respectively. Calculations show that the translational analysis accuracies of the RG-DIC method and the PIVlab method are 0.01 mm and 0.05 mm, respectively.
[0163] Regarding the handling of rotational deformation, when θ(t) = π / 36, the two image deformation analysis techniques were calibrated using the soil simulation image generated based on the method provided in this embodiment of the invention. The displacement field analysis results of the RG-DIC method and the PIVlab method show that the former's displacement field is a series of concentric circles with clear boundaries, while the latter's displacement field, although exhibiting concentric circle characteristics, has blurred and irregular boundaries, and becomes increasingly distorted with increasing radius. This indicates that the stability and accuracy of the RG-DIC method for rotational deformation analysis are significantly higher than those of the PIVlab method.
[0164] Regarding the treatment of compressive deformation, when k(T) = 1.0%h y In this study, soil simulation images generated using the method provided in this embodiment of the invention were used to calibrate two image deformation analysis techniques. Displacement field equipotential lines were obtained through analysis using the RG-DIC method and the PIVlab method. The actual equipotential lines are a series of equally spaced horizontal lines. The equipotential lines obtained by the RG-DIC method are basically equally spaced horizontal lines, exhibiting some minor distortion with increasing height from the bottom edge, but this distortion is negligible. In contrast, the equipotential lines obtained by the PIVlab method show significant distortion, further demonstrating the superiority of the RG-DIC method.
[0165] Regarding the handling of shear deformation, the shear strain is set to 0-10%, corresponding to the generation of a set of soil simulation image sequences. The two image deformation analysis techniques are calibrated using the soil simulation images generated based on the method provided in this embodiment. Theoretically, the shear strain at each observation point should be completely consistent. However, in reality, when the distance from the bottom boundary is too large, the shear strain obtained by the PIVlab method shows significant dispersion, which intensifies with increasing distance from the bottom boundary, even exhibiting distortion of shear strain in opposite directions. In contrast, the shear strain obtained by the RG-DIC method is relatively more accurate and stable.
[0166] Based on the method provided in this invention, the generated soil simulation image can effectively reflect and control the roundness, color value, composition, and pose of soil particles. Compared with previous speckle images, the simulation image generated by the method provided in this invention can be used to simulate factors and texture features such as the composition, color value, roundness, and pose of soil particles, maintaining a high degree of similarity to real soil particle images. During the generation process, all parameters can be manually adjusted, enabling research on the impact of single factors and texture features on the reliability of image deformation analysis methods.
[0167] The method provided in this invention uses a single soil particle as the basic unit to simulate shape, color, and motion, and can realize the rotation of a single particle during motion. Arbitrary deformation functions can be introduced, realistically reflecting the translation, compression, rotation, and shearing processes between particles in typical soil deformation, while maintaining the stability of individual soil particles. This provides research conditions for the reliability evaluation of image analysis of static and dynamic deformation.
[0168] The method provided in this invention can incorporate test conditions such as light intensity, uneven lighting, and environmental noise, providing conditions for answering the impact of observation conditions on image deformation analysis methods and standardizing test techniques.
[0169] The soil simulation images generated by the method provided in the embodiments of the present invention are suitable for evaluating the actual performance of various image deformation analysis techniques in analyzing soil deformation, and for exploring the impact of different types of soil and environmental factors on the accuracy of analysis.
[0170] and Figure 1 Corresponding to the method for generating a soil simulation image shown, this embodiment of the invention also provides a soil simulation image generation system for generating soil simulation images. Figure 1 The specific implementation of the method shown is illustrated in the following diagram. Figure 7 As shown, it includes:
[0171] The first determining unit 201 is used to determine the number of soil particles, image information, and particle distribution information corresponding to the image generation instruction when it receives an image generation instruction sent by a user; the image information includes image size and image resolution, and the particle distribution information includes multiple sets of particle morphology data and the particle ratio corresponding to each set of particle morphology data.
[0172] The second determining unit 202 is used to determine multiple target soil particle simulation images based on the number of soil particles, the particle distribution information, and a preset soil particle simulation image library; the soil particle simulation image library contains multiple pre-constructed soil particle simulation images.
[0173] The filling unit 203 is used to create an image space and fill the image space with simulated images of each target soil particle according to a preset distribution function to obtain a filled image space.
[0174] The image generation unit 204 is used to generate an initial soil simulation image corresponding to the filled image space based on the image information; the initial soil simulation image includes simulation images of each of the target soil particles;
[0175] The third determining unit 205 is used to determine the application strategy set corresponding to the image generation instruction based on a set of preset image processing strategies; the application strategy set includes at least one image processing strategy among the multiple image processing strategies.
[0176] The image processing unit 206 is used to perform image processing on the initial soil simulation image according to the image processing strategy in the application strategy set, to obtain a simulation image corresponding to the initial soil simulation image, and to use the simulation image as the final soil simulation image.
[0177] The system provided in this invention can generate an initial soil simulation image based on a simulated soil particle image, according to a specified number of soil particles, image size, image resolution, and particle distribution. The initial soil simulation image can then be processed using a specified image processing strategy to obtain the final soil simulation image. The basic unit in the generated soil simulation image is the simulated soil particle image, which has a high similarity to the real soil image. It can provide a reference for evaluating image deformation analysis techniques for soil deformation measurement in terms of image texture and color value distribution. Furthermore, image processing can simulate environmental influences such as illumination and deformation. The soil simulation image can be used to evaluate the impact of observation conditions on image deformation analysis techniques, thereby improving the accuracy of image deformation analysis evaluation techniques for soil deformation measurement.
[0178] exist Figure 7 Based on the system shown, in the system provided by the embodiments of the present invention, the multiple image processing strategies include an illumination processing strategy, the application strategy set includes the illumination processing strategy, and the image processing unit 206 includes:
[0179] The first determining subunit is used to determine the illumination intensity and illumination mode corresponding to the image generation instruction;
[0180] The second determining subunit is used to determine the image matrix corresponding to the initial soil simulation image;
[0181] The first processing subunit is used to add illumination values to the image matrix according to the illumination intensity and the illumination mode, so as to perform image processing on the initial soil simulation image.
[0182] exist Figure 7 Based on the system shown, in the system provided by the embodiments of the present invention, the various image processing strategies include a noise processing strategy, the application strategy set includes the noise processing strategy, and the image processing unit 206 includes:
[0183] The third determining subunit is used to determine the target noise type corresponding to the image generation instruction from a preset variety of noise types; the variety of noise types includes dark noise, shot noise, readout noise, and impulse noise;
[0184] The second processing subunit is used to add image noise corresponding to the target noise type to the initial soil simulation image according to the preset noise addition strategy corresponding to the target noise type, so as to perform image processing on the initial soil simulation image.
[0185] exist Figure 7 Based on the system shown, the system provided in this embodiment of the invention can be further extended to include multiple units. The functions of each unit can be found in the descriptions of the various embodiments of the soil simulation image generation method provided above, and will not be further illustrated here.
[0186] This invention also provides a soil simulation image generation storage medium, which includes stored instructions, wherein the execution of the instructions controls the device where the soil simulation image generation storage medium is located to execute the soil simulation image generation method described above.
[0187] This invention also provides an electronic device for generating soil simulation images, the schematic diagram of which is shown below. Figure 8 As shown, it specifically includes a memory 301 and one or more instructions 302, wherein one or more instructions 302 are stored in the memory 301 and configured to be executed by one or more processors 303 to perform the following operations:
[0188] When an image generation instruction sent by a user is received, the number of soil particles, image information, and particle distribution information corresponding to the image generation instruction are determined; the image information includes image size and image resolution, and the particle distribution information includes multiple sets of particle morphology data and the particle ratio corresponding to each set of particle morphology data.
[0189] Based on the number of soil particles, the particle distribution information, and a pre-set soil particle simulation image library, multiple target soil particle simulation images are determined; the soil particle simulation image library contains multiple pre-constructed soil particle simulation images.
[0190] An image space is created, and according to a preset distribution function, the simulated images of each target soil particle are filled into the image space to obtain the filled image space.
[0191] Based on the image information, an initial soil simulation image corresponding to the filled image space is generated; the initial soil simulation image contains simulation images of each of the target soil particles;
[0192] Based on a set of pre-set image processing strategies, a set of application strategies corresponding to the image generation instruction is determined; the set of application strategies includes at least one of the multiple image processing strategies.
[0193] Based on the image processing strategies in the application strategy set, the initial soil simulation image is processed to obtain the simulation image corresponding to the initial soil simulation image, and the simulation image is used as the final soil simulation image.
[0194] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0195] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0196] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating simulated soil images, characterized in that, include: When an image generation instruction sent by a user is received, the number of soil particles, image information, and particle distribution information corresponding to the image generation instruction are determined; the image information includes image size and image resolution, and the particle distribution information includes multiple sets of particle morphology data and the particle ratio corresponding to each set of particle morphology data. Based on the number of soil particles, the particle distribution information, and a pre-set soil particle simulation image library, multiple target soil particle simulation images are determined; the soil particle simulation image library contains multiple pre-constructed soil particle simulation images. An image space is created, and according to a preset distribution function, the simulated images of each target soil particle are filled into the image space to obtain the filled image space. Based on the image information, an initial soil simulation image corresponding to the filled image space is generated; the initial soil simulation image contains simulation images of each of the target soil particles; Based on a set of pre-set image processing strategies, a set of application strategies corresponding to the image generation instruction is determined; the set of application strategies includes at least one of the pre-set image processing strategies; the pre-set image processing strategies include any combination of lighting processing strategies, noise processing strategies, translation processing strategies, rotation processing strategies, compression processing strategies, and cropping processing strategies. Based on the image processing strategies in the application strategy set, the initial soil simulation image is processed to obtain the simulation image corresponding to the initial soil simulation image, and the simulation image is used as the final soil simulation image.
2. The method according to claim 1, characterized in that, The various image processing strategies include illumination processing strategies, the application strategy set includes the illumination processing strategies, and the process of processing the initial soil simulation image according to the illumination processing strategies includes: Determine the illumination intensity and illumination mode corresponding to the image generation command; Determine the image matrix corresponding to the initial soil simulation image; Based on the light intensity and the light pattern, the image matrix is processed by adding light values to perform image processing on the initial soil simulation image.
3. The method according to claim 1, characterized in that, The various image processing strategies include a noise processing strategy, the application strategy set includes the noise processing strategy, and the process of processing the initial soil simulation image according to the noise processing strategy includes: Among a variety of preset noise types, the target noise type corresponding to the image generation instruction is determined; the various noise types include dark noise, shot noise, readout noise, and impulse noise. Based on the preset noise addition strategy corresponding to the target noise type, image noise corresponding to the target noise type is added to the initial soil simulation image to perform image processing on the initial soil simulation image.
4. The method according to claim 1, characterized in that, The various image processing strategies include a translation processing strategy, the application strategy set includes the translation processing strategy, and the process of processing the initial soil simulation image according to the translation processing strategy includes: Based on a preset translation function, the translational deformation coordinates corresponding to each target soil particle simulation image in the initial soil simulation image are determined; Based on the respective translational deformation coordinates, the coordinates of each target soil particle simulation image in the initial soil simulation image are adjusted to perform image processing on the initial soil simulation image.
5. The method according to claim 1, characterized in that, The various image processing strategies include a rotation processing strategy, the application strategy set includes the rotation processing strategy, and the process of processing the initial soil simulation image according to the rotation processing strategy includes: Determine the rotation angle corresponding to the image generation instruction; Based on the preset rotational motion function, the preset rotation center point, and the rotation angle, the rotational deformation coordinates corresponding to each target soil particle simulation image in the initial soil simulation image are determined; Based on the respective rotational deformation coordinates, the coordinates of each target soil particle simulation image in the initial soil simulation image are adjusted to perform image processing on the initial soil simulation image.
6. The method according to claim 1, characterized in that, The various image processing strategies include a compression processing strategy, the application strategy set includes the compression processing strategy, and the process of processing the initial soil simulation image according to the compression processing strategy includes: Determine the compression amount corresponding to the image generation instruction; Based on the compression amount and the preset compression deformation function, determine the compression deformation coordinates corresponding to the simulated image of each target soil particle in the initial soil simulation image; Based on the respective compression deformation coordinates, the coordinates of each target soil particle simulation image in the initial soil simulation image are adjusted to perform image processing on the initial soil simulation image.
7. The method according to claim 1, characterized in that, The various image processing strategies include a cropping strategy, the application strategy set includes the cropping strategy, and the process of processing the initial soil simulation image according to the cropping strategy includes: Determine the amount of shearing corresponding to the image generation instruction; Based on the preset shear strain function and the shear amount, the shear deformation coordinates corresponding to the simulated image of each target soil particle in the initial soil simulation image are determined; Based on the shear deformation coordinates, the coordinates of the simulated images of each target soil particle in the initial soil simulation image are adjusted to perform image processing on the initial soil simulation image.
8. A soil simulation image generation system, characterized in that, include: The first determining unit is used to determine the number of soil particles, image information, and particle distribution information corresponding to the image generation instruction when it receives an image generation instruction sent by a user; the image information includes image size and image resolution, and the particle distribution information includes multiple sets of particle morphology data and the particle ratio corresponding to each set of particle morphology data. The second determining unit is used to determine multiple target soil particle simulation images based on the number of soil particles, the particle distribution information, and a preset soil particle simulation image library; the soil particle simulation image library contains multiple pre-constructed soil particle simulation images. A filling unit is used to create an image space and fill the image space with simulated images of each target soil particle according to a preset distribution function to obtain a filled image space. An image generation unit is configured to generate an initial soil simulation image corresponding to the filled image space based on the image information; the initial soil simulation image includes simulation images of each of the target soil particles; The third determining unit is used to determine the set of application strategies corresponding to the image generation instruction based on a set of preset image processing strategies; the set of application strategies includes at least one of the preset image processing strategies; the preset image processing strategies include any combination of lighting processing strategy, noise processing strategy, translation processing strategy, rotation processing strategy, compression processing strategy and shearing processing strategy. The image processing unit is used to perform image processing on the initial soil simulation image according to the image processing strategy in the application strategy set, to obtain a simulation image corresponding to the initial soil simulation image, and to use the simulation image as the final soil simulation image.
9. The system according to claim 8, characterized in that, The various image processing strategies include illumination processing strategies, the application strategy set includes the illumination processing strategies, and the image processing unit includes: The first determining subunit is used to determine the illumination intensity and illumination mode corresponding to the image generation instruction; The second determining subunit is used to determine the image matrix corresponding to the initial soil simulation image; The first processing subunit is used to add illumination values to the image matrix according to the illumination intensity and the illumination mode, so as to perform image processing on the initial soil simulation image.
10. The system according to claim 8, characterized in that, The various image processing strategies include a noise processing strategy, the application strategy set includes the noise processing strategy, and the image processing unit includes: The third determining subunit is used to determine the target noise type corresponding to the image generation instruction from a preset variety of noise types; the variety of noise types includes dark noise, shot noise, readout noise, and impulse noise; The second processing subunit is used to add image noise corresponding to the target noise type to the initial soil simulation image according to the preset noise addition strategy corresponding to the target noise type, so as to perform image processing on the initial soil simulation image.