Method for reconstructing three-dimensional structure of deep-sea sediment particles based on scanning electron microscope images
Patent Information
- Application Number
- CN202610800592.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-04
- Publication Date
- 2026-08-25
AI Technical Summary
本发明用于解决现有技术中单幅SEM图像中目标颗粒难以自动、准确分离,灰度直接映射为高度时背景区域容易产生伪高值,重建结果边缘不规整且难以比较,以及缺少可量化剖面和误差表示等问题
(1)本发明基于单张扫描电镜图像即可完成深海沉积物颗粒三维形貌重建,无需依赖多角度立体SEM、FIB-SEM切片或其他复杂硬件设备,降低了样品三维形貌分析的设备门槛和操作复杂度。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the fields of marine sedimentology, scanning electron microscopy image processing, and three-dimensional reconstruction of particle morphology. Specifically, it relates to a method for three-dimensional reconstruction of deep-sea sediment particle structure based on scanning electron microscopy images, which is applicable to the quantitative morphological analysis and structural identification of marine suspended sediments, seabed sediments, and their particles. Background Technology
[0002] The morphological characteristics of marine sediment particles, such as particle size, surface undulations, fracture surfaces, and intergranular adhesion structures, are important indicators for determining the provenance, sedimentary environment, and subsequent alteration processes. Scanning electron microscopy (SEM) can obtain high-resolution two-dimensional images, but its output is typically a grayscale planar image, which cannot directly reflect the relative surface undulations and three-dimensional morphology of the particles. For sediment particles with rough surfaces, agglomerates, or irregular boundaries, relying solely on two-dimensional SEM images makes stable quantitative comparisons difficult.
[0003] Existing methods for obtaining three-dimensional topography mainly fall into two categories: one relies on hardware methods such as multi-angle stereo SEM and focused ion beam scanning electron microscopy (FIB-SEM) to obtain multi-view images or multi-layer slices and then perform voxel reconstruction. This type of method has high equipment costs, is complex to operate, and is not suitable for batch processing of a large number of samples. The other type uses a general three-dimensional topography reconstruction algorithm to directly map image grayscale to height. However, in marine sediment SEM images, due to the presence of large areas of black background, particle adhesion, and irregular boundaries, direct mapping is prone to producing jagged edges, false high values in the background area, and incorrect reconstruction of non-target areas, affecting the three-dimensional observation effect and the reliability of quantitative analysis.
[0004] Furthermore, marine sediment SEM images often contain multiple particles or particle clusters simultaneously. If 3D reconstruction is performed directly without automatic extraction, cropping, and masking of the target particles, the image background and non-target particles may be elevated to 3D surfaces, resulting in unclear target particle outlines and difficulty in identifying the reconstruction results. Existing methods still lack an integrated automated processing workflow for automatically selecting target particles in a single SEM image, simultaneously cropping grayscale images and applying masks, masking the background, and generating multi-view 3D results and quantitative profiles.
[0005] Therefore, there is a need for a method that can automatically extract target particles from a single SEM image, eliminate background effects, stably map grayscale to relative height, and output multi-view 3D results, quantitative profiles, and height grading maps, so as to achieve batch 3D morphology reconstruction and comparative analysis of deep-sea sediment particles without changing the existing microscope hardware. Summary of the Invention
[0006] To overcome the shortcomings of existing technologies, this invention provides a method for reconstructing the three-dimensional structure of deep-sea sediment particles based on scanning electron microscope (SEM) images. This invention addresses problems in existing technologies, such as the difficulty in automatically and accurately separating target particles from a single SEM image, the tendency for false height values to be generated in the background region when grayscale is directly mapped to height, irregular and difficult-to-compare edges in the reconstructed results, and the lack of quantifiable profiles and error representations. This invention achieves automatic generation of three-dimensional particle morphology data from the original SEM image, usable for analysis and illustrated representation, by dividing the processing into steps including image acquisition and preprocessing, target particle extraction, mask purification, grayscale-height mapping, multi-view representation, central profile extraction, refined reconstruction of local regions, and height-level output.
[0007] This invention is achieved through the following technical solution: a method for reconstructing the three-dimensional structure of deep-sea sediment particles based on scanning electron microscopy images, specifically including the following steps: Step S1: Image acquisition and basic preprocessing; Export the deep-sea sediment particle images to be analyzed from a scanning electron microscope (SEM) and unify the images into a single-channel grayscale format; when the image is a color image or an image with pseudo-color, perform grayscale conversion according to the following formula:
[0008] Alternatively, a grayscale channel can be exported using a scanning electron microscope; then, a Gaussian filter with a standard deviation of 0.5 to 2 pixels can be used to suppress random noise, or histogram equalization can be used to improve the contrast between particles and the background in a dark background. Step S2: Automatic locking and trimming of the target particle area; Automatic thresholding segmentation is performed on the preprocessed grayscale image to divide the image into foreground and background regions; the Otsu method is used to automatically calculate the threshold T that maximizes the inter-class variance, and a binary image is constructed.
[0009] The binary image is labeled with connected components, the area of each connected component is counted, the connected component with the largest area is extracted as the target particle region, and the minimum bounding rectangle of the target particle region is used as the clipping window to simultaneously clip the original grayscale image and the corresponding binary image, forming a grayscale sub-image and a binary mask sub-image that only contain the target particle. Step S3: Mask cleaning, hole filling, and size standardization; The target particle binary mask obtained in step S2 is cleaned up, retaining only the largest connected region in the mask and removing scattered regions unrelated to the target particles; the holes inside the mask are filled to make the mask form a closed whole; then the cropped grayscale sub-image and the cleaned binary mask are uniformly scaled to a preset standard size. When scaling the mask, nearest neighbor interpolation is used to maintain its binary characteristics, and linear interpolation or cubic interpolation is used when scaling the grayscale sub-image to maintain grayscale smoothness; finally, the grayscale of the pixels outside the mask is set to 0, making the background area a pure black area; Step S4: Grayscale-height mapping and background masking; The size-normalized grayscale image is converted into a height field, and grayscale-height mapping is performed using the following linear relationship:
[0010] Wherein, G(x,y) is the standardized gray value obtained in step S3, k is the height scaling factor, Z(x,y) is the relative height value corresponding to pixel (x,y), and the value of k ranges from 10 to 50; background pixels with a mask value of 0 are not rendered, or their corresponding height is set to an invalid value and masked in the 3D display, so that the final 3D surface only covers the target particle area; Step S5: Multi-view 3D representation and height distribution generation; The same height field is used to generate visualization results from multiple observation angles, including a 3D surface map from an oblique perspective, a top view, and a side view; after linearly normalizing the height values within the target particle region to the [0,1] interval, a two-dimensional color height distribution map is drawn, and a color scale is set to represent the relative height of the particle surface, while keeping the coordinate direction consistent between different views; Step S6: Extraction of the central profile and construction of error bands; In a standard-sized height field, the center row and center column are selected, and one-dimensional height sequences are extracted respectively, serving as typical profiles of the target particle in two orthogonal directions. A preset relative error coefficient α is introduced, and the upper and lower envelopes are calculated for each profile height z(i). ; Step S7: Refined reconstruction of local areas and contour line representation; Select a local analysis area on the height distribution map, extract the height data of the area separately, and perform 3D plotting or contour plotting in a local zoom-in mode. Step S8: High-level hierarchical classification and visualization output; Minimum Z of the height field within the target particle region min With the maximum value Z max The statistics are analyzed, and the height range is divided into K levels. The height interval of the kth level is represented as follows:
[0011] Where K is the number of levels and k is the height level number; pixels falling into different intervals are assigned different numbers or colors to obtain a discrete height level map.
[0012] As a preferred option, in step S3, the cropped grayscale sub-image and the purified binary mask are uniformly scaled to 256×256 pixels.
[0013] As a preferred option, in step S5, when expressing uncertainty in the three-dimensional scene, a dashed surface with a height of Z(x,y)+Δz is superimposed on the entire height field to represent the overall upper limit of the height field.
[0014] As a preferred option, K is 4 in step S5.
[0015] By adopting the above technical solutions, this invention has the following beneficial effects compared with the prior art: (1) The present invention can complete the three-dimensional morphology reconstruction of deep-sea sediment particles based on a single scanning electron microscope image, without relying on multi-angle stereo SEM, FIB-SEM slices or other complex hardware equipment, thus reducing the equipment threshold and operational complexity of sample three-dimensional morphology analysis.
[0016] (2) The present invention can automatically lock the target particle region from SEM images containing multiple particles or background noise by means of automatic threshold segmentation, connected component filtering and minimum bounding rectangle cropping, thereby reducing subjective errors caused by manual selection and improving batch processing efficiency.
[0017] (3) The present invention uses binary mask purification, hole filling and background shielding to make the three-dimensional surface cover only the target particle range, avoid the background area being incorrectly promoted to a pseudo three-dimensional structure by gray-scale-height mapping, and improve the boundary regularity and recognizability of the reconstruction result.
[0018] (4) The present invention maps the grayscale image to a relative height field after standardizing the size, and further outputs a multi-view three-dimensional surface map, a color height distribution map, a central profile and an error band, so that the reconstruction results can be used not only for morphological observation, but also for quantitative comparison of particle surface undulations and profile changes.
[0019] (5) The present invention introduces local area fine reconstruction and highly hierarchical output, which can magnify and express local protrusions, micro-erosion pits, adhered particles and irregular edges on the particle surface, and form structured image results that can be used for inter-sample comparison, roughness partitioning or subsequent machine learning analysis. Attached Figure Description
[0020] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a flowchart of the method for reconstructing the three-dimensional structure of deep-sea sediment particles based on scanning electron microscope images according to the present invention, which is used to illustrate the overall processing sequence from image acquisition, target particle extraction, mask purification, grayscale-height mapping, multi-view display to result output. Figure 2 This is a preliminary three-dimensional schematic diagram of sediment particle extraction and analysis according to the present invention, wherein: Figure 2 (a) is a single-particle image of the target cropped from the original SEM image with a scale; Figure 2 (b) is the corresponding binary mask image; Figure 2 (c) is a 3D schematic diagram constructed based on grayscale; Figure 2 (d) is a top-down view of the particles; Figure 3 This is a multi-view visualization of the three-dimensional reconstruction results of the present invention, wherein: Figure 3 (a) is a three-dimensional reconstructed surface image; Figure 3 (b) is a top view of the 3D reconstruction results; Figure 3 (c) is a side view of the 3D reconstruction result; Figure 3 (d) is a color height distribution map with a color scale; Figure 4 This is a quantitative profile and error representation diagram of the present invention, wherein: Figure 4 (a) is a central column section with error bands; Figure 4 (b) is a central row profile with an error band; Figure 4 (c) is a schematic diagram of the height envelope superimposed on a three-dimensional surface; Figure 4 (d) is a schematic diagram comparing the three-dimensional mesh wireframes; Figure 5 This is a schematic diagram of the fine reconstruction of a local area according to the present invention, wherein: Figure 5 (a) A location map of a selected local area within the overall height distribution; Figure 5 (b) is a three-dimensional magnified view of this local area; Figure 5 (c) is a contour map of this local area; Figure 5 (d) is a side view of this local area; Figure 6 This is a schematic diagram illustrating the hierarchical and extended display of the present invention, wherein: Figure 6 (a) is a schematic diagram of superimposing height contour lines on the original SEM image; Figure 6 (b) is a three-dimensional reconstructed surface view from another perspective; Figure 6 (c) is a hierarchical display diagram divided by height range; Figure 6 (d) is a wireframe 3D plot used for comparison. Detailed Implementation
[0021] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0023] like Figure 1 As shown, this invention proposes a method for reconstructing the three-dimensional structure of deep-sea sediment particles based on scanning electron microscopy images, specifically including the following steps: Step S1: Image acquisition and basic preprocessing; First, the deep-sea sediment particle image to be processed is exported from the scanning electron microscope (SEM). Considering the potential differences in resolution, bit depth, and color mode between SEM images from different laboratories or batches, this step prioritizes unifying the images to a single-channel grayscale format. When the image is a color image or an image with pseudo-color, grayscale conversion is performed according to the following formula:
[0024] Alternatively, the device's built-in grayscale channel can be used. To improve the robustness of subsequent automatic segmentation, smoothing, denoising, or contrast enhancement operations can be added in this step. Gaussian filtering with a standard deviation of 0.5 to 2 pixels can be used to suppress random noise, or histogram equalization can be used to improve the contrast between particles and the background in a dark background, so as to separate the particle body in subsequent thresholding.
[0025] Step S2: Automatic locking and trimming of the target particle area; Automatic thresholding segmentation is performed on the preprocessed grayscale image to divide the image into foreground and background regions. Since sediment particles typically appear as brighter areas than the background in SEM images, the Otsu method is used to automatically determine the threshold T that maximizes the inter-class variance, and a binary image is constructed.
[0026] The resulting binary image may contain multiple particles, noise, or edge regions simultaneously. Therefore, connected component labeling is performed on the binary image, the area of each connected component is calculated, and the connected component with the largest area is extracted as the target particle region. The minimum bounding rectangle of this target particle region is then used as the clipping window to simultaneously clip the original grayscale image and the corresponding binary image, forming a grayscale sub-image and a binary mask sub-image that only contain the target particle. Through this processing, subsequent 3D reconstruction only expands on the target particle, avoiding mutual occlusion or superposition of multiple particles in the same height field.
[0027] Step S3: Mask cleaning, hole filling, and size standardization; The target particle binary mask obtained in step S2 is further cleaned. Actual SEM images often contain small bright spots adhering to particle edges, broken fine branches, or holes caused by imaging noise. This step only retains the largest connected region in the mask, removing scattered areas unrelated to the target particles. Then, the holes inside the mask are filled to make the mask a closed whole, ensuring the continuity of particle boundaries in the 3D reconstruction. Afterward, the cropped grayscale sub-image and the cleaned binary mask are uniformly scaled to a preset standard size, preferably 256×256 pixels, to facilitate direct comparison and batch processing between different samples. Nearest neighbor interpolation is used to maintain the binary characteristics of the mask during scaling, while linear or cubic interpolation is used to maintain grayscale smoothness during grayscale sub-image scaling. Finally, the grayscale of pixels outside the mask is set to 0, making the background a pure black area, providing a basis for subsequent background masking.
[0028] Step S4: Grayscale-height mapping and background masking; The size-normalized grayscale image is converted into a height field; the height field refers to a two-dimensional array composed of the relative height values corresponding to each pixel in the image, and grayscale-height mapping is performed using the following linear relationship:
[0029] Where G(x,y) is the standardized grayscale value obtained in step S3, k is the height scaling factor, and Z(x,y) is the relative height value corresponding to pixel (x,y); k can be set according to the overall contrast of the SEM image, the height fluctuation display effect of the proposed output 3D image, and the size of the display window, and is generally taken as 10 to 50. Background pixels with a mask value of 0 are not rendered in 3D, or their corresponding heights are set to invalid values and masked in the display, so that the final 3D surface only covers the real target particle area; if slight edge jaggedness occurs during scaling or thresholding, a light smoothing can be added at the end of this step to obtain a more continuous 3D contour.
[0030] Step S5: Multi-view 3D representation and height distribution generation; The same height field is visualized from multiple angles to allow observation of particle morphology from different directions. Specifically, a 3D surface map with an oblique view, a top-down view, and a lateral thickness view are generated. The height values within the target particle region are linearly normalized to the [0,1] interval before a 2D color height distribution map is drawn. To ensure consistency between different views, a color scale is uniformly set in this step. This color scale represents the relative height of the particle surface and maintains consistent coordinate directions across views, allowing for direct reference in subsequent manuals, reports, or drawings. When it is necessary to express uncertainty in a 3D scene, a dashed surface with height Z(x,y)+Δz can be superimposed on the entire height field to represent the overall upper limit of the height field.
[0031] Step S6: Extraction of the central profile and construction of error bands; To enable cross-sectional comparison of the reconstructed results, two positions—the center row and the center column—are selected in a standard-sized height field. One-dimensional height sequences are extracted from each position and used as typical cross-sections of the target particle in two orthogonal directions. Considering that the gray-level-height linear mapping and image noise introduce certain errors, a preset relative error coefficient α is introduced. The upper and lower envelopes are calculated for each cross-sectional height z(i). ; This allows for the simultaneous provision of calculated height and allowable fluctuation range when drawing cross-sectional diagrams, enabling subsequent users to intuitively judge the range of changes in the reconstruction results.
[0032] Step S7: Refined reconstruction of local areas and contour line representation; For particle surfaces exhibiting localized protrusions, micro-erosion pits, adhered particles, or irregular edges, a localized analysis area is selected on the height distribution map. The height data of this area is extracted separately and then used for 3D plotting or contour drawing using a localized magnification method. Since height variations are often more concentrated in localized areas, this processing can more clearly reveal details that are difficult to identify in the overall image, while maintaining consistency with the overall height distribution. Figure 1 Provide detailed color scale and coordinate instructions.
[0033] Step S8: High-level hierarchical classification and visualization output; To ensure the comparability of 3D results from different samples and regions, the minimum and maximum height fields Zmin and Zmax within the target particle region are first statistically analyzed. Then, this height range is divided into K levels, with K preferably being 4. The height interval of the k-th level is represented as follows:
[0034] Where K is the number of levels and k is the height level sequence number; pixels falling into different intervals are assigned different numbers or colors to obtain a discrete height grading map. This height grading map can be used for rapid comparison of the relative roughness of particle surfaces, automatic layer recognition, or as input features for subsequent machine learning models. After grading is completed, the aforementioned generated 3D view, top view, side view, center profile, error band, local magnification results, and height grading results are exported as image or document files for easy use as illustrations, technical specifications, or data interfaces.
[0035] The above steps, when executed sequentially, can complete the automatic three-dimensional morphology reconstruction of deep-sea sediment particles in a single scanning electron microscope image. When there are multiple particles in the input image, steps S2 to S8 can be executed cyclically, selecting the largest unprocessed connected region as the target particle for cropping and reconstruction each time, thereby achieving batch processing of multiple particles without changing the main algorithm. When it is necessary to use it in conjunction with other microscopic morphology data, the height field obtained in step S4 can also be directly used as a unified intermediate result for feature extraction.
[0036] The following is combined with Figures 1 to 6 The present invention provides a detailed description of the method for reconstructing the three-dimensional structure of deep-sea sediment particles based on scanning electron microscope images.
[0037] like Figure 1 As shown, the method in this embodiment executes the following steps in sequence: image acquisition and basic preprocessing, automatic locking and cropping of target particle regions, mask purification and size standardization, grayscale-height mapping and background masking, multi-view 3D representation, central profile extraction, local region fine reconstruction, and height grading and visualization output.
[0038] First, obtain the SEM image to be processed. If the original image is in RGB format, convert it to a grayscale image using the following formula:
[0039] Then, a Gaussian filter is applied to the grayscale image, with the standard deviation of the filter kernel set to σ=1.0, in order to remove isolated noise points and preserve particle edges as much as possible.
[0040] The filtered grayscale image is segmented using a threshold, which is automatically calculated using the Otsu method, resulting in a binary image B(x,y). Connectivity analysis is then performed on this binary image, calculating the number of pixels in each connected region. The connected region with the largest number of pixels is selected as the target particle region.
[0041] Read the minimum bounding rectangle of the target particle region, and use this rectangle to simultaneously crop the grayscale image and the binary image, obtaining a grayscale sub-image and a binary mask sub-image containing only the target particle, respectively corresponding to... Figure 2 (a) and Figure 2 (b)
[0042] The cropped binary mask is then subjected to maximum connectivity preservation and hole filling processes again to obtain a purified single-particle mask. Both the grayscale subimage and the binary mask are then scaled to 256×256 pixels; the mask scaling uses nearest neighbor interpolation, and the grayscale image scaling uses bilinear interpolation. After scaling, the grayscale values corresponding to positions with a mask value of 0 are all set to 0, making the background area a pure black area.
[0043] Establish the height field. The height field Z(x,y) is obtained by multiplying the grayscale value G(x,y) by a fixed height scaling factor k:
[0044] In this embodiment, the height scaling factor k is fixed at 30. Simultaneously, pixels with a mask value of 0 are not included in the subsequent 3D display, and their heights are set to NaN or other invalid values to prevent the background area from being reconstructed as a 3D surface, thereby obtaining... Figure 2 (c) and Figure 2 (d) shows the three-dimensional morphology of the target particles.
[0045] Based on the aforementioned height field, three views are generated: a 3D surface view from an oblique perspective, a top view, and a side view. Simultaneously, the normalized height H(x,y) is calculated.
[0046] Where Zmin and Zmax are the minimum and maximum height values within the target particle region, respectively. A color height distribution map is plotted based on the normalized height H(x,y), with the color scale representing the relative height at the particle surface. Figure 3 The results shown are from multiple perspectives.
[0047] For quantitative analysis, two profiles, the center row and the center column, are extracted from the height field. In this embodiment, the image size is 256×256 pixels, therefore the index of both the center row and the center column is 128. After obtaining the two height sequences, the relative error coefficient is set as follows:
[0048] That is, the relative error is taken as 10%. The corresponding upper and lower envelopes are as follows:
[0049] By plotting the lower envelope, the original section, and the upper envelope in the same cross-sectional view, we obtain... Figure 4 (a) and Figure 4 The effect shown in (b). When it is necessary to represent the error on a 3D surface, draw an envelope surface that is shifted upwards as a whole:
[0050] In this embodiment, Δz is fixed at 2 height units, thus obtaining Figure 4 (c) shows the upper envelope.
[0051] When observing local details, select a 64×64 pixel local window on the normalized height map, extract the height data corresponding to this window separately, and draw the local 3D map, contour map, and side view in the same way to obtain... Figure 5 (a) to Figure 5 (d) shows the local results.
[0052] Finally, height grading is performed. First, Zmin and Zmax within the target particle region are calculated. Then, the height range is divided into 4 levels, i.e., K=4. The height range of the k-th level is represented as:
[0053] Where k = 1, 2, 3, 4. Pixels falling into each height range are assigned different colors, resulting in... Figure 6 (c) shows the height classification diagram.
[0054] In the description of this invention, the term "multiple" refers to two or more unless otherwise expressly defined. The terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are used only for the convenience of describing the invention and simplifying the description. They do not indicate or imply that the device, structure, or result referred to must have a specific orientation, be constructed or operated in a specific orientation, and therefore should not be construed as a limitation of the invention. The terms "connection," "installation," "fixing," etc., should be interpreted broadly. For example, "connection" can mean a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0055] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0056] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for reconstructing the three-dimensional structure of deep-sea sediment particles based on scanning electron microscopy images, characterized in that, Specifically, the following steps are included: Step S1: Image acquisition and basic preprocessing; Export the deep-sea sediment particle images to be analyzed from a scanning electron microscope (SEM) and unify the images into a single-channel grayscale format; when the image is a color image or an image with pseudo-color, perform grayscale conversion according to the following formula: , Alternatively, a grayscale channel can be exported using a scanning electron microscope; then, a Gaussian filter with a standard deviation of 0.5 to 2 pixels can be used to suppress random noise, or histogram equalization can be used to improve the contrast between particles and the background in a dark background. Step S2: Automatic locking and trimming of the target particle area; Automatic thresholding segmentation is performed on the preprocessed grayscale image to divide the image into foreground and background regions; the Otsu method is used to automatically calculate the threshold T that maximizes the inter-class variance, and a binary image is constructed. , The binary image is labeled with connected components, the area of each connected component is counted, the connected component with the largest area is extracted as the target particle region, and the minimum bounding rectangle of the target particle region is used as the clipping window to simultaneously clip the original grayscale image and the corresponding binary image, forming a grayscale sub-image and a binary mask sub-image that only contain the target particle. Step S3: Mask cleaning, hole filling, and size standardization; Clean up the binary mask of the target particle obtained in step S2, retaining only the largest connected region in the mask and removing sporadic regions that are unrelated to the target particle. The holes inside the mask are filled to form a closed whole. Then, the cropped grayscale sub-image and the purified binary mask are scaled to a preset standard size. Nearest neighbor interpolation is used when scaling the mask to maintain its binary characteristics, and linear or cubic interpolation is used when scaling the grayscale sub-image to maintain grayscale smoothness. Finally, the grayscale of the pixels outside the mask is set to 0, making the background area a pure black area. Step S4: Grayscale-height mapping and background masking; The size-normalized grayscale image is converted into a height field, and grayscale-height mapping is performed using the following linear relationship: , Wherein, G(x,y) is the standardized gray value obtained in step S3, k is the height scaling factor, Z(x,y) is the relative height value corresponding to pixel (x,y), and the value of k ranges from 10 to 50; background pixels with a mask value of 0 are not rendered, or their corresponding height is set to an invalid value and masked in the 3D display, so that the final 3D surface only covers the target particle area; Step S5: Multi-view 3D representation and height distribution generation; The same height field is used to generate visualization results from multiple observation angles, including a 3D surface map from an oblique perspective, a top view, and a side view; after linearly normalizing the height values within the target particle region to the [0,1] interval, a two-dimensional color height distribution map is drawn, and a color scale is set to represent the relative height of the particle surface, while keeping the coordinate direction consistent between different views; Step S6: Extraction of the central profile and construction of error bands; In a standard-sized height field, the center row and center column are selected, and one-dimensional height sequences are extracted respectively, serving as typical profiles of the target particle in two orthogonal directions. A preset relative error coefficient α is introduced, and the upper and lower envelopes are calculated for each profile height z(i). ; Step S7: Refined reconstruction of local areas and contour line representation; Select a local analysis area on the height distribution map, extract the height data of the area separately, and perform 3D plotting or contour plotting in a local zoom-in mode. Step S8: High-level hierarchical classification and visualization output; Minimum Z of the height field within the target particle region min With the maximum value Z max The statistics are analyzed, and the height range is divided into K levels. The height interval of the kth level is represented as follows: , Where K is the number of levels and k is the height level number; pixels falling into different intervals are assigned different numbers or colors to obtain a discrete height level map.
2. The method for reconstructing the three-dimensional structure of deep-sea sediment particles based on scanning electron microscopy images according to claim 1, characterized in that, In step S3, the cropped grayscale sub-image and the purified binary mask are uniformly scaled to 256×256 pixels.
3. The method for reconstructing the three-dimensional structure of deep-sea sediment particles based on scanning electron microscopy images according to claim 1, characterized in that, In step S5, when expressing uncertainty in a three-dimensional scene, a dashed surface with a height of Z(x,y)+Δz is superimposed on the entire height field to represent the overall upper limit of the height field.
4. The method for reconstructing the three-dimensional structure of deep-sea sediment particles based on scanning electron microscopy images according to claim 1, characterized in that, In step S5, K is 4.
