Foam light soil microstructure analysis method based on image recognition

By employing image recognition-based methods, combined with an industrial CCD camera and metallographic microscope, and using improved watershed and grey relational entropy algorithms, the problems of speed, low cost, and accuracy in microstructure analysis of foamed lightweight soil were solved. This enabled accurate quantification of pore characteristics and correlation analysis of mechanical properties, thereby improving the reliability of engineering optimization.

CN122116350APending Publication Date: 2026-05-29RES INST OF HIGHWAY MINIST OF TRANSPORT

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
RES INST OF HIGHWAY MINIST OF TRANSPORT
Filing Date
2026-02-04
Publication Date
2026-05-29

Smart Images

  • Figure CN122116350A_ABST
    Figure CN122116350A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of building material microstructure analysis, and in particular to a foam light soil microstructure analysis method based on image recognition; a foam light soil forming test piece is selected, and a flaky analysis sample is obtained after surface treatment; an imaging device is used to collect multi-view images of the sample, and two-dimensional images meeting the analysis accuracy are obtained; the collected images are subjected to denoising, segmentation and quality optimization processing, and the boundary features of the pores and matrix are highlighted; the pore area is extracted through an image segmentation algorithm, the pore profile is automatically identified and microstructure characteristic parameters are collected, and an analysis model is constructed based on the characteristic parameters; the present application includes sample preparation, multi-view image acquisition, optimization preprocessing, feature identification and analysis steps, and through multi-angle collection and algorithm optimization, the pore features are accurately quantified, the information loss and quantization errors of traditional methods are avoided, and the present application has the advantages of low cost, high efficiency and accurate analysis of foam light soil microstructure features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microstructure analysis technology for building materials, specifically a method for microstructure analysis of foamed lightweight soil based on image recognition. Background Technology

[0002] Foamed lightweight soil, as a novel engineering material, has been widely used in civil engineering practices such as roadbed backfilling, foundation pit support, and building insulation due to its comprehensive advantages including lightweight, high strength, and thermal insulation. The macroscopic mechanical properties of the material, such as compressive strength and elastic modulus, as well as key indicators like impermeability, are closely related to its internal microstructure characteristics. Among these, parameters such as pore morphology, spatial distribution, and connectivity directly affect the overall performance of the material. Therefore, achieving accurate quantitative analysis of microstructural characteristics is a core technical step in optimizing the mix design of foamed lightweight soil and improving engineering quality and durability.

[0003] However, current mainstream analytical techniques face multiple limitations: while traditional CT scanning methods can provide three-dimensional structural information, the cost of equipment purchase and maintenance is extremely high, the single detection process is time-consuming and requires a professional laboratory environment, making it difficult to meet the rapid detection needs of large batches of samples at construction sites; conventional image recognition technologies mostly use single-view image acquisition methods, which can easily lead to the loss of pore information and feature extraction deviations when there are irregular undulations or partial occlusions on the sample surface; at the same time, existing image preprocessing algorithms, such as fixed threshold segmentation, are not adaptable enough to processing low-contrast images such as foamed lightweight soil, making it difficult to clearly define the boundaries between pore and matrix regions; in the process of pore morphology quantification, most methods only calculate parameters based on two-dimensional projection images, ignoring the influence of three-dimensional volume features, resulting in systematic errors in the description of the true geometric morphology of pores; the correlation analysis between microstructure parameters and macroscopic performance lacks effective mathematical model support, making it impossible to accurately quantify the contribution weight of each parameter to mechanical performance, resulting in a lack of targeted guidance for engineering optimization; in addition, some analysis processes lack independent result verification mechanisms, making it difficult to fully guarantee the reliability of analysis results, which may mislead engineering decisions.

[0004] Therefore, we propose an image recognition-based microstructure analysis method for foamed lightweight soil to address the above problems. Summary of the Invention

[0005] (a) Technical problems to be solved To address the shortcomings of existing technologies, this invention provides an image recognition-based method for analyzing the microstructure of foamed lightweight soil. This method offers advantages such as low cost, high efficiency, and accurate analysis of the microstructure characteristics of foamed lightweight soil, thereby optimizing material mix design and improving engineering performance, and solving the problems mentioned in the background section.

[0006] (II) Technical Solution To achieve the above objectives, the present invention specifically adopts the following technical solution: A method for microstructure analysis of foamed lightweight soil based on image recognition includes the following steps: S1. Sample preparation: Select foamed lightweight soil molded specimens and obtain thin sheet-like analytical samples after surface treatment; S2. Image acquisition: Imaging equipment is used to acquire multi-view images of the sample to obtain two-dimensional images that meet the analytical accuracy requirements; S3. Image preprocessing: Denoising, segmentation, and quality optimization are performed on the acquired images to highlight the boundary features of pores and matrix; S4. Feature Recognition: Extract pore regions using image segmentation algorithms, automatically identify pore contours, and collect microstructure feature parameters; S5. Microstructure Analysis: Based on characteristic parameters, an analysis model is constructed, and an analysis report containing pore morphology, distribution, and performance correlation is output.

[0007] Further, the sample preparation in step S1 specifically includes: selecting a standard molded specimen of foamed lightweight soil with a size of 50mm×50mm×50mm, curing for 7 days, 14 days or 28 days, vertically slicing the specimen using a diamond slicer to obtain a thin slice with a thickness of 0.5-2mm, gradually polishing it with 1200-grit sandpaper until the surface roughness Ra≤0.8μm, and finally cleaning it with anhydrous ethanol and air drying it naturally.

[0008] Furthermore, in step S2, the image acquisition uses a combination of an industrial CCD camera and a metallurgical microscope. During image acquisition, a ring-shaped uniform light source is used for supplementary lighting. The acquisition angle covers the upper surface, lower surface, and four side surfaces of the sample. Three to five acquisition points are evenly selected on each surface, and two to three repeated images are taken at each point to eliminate random errors.

[0009] Furthermore, the image preprocessing in step S3 includes the following steps: first, median filtering with a 3×3 template is used for denoising to remove salt-and-pepper noise from the image; then, an adaptive threshold segmentation algorithm is used to separate the pore and matrix regions, with the initial threshold value set based on the bimodal mean of the image grayscale histogram; finally, morphological opening operations are used to remove small noise points after segmentation, with the opening operation structuring element using a 5×5 square template.

[0010] Furthermore, in step S4, the feature recognition adopts an improved watershed algorithm, which avoids over-segmentation through a label control strategy: first, the preprocessed image is subjected to distance transformation, and then the distance transformation result is subjected to threshold segmentation to obtain the foreground label. The image edge detection result is used as the background label. Based on the dual label constraint, the accurate segmentation of the pore region is achieved. The extracted feature parameters include pore area, perimeter, equivalent diameter, number of pores and pore spacing.

[0011] Furthermore, the pore morphology coefficient in step S4 is calculated using the following formula: in: This is the pore shape coefficient, with a value ranging from 0 to 1. The closer it is to 1, the closer the pore is to an ideal sphere. The two-dimensional projected area of ​​the pore (μm²) is obtained by integrating the contour pixels. The pore perimeter (μm) is extracted using a chain code tracing algorithm; The pore volume (μm³) is calculated by reconstructing images from multiple perspectives. The equivalent diameter of the pore (μm) is the diameter of a circle with the same area as the pore. This formula achieves precise quantification of pore morphology by coupling two-dimensional morphology with three-dimensional volume features.

[0012] Furthermore, the microstructure analysis in step S5 includes pore distribution uniformity analysis, which quantifies the dispersion of pore size distribution by statistically analyzing the ratio of the standard deviation to the mean of the equivalent diameter of all pores. When the ratio is ≤20%, it is determined that the pore distribution is uniform, and the coefficient of variation of the mechanical properties of the foamed lightweight soil is ≤15%.

[0013] Furthermore, in step S5, the connectivity quantification uses the following formula to calculate the connectivity index: Connectivity index (μm) -1 A higher value indicates stronger pore connectivity. The length (μm) of the i-th connected path is determined by the shortest path algorithm; The number of branches in the i-th connected path is counted by the skeleton extraction algorithm; Let be the area (μm²) of the j-th independent pore. n is the total number of connected paths, and m is the total number of independent pores; This index is used to characterize the connectivity of pores within foamed lightweight soil, providing a basis for assessing its impermeability.

[0014] Furthermore, in step S5, the mechanical property correlation analysis adopts the grey relational entropy algorithm, which uses pore morphology coefficient, connectivity index, and porosity as input parameters, and performs correlation calculation with the compressive strength and elastic modulus of foamed lightweight soil to output the influence weight of each microstructure parameter on mechanical properties, wherein the weight of pore morphology coefficient accounts for ≥30%.

[0015] Furthermore, it also includes a result verification step: comparing the microstructure analysis results with the CT scan test results. When the relative error of the number of pores and the equivalent diameter is ≤5%, and the relative error of the pore morphology coefficient is ≤8%, the analysis results are deemed valid; if the error exceeds the threshold, the process returns to step S3 to adjust the image preprocessing parameters and re-analyze.

[0016] (III) Beneficial Effects Compared with existing technologies, this invention provides an image recognition-based method for analyzing the microstructure of foamed lightweight soil, which has the following advantages: This invention includes sample preparation, multi-view image acquisition, optimized preprocessing, feature recognition and analysis steps. Through multi-angle acquisition and algorithm optimization, it accurately quantifies pore characteristics, avoids information loss and quantification errors of traditional methods, and has the advantages of low cost, high efficiency and accurate analysis of microstructure characteristics of foamed lightweight soil. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the process of the present invention. Detailed Implementation

[0018] 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.

[0019] Example Traditional methods for analyzing the microstructure of foamed lightweight soil suffer from high equipment costs and long testing cycles, making it difficult to meet the needs of batch testing in engineering projects. Conventional image recognition methods often rely on single-view image acquisition, which is prone to feature extraction bias due to missing information. Furthermore, image preprocessing algorithms lack specificity and struggle to effectively separate pore and matrix regions. In addition, pore morphology quantification is mostly based on two-dimensional features, ignoring three-dimensional volume information, resulting in inaccurate morphological descriptions. The correlation analysis between microstructure parameters and macroscopic performance lacks systematic algorithmic support, making it impossible to quantify the weight of each parameter's impact on performance, and the reliability of the analysis results cannot be guaranteed.

[0020] like Figure 1As shown in the figure, an embodiment of the present invention proposes a method for microstructure analysis of foamed lightweight soil based on image recognition, which includes the following steps: S1. Sample preparation: Select foamed lightweight soil molded specimens and obtain thin sheet-like analytical samples after surface treatment; S2. Image acquisition: Imaging equipment is used to acquire multi-view images of the sample to obtain two-dimensional images that meet the analytical accuracy requirements; S3. Image preprocessing: Denoising, segmentation, and quality optimization are performed on the acquired images to highlight the boundary features of pores and matrix; S4. Feature Recognition: Extract pore regions using image segmentation algorithms, automatically identify pore contours, and collect microstructure feature parameters; S5. Microstructure Analysis: Based on characteristic parameters, an analysis model is constructed, and an analysis report containing pore morphology, distribution, and performance correlation is output.

[0021] For ease of understanding, the following explains some key terms in this embodiment: Microstructure analysis of foamed lightweight soil refers to a technical approach that quantifies and evaluates the microscopic characteristics of foamed lightweight soil, such as the morphology, distribution, and connectivity of pores, to reveal the correlation between these characteristics and macroscopic mechanical and impermeability properties. This method aims to provide data support for mix design optimization, performance prediction, and engineering applications of foamed lightweight soil.

[0022] Sample preparation refers to the process of transforming raw foamed lightweight soil specimens into sheet-like samples suitable for image acquisition and microscopic analysis through a series of physical treatments. This process ensures the representativeness and surface quality of the analytical samples, laying the foundation for subsequent image processing.

[0023] Image acquisition refers to the process of using specific imaging equipment to optically scan or photograph prepared thin-film analytical samples, recording their microstructure information in the form of digital images. Multi-view acquisition aims to obtain information from different directions and depths of the sample to improve the comprehensiveness of the analysis.

[0024] Image preprocessing refers to a series of algorithmic operations performed on the original acquired digital images, including denoising, enhancement, and segmentation, in order to eliminate interference introduced during image acquisition, highlight the boundaries between pores and matrix in the image, and provide clear and accurate image data for subsequent feature recognition.

[0025] Feature recognition refers to the process of automatically detecting, extracting, and quantifying the microscopic features such as the geometry, size, quantity, and location of pores within foamed lightweight soil in a pre-processed image using specific image processing algorithms. These parameters are the fundamental data for microstructure analysis.

[0026] Microstructure analysis refers to the process of constructing corresponding mathematical or statistical models based on identified and quantified microstructure characteristic parameters to conduct an in-depth assessment and reporting of the pore morphology, distribution, connectivity, and correlation between these microscopic characteristics and macroscopic mechanical and impermeability properties of foamed lightweight soil. This analysis aims to provide comprehensive microstructure assessment results.

[0027] The implementation of this application may include the following steps: In step S1, sample preparation, foamed lightweight soil specimens of any size can be selected, such as those prepared in the laboratory or sampled from the engineering site. The specimens can be cut using conventional cutting tools, such as a hacksaw or a grinder, to obtain roughly flat sheets. Subsequently, the surface of the sheets can be simply cleaned, such as by rinsing with water or wiping with a cloth, to remove any loose particles adhering to the surface.

[0028] In step S2, image acquisition, a commercially available digital camera or mobile phone camera can be used as the imaging device to acquire images of the prepared sample. Image acquisition can be performed from several main directions of the sample, such as taking one image from above and one from the side. Ambient light can be used for illumination during acquisition to ensure that the images can roughly reflect the microstructure of the sample.

[0029] In step S3, image preprocessing, basic denoising operations can be performed on the acquired image, such as mean filtering or Gaussian filtering to smooth the image. Subsequently, a global thresholding method, such as the Otsu method, can be used to separate the pore regions from the matrix regions in the image. To improve image quality, simple contrast enhancement processing can be performed.

[0030] In step S4, feature recognition, after image segmentation, connected component analysis algorithms can be used to identify individual pore regions in the image. For each identified pore, its basic geometric feature parameters can be calculated, such as obtaining the pore area through pixel count and the pore perimeter through the number of boundary pixels. These parameters can serve as the basic data for microstructure analysis.

[0031] In step S5, the microstructure analysis, preliminary statistical analysis can be performed based on the pore characteristic parameters collected in step S4. For example, the average area and average perimeter of all pores can be calculated, and a histogram of pore sizes can be plotted to roughly understand the pore distribution. Regarding performance correlation, pore parameters can be compared with known macroscopic mechanical property data based on experience or a simple linear regression model, thus generating a report containing preliminary analysis results.

[0032] This application provides a relatively efficient and cost-effective approach to microstructure analysis of foamed lightweight soil through systematic sample preparation, multi-view image acquisition, basic image preprocessing, pore feature identification, and preliminary microstructure analysis. This method can obtain comprehensive pore information, achieve preliminary separation of pores from the matrix, and conduct a basic assessment of pore morphology, distribution, and their correlation with macroscopic properties, providing preliminary microstructure data support for the engineering application of foamed lightweight soil.

[0033] like Figure 1 As shown, in some embodiments of this application, sample preparation is proposed to obtain thin-film analytical samples. However, in its implementation, there may be inconsistencies in sample size and surface treatment, leading to insufficient image acquisition and analysis accuracy. The sample preparation in step S1 specifically includes: selecting a standard molded specimen of foamed lightweight soil with a size of 50mm×50mm×50mm, curing for 7 days, 14 days or 28 days, vertically slicing the specimen with a diamond slicer to obtain a thin film with a thickness of 0.5-2mm, gradually polishing it with 1200-grit sandpaper until the surface roughness Ra≤0.8μm, and finally cleaning it with anhydrous ethanol and air drying it naturally.

[0034] Specifically, standard molded specimens of foamed lightweight soil with dimensions of 50mm × 50mm × 50mm are selected to provide a uniform geometric basis and ensure comparability and consistency between different samples. Besides the 50mm × 50mm × 50mm cubic specimens, other sizes (e.g., 70.7mm × 70.7mm × 70.7mm cubic specimens or cylindrical specimens with specific diameters and heights) can also be selected according to specific testing standards or engineering requirements; the core principle is standardization. Curing periods of 7 days, 14 days, or 28 days are used to control the maturity and physical state of the foamed lightweight soil, ensuring that the analyzed microstructural characteristics represent the material's performance at a specific age. In addition to the above ages, other standard curing ages, such as 3 days or 56 days, can be selected based on the material's hardening characteristics or engineering application requirements. A diamond slicer is used to vertically slice the specimens to obtain flat slices with minimal damage to the internal structure. In addition to diamond slicers, precision cutting equipment such as high-speed diamond saws or wire cutters equipped with cooling systems can also be used to achieve precise cutting of the specimen and ensure consistency between the slicing direction and the original forming direction of the specimen. Thin slices with a thickness of 0.5-2 mm are obtained. This thickness range is optimized to ensure sufficient strength for handling while meeting the requirements of imaging equipment for light transmittance or surface imaging depth, thus clearly capturing microstructural details. In some special applications, if higher resolution imaging equipment such as transmission electron microscopes is used, the slice thickness may need to be further reduced to the micrometer or even nanometer level. The surface is then progressively polished with 1200-grit sandpaper until the surface roughness Ra ≤ 0.8 μm. This step, through fine mechanical processing, significantly reduces the unevenness of the sample surface, eliminates cutting marks and microscopic defects, thereby reducing light scattering and artifacts during image acquisition and enhancing the clarity of pore and matrix boundaries. Besides 1200-grit sandpaper, finer polishing pastes (such as diamond polishing paste) can be used with polishing cloths for multi-stage polishing to achieve even higher surface finish requirements. Finally, the sample is cleaned with anhydrous ethanol and allowed to air dry. This process thoroughly removes residual abrasive, cutting fluid, and other contaminants from the sample surface and ensures the sample is dry before imaging, preventing moisture from interfering with image quality and microstructure analysis results. Besides anhydrous ethanol, volatile organic solvents such as acetone or isopropanol can also be used for cleaning, followed by air drying in a clean environment or drying in a desiccator.

[0035] Through the above technical solutions, this application achieves standardization and refinement in the preparation of foamed lightweight soil samples. Selecting standard molded specimens of specific sizes and controlling the curing age effectively unifies the macroscopic physical state of the samples, avoiding analytical biases caused by sample differences. Vertical slicing using a diamond slicer and strict control of slice thickness ensures the representativeness of the analyzed samples and the suitability for imaging. Through progressive polishing to extremely low surface roughness, the optical quality of the sample surface is significantly improved, enabling subsequent image acquisition to obtain high-contrast, high-resolution microstructure images, laying a solid foundation for accurately identifying pore contours and acquiring microstructure characteristic parameters. The final cleaning and air-drying steps completely eliminate interference from external impurities and moisture on the images. These measures work synergistically to ensure the accuracy of image acquisition and the reliability of subsequent microstructure analysis from the source, effectively solving potential problems of inconsistent size and surface treatment during sample preparation, thereby significantly improving the accuracy of image recognition and microstructure analysis.

[0036] In some implementations of the above methods, image acquisition is proposed to obtain multi-view images to meet the analysis accuracy. However, in the process of implementation, conventional image acquisition may rely on a single viewpoint or a limited angle, resulting in missing image information and failure to fully cover the sample surface, which in turn affects the accuracy of subsequent pore feature identification. At the same time, uneven lighting conditions or insufficient representativeness of acquisition points may introduce noise and random errors, reduce image quality, and make it difficult to effectively separate pores from matrix boundaries.

[0037] In this regard, this application further proposes that the image acquisition in step S2 adopts a combination device of industrial CCD camera and metallurgical microscope, the microscope objective lens magnification is 50-200 times, the camera resolution is ≥2048×2048 pixels, a ring uniform light source is used for supplementary lighting during image acquisition, the color temperature of the light source is controlled at 5500-6500K, the acquisition angle covers the upper surface, lower surface and four side surfaces of the sample, 3-5 acquisition points are evenly selected on each surface, and 2-3 repeated images are taken at each point to eliminate random errors.

[0038] Specifically, the industrial CCD camera and metallurgical microscope combination device utilizes an industrial CCD camera, a high-performance digital camera designed specifically for industrial environments, featuring high resolution, high frame rate, and low noise, capable of capturing fine image details. The metallurgical microscope, a specialized optical microscope for observing the microstructure of materials, boasts high magnification and high resolution, clearly revealing the microscopic pore structure within lightweight foam soil. This combination device provides high-definition, high-magnification images, ensuring accurate capture of even the smallest pore details. Besides the industrial CCD camera and metallurgical microscope combination device, a high-resolution digital camera combined with a stereomicroscope, or a scanning electron microscope (SEM) can be used for even higher magnification image acquisition, to meet different precision and cost requirements.

[0039] The aforementioned ring-shaped uniform light source supplementary illumination refers to using a ring of LED lights or other light sources to uniformly illuminate the sample surface from all directions, eliminating shadows, reflections, and uneven brightness, thereby improving image contrast and uniformity, and making the boundaries between pores and the matrix clearer. Besides using an LED ring light source, coaxial light sources or multi-angle diffused light sources can also be used, projecting light uniformly onto the sample surface through optical fibers or diffusers to achieve a similar uniform supplementary illumination effect.

[0040] The acquisition angle covering the upper surface, lower surface, and four side surfaces of the sample means that during image acquisition, not only is the top surface of the foamed lightweight soil sample observed, but also its bottom surface and four sides are comprehensively imaged. This can be achieved by fixing the sample to a rotatable fixture or by automatically adjusting the sample's posture using a robotic arm. Besides manual or robotic arm adjustment, multi-camera arrays or 3D scanning technology can be used to capture multiple surface images of the sample from different angles simultaneously or in batches, and then stitched or reconstructed to achieve comprehensive image coverage.

[0041] The phrase "uniformly selecting 3-5 sampling points on each surface" refers to selecting 3 to 5 representative regions on each sample surface to be sampled, according to a preset grid division or random sampling method, for image acquisition. These sampling points should be evenly distributed to ensure that the acquired images can comprehensively reflect the microstructural features of the surface and avoid anomalies in local areas from having an excessive impact on the overall analysis results. In addition to manually selecting sampling points, an automated platform can be used for programmed control, preset acquisition paths and sampling points, ensuring the uniformity and repeatability of the sampling point distribution.

[0042] Taking 2-3 repeated images at each location to eliminate random errors means taking multiple images continuously or at intervals at the same acquisition point. By comparing, averaging, or filtering these repeated images, random errors caused by random factors such as equipment shake, ambient light fluctuations, and sensor noise can be effectively reduced, improving the stability and reliability of image data. In addition to simple repeated shooting, image stacking technology can also be used to fuse multiple images taken at different focal planes or with slight displacements to obtain a clearer image with less noise.

[0043] By employing the aforementioned technical solution, a combination of an industrial CCD camera and a metallurgical microscope, along with a ring-shaped uniform light source for illumination, can acquire high-resolution, high-contrast microscopic images, ensuring clear and discernible boundaries between pores and the matrix. Simultaneously, by covering the upper, lower, and four side surfaces of the sample with acquisition angles, and uniformly selecting 3-5 acquisition points on each surface, the coverage and representativeness of the image data are greatly expanded, avoiding information loss that may result from single-viewpoint or local sampling. This provides comprehensive and reliable raw data for subsequent microstructure analysis. Furthermore, the strategy of taking 2-3 repeated images at each point effectively eliminates random errors during image acquisition, further improving image quality and data consistency. Therefore, the image acquisition method of this application significantly improves the quality, completeness, and reliability of microstructure images of foamed lightweight soil, laying a solid foundation for subsequent accurate feature identification and microstructure analysis, thereby enhancing the accuracy and reliability of the entire analytical method.

[0044] In some of the embodiments described above in this application, image preprocessing is proposed to highlight the boundary features between pores and matrix. However, in its implementation, due to the lack of specificity of the preprocessing algorithm, it is difficult to effectively separate the pore and matrix regions, resulting in feature extraction deviation.

[0045] In response, this application further proposes that the image preprocessing in step S3 of the above method includes the following steps: first, denoising is performed using median filtering with a 3×3 template to remove salt-and-pepper noise from the image; then, an adaptive threshold segmentation algorithm is used to separate the pore and matrix regions, with the initial threshold value set based on the bimodal mean of the image's gray-level histogram; finally, morphological opening operations are used to remove small noise points after segmentation, with the opening operation structuring element using a 5×5 square template. The 3×3 template median filtering is a nonlinear digital filtering technique that effectively suppresses impulse noise such as salt-and-pepper noise in the image while preserving edge information as much as possible. In specific implementation, this method achieves denoising by replacing the gray value of each pixel in the image with the median gray value of its neighboring pixels. Besides the 3×3 template, other template sizes, such as 5×5 or 7×7 templates, can be selected based on the noise density and image detail requirements to adjust the denoising intensity and the degree of image detail preservation.

[0046] In step S3, the adaptive threshold segmentation uses a dual-threshold iterative algorithm, with an initial threshold... Take the average grayscale value of the image, and iteratively update the threshold using the following formula until convergence: in: The threshold for the (k+1)th iteration; For grayscale values ​​greater than regional mean For grayscale values ​​less than Equal to the mean of the region; Convergence condition is ( (to a minimum value), ensuring that the segmentation accuracy of pore and matrix regions is ≥95%.

[0047] In this regard, this application further proposes that in step S4, the feature recognition adopts an improved watershed algorithm, and avoids over-segmentation through a label control strategy: first, the preprocessed image is subjected to distance transformation, and then the distance transformation result is subjected to threshold segmentation to obtain the foreground label. The image edge detection result is used as the background label. Based on the dual label constraint, the accurate segmentation of the pore region is achieved. The extracted feature parameters include pore area, perimeter, equivalent diameter, number of pores and pore spacing.

[0048] The improved watershed algorithm aims to overcome the oversegmentation problem of traditional watershed algorithms by introducing external information or modifying internal mechanisms to guide the segmentation process, making it more consistent with the boundaries of the actual target object. For example, a label-based watershed algorithm can be used, pre-determining foreground and background labels in the image to guide the watershed algorithm to segment between these labels; alternatively, a region-merging-based watershed algorithm can be used, merging regions based on similarity (such as grayscale, texture, etc.) after initial oversegmentation to obtain more accurate segmentation results. The core of the label control strategy is to provide clear guidance information for the segmentation algorithm, distinguishing between the target object (foreground) and background, thereby effectively suppressing oversegmentation or undersegmentation. In addition to the foreground and background labels mentioned in this application, interactive labeling can be used, allowing users to manually specify a small number of foreground and background regions, and then the algorithm segments based on these labels; alternatively, a machine learning-based label generation method can be used, automatically identifying key regions in the image as labels through training a model, further improving automation and accuracy.

[0049] The characteristic parameters in step S4 also include pore roundness. It is calculated using the following formula: in: This represents the roundness of the pores, with a value ranging from 0 to 1. The closer the value is to 1, the closer the pores are to being circular. The maximum inscribed circle diameter (μm) of the pore profile is extracted using the Hough circle detection algorithm; this parameter, used in conjunction with the morphology coefficient F, enables a multi-dimensional and accurate description of the pore geometry.

[0050] like Figure 1 As shown, in some embodiments, the pore morphology coefficient in step 4 is calculated using the following formula: in: This is the pore shape coefficient, with a value ranging from 0 to 1. The closer it is to 1, the closer the pore is to an ideal sphere. The two-dimensional projected area of ​​the pore (μm²) is obtained by integrating the contour pixels. The pore perimeter (μm) is extracted using a chain code tracing algorithm; The pore volume (μm³) is calculated by reconstructing images from multiple perspectives. The equivalent diameter of the pore (μm) is the diameter of a circle with the same area as the pore. This formula achieves precise quantification of pore morphology by coupling two-dimensional morphology with three-dimensional volume features.

[0051] Through the above technical solution, this application will utilize the two-dimensional morphological characteristics of pores (such as two-dimensional projected area S, perimeter C, and equivalent diameter). A comprehensive pore morphology coefficient F is constructed by effectively coupling the pore morphology coefficient F with the three-dimensional volume feature V. The introduction of this coefficient overcomes the limitations of traditional methods that rely solely on two-dimensional features to describe pore morphology, and avoids inaccurate morphology descriptions caused by ignoring three-dimensional information. Specifically, the three-dimensional pore volume V is obtained through multi-view image reconstruction, and then coupled with the two-dimensional projected area S, perimeter C, and equivalent diameter F. This combination allows for a more comprehensive and precise quantification of pore morphology. When the pore morphology coefficient F is closer to 1, it indicates that the pores are closer to an ideal sphere, providing a more refined and reliable quantitative indicator for the microstructure analysis of foamed lightweight soil. This precise morphology quantification helps to more accurately understand the relationship between the internal microstructure of foamed lightweight soil and its macroscopic mechanical and impermeability properties, thus providing stronger technical support for material proportion optimization and engineering quality control.

[0052] In some of the solutions described above in this application, microstructure analysis is proposed to output an analysis report containing pore distribution. However, in this process, there is a lack of specific quantitative methods to evaluate the uniformity of pore distribution, which makes the analysis results less objective and reliable, and difficult to accurately correlate with the mechanical performance stability of foamed lightweight soil.

[0053] In some embodiments, the microstructure analysis in step S5 includes pore distribution uniformity analysis. By statistically analyzing the ratio of the standard deviation to the mean of the equivalent diameter of all pores, the dispersion of pore size distribution is quantified. When the ratio is ≤20%, it is determined that the pore distribution is uniform, and the coefficient of variation of the mechanical properties of the foamed lightweight soil is ≤15%.

[0054] In some embodiments, the connectivity quantization in step S5 uses the following formula to calculate the connectivity index: Connectivity index (μm) -1 A higher value indicates stronger pore connectivity. The length (μm) of the i-th connected path is determined by the shortest path algorithm; The number of branches in the i-th connected path is counted by the skeleton extraction algorithm; Let be the area (μm²) of the j-th independent pore. n is the total number of connected paths, and m is the total number of independent pores; This index is used to characterize the connectivity of pores within foamed lightweight soil, providing a basis for assessing its impermeability.

[0055] like Figure 1 As shown, in some embodiments, the mechanical property correlation analysis in step S5 adopts the grey relational entropy algorithm, which uses pore shape coefficient, connectivity index and porosity as input parameters, and performs correlation calculation with compressive strength and elastic modulus of foamed lightweight soil to output the influence weight of each microstructure parameter on mechanical properties, wherein the weight of pore shape coefficient accounts for ≥30%.

[0056] like Figure 1 As shown, in some embodiments, a result verification step is also included: the microstructure analysis results are compared with the CT scan test results. When the relative error of the number of pores and the equivalent diameter is ≤5%, and the relative error of the pore morphology coefficient is ≤8%, the analysis results are deemed valid. If the error exceeds the threshold, the process returns to step 3 to adjust the image preprocessing parameters and re-analyze. Specific implementation examples: The following example will provide a more detailed explanation of the above technical solution: At a certain engineering project site, User A needed to conduct rapid and accurate microstructure analysis on a batch of foamed lightweight soil specimens to evaluate their mechanical and impermeability properties and provide data support for subsequent mix design optimization. Traditional CT scanning methods, due to their high cost and long testing cycle, could not meet the batch testing requirements of this project. Therefore, User A adopted an image recognition-based microstructure analysis method for foamed lightweight soil.

[0058] First, in the sample preparation stage, User A selected standard specimens with dimensions of 50mm × 50mm × 50mm from the foamed lightweight soil molding specimens. These specimens were cured for 7 days, 14 days, and 28 days, respectively. User A used a diamond slicer to vertically slice the specimens, obtaining thin slices ranging from 0.5mm to 2mm in thickness. Subsequently, these slices were progressively polished with 1200-grit sandpaper until the surface roughness Ra reached or fell below 0.8μm. Finally, the slices were cleaned with anhydrous ethanol and air-dried to ensure surface cleanliness, providing high-quality analytical samples for subsequent image acquisition. Compared to traditional preparation methods, this refined sample preparation process ensures the representativeness and surface quality of the analytical samples, avoiding image acquisition errors caused by sample defects.

[0059] Next, in the image acquisition stage, User A used a combination of an industrial CCD camera and a metallurgical microscope to acquire multi-view images of the prepared thin-slice analytical sample. During image acquisition, the system used a ring-shaped uniform light source for supplemental lighting to ensure uniform illumination and avoid shadow interference. The acquisition angles covered the upper surface, lower surface, and four side surfaces of the sample, with 3 to 5 acquisition points evenly selected on each surface. Two to 3 repeated images were taken at each point to eliminate random errors and improve the reliability of the image data. This multi-view, multi-point, and repeated acquisition strategy effectively solved the problems of information loss and feature extraction bias that may result from traditional single-view image acquisition, providing comprehensive two-dimensional image data for subsequent 3D reconstruction and accurate analysis.

[0060] Subsequently, in the image preprocessing stage, User A performed a series of processing steps on the acquired image. First, median filtering with a 3×3 template was used to denoise the image, effectively removing salt-and-pepper noise. Second, an adaptive threshold segmentation algorithm was used to separate the pore and matrix regions, where the initial threshold value was set based on the bimodal mean of the image's gray-level histogram, ensuring effective separation of the pores and matrix. Finally, morphological opening operations were used to remove small noise points after segmentation, with the opening operation structuring element using a 5×5 square template. Compared to conventional image preprocessing algorithms, this method, through the combined application of median filtering, adaptive threshold segmentation, and morphological opening operations, can more effectively highlight the boundary features of the pores and matrix, laying the foundation for subsequent feature recognition.

[0061] In the feature recognition stage, the system extracts pore regions using an improved watershed algorithm. This algorithm avoids over-segmentation through a label control strategy: first, a distance transform is applied to the preprocessed image, then threshold segmentation is performed on the distance transform result to obtain foreground labels, while image edge detection results are used as background labels. Based on the dual-label constraint, accurate segmentation of pore regions is achieved, and pore contours are automatically identified. Furthermore, the system collects microstructural feature parameters, including pore area, perimeter, equivalent diameter, number of pores, and pore spacing. In addition, the pore morphology coefficient F is calculated using the formula... The calculation is performed, where S is the two-dimensional projected area of ​​the pore, C is the perimeter of the pore, and V is the three-dimensional volume of the pore (calculated from multi-view image reconstruction). The formula represents the equivalent diameter of the pores. By coupling two-dimensional morphology with three-dimensional volume features, this formula achieves precise quantification of pore morphology, overcoming the limitations of traditional methods that only describe pore morphology based on two-dimensional features, and improving the accuracy of morphology description.

[0062] Finally, in the microstructure analysis stage, the system constructs an analysis model based on the collected feature parameters and outputs an analysis report containing information on pore morphology, distribution, and performance correlations. Specific analysis content includes: 1. Pore Distribution Uniformity Analysis: The dispersion of pore size distribution is quantified by statistically analyzing the ratio of the standard deviation to the mean of the equivalent diameter of all pores. When this ratio is less than or equal to 20%, the pore distribution is considered uniform, and the coefficient of variation of the mechanical properties of the foamed lightweight soil is less than or equal to 15%.

[0063] 2. Connectivity Quantification: Using connectivity indices Perform calculations, where Let be the length of the i-th connected path. Let be the number of branches in the i-th connected path. Let be the area of ​​the j-th independent pore, n be the total number of connected paths, and m be the total number of independent pores. This index is used to characterize the connectivity of pores within foamed lightweight soil, providing a basis for assessing its impermeability.

[0064] 3. Mechanical Property Correlation Analysis: The grey relational entropy algorithm is employed, using pore shape coefficient, connectivity index, and porosity as input parameters. These parameters are correlated with the compressive strength and elastic modulus of the foamed lightweight soil to calculate the influence weight of each microstructure parameter on mechanical properties. In this analysis, the weight of the pore shape coefficient reaches or exceeds 30%. Unlike existing technologies lacking systematic algorithmic support, this method can quantify the influence weight of each parameter on performance, providing direct guidance for engineering applications.

[0065] To ensure the reliability of the analysis results, this method also includes a result verification step. User A compares the microstructure analysis results with the CT scan test results. The analysis results are considered valid when the relative errors in the number of pores and equivalent diameter are less than or equal to 5%, and the relative error in the pore morphology coefficient is less than or equal to 8%. If the error exceeds the threshold, the system returns to the image preprocessing step, adjusts the image preprocessing parameters, and re-analyzes until the accuracy requirements are met. This verification step effectively solves the problem of unreliable analysis results caused by the lack of a result verification step in some methods.

[0066] Through the above steps, User A can quickly and accurately obtain the microstructural characteristics of foamed lightweight soil and quantify its correlation with macroscopic mechanical properties and impermeability, thus providing a scientific basis for material optimization and quality control in engineering projects.

[0067] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for microstructure analysis of foamed lightweight soil based on image recognition, characterized in that: Includes the following steps: S1. Sample preparation: Select foamed lightweight soil molded specimens and obtain thin sheet-like analytical samples after surface treatment; S2. Image acquisition: Imaging equipment is used to acquire multi-view images of the sample to obtain two-dimensional images that meet the analytical accuracy requirements; S3. Image preprocessing: Denoising, segmentation, and quality optimization are performed on the acquired images to highlight the boundary features of pores and matrix; S4. Feature Recognition: Extract pore regions using image segmentation algorithms, automatically identify pore contours, and collect microstructure feature parameters; S5. Microstructure Analysis: Based on characteristic parameters, an analysis model is constructed, and an analysis report containing pore morphology, distribution, and performance correlation is output.

2. The method for microstructure analysis of foamed lightweight soil based on image recognition according to claim 1, characterized in that: The sample preparation in step S1 specifically includes: selecting a standard molded specimen of foamed lightweight soil with a size of 50mm×50mm×50mm, curing for 7 days, 14 days or 28 days, vertically slicing the specimen using a diamond slicer to obtain a thin slice with a thickness of 0.5-2mm, gradually polishing it with 1200-grit sandpaper until the surface roughness Ra≤0.8μm, and finally cleaning it with anhydrous ethanol and air drying it naturally.

3. The method for microstructure analysis of foamed lightweight soil based on image recognition according to claim 1, characterized in that: In step S2, image acquisition uses a combination of an industrial CCD camera and a metallurgical microscope. During image acquisition, a ring-shaped uniform light source is used for supplemental lighting. The acquisition angle covers the upper surface, lower surface, and four side surfaces of the sample. Three to five acquisition points are evenly selected on each surface, and two to three repeated images are taken at each point to eliminate random errors.

4. The method for microstructure analysis of foamed lightweight soil based on image recognition according to claim 1, characterized in that: The image preprocessing in step S3 includes the following steps: First, median filtering with a 3×3 template is used for denoising to remove salt-and-pepper noise from the image; then, an adaptive threshold segmentation algorithm is used to separate the pore and matrix regions, with the initial threshold value set based on the bimodal mean of the image grayscale histogram; finally, morphological opening operations are used to remove small noise points after segmentation, with the opening operation structuring element using a 5×5 square template.

5. The method for microstructure analysis of foamed lightweight soil based on image recognition according to claim 1, characterized in that: In step S4, the feature recognition adopts an improved watershed algorithm, which avoids over-segmentation through a label control strategy: first, the preprocessed image is subjected to distance transformation, and then the distance transformation result is subjected to threshold segmentation to obtain the foreground label. The image edge detection result is used as the background label. Based on the dual label constraint, the accurate segmentation of the pore region is achieved. The extracted feature parameters include pore area, perimeter, equivalent diameter, number of pores and pore spacing.

6. The method for microstructure analysis of foamed lightweight soil based on image recognition according to claim 1, characterized in that: The pore morphology coefficient in step S4 is calculated using the following formula: in: This is the pore shape coefficient, with a value ranging from 0 to 1. The closer it is to 1, the closer the pore is to an ideal sphere. The two-dimensional projected area of ​​the pore (μm²) is obtained by integrating the contour pixels. The pore perimeter (μm) is extracted using a chain code tracing algorithm; The pore volume (μm³) is calculated by reconstructing images from multiple perspectives. The equivalent diameter of the pore (μm) is the diameter of a circle with the same area as the pore. This formula achieves precise quantification of pore morphology by coupling two-dimensional morphology with three-dimensional volume features.

7. The method for microstructure analysis of foamed lightweight soil based on image recognition according to claim 1, characterized in that: The microstructure analysis in step S5 includes pore distribution uniformity analysis, which quantifies the dispersion of pore size distribution by statistically analyzing the ratio of the standard deviation to the mean of the equivalent diameter of all pores. When the ratio is ≤20%, it is determined that the pore distribution is uniform, and the coefficient of variation of the mechanical properties of the foamed lightweight soil is ≤15%.

8. The method for microstructure analysis of foamed lightweight soil based on image recognition according to claim 1, characterized in that: In step S5, connectivity quantification uses the following formula to calculate the connectivity index: Connectivity index (μm) -1 A higher value indicates stronger pore connectivity. The length (μm) of the i-th connected path is determined by the shortest path algorithm; The number of branches in the i-th connected path is counted by the skeleton extraction algorithm; Let be the area (μm²) of the j-th independent pore. n is the total number of connected paths, and m is the total number of independent pores; This index is used to characterize the connectivity of pores within foamed lightweight soil, providing a basis for assessing its impermeability.

9. The method for microstructure analysis of foamed lightweight soil based on image recognition according to claim 1, characterized in that: In step S5, the mechanical property correlation analysis adopts the grey relational entropy algorithm, which uses pore morphology coefficient, connectivity index, and porosity as input parameters, and performs correlation calculation with the compressive strength and elastic modulus of foamed lightweight soil to output the influence weight of each microstructure parameter on mechanical properties, wherein the weight of pore morphology coefficient accounts for ≥30%.

10. The method for microstructure analysis of foamed lightweight soil based on image recognition according to claim 1, characterized in that: It also includes a result verification step: comparing the microstructure analysis results with the CT scan test results. When the relative error of the number of pores and the equivalent diameter is ≤5%, and the relative error of the pore morphology coefficient is ≤8%, the analysis results are deemed valid. If the error exceeds the threshold, return to step S3 to adjust the image preprocessing parameters and reanalyze.