Automatic comparison method of SEM images of same position of rock sample before and after diagenetic reaction

By using the characteristic information of mineral grains and cements for matching and registration in the automatic comparison method of SEM images of rock samples before and after geochemical reactions, the problem of inaccurate comparison of SEM images before and after geochemical reactions is solved, and accurate comparison of rock samples at the same location is achieved, which improves the reliability of experimental conclusions and the understanding of geochemical reaction mechanisms.

CN122048947BActive Publication Date: 2026-06-19CHINA UNIV OF PETROLEUM (EAST CHINA)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNIV OF PETROLEUM (EAST CHINA)
Filing Date
2026-04-17
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing technologies, comparing SEM images of rock samples at different locations before and after geochemical reactions reduces the reliability of experimental conclusions, fails to achieve rapid and accurate localization and comparison, and leads to inaccurate observation of microstructural changes before and after geochemical reactions.

Method used

An automatic comparison method for SEM images of rock samples at the same location before and after geochemical reaction is provided. By acquiring and preprocessing SEM images, feature information of mineral particles and cement is extracted, and mineral particles and cement are used as fingerprint information for matching and registration. The similarity is calculated, the mask similarity is output, and the images are iterated to achieve accurate comparison.

🎯Benefits of technology

It enables precise comparison of rock samples at the same location before and after geochemical reactions, improving the reliability and accuracy of experimental conclusions, allowing for direct observation of mineral changes before and after the reaction, and revealing the microscopic mechanism of geochemical reactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122048947B_ABST
    Figure CN122048947B_ABST
Patent Text Reader

Abstract

This invention relates to an automatic comparison method for SEM images of rock samples at the same location before and after geochemical reactions, belonging to the field of petroleum technology. The method includes acquiring a first set of SEM images before geochemical reactions and a second set of SEM images after geochemical reactions; preprocessing the two sets of SEM images to ensure they have the same magnification and geometric dimensions; extracting feature information of mineral particles and cement from the two sets of preprocessed SEM images; using the feature information of mineral particles in the first set of preprocessed SEM images as a first feature fingerprint, searching for the SEM image in the second set of preprocessed SEM images that best matches the first feature fingerprint to obtain a third set of SEM images; using the feature information of cement from the first set of preprocessed SEM images as a second feature fingerprint, filtering the SEM images in the third set of SEM images that best match the second feature fingerprint to obtain a fourth set of SEM images, and a fifth set of SEM images from the first set of SEM images that matches the fourth set of SEM images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of petroleum technology, and in particular to an automatic comparison method for SEM images of rock samples at the same location before and after geochemical reactions. Background Technology

[0002] Carbon capture, utilization, and storage (CCUS) is a key means of addressing global climate change and achieving carbon dioxide emission reduction targets. The core of CCUS is to capture CO2 generated during industrial production processes, then reuse or transport it to suitable geological formations for long-term safe storage, thereby reducing greenhouse gas emissions into the atmosphere. Depending on the type of geological formation, carbon storage can be categorized into saline aquifer storage, abandoned oil and gas reservoir storage, coal seam storage, salt cavern storage, and abandoned mine storage. Saline aquifers, with their wide distribution, vast space, and reliable safety, have become one of the most promising CO2 storage methods.

[0003] When CO2 is injected into a saline aquifer, under high temperature and pressure, the supercritical CO2 exhibits extremely high reactivity, undergoing a series of chemical reactions with the reservoir rocks and fluids. The carbonic acid formed by CO2 dissolving in formation water can directly dissolve rock minerals. Additionally, CO2 reacts with silicate or oxide minerals containing active metals such as calcium, magnesium, and iron to form stable carbonate minerals that precipitate. Due to the diversity of rock mineral composition, the geochemical reactions during CO2 storage are exceptionally complex. These complex microscopic chemical reactions directly affect the pore structure and permeability of the aquifer, thus impacting the reservoir's CO2 storage capacity and mechanical structural stability. Besides the aquifer, the carbonic acid formed by CO2 and water may also dissolve carbonate cement and other easily soluble components in the caprock, leading to increased pore space, impaired caprock integrity, and the induction of microcrack propagation, thereby creating caprock leakage risks and further jeopardizing the safety and long-term stability of CO2 storage. Furthermore, since the injected CO2 is not static in the aquifer but constantly migrates and diffuses, the geochemical reaction is persistent, which further exacerbates the negative impact of the geochemical reaction.

[0004] Given the significant impact of CO2-rock-fluid geochemical reactions, systematic research on them through laboratory experiments is necessary. Scanning electron microscopy (SEM) can directly observe the microstructure and morphology of rocks, providing high-resolution imaging and morphological change analysis of rock samples that have undergone CO2-rock-fluid geochemical reactions, making it one of the most commonly used methods in microscopic experimental research. The unique characteristic of CO2-rock-fluid geochemical reactions lies in the need for repeated observations of the same location on the rock sample before and after the reaction. Through precise positioning and comparison, the specific changes in the surface morphology of minerals, pore-throat boundaries, and cement distribution before and after the reaction can be directly observed, thereby revealing the microscopic mechanisms of the geochemical reaction. However, most current observation methods only show comparisons of different locations before and after the geochemical reaction, reducing the reliability of experimental conclusions.

[0005] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] The main objective of this invention is to provide an automatic comparison method for SEM images of rock samples at the same location before and after geochemical reactions, aiming to solve the aforementioned technical problems in the prior art.

[0007] To achieve the above objectives, this invention provides an automatic comparison method for SEM images of rock samples at the same location before and after geochemical reactions under mineral dissolution-deformation conditions, comprising:

[0008] The first set of SEM images before geochemical reaction and the second set of SEM images after geochemical reaction were obtained, and the two sets of SEM images were preprocessed to make the magnification and geometric size of the two sets of SEM images the same.

[0009] Feature information of mineral particles and cement was extracted from the two sets of preprocessed SEM images;

[0010] The feature information of mineral particles in the first set of preprocessed SEM images is used as the first feature fingerprint. The SEM image that best matches the first feature fingerprint is found in the second set of preprocessed SEM images to obtain the third set of SEM images.

[0011] The feature information of the cement in the first set of preprocessed SEM images is used as the second feature fingerprint. The SEM images that best match the second feature fingerprint are selected from the third set of SEM images to obtain the fourth set of SEM images, and the fifth set of SEM images that matches the fourth set of SEM images in the first set of SEM images.

[0012] The fourth and fifth sets of SEM images were registered and aligned using the geometric center of the mineral particles. The similarity of the geometric shape and area of ​​each mineral particle in the fourth and fifth sets of SEM images was calculated. The overlapping areas with the similarity of the geometric shape and area of ​​each mineral particle greater than or equal to the preset threshold were retained, and the areas with the similarity of the geometric shape and area of ​​each mineral particle less than the preset threshold were removed.

[0013] Calculate the similarity between the mineral particle mask and the cement mask in the processed fourth and fifth SEM images, and output the similarity between the mineral particle mask and the cement mask. Based on the similarity between the mineral particle mask and the cement mask, determine the similarity threshold between the mineral particle mask and the cement mask.

[0014] The system iterates through all SEM images before and after the geochemical reaction. Based on the mineral particle mask similarity threshold and the cement mask similarity threshold, it selects a set of similar images after the geochemical reaction that correspond to each image in the first set of SEM images from the second set of SEM images, thus obtaining successfully matched images before and after the reaction.

[0015] Preferably, in the automatic comparison method for SEM images of rock samples at the same location under mineral dissolution-deformation conditions before and after the geochemical reaction, after the step of iteratively traversing all SEM images before and after the geochemical reaction, and filtering out a set of similar images after the geochemical reaction corresponding to each image in the first set of SEM images from the second set of SEM images based on mineral grain mask similarity thresholds and cement mask similarity thresholds, to obtain successfully matched pre-reaction and post-reaction images, the method further includes:

[0016] Weighted logical operations are performed on the binary data of mineral particles and cement in the successfully matched pre-reaction and post-reaction images to output a visual comparison result image.

[0017] Preferably, in the automatic comparison method for SEM images of rock samples at the same location under mineral dissolution-deformation conditions before and after the geochemical reaction, after the step of iteratively traversing all SEM images before and after the geochemical reaction, and filtering out a set of similar images after the geochemical reaction corresponding to each image in the first set of SEM images from the second set of SEM images based on mineral grain mask similarity thresholds and cement mask similarity thresholds, to obtain successfully matched pre-reaction and post-reaction images, the method further includes:

[0018] Take one SEM image before geochemical reaction from the first set of SEM images and a set of similar images that are successfully matched with it;

[0019] When the matching similar image set corresponding to the extracted SEM image before geochemical reaction contains only one image, the matched similar image set is determined to be the SEM image after geochemical reaction corresponding to the SEM image before geochemical reaction.

[0020] Preferably, in the automatic comparison method of SEM images of rock samples at the same location under mineral dissolution-deformation conditions before and after the geochemical reaction, after the step of extracting a SEM image before the geochemical reaction and a set of similar images that successfully match it from the first set of SEM images, the method further includes:

[0021] When the SEM image before geochemical reaction is extracted corresponds to a set of similar images that includes multiple images, the multiple images are sorted from largest to smallest according to the similarity of mineral grain mask to obtain the first sorting result;

[0022] The total absolute difference in grayscale values ​​of the extracted SEM images before geochemical reaction and each SEM image in the corresponding matching similar image set are calculated. The images are then sorted from largest to smallest based on the calculated total absolute difference in grayscale values ​​to obtain the second sorting result.

[0023] When the SEM image ranked first in the first ranking result is the same as the SEM image ranked first in the second ranking result, the SEM image ranked first is used as the SEM image after geochemical reaction that matches the SEM image before geochemical reaction.

[0024] Preferably, in the automatic comparison method of SEM images of rock samples at the same location under mineral dissolution-deformation conditions before and after the geochemical reaction, the calculation formula for the step of calculating the similarity between the mineral grain mask and the cement mask in the processed fourth and fifth SEM images and outputting the similarity between the mineral grain mask and the cement mask is as follows:

[0025] ;

[0026] The coefficients represent the similarity between the mineral particle mask / cement mask in the fourth and fifth SEM images, and the coefficients ∈ [0, 1].

[0027] A represents the set of pixel regions of mineral grains / cement in the SEM image before geochemical reaction;

[0028] B represents the set of pixel regions of mineral grains / cement in the SEM image after geochemical reaction;

[0029] A∩B is the intersection of pixel regions where both the reaction and the reaction consist of mineral particles / cement.

[0030] A∪B is the union of pixel regions that are mineral particles / cement before or after the reaction.

[0031] Preferably, in the automatic comparison method of SEM images of rock samples at the same location under the mineral dissolution-deformation conditions before and after the geochemical reaction, the step of determining the mineral grain mask similarity threshold and cement mask similarity threshold based on the similarity of the two mineral grain mask and cement mask includes:

[0032] Based on the geochemical reaction intensity, and the similarity between the mineral particle mask and the cement mask, the similarity thresholds for the mineral particle mask and the cement mask are determined, wherein the similarity threshold for the mineral particle mask is less than or equal to the similarity between the two mineral particle masks, and the similarity threshold for the cement mask is less than or equal to the similarity threshold between the two cement mask.

[0033] Preferably, in the automatic comparison method for SEM images of rock samples at the same location under mineral dissolution-deformation conditions before and after the geochemical reaction, the step of acquiring a first set of SEM images before the geochemical reaction and a second set of SEM images after the geochemical reaction, and preprocessing the two sets of SEM images to make the two sets of SEM images have the same magnification and geometric size, includes the following preprocessing of the two sets of SEM images:

[0034] The first set of SEM images and the second set of SEM images were registered by magnification to ensure that the two images used for comparison were acquired at the same magnification.

[0035] For two images with matching magnification, compare their pixel dimensions and crop them to make them exactly the same size, using the minimum number of pixels on the X and Y axes as a reference.

[0036] The present invention has at least the following beneficial effects:

[0037] This invention acquires a first set of SEM images before geochemical reactions and a second set of SEM images after geochemical reactions. The two sets of SEM images are preprocessed to ensure they have the same magnification and geometric dimensions. Feature information of mineral particles and cementitious materials is extracted from the preprocessed SEM images. The feature information of mineral particles in the first set of preprocessed SEM images is used as a first feature fingerprint. The SEM image in the second set of preprocessed SEM images that best matches the first feature fingerprint is searched to obtain a third set of SEM images. The feature information of cementitious materials in the first set of preprocessed SEM images is used as a second feature fingerprint. The SEM image in the third set of SEM images that best matches the second feature fingerprint is selected to obtain a fourth set of SEM images, and a fifth set of SEM images from the first set of SEM images that matches the fourth set of SEM images. The selected fourth and fifth sets of SEM images are registered and aligned using the geometric center of the mineral particles, and the S-value of the fourth set is calculated. The similarity of the geometric shape and area of ​​each mineral particle in the EM image and the fifth group of SEM images is calculated. Overlapping areas with similarity greater than or equal to a preset threshold are retained, while areas with similarity less than the preset threshold are removed. The similarity between the mineral particle mask and the cement mask in the processed fourth and fifth group of SEM images is calculated, and the similarity scores are output. Based on these similarity scores, the similarity thresholds for the mineral particle mask and cement mask are determined. All SEM images before and after the geochemical reaction are iterated over. Based on the mineral particle mask similarity threshold and the cement mask similarity threshold, a set of similar post-geochemical reaction images corresponding to each image in the first group of SEM images is selected from the second group of SEM images, resulting in successfully matched pre-reaction and post-reaction images. This allows for precise comparison of the same locations before and after the geochemical reaction. Attached Figure Description

[0038] Figure 1 This is a comparison of SEM images at different locations before and after the geochemical reaction. Figure 1 (a) SEM image before geochemical reaction. Figure 1 (b) SEM image after geochemical reaction, Figure 1 (c) Comparison results of mineral particles (white = cement, black = mineral particles). Figure 1 (d) Comparison results of cementitious materials (blue = cementitious material before reaction, red = cementitious material after reaction);

[0039] Figure 2 This is an intelligent comparison result image of SEM images at the same location before and after the geochemical reaction provided by the present invention, wherein, Figure 2(a) SEM image before geochemical reaction. Figure 2 (b) SEM image after geochemical reaction, Figure 2 (c) Comparison results of mineral particles (white = cement, black = mineral particles). Figure 2 (d) Comparison results of cementitious materials (blue = cementitious material before reaction, red = cementitious material after reaction);

[0040] Figure 3 This is a diagram illustrating the intelligent identification process of mineral particles and cement in SEM images provided by the present invention. Figure 3 (a) in the image is the original SEM image. Figure 3 Image (b) is the image after enhancement and filtering preprocessing. Figure 3 (c) in the diagram is a scatter plot of mineral grains / cement (red = cement, green = mineral grains). Figure 3 (d) in the image represents the binary map of mineral grains. Figure 3 (e) in the image is the binary image of the cementitious material. Figure 3 (f) in the image is a pseudo-color overlay image after intelligent identification of mineral particles and cementitious materials;

[0041] Figure 4 This is a schematic diagram of one embodiment of the automatic comparison method for SEM images of rock samples at the same location before and after geochemical reaction provided by the present invention.

[0042] Figure 5 The images show the mineral grain contour identification results from SEM images before and after the geochemical reaction. Figure 5 (a) in the image represents the SEM image recognition result before geochemical reaction. Figure 5 (b) SEM image recognition results after geochemical reaction.

[0043] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0044] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0045] In this embodiment of the invention, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.

[0046] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0047] In this embodiment of the invention, the term "multiple" refers to two or more, and other quantifiers are similar.

[0048] In this invention, unless otherwise stated, directional terms such as "upper," "lower," "top," and "bottom" are generally used in relation to the direction shown in the accompanying drawings, or in relation to the vertical, perpendicular, or gravitational direction of the component itself; similarly, for ease of understanding and description, "inner" and "outer" refer to the inner and outer contours of each component itself, but the above directional terms are not intended to limit this invention.

[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details are presented in the embodiments of the present invention to facilitate a better understanding of the invention. However, the technical solutions claimed in the present invention can be implemented even without these technical details and various variations and modifications based on the following embodiments. The division of the following embodiments is for ease of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with and referenced by each other without contradiction.

[0050] By using a high-temperature, high-pressure reactor as the core, along with supporting equipment such as fluid injection and production devices, temperature and pressure control devices, and sampling and analysis devices, a physical simulation can be achieved of CO2 dissolving in formation water and undergoing geochemical reactions with rocks and minerals during fluid seepage under high-temperature and high-pressure conditions in saline aquifers. Based on this, geochemical reaction experiments can be conducted, detailing the specific experimental procedures for simulated formation water preparation, core slice preparation, pre-reaction microscopic observation, high-temperature and high-pressure geochemical reaction control, and post-reaction microscopic observation, thus forming a complete geochemical reaction experimental system.

[0051] To conduct microscopic experimental studies of geochemical reactions, a scanning electron microscopy (SEM) observation method was designed. This method includes platinum-sprayed pretreatment of core slices, SEM observation before geochemical reactions, EDS energy dispersive spectroscopy analysis of mineral composition before geochemical reactions, SEM observation after geochemical reactions, and EDS energy dispersive spectroscopy analysis. By observing the geochemical reactions before and after the reactions and comparing the acquired images, combined with mineral composition change analysis, the geochemical reaction equations can be inverted, thus laying the foundation for research on geochemical reaction mechanisms.

[0052] However, most current observation methods only show comparisons of different locations before and after geochemical reactions, reducing the reliability of experimental conclusions. There is no rapid and accurate method to achieve SEM comparison of rock samples at the same location before and after geochemical reactions. Generally, SEM observations require magnification at different levels. When SEM images are magnified from millimeter (1mm) resolution to nanometer (1000nm) resolution, a single field of view is decomposed into tens of thousands of sub-images. These magnified images suffer from limited overlap, lack of macroscopic reference, sample displacement during imaging, high similarity in mineral grain and pore morphology within the rock's microstructure, and changes in surface morphology due to geochemical reactions. These factors combined make it difficult for the human eye to accurately locate the same position through image comparison. Therefore, given the changes in the microstructure of rock samples caused by dissolution, how to automatically match the massive amounts of images before and after geochemical reactions at high magnification is a significant challenge.

[0053] Generally, the microstructure of rock samples does not change significantly before and after displacement or saturation with fluid, making comparative SEM observations and image recognition at the same location relatively simple. However, for carbon dioxide burial, carbon dioxide dissolves in water to form carbonic acid, which can undergo geochemical reactions with rock minerals, thus dissolving the surface of the rock sample. This leads to varying degrees of change in the microstructure of the rock sample after the geochemical reaction (compared to before the reaction). Furthermore, dissolution reduces the mechanical and structural stability of the rock sample, causing certain deformations in the microstructure of mineral grains and cement. Therefore, in carbon dioxide burial microscopic experiments, due to the mineral dissolution-deformation characteristics, the microscopic images of the same location before and after the experiment do not completely overlap, further increasing the difficulty of automatic comparison of SEM images before and after the geochemical reaction.

[0054] This invention addresses the method of simultaneously comparing multiple mineral particles in a single image. It uses mineral particles as the first fingerprint information, ensuring that most mineral particles overlap, while lowering the overlap threshold to eliminate the influence of dissolved and deformed mineral particles. Building upon this, the invention adds cementitious materials as a second fingerprint information for auxiliary comparison. Since cementitious materials are primarily clay minerals, they exhibit low reactivity in geochemical reactions and generally do not undergo significant geochemical reactions, making them relatively stable. Therefore, using cementitious materials as the second fingerprint information for auxiliary comparison can further improve the accuracy of the comparison results.

[0055] Figure 4 The diagram illustrates an automatic comparison method for SEM images of rock samples at the same location before and after geochemical reactions, provided by this invention.

[0056] In step S1000, the first set of SEM images before the geochemical reaction and the second set of SEM images after the geochemical reaction are obtained, and the two sets of SEM images are preprocessed to make the two sets of SEM images have the same magnification and geometric size.

[0057] Maintaining the same magnification is fundamental for image comparison. Therefore, during SEM image acquisition before and after the geochemical reaction, the same magnification order and system should be followed, such as 1x → 10x → 100x → 1000x, to facilitate subsequent image comparison. Similarly, when performing image comparison, two sets of images at the same magnification should be selected for comparison to ensure that the comparison basis is the same.

[0058] To prevent array size incompatibility issues caused by non-one-to-one mapping during comparison, the dimensions of the SEM images before and after the geochemical reaction need to be standardized. Pixel size comparisons are performed on the SEM images before and after the geochemical reaction (i.e., the first and second sets of SEM images) to determine the minimum number of pixels along the X and Y axes, and the two images are then cropped based on this. This ensures the consistency of the dimensions of the two SEM images before and after the geochemical reaction, thereby ensuring that the subsequent mineral grain / cement extraction arrays are of the same size, providing a basis for similarity calculations.

[0059] The preprocessing of the two sets of SEM images in step S1000 includes: registering the first set of SEM images and the second set of SEM images by magnification to ensure that the two images for comparison were acquired at the same magnification; comparing the pixel size of the two images with the same magnification, and cropping the two images based on the minimum number of pixels on the X-axis and Y-axis to make their sizes completely consistent.

[0060] In step S2000, feature information of mineral grains and cement is extracted from the two sets of preprocessed SEM images. For sandstone reservoirs, the rock is mainly composed of mineral grains and cement. Due to the different chemical compositions of the constituent mineral grains and cement, they exhibit different characteristics in the grayscale image: specifically, mineral grains are darker in color and have smaller grayscale values, while cement is brighter in color and has larger grayscale values. Therefore, based on this characteristic, feature information of mineral grains and cement can be extracted from the two sets of preprocessed SEM images, which will be explained in detail below.

[0061] In step S3000, the feature information of mineral particles in the first set of preprocessed SEM images is used as the first feature fingerprint. The SEM image that best matches the first feature fingerprint is found in the second set of preprocessed SEM images to obtain the third set of SEM images.

[0062] The core idea of ​​this step is to treat the geometry and distribution of the extracted mineral particles before the geochemical reaction as a fingerprint, and then find the image with the most similar fingerprint among numerous SEM images after the geochemical reaction. In practice, the mineral particles in the SEM images extracted before and after the geochemical reaction are segmented into several independent mineral particles. The geometric center of each mineral particle is calculated and recorded. The geometric centers of the mineral particles in the two SEM images before and after the geochemical reaction are aligned, and the similarity in geometry and area of ​​the mineral particles is compared.

[0063] In step S4000, the feature information of the cement in the preprocessed first group of SEM images is used as the second feature fingerprint. The SEM image that best matches the second feature fingerprint is selected from the third group of SEM images to obtain the fourth group of SEM images and the fifth group of SEM images that matches the fourth group of SEM images from the first group of SEM images.

[0064] Because the continuity and integrity of cement distribution in rock samples are relatively poor, it is used here as an auxiliary identification indicator. The geometric shape and distribution information of cement in SEM images extracted before and after the geochemical reaction are recorded. The geometric shape and distribution of cement in the two SEM images before and after the geochemical reaction are compared to determine the degree of similarity. Figure 2 As shown in (d) of the image, for images taken at the same location before and after the geochemical reaction, the changes in cement are mainly concentrated at the edges of mineral grains, showing a pattern of mostly overlap with minor differences. In contrast, Figure 1 As shown in (d), the distribution of cementitious material before and after the geochemical reaction is significantly different with very low overlap, suggesting that the two SEM images before and after the geochemical reaction were taken from different locations on the core slice.

[0065] In step S5000, the selected fourth and fifth SEM images are registered and aligned using the geometric center of the mineral particles. The similarity of the geometric shape and area of ​​each mineral particle in the fourth and fifth SEM images is calculated. Overlapping areas with a similarity of geometric shape and area of ​​each mineral particle greater than or equal to a preset threshold are retained, while areas with a similarity of geometric shape and area of ​​each mineral particle less than the preset threshold are removed.

[0066] After image acquisition before the geochemical reaction, core slices were removed for geochemical experiments, followed by image acquisition. During these two acquisitions, core slice displacement inevitably resulted in partial overlap between the images acquired before and after the geochemical reaction. To address this issue, image registration was performed by aligning the geometric centers of mineral grains, rather than aligning the coordinates of the two images. Then, the similarity of the geometric shape and area of ​​each mineral grain in the two images was calculated. The largest rectangular area occupied by mineral grains with a similarity greater than 80% was retained, and dissimilar parts in the SEM image were removed, achieving partial overlap image matching.

[0067] In step S6000, the similarity between the mineral particle mask and the cement mask in the processed fourth and fifth SEM images is calculated, and the similarity between the mineral particle mask and the cement mask is output. Based on the similarity between the mineral particle mask and the cement mask, the similarity thresholds for the mineral particle mask and the cement mask are determined.

[0068] The formula for calculating the similarity between the mineral particle mask and the cement mask in the processed fourth and fifth SEM images is as follows:

[0069] ;

[0070] The coefficients represent the similarity between the mineral particle mask / cement mask in the fourth and fifth SEM images, and the coefficients ∈ [0, 1].

[0071] A represents the set of pixel regions of mineral grains / cement in the SEM image before geochemical reaction;

[0072] B represents the set of pixel regions of mineral grains / cement in the SEM image after geochemical reaction;

[0073] A∩B is the intersection of pixel regions where both the reaction and the reaction consist of mineral particles / cement.

[0074] A∪B is the union of pixel regions that are mineral particles / cement before or after the reaction.

[0075] For two matched SEM images selected from the pool, the regions where both the geochemical reaction occurred before and after the reaction (intersection) and the regions where both occurred at any point before and after the reaction (union) are calculated. Based on this, the mineral grain mask similarity (the aforementioned coefficient) is calculated. This coefficient (intersection-union ratio) quantifies the similarity of mineral grains in the SEM images; a larger value indicates a more similar pair of grains, while a smaller value indicates a greater difference. Similarly, the cementitious material mask similarity can be calculated to characterize the similarity of cemented material regions. Based on this method, the following is calculated: Figure 2 (c) and Figure 2The mineral grain mask similarity of the two SEM images shown in (d) is 91%, and the cementitious material mask similarity is 83%; the calculation... Figure 1 (c) and Figure 1 The similarity of the mineral grain mask in the two SEM images shown in (d) is 16%, and the similarity of the cement mask is 24%.

[0076] It should be noted that the similarity thresholds for mineral grain masks and cementitious material masks need to take into account the effects of mineral dissolution and deformation before and after geochemical reactions. When evaluating the comparison results, 100% similarity is not required; instead, specific similarity thresholds (80% for mineral grains and 70% for cementitious materials) should be set. These thresholds depend on the intensity of the geochemical reaction and are specifically affected by factors such as rock mineral composition, temperature, and pressure conditions.

[0077] Specifically, based on the geochemical reaction intensity and the similarity between the mineral particle masks and the cement mask, a similarity threshold for the mineral particle mask and a similarity threshold for the cement mask are determined, wherein the similarity threshold for the mineral particle mask is less than or equal to the similarity between the two mineral particle masks, and the similarity threshold for the cement mask is less than or equal to the similarity threshold for the two cement mask.

[0078] In step S7000, all SEM images before and after the geochemical reaction are iterated. Based on the mineral particle mask similarity threshold and the cement mask similarity threshold, a set of similar images after the geochemical reaction corresponding to each image in the first group of SEM images is selected from the second group of SEM images, so as to obtain the successfully matched images before and after the reaction.

[0079] Take a fixed image before geochemical reaction, repeat the above process, compare the SEM image before geochemical reaction with all SEM images after geochemical reaction, and extract the SEM images after geochemical reaction that have an average mineral particle similarity greater than the mineral particle mask similarity threshold (e.g., 80%) and a cement mask similarity greater than the cement mask similarity threshold (e.g., 70%), and put them into the similar image set.

[0080] In some other embodiments, a specific image after geochemical reaction can be fixed, and the above process can be repeated to compare the geochemical reaction-post SEM image with all SEM images before geochemical reaction. The SEM images before geochemical reaction that have an average mineral particle similarity greater than the mineral particle mask similarity threshold (e.g., 80%) and a cement mask similarity greater than the cement mask similarity threshold (e.g., 70%) can be extracted and placed into another set of similar images.

[0081] The following sections will elaborate on the specific steps mentioned above.

[0082] Step S2000 includes steps S2100 to S2900. This enables the identification and extraction of geometric distribution and grayscale information of mineral particles and cement in SEM images before and after geochemical reactions.

[0083] Step S2100 involves reading and grayscale conversion. The preprocessed first and second SEM images are read to obtain a grayscale matrix. The image is checked to see if it is a 3D RGB image (height × width × 3 channels); if it is a color image, the R / G / B values ​​are combined into a single grayscale image using a weighted average method.

[0084] Gray values ​​at S2200 are normalized. The resulting gray-level matrix is ​​linearly stretched to the [0, 1] interval, where 0 represents the darkest and 1 represents the brightest. Normalizing different images to a uniform gray-level range is beneficial for subsequent adaptive enhancement, threshold calculation, and other tasks.

[0085] Contrast enhancement processing at step S2300. The continuous image is discretized using the Adaptive Histogram Equalization (CLAHE) method, dividing it into pixel-level small grid blocks. Contrast stretching is performed on each small grid block, followed by smooth transition processing. For example... Figure 3 (a) and Figure 3 The local contrast is significantly enhanced after processing (b), the grayscale difference between mineral particles and cement is more obvious, and the details are more prominent.

[0086] Step S2400 involves two-dimensional median filtering. A neighborhood within a 3×3 grid is selected, and for each pixel, it is replaced with the median of the surrounding 3×3 pixels. This better removes "salt-and-pepper noise" (isolated bright or dark spots in a series of smooth pixels), and this method more clearly highlights the edges of mineral grains and cementation than mean filtering. The image after filtering is as follows. Figure 3 As shown in (b) of the diagram.

[0087] In step S2500, the optimal Otsu segmentation threshold is selected. Since both mineral particles and cement in the rock sample SEM image are gray, the main difference between them is their grayscale values. Therefore, this invention uses the Otsu method to determine the grayscale threshold that distinguishes between mineral particles and cement. The basic idea is to assume that the SEM image histogram consists of two main peaks (two classes), dividing pixels into "foreground" and "background." Within each class, the grayscale values ​​should be as "concentrated" as possible (small intra-class variance), and the difference in grayscale mean between the two classes should be as large as possible (large inter-class variance). All possible thresholds are enumerated, and the threshold T that maximizes the inter-class variance while minimizing the intra-class variance is selected as the optimal segmentation grayscale threshold.

[0088] Step S2600 involves image segmentation of mineral particles and cement based on grayscale thresholds. Each grid in the first and second set of SEM images is classified according to a grayscale threshold: grayscale values ​​less than or equal to T are classified as mineral particles, and grayscale values ​​greater than T are classified as cement. This yields two-dimensional matrix datasets for mineral particles and cement. Further, the area proportions Rm (mineral particles) and Rc (cement) in the two sets of SEM images are statistically analyzed, ensuring their sum is 1.

[0089] Step S2700: Noise Removal. Compared to cement, mineral particles exhibit a continuous distribution. To reflect this characteristic, noise within the mineral particles needs to be removed. The previously obtained two-dimensional matrix dataset of mineral particles [0 to T] is converted into a binary matrix [0 or 1]. Continuous regions are identified within the binary matrix, and non-connected blocks with an area less than 50 pixels within these regions are deleted. The purpose of this operation is to remove isolated small spots and fragments, retaining larger, genuine mineral particles to ensure the continuity and integrity of the mineral particles. The "50 pixels" value here is manually set; a larger number results in a larger and more extensive deletion of smaller particles, treating them as noise; a smaller number results in a smaller and less extensive deletion of particles, retaining more small patches on the mineral particles. In practice, this pixel value needs to be determined based on the actual mineral composition of the rock sample.

[0090] Step S2800: Hole Filling Process. Holes in the binary image of mineral grains arise from two main causes: the presence of cementing material and image shadows caused by crystal depressions or protrusions on the mineral grains. Therefore, it is necessary to fill the holes in the second case. The processing method involves filling the "0 regions completely surrounded by 1s" within the 5×5 grid area of ​​the mineral grain binary image with 1s. This will turn some black holes / small cavities inside large grains into solid areas after filling. This process makes the mineral grain area more complete and continuous, improving the accuracy of subsequent area or shape calculations. The "5×5 grid area" is also manually set, and its value is positively correlated with the roughness of the core slice plane. The mineral grain binary image and cementing material binary image after image segmentation, noise reduction, and hole filling processing are shown below. Figure 3 (d) and Figure 3 As shown in (e) in the diagram.

[0091] Step S2900: Binary image overlay and pseudo-color output display. The binary images of mineral grains and cement are overlaid, and mineral grains and cement are distinguished using red and green colors (green for mineral grains, red for cement). The result is as follows. Figure 3As shown in (c) of the figure, the main mineral grains retain continuity and integrity, while the cement exhibits dispersion and a certain degree of incompleteness. These characteristics are entirely consistent with diagenetic theories. Using the SEM image as a background, the identification results of mineral grains and cement are overlaid and displayed using pseudo-color overlay. The results are shown below. Figure 3 As shown in (f) in the figure, this figure visually illustrates the result after the original SEM image has undergone intelligent identification of mineral particles and cement.

[0092] In addition, the automatic comparison method for SEM images of rock samples at the same location before and after the geochemical reaction also includes steps S8000 and S9000.

[0093] Step S8000 performs weighted logical operations on the binary data of mineral particles and cement in the successfully matched pre-reaction and post-reaction images, outputting a visual comparison result map. By performing weighted logical operations on the binary data during the mineral particle comparison process, a dataset of operation results with values ​​[0, 1, 2, 3] can be obtained. These four values ​​correspond to four cases: "no mineral particles before or after the geochemical reaction," "mineral particles before the geochemical reaction," "mineral particles after the geochemical reaction," and "mineral particles before and after the geochemical reaction." The cement is processed using the same method. This allows for the creation of a visual comparison map. Figure 1 and Figure 2 The comparison results are shown in the figure.

[0094] After comparing a pre-geochemical SEM image, the post-geochemical reaction similar image set may contain one image, multiple images, or none. Therefore, step S9000 also includes steps S9100 to S9500.

[0095] Step S9100: Extract a SEM image before geochemical reaction and a set of similar images that are successfully matched with it from the first set of SEM images.

[0096] In step S9200, when the matched similar image set corresponding to the extracted pre-geochemical SEM image contains only one image, the matched similar image set is determined to be the post-geochemical SEM image corresponding to the pre-geochemical SEM image. If the similar image set of the pre-geochemical SEM image contains only one image, it is directly determined to be the post-geochemical SEM image.

[0097] In step S9300, when the SEM image before geochemical reaction is extracted and the matching similar image set includes multiple images, the multiple images are sorted from largest to smallest according to the similarity of mineral grain mask to obtain the first sorting result.

[0098] Step S9400 calculates the total absolute difference in grayscale between the extracted SEM image before geochemical reaction and each SEM image in the corresponding matching similar image set. The images are then sorted from largest to smallest based on the calculated total absolute difference in grayscale to obtain the second sorting result.

[0099] Step S9500: When the SEM image ranked first in the first sorting result is the same as the SEM image ranked first in the second sorting result, the SEM image ranked first is used as the SEM image after geochemical reaction that matches the SEM image before geochemical reaction.

[0100] When multiple images are present in a similar image set, all images are sorted from highest to lowest mineral grain mask similarity. If mineral grain mask similarity is the same, cementitious material mask similarity is used for auxiliary sorting. Next, the difference in grayscale values ​​between the SEM images before and after the geochemical reaction is calculated (note that this is the absolute grayscale value, not the binary value used for mineral grain mask similarity). The absolute values ​​of all grid differences are then summed, and the SEM images in the similar image set are sorted from smallest to largest based on the total absolute difference.

[0101] The results of the mineral particle mask similarity ranking and the total absolute difference ranking are compared. If the images ranked first by both ranking methods are the same, then the image ranked first is determined to be its corresponding SEM image after geochemical reaction. If they are different, the process proceeds to the next verification step (e.g., manual verification).

[0102] Figure 1 This image shows a comparison of SEM images at different locations before and after the geochemical reaction. Figure 1 (a) and Figure 1 In (b), it is obvious to the naked eye that the two pictures were not taken from the same location. Therefore... Figure 1 (c) shows that the mineral grains have a very low degree of overlap, a chaotic distribution pattern, and no clear mineral grain outlines. Figure 2 This image shows a comparison of SEM images of the same location before and after the geochemical reaction. As can be seen from the image, the identified mineral particles largely overlap before and after the geochemical reaction, and the boundaries between the mineral particles and the cement are clear, reflecting a good identification effect. Figure 1 and Figure 2 The comparison results show that the method provided by this invention has good recognition performance in various situations.

[0103] Figure 5 The diagram illustrates the mineral particle contour recognition results from SEM images before and after geochemical reactions. Based on a mineral particle contour edge detection method, the boundaries between mineral particles and cement are drawn, with the red curve representing the boundary before geochemical reaction and the blue boundary representing the boundary after geochemical reaction. Drawing mineral particle contour lines aids in verification, particularly manual verification.

[0104] More specifically, the method employs Canny edge detection to identify mineral grain and cementation boundaries, adjusting the threshold to achieve optimal edge detection results. Morphological closing operations are used to optimize the minimum structural unit while removing small noise points. Dilation operations are used to reconnect boundary lines separated by X pixels (X pixels are adjusted based on rock properties and recognition performance), reconnecting boundary lines broken by anomalies. The dilated thick lines are then "compressed" into a one-pixel-wide main line, achieving boundary line skeletonization. Pruning removes small branches and very short boundary lines to avoid jagged edges, retaining only the main contour lines. Through this mineral grain contour edge detection method, the identification of mineral grain contours in SEM images before and after geochemical reactions is achieved, as detailed below. Figure 5 As shown. Based on this, by comparing the boundaries of mineral grains before and after the geochemical reaction (comparison of red and blue outlines), the efficiency of identification can be significantly improved, especially in manual identification.

[0105] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. An automatic comparison method for SEM images of rock samples at the same location before and after geochemical reactions under mineral dissolution-deformation conditions, characterized in that, include: The first set of SEM images before geochemical reaction and the second set of SEM images after geochemical reaction were obtained, and the two sets of SEM images were preprocessed to make the magnification and geometric size of the two sets of SEM images the same. Feature information of mineral particles and cement was extracted from the two sets of preprocessed SEM images; The feature information of mineral particles in the first set of preprocessed SEM images is used as the first feature fingerprint. The SEM image that best matches the first feature fingerprint is found in the second set of preprocessed SEM images to obtain the third set of SEM images. The feature information of the cement in the first set of preprocessed SEM images is used as the second feature fingerprint. The SEM images that best match the second feature fingerprint are selected from the third set of SEM images to obtain the fourth set of SEM images, and the fifth set of SEM images that matches the fourth set of SEM images in the first set of SEM images. The fourth and fifth sets of SEM images were registered and aligned using the geometric center of the mineral particles. The similarity of the geometric shape and area of ​​each mineral particle in the fourth and fifth sets of SEM images was calculated. The overlapping areas with the similarity of the geometric shape and area of ​​each mineral particle greater than or equal to the preset threshold were retained, and the areas with the similarity of the geometric shape and area of ​​each mineral particle less than the preset threshold were removed. Calculate the similarity between the mineral particle mask and the cement mask in the processed fourth and fifth SEM images, and output the similarity between the mineral particle mask and the cement mask. Based on the similarity between the mineral particle mask and the cement mask, determine the similarity threshold between the mineral particle mask and the cement mask. The system iterates through all SEM images before and after the geochemical reaction. Based on the mineral particle mask similarity threshold and the cement mask similarity threshold, it selects a set of similar images after the geochemical reaction that correspond to each image in the first set of SEM images from the second set of SEM images, thus obtaining successfully matched images before and after the reaction.

2. The automatic comparison method for SEM images of rock samples at the same location under mineral dissolution-deformation conditions before and after geochemical reactions, as described in claim 1, is characterized in that... After the step of iteratively traversing all SEM images before and after the geochemical reaction, and selecting a set of similar post-geochemical reaction images corresponding to each image in the first group of SEM images from the second group of SEM images based on mineral grain mask similarity thresholds and cementitious material mask similarity thresholds, thus obtaining successfully matched pre-reaction and post-reaction images, the method further includes: Weighted logical operations are performed on the binary data of mineral particles and cement in the successfully matched pre-reaction and post-reaction images to output a visual comparison result image.

3. The automatic comparison method for SEM images of rock samples at the same location under mineral dissolution-deformation conditions before and after geochemical reactions, as described in claim 1, is characterized in that... After the step of iteratively traversing all SEM images before and after the geochemical reaction, and selecting a set of similar post-geochemical reaction images corresponding to each image in the first group of SEM images from the second group of SEM images based on mineral grain mask similarity thresholds and cementitious material mask similarity thresholds, thus obtaining successfully matched pre-reaction and post-reaction images, the method further includes: Take one SEM image before geochemical reaction from the first set of SEM images and a set of similar images that are successfully matched with it; When the matching similar image set corresponding to the extracted SEM image before geochemical reaction contains only one image, the matched similar image set is determined to be the SEM image after geochemical reaction corresponding to the SEM image before geochemical reaction.

4. The automatic comparison method for SEM images of rock samples at the same location under mineral dissolution-deformation conditions before and after geochemical reactions, as described in claim 3, is characterized in that... After the step of retrieving a pre-geochemical reaction SEM image and a set of similar images that successfully match it from the first set of SEM images, the method further includes: When the SEM image before geochemical reaction is extracted corresponds to a set of similar images that includes multiple images, the multiple images are sorted from largest to smallest according to the similarity of mineral grain mask to obtain the first sorting result; The total absolute difference in grayscale values ​​of the extracted SEM images before geochemical reaction and each SEM image in the corresponding matching similar image set are calculated. The images are then sorted from largest to smallest based on the calculated total absolute difference in grayscale values ​​to obtain the second sorting result. When the SEM image ranked first in the first ranking result is the same as the SEM image ranked first in the second ranking result, the SEM image ranked first is used as the SEM image after geochemical reaction that matches the SEM image before geochemical reaction.

5. The automatic comparison method for SEM images of rock samples at the same location under mineral dissolution-deformation conditions before and after geochemical reactions, as described in claim 4, is characterized in that... In the step of calculating the similarity between the mineral particle mask and the cement mask in the processed fourth and fifth SEM images, and outputting the similarity between the mineral particle mask and the cement mask, the calculation formula is as follows: ; The coefficients represent the similarity between the mineral particle mask / cement mask in the fourth and fifth SEM images, and the coefficients ∈ [0, 1]. A represents the set of pixel regions of mineral grains / cement in the SEM image before geochemical reaction; B represents the set of pixel regions of mineral grains / cement in the SEM image after geochemical reaction; A∩B is the intersection of pixel regions where both the reaction and the reaction consist of mineral particles / cement. A∪B is the union of pixel regions that are mineral particles / cement before or after the reaction.

6. The automatic comparison method for SEM images of rock samples at the same location under mineral dissolution-deformation conditions before and after geochemical reactions, as described in claim 1, is characterized in that... The step of determining the mineral particle mask similarity threshold and the cementitious mask similarity threshold based on the similarity between the two masks includes: Based on the geochemical reaction intensity, and the similarity between the mineral particle mask and the cement mask, the similarity thresholds for the mineral particle mask and the cement mask are determined, wherein the similarity threshold for the mineral particle mask is less than or equal to the similarity between the two mineral particle masks, and the similarity threshold for the cement mask is less than or equal to the similarity threshold between the two cement mask.

7. The automatic comparison method for SEM images of rock samples at the same location under mineral dissolution-deformation conditions before and after geochemical reactions, as described in claim 1, is characterized in that... The step of acquiring a first set of SEM images before the geochemical reaction and a second set of SEM images after the geochemical reaction, and preprocessing the two sets of SEM images to make the two sets of SEM images have the same magnification and geometric size, includes the following preprocessing of the two sets of SEM images: The first set of SEM images and the second set of SEM images were registered by magnification to ensure that the two images used for comparison were acquired at the same magnification. For two images with matching magnification, compare their pixel dimensions and crop them to make them exactly the same size, using the minimum number of pixels on the X and Y axes as a reference.

Citation Information

Patent Citations

  • Method for reflecting sedimentary-diagenesis environment through geochemical characteristics of dolomite and evaporite symbiotic system

    CN117647472A

  • Method and system for identifying grain boundaries and minerals in a sample

    WO2023233197A1