Digital petrographic automated analysis method based on three modal microimages and standard sample reference library
Patent Information
- Application Number
- CN202610752167.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-10-13
AI Technical Summary
[0004]本申请的目的在于提供一种基于三模态显微图像、标准样品参考库与颗粒级追溯的数字岩相自动分析方法、系统、电子设备及计算机可读存储介质,以解决现有技术中存在的如下问题:
1.提高矿物颗粒边界识别稳定性。本申请融合单偏光图像PPL、正交偏光图像XPL和阴极发光图像CL三种互补显微图像,并构建归一化强度、局部增强、边缘响应、多模态边缘共识和阴极发光引导边界通道,使像素分类模型能够同时利用不同显微图像中反映的矿物颜色、干涉色、消光、发光环带、裂隙和颗粒边界信息,从而提高复杂岩石薄片中矿物颗粒边界识别的稳定性。
Smart Images

Figure CN122905923A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of rock thin section microscopic image processing, and in particular to an automatic digital petrographic analysis method based on three-modal microscopic images and a standard sample reference library. Background Technology
[0002] Thin section microscopic identification of rocks is a fundamental task in geological disciplines such as petrology and mineral deposit geology. Traditional methods rely on manual observation of mineral characteristics such as color, relief, interference colors, and cathodoluminescence, and on empirical judgment. While this method has interpretive power, it suffers from drawbacks such as low efficiency, high subjectivity, and difficulty in systematically recording grain parameters and constructing large-scale databases.
[0003] With the development of digital image processing and machine learning technologies, automatic identification of rock thin sections has become an important development direction. However, existing methods still have the following limitations: (1) Most of them only use a single mode such as single polarized light or cross-polarized light, without integrating complementary information such as mineral color, extinction, and luminescence ring reflected in single polarized light, cross-polarized light and cathodoluminescence images respectively, making it difficult to distinguish minerals with similar optical properties or those that have undergone multiple phases of modification; (2) Conventional segmentation methods are based on simple color or edge features, which are unstable in recognizing complex thin sections with blurred boundaries, particle adhesion, alteration and crack development, and are prone to over-segmentation or under-segmentation; (3) Although interactive segmentation software can output pixel-level probability maps, converting them into particle instance masks with independent numbers and completing measurement, cutting and classification still requires a lot of manual operation, and cannot form a batch processing flow; (4) Automatic classification directly depends on the training of the data to be identified, and lacks a standard sample reference library confirmed by experts, resulting in poor interpretability of classification results and difficulty in review; (5) The segments of segmentation, measurement, classification and visualization are disconnected from each other, and the number and features of the same particle in the mask, table and image lack unified traceability, which limits scientific research review and further use of the dataset. Single-polarized light images (PPL) primarily reflect the color, prominence, and turbidity of minerals; crossed-polarized light images (XPL) reveal interference colors, extinction, and differences in crystal orientation; and cathodoluminescence images (CL) reveal compositional and growth information such as luminescence intensity, internal zoning, and microfractures. These three modalities are highly complementary, and using any single modality alone is insufficient to fully characterize the geometric boundaries and optical features of mineral grains. By effectively fusing these three modalities, a stable representation of mineral boundaries, internal structure, and luminescence characteristics can be obtained simultaneously, thereby improving the accuracy and robustness of grain segmentation and type identification. Therefore, current digital petrographic analysis methods still lack an automated technical solution capable of fusing PPL, XPL, and CL images within the same coordinate system and grain ID system, and further automating pixel-level probabilistic graph inference, grain instance segmentation, grain feature extraction, standard sample reference library matching, and grain-level traceability output. Summary of the Invention
[0004] The purpose of this application is to provide a digital petrographic automated analysis method, system, electronic device, and computer-readable storage medium based on three-modal microscopic images, a standard sample reference library, and particle size traceability, in order to solve the following problems existing in the prior art: 1. A single microscopic image modality is insufficient to fully represent mineral grain boundaries, optical features, and luminescence characteristics; 2. Conventional image segmentation methods are unstable in identifying weak boundaries, cohesive grains, alteration boundaries, and luminescent rings in complex rock thin sections; 3. Pixel-level probability maps are difficult to directly convert into instance masks with grain numbers and statistical significance; 4. Mineral identification lacks support from expert-verified standard sample reference libraries, resulting in insufficient interpretability of classification results; 5. There is a lack of particle-level consistency and traceability among segmentation, statistics, cropping, identification, and visualization outputs; 6. Digital petrographic analysis of rock thin sections has a low degree of automation, making large-scale batch processing and verification difficult; 7. Traditional quantitative mineral analysis methods (such as electron probe microanalysis, SEM-EDS, TIMA, etc.) typically require specialized testing equipment and long analysis cycles, making it difficult to meet the needs of large-scale rock thin section sample pre-screening, target grain screening, and batch digital petrographic statistics.
[0005] The above-mentioned objective of this application is achieved through the following technical solution: S1: Obtain a three-mode aligned image by using the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescence image CL of the same sample area; S2: Generate a specimen region mask based on the trimodal aligned image, and use the specimen region mask to define the effective analysis area; S3: Construct multi-channel image data based on trimodal aligned images and effective analysis regions; S4: Input multi-channel image data into the pixel classification model for batch inference, output particle probability map file and perform automated post-processing to obtain a particle candidate instance mask with an independent particle ID. S5: Based on the particle candidate instance mask, each particle is uniquely numbered, its morphological parameters are measured, its three-modal color statistical parameters are extracted, and its single-particle multimodal image is cropped. S6: Construct a mineral feature reference library based on standard samples confirmed by experts. The mineral feature reference library includes mineral category labels, morphological parameters, and three-modal color statistical parameters of the standard sample particles. S7: Match the morphological parameters and trimodal color statistical parameters of the particle to be identified with the mineral feature reference library to obtain the mineral category identification result of the particle to be identified; S8: Output traceability results including particle ID, particle measurement parameters, mineral category identification results, and corresponding particle probability map file index.
[0006] Optionally, step S1 includes: A three-modal image group is formed by automatically matching the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL of the same sample area. The automatic matching includes identifying the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL of the same sample area according to the file name, sample number, field of view number, or preset naming rules, and combining them into a three-modal image group. The three-modal image group is cropped, sized, and spatially registered to obtain a three-modal aligned image; The dimensional correction includes: When the size difference between the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL is less than the preset size tolerance, at least one of the images will be adjusted to the reference image size. When the size difference exceeds the preset size tolerance, an error message will be output or the processing of the three-modal image group will be stopped. The spatial registration includes one or more of the following methods: feature point matching, phase correlation, enhanced correlation coefficient registration, mutual information registration, affine transformation, perspective transformation, elastic registration, or manual control point correction.
[0007] Optionally, step S2 includes: The specimen region mask is generated based on a combination criterion of the brightness of a single polarized image (PPL) and the brightness of an orthogonal polarized image (XPL), and is modified by one or more operations, including morphological closing operation, morphological opening operation, hole filling, and small object removal. The combined criteria include: identifying regions in the single-polarized image PPL with brightness higher than a first threshold and regions in the orthogonally polarized image XPL with brightness lower than a second threshold as candidate background regions; generating a background mask by combining one or more operations of morphological processing, connected component area filtering, and boundary position constraints; and identifying regions outside the background mask as valid analysis regions of the candidate specimens.
[0008] Optionally, step S3 includes: The multi-channel image data includes at least a three-modal normalized intensity channel, a local contrast enhancement channel, an edge response channel, and a multi-modal fusion boundary channel; The multi-channel image data includes multiple channels from PPL_norm, XPL_norm, CL_norm, PPL_CLAHE, XPL_CLAHE, CL_CLAHE, PPL_edge, XPL_edge, CL_edge, edge_consensus, and CL_on_edge_guide; wherein: The PPL_norm, XPL_norm, and CL_norm are obtained by percentile normalization of the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL within the effective analysis area defined by the sample area mask, or by normalizing each RGB channel of the corresponding modal image and then fusing them according to a preset weight. The PPL_CLAHE, XPL_CLAHE and CL_CLAHE are obtained by performing contrast-limited adaptive histogram equalization on the single-polarized image PPL, the cross-polarized image XPL and the cathodoluminescent image CL, respectively. The PPL_edge, XPL_edge, and CL_edge are obtained by calculating the edge intensity of the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL, respectively. The edge intensity calculation includes first performing Gaussian blur preprocessing on the image, and then using the Sobel gradient magnitude or Scharr gradient magnitude method to generate a continuous intensity response. The edge_consensus channel is obtained by weighted fusion of PPL_edge, XPL_edge and CL_edge, satisfying edge_consensus = a × PPL_edge + b × XPL_edge + c × CL_edge, and the result is limited to the range of 0-255, where a, b, and c are preset positive real number weights, and a+b+c≠0; The CL_on_edge_guide channel is obtained by superimposing the CL normalized image with the edge_consensus channel according to the alpha blending formula, which is I_output = (1-α) × I_edge + α × I_CL, where: I_output represents the intensity of the output fused image, and the result is limited to a preset grayscale range; I_edge represents the intensity value of the edge consensus channel edge_consensus; I_CL represents the intensity value of the CL normalized channel CL_norm; and α is a preset transparency coefficient with a value range of 0≤α≤1.
[0009] Optionally, step S4 includes: The multi-channel image data is saved as a format file that the model can read, and the format file is input into a pixel classification model that can output pixel-level probability maps for batch inference to obtain a particle probability map file. The format file includes: image dataset, channel name, dimension label, sample identifier, and preprocessing parameter information; the dimension label is used to indicate the spatial dimension and channel dimension of the image data; The pixel classification model is an image segmentation model that can output pixel-level category probability maps based on multi-channel image data, including one of the following: interactive pixel classification model, random forest pixel classification model, convolutional neural network segmentation model, U-Net class segmentation model, or Transformer image segmentation model; The batch inference is executed in command-line mode and automatically calls the same pixel classification model for multiple format files, outputting probability map files corresponding to each format file; the particle probability map file includes: particle region probability map and particle boundary probability map; The automated post-processing includes one or more of the following: probability map reading, probability value normalization, probability channel identification, threshold segmentation, specimen region mask constraint, morphological closing operation, small object removal, distance transformation, seed point extraction, watershed segmentation, secondary filtering, and instance renumbering. When watershed segmentation is used, a topographic map constructed from a distance transformation map and a boundary probability map is used, and the topographic map satisfies: elevation = -distance + p_boundary × boundary_weight; Here, `elevation` represents the terrain height value of the topographic map, used as the flooding benchmark for the watershed algorithm; `distance` represents the foreground region distance transformation map, defined as the Euclidean distance from each foreground pixel in the binary foreground image to the nearest background pixel; `p_boundary` represents the boundary probability map, which is directly output by the pixel classification model or obtained from the particle region probability map through edge detection; and `boundary_weight` represents the boundary probability weight, a preset positive real number used to adjust the contribution intensity of the boundary probability in the topographic map construction.
[0010] Optionally, step S5 includes: The morphological parameters include one or more of the following: particle area, perimeter, equivalent diameter, major axis length, minor axis length, aspect ratio, roundness, orientation angle, centroid coordinates, circumscribed rectangle coordinates, and particle boundary coordinates. The three-modal color statistical parameters include one or more of the following in the particle region of the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL: RGB mean, RGB standard deviation, gray mean, gray standard deviation, gray quantile, information entropy, color dispersion, and texture complexity. The single-particle multimodal image cropping includes obtaining the bounding rectangular region of the current particle based on the particle candidate instance mask, and using a local instance mask to retain the current particle pixels while removing non-current particle pixels within the bounding rectangular region.
[0011] Optionally, step S6 includes: The standard samples are standard samples whose mineral categories have been confirmed by experts. The mineral feature reference library corresponding to the standard samples includes the color, brightness, texture, and morphological features of each mineral in single-polarized light image PPL, cross-polarized light image XPL, and cathodoluminescent image CL.
[0012] Optionally, the method further includes manual correction and model iteration steps: The obtained particle candidate instance mask and particle probability map file are exported to external image processing software, manual annotation software or interactive correction software for manual boundary correction, particle re-cutting or label correction, and the corrected particle instance mask is re-imported into steps S5 to S7 to continue particle feature extraction, mineral identification and particle-level traceability output. The particle-level tracing includes simultaneously associating the same particle ID with a particle candidate instance mask, a particle measurement table, a mineral identification result table, a PPL single particle cropped image, an XPL single particle cropped image, a CL single particle cropped image, a particle boundary overlay image, and a mineral classification overlay image. The method also includes generating digital lithofacies statistical results based on mineral category identification results. The digital lithofacies statistical results include one or more of the following: area, quantity, area percentage, quantity percentage, grain size distribution, morphological parameters, directional parameters, and spatial distribution parameters of different mineral categories.
[0013] An electronic device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to enable the electronic device to perform an automated digital petrographic analysis method based on a trimodal microscopic image and a standard sample reference library.
[0014] A computer-readable storage medium storing instructions that, when executed, perform an automated digital petrographic analysis method based on a trimodal microscopic image and a standard sample reference library.
[0015] The beneficial effects of the technical solution provided in this application are: 1. Improve the stability of mineral grain boundary recognition. This application integrates three complementary microscopic images: single-polarized image (PPL), orthogonally polarized image (XPL), and cathodoluminescent image (CL). It also constructs normalized intensity, local enhancement, edge response, multimodal edge consensus, and cathodoluminescent guided boundary channels. This enables the pixel classification model to simultaneously utilize mineral color, interference color, extinction, luminescence rings, cracks, and grain boundary information reflected in different microscopic images, thereby improving the stability of mineral grain boundary recognition in complex rock thin sections.
[0016] 2. Reduce interference from background regions on segmentation and statistics. This application utilizes a combination criterion of high brightness in a single-polarized image (PPL) and low brightness in an orthogonally polarized image (XPL) to generate a sample region mask, which can effectively exclude resin, blank background, bubbles, and non-sample regions, reducing the impact of background noise on normalization, model inference, and particle statistics.
[0017] 3. Automatic conversion from probabilistic maps to particle instances. This application automatically converts pixel-level probabilistic maps into instance masks with independent particle IDs through threshold segmentation, morphological processing, distance transformation, seed point extraction, and boundary probability weighted watershed segmentation, reducing the workload of manually correcting particle boundaries one by one in image processing software.
[0018] 4. Achieve full-process traceability at the particle level. This application enables the same particle ID to be simultaneously associated with instance masks, morphological parameters, color parameters, single-particle cropped images, mineral categories, and multiple overlay images, thereby achieving complete traceability from the original microscopic image to the final mineral identification result.
[0019] 5. Improve the interpretability of mineral identification. This application constructs a mineral feature reference library based on standard samples confirmed by experts, and uses interpretable features such as color, brightness, texture, and morphology for mineral category identification, so that the identification results can correspond to the microscopic observation logic of petrologists.
[0020] 6. Supports large-scale batch digital petrographic analysis. This application achieves automated analysis of multi-sample, multi-view rock thin section images through automatic three-modal image matching, input generation of model-readable format files, command-line mode batch inference, automatic post-processing, and batch output, thereby improving the efficiency of digital petrographic data production.
[0021] 7. Provides standardized data for subsequent model training and structural interpretation. The single-particle multimodal cropped images, particle parameter tables, and mineral category labels output by this application can be used to construct high-quality mineral image datasets, further supporting the training of CNN, U-Net, or other deep learning models. Simultaneously, parameters such as particle area, aspect ratio, orientation angle, and spatial distribution can be used for rock deformation, particle orientation, mineral assemblage, and tectonic process analysis.
[0022] 8. Highly scalable for both manual correction and iterative training of proprietary models. The probabilistic map post-processing in this application employs parametric mathematical algorithms, including threshold segmentation, morphological processing, distance transformation, boundary probability-weighted watershed segmentation, and instance renumbering. This process can be executed automatically, or the probabilistic map or particle candidate instance mask can be exported to external image processing software or manual annotation software for manual correction. The manually corrected instance masks and mineral labels can be re-imported into the workflow of this application and further used as high-quality training data to train proprietary U-Net, convolutional neural networks, or other segmentation and classification models. Therefore, this application possesses the capability to iteratively upgrade from relying on existing pixel classification models to a proprietary model system.
[0023] 9. Applicable to preliminary screening and target particle selection for large-scale rock thin section samples. This application utilizes PPL, XPL, and CL trimodal microscopic images for particle segmentation, mineral identification, statistical analysis, and visualization output, enabling preliminary mineral composition statistics to be obtained without performing chemical composition or crystallographic testing on a particle-by-particle basis. For research scenarios requiring the processing of large numbers of rock thin section samples, such as mineral exploration, core evaluation, mineral assemblage identification, and alteration zoning, this application can serve as a preliminary screening tool, providing a basis for selecting target minerals, target particles, or target regions for subsequent high-precision testing.
[0024] 10. Serving Fluid-Rock Interactions, Thermodynamic Simulation, and Structural Geological Analysis. This application can statistically analyze the area, quantity, grain size distribution, morphological characteristics, and spatial proportion of different mineral categories based on mineral identification results, providing a data foundation for the quantitative analysis of rock mineral composition. In open geological systems with intense fluid activity, traditional whole-rock composition methods may struggle to accurately reflect local mineral transformation processes. However, this application can assist in identifying the initial state before fluid activity, the intermediate state during fluid activity, and the final state after fluid activity through particle-level mineral composition and spatial structure statistics, providing constraints for fluid-rock reactions, geological fluid thermodynamic simulation, and mineralization process analysis. Furthermore, the grain size, area, aspect ratio, orientation angle, directional arrangement, and morphological parameters extracted in this application can provide a quantitative parameter basis for grain orientation analysis, mineral morphology analysis, deformation strength evaluation, and related tectonic geological interpretation. Attached Figure Description
[0025] The present application will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 The overall flowchart of the digital lithofacies automatic analysis method provided in this application; Figure 2 A schematic diagram illustrating image preprocessing and multichannel image construction; Figure 3 A schematic diagram illustrating the generation of a candidate particle mask; Figure 4 This is a schematic diagram of particle feature extraction, matching, and particle-level tracing output. Figure 5 This is a schematic diagram of the automatic mineral classification module; Figure 6 This is a schematic diagram of the electronic device structure in the embodiments of this application. Detailed Implementation
[0026] To provide a clearer understanding of the technical features, objectives, and effects of this application, the specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0027] The embodiments of this application provide an automated digital petrographic analysis method based on three-modal microscopic images and a standard sample reference library.
[0028] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the steps of an automated digital petrographic analysis method based on three-modal microscopic images and a standard sample reference library, as described in this application, including: S1: Obtain a three-mode aligned image by using the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescence image CL of the same sample area; S2: Generate a specimen region mask based on the trimodal aligned image, and use the specimen region mask to define the effective analysis area; S3: Construct multi-channel image data based on trimodal aligned images and effective analysis regions; S4: Input multi-channel image data into the pixel classification model for batch inference, output particle probability map file and perform automated post-processing to obtain a particle candidate instance mask with an independent particle ID. S5: Based on the particle candidate instance mask, each particle is uniquely numbered, its morphological parameters are measured, its three-modal color statistical parameters are extracted, and its single-particle multimodal image is cropped. S6: Construct a mineral feature reference library based on standard samples confirmed by experts. The mineral feature reference library includes mineral category labels, morphological parameters, and three-modal color statistical parameters of the standard sample particles. S7: Match the morphological parameters and trimodal color statistical parameters of the particle to be identified with the mineral feature reference library to obtain the mineral category identification result of the particle to be identified; S8: Output traceability results including particle ID, particle measurement parameters, mineral category identification results, and corresponding particle probability map file index.
[0029] Step S1 includes: A three-modal image group is formed by automatically matching the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL of the same sample area. The automatic matching includes identifying the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL of the same sample area according to the file name, sample number, field of view number, or preset naming rules, and combining them into a three-modal image group. The three-modal image group is cropped, sized, and spatially registered to obtain a three-modal aligned image; The dimensional correction includes: When the size difference between the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL is less than the preset size tolerance, at least one of the images will be adjusted to the reference image size. When the size difference exceeds the preset size tolerance, an error message will be output or the processing of the three-modal image group will be stopped. The spatial registration includes one or more of the following methods: feature point matching, phase correlation, enhanced correlation coefficient registration, mutual information registration, affine transformation, perspective transformation, elastic registration, or manual control point correction.
[0030] As one embodiment, since the switching of the microscope light source, slight offset of the stage, or differences in the image acquisition equipment may cause size differences, translation, rotation, scaling, or local distortion between different modal images, this application performs size correction and spatial registration on the three modal images.
[0031] As one embodiment, when the size difference between the three modal images is less than a preset size tolerance, one or more of the images are adjusted to the size of the reference image; when the size difference exceeds the preset size tolerance, an error message is output or the processing of the three modal image group is stopped, prompting the user to check the image matching or cropping results. In one embodiment, the PPL image (i.e., the single-polarized image PPL) is used as the reference image, and the XPL image (i.e., the cross-polarized image XPL) and the CL image (i.e., the cathodoluminescent image CL) are adjusted to the size of the PPL image; the cross-polarized image XPL and the cathodoluminescent image CL are registered to the coordinate system of the single-polarized image PPL.
[0032] Step S2 includes: The specimen region mask is generated based on a combination criterion of the brightness of a single polarized image (PPL) and the brightness of an orthogonal polarized image (XPL), and is modified by one or more operations, including morphological closing operation, morphological opening operation, hole filling, and small object removal. The combined criteria include: identifying regions in the single-polarized image PPL with brightness higher than a first threshold and regions in the orthogonally polarized image XPL with brightness lower than a second threshold as candidate background regions; generating a background mask by combining one or more operations of morphological processing, connected component area filtering, and boundary position constraints; and identifying regions outside the background mask as valid analysis regions of the candidate specimens.
[0033] As one embodiment, since resin glue, blank background or non-sample areas may appear as bright in PPL images and as low brightness or completely dull in XPL images, this application can identify candidate background areas based on a combination of PPL image brightness and XPL image brightness criteria.
[0034] In one embodiment, regions in the PPL image with brightness above a first threshold and regions in the XPL image with brightness below a second threshold are identified as candidate background regions. A background mask is generated by combining one or more operations, including morphological processing, connected component area filtering, and boundary position constraints. Regions outside the background mask are identified as valid candidate specimen regions. Subsequently, the initial specimen region mask is modified by one or more of the following: morphological closing operation, morphological opening operation, hole filling, and small object removal, to obtain a continuous and stable specimen region mask. This specimen region mask is used to limit the normalized statistical range, exclude background regions, reduce background noise in model learning, and improve the accuracy of subsequent particle segmentation and feature extraction.
[0035] Step S3 includes: The multi-channel image data includes at least a three-modal normalized intensity channel, a local contrast enhancement channel, an edge response channel, and a multi-modal fusion boundary channel; The multi-channel image data includes multiple channels from PPL_norm, XPL_norm, CL_norm, PPL_CLAHE, XPL_CLAHE, CL_CLAHE, PPL_edge, XPL_edge, CL_edge, edge_consensus, and CL_on_edge_guide; wherein: The PPL_norm, XPL_norm, and CL_norm are obtained by percentile normalization of the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL within the effective analysis area defined by the sample area mask, or by normalizing each RGB channel of the corresponding modal image and then fusing them according to a preset weight. The PPL_CLAHE, XPL_CLAHE and CL_CLAHE are obtained by performing contrast-limited adaptive histogram equalization on the single-polarized image PPL, the cross-polarized image XPL and the cathodoluminescent image CL, respectively. As one specific implementation, the parameters of CLAHE include contrast limiting clip_limit (used to limit local histogram gain to suppress noise amplification) and local grid size n_tiles (used to divide the image into several rectangular sub-regions for independent histogram equalization). Typical values can be set to clip_limit=2.0 or 3.0 and n_tiles=(8,8).
[0036] The PPL_edge, XPL_edge, and CL_edge are obtained by calculating the edge intensity of the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL, respectively. The edge intensity calculation includes first performing Gaussian blur preprocessing on the image, and then using the Sobel gradient magnitude or Scharr gradient magnitude method to generate a continuous intensity response. The edge_consensus channel is obtained by weighted fusion of PPL_edge, XPL_edge and CL_edge, satisfying edge_consensus = a × PPL_edge + b × XPL_edge + c × CL_edge, and the result is limited to the range of 0-255, where a, b, and c are preset positive real number weights, and a+b+c≠0; The CL_on_edge_guide channel is obtained by superimposing the CL normalized image with the edge_consensus channel according to the alpha blending formula, which is I_output = (1-α) × I_edge + α × I_CL, where: I_output represents the intensity of the output fused image, and the result is limited to a preset grayscale range; I_edge represents the intensity value of the edge consensus channel edge_consensus; I_CL represents the intensity value of the CL normalized channel CL_norm; and α is a preset transparency coefficient with a value range of 0≤α≤1.
[0037] As one example, the CL_on_edge_guide channel spatially couples cathode luminescence intensity information with geometric boundary information, providing luminescence-enhancing boundary guidance features for subsequent pixel classification models.
[0038] Step S4 includes: The multi-channel image data is saved as a format file that the model can read, and the format file is input into a pixel classification model that can output pixel-level probability maps for batch inference to obtain a particle probability map file. The format file includes: image dataset, channel name, dimension label, sample identifier, and preprocessing parameter information; the dimension label is used to indicate the spatial dimension and channel dimension of the image data; The pixel classification model is an image segmentation model that can output pixel-level category probability maps based on multi-channel image data, including one of the following: interactive pixel classification model, random forest pixel classification model, convolutional neural network segmentation model, U-Net class segmentation model, or Transformer image segmentation model; The batch inference is executed in command-line mode and automatically calls the same pixel classification model for multiple format files, outputting probability map files corresponding to each format file; the particle probability map file includes: particle region probability map and particle boundary probability map; The automated post-processing includes one or more of the following: probability map reading, probability value normalization, probability channel identification, threshold segmentation, specimen region mask constraint, morphological closing operation, small object removal, distance transformation, seed point extraction, watershed segmentation, secondary filtering, and instance renumbering. When watershed segmentation is used, a topographic map constructed from a distance transformation map and a boundary probability map is used, and the topographic map satisfies: elevation = -distance + p_boundary × boundary_weight; Here, `elevation` represents the terrain height value of the topographic map, used as the flooding benchmark for the watershed algorithm; `distance` represents the foreground region distance transformation map, defined as the Euclidean distance from each foreground pixel in the binary foreground image to the nearest background pixel; `p_boundary` represents the boundary probability map, which is directly output by the pixel classification model or obtained from the particle region probability map through edge detection; and `boundary_weight` represents the boundary probability weight, a preset positive real number used to adjust the contribution intensity of the boundary probability in the topographic map construction.
[0039] As one embodiment, the Ilastik pixel classification model is employed, and batch inference is performed on multiple format files through a command-line interface-free mode, outputting probability map files corresponding to each sample. To improve the stability of batch processing, this application may also include steps such as automatically identifying input files, automatically creating output directories, automatically deleting old files with the same name, automatically mapping output formats, automatically checking whether output files have been generated, recording processing status, and outputting error messages. This method subjectes the segmentation process to constraints of both particle geometric centrality and predicted boundary strength, helping to reduce particle adhesion and missegmentation. After segmentation, the instance results are subjected to secondary small object filtering and continuous numbering to obtain particle candidate instance masks with independent particle IDs. In the particle candidate instance masks, background pixels are zero, and non-zero pixel values represent the corresponding particle IDs.
[0040] Step S5 includes: The morphological parameters include one or more of the following: particle area, perimeter, equivalent diameter, major axis length, minor axis length, aspect ratio, roundness, orientation angle, centroid coordinates, circumscribed rectangle coordinates, and particle boundary coordinates. The three-modal color statistical parameters include one or more of the following in the particle region of the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL: RGB mean, RGB standard deviation, gray mean, gray standard deviation, gray quantile, information entropy, color dispersion, and texture complexity. The single-particle multimodal image cropping includes obtaining the bounding rectangular region of the current particle based on the particle candidate instance mask, and using a local instance mask to retain the current particle pixels while removing non-current particle pixels within the bounding rectangular region.
[0041] In one embodiment, for each particle, nine features are extracted from the PPL, XPL, and CL images respectively, including the mean of the R channel, the mean of the G channel, the mean of the B channel, the mean of the gray level, the standard deviation of the gray level, the gray level p10, the gray level p50, the gray level p90, and the information entropy, thereby constructing a 27-dimensional three-modal color and texture basic feature vector. Furthermore, the 27-dimensional basic feature vector can be combined with morphological parameters such as particle area, aspect ratio, roundness, and orientation angle to form a comprehensive feature vector for mineral identification.
[0042] The single-particle multimodal image cropping involves obtaining the bounding rectangular region of the current particle based on a particle candidate instance mask, and using a local instance mask to retain the current particle pixels while removing non-current particle pixels within the bounding rectangular region. This yields a single-particle cropped image for each particle in PPL, XPL, and CL images.
[0043] The single-particle cropped images can be used for manual verification, construction of standard sample libraries, training of supervised learning models, training of deep learning classifiers, and analysis of structural deformation parameters.
[0044] Step S6 includes: The standard samples are standard samples whose mineral categories have been confirmed by experts. The mineral feature reference library corresponding to the standard samples includes the color, brightness, texture, and morphological features of each mineral in single-polarized light image PPL, cross-polarized light image XPL, and cathodoluminescent image CL.
[0045] As one embodiment, in the mineral feature reference library, each standard sample particle includes at least a 27-dimensional basic feature vector composed of 9 color and texture features from each of the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL. The 9 color and texture features include the mean of the R channel, the mean of the G channel, the mean of the B channel, the mean of the gray level, the standard deviation of the gray level, the 10th percentile gray level (p10), the 50th percentile gray level (p50, i.e., the median), the 90th percentile gray level (p90), and the information entropy. The mineral feature reference library also includes particle morphology parameters and mineral category labels corresponding to the 27-dimensional basic feature vector.
[0046] As one embodiment, before similarity matching, the corresponding features of the particle to be identified and the mineral feature reference library are standardized, normalized, or robustly scaled to reduce the impact of features with different dimensions on the distance calculation results. The mineral category identification is achieved using a similarity measurement method and / or a classification model; the similarity measurement method includes one or more of Euclidean distance, weighted Euclidean distance, Mahalanobis distance, cosine similarity, nearest neighbor classification, or K-nearest neighbor classification; the classification model includes a random forest classification model, a support vector machine classification model, a neural network classification model, or a combination thereof; when using weighted Euclidean distance, when calculating the distance between the particle to be identified and a certain reference mineral category or a standard particle of that category in the mineral feature reference library, the modal weights of the single-polarized image PPL, the orthogonally polarized image XPL, and the cathodoluminescent image CL corresponding to that reference mineral category are used to represent the identification contribution of that reference mineral category under different microscopic image modalities; when the minimum similarity distance between the particle to be identified and the mineral feature reference library exceeds a preset threshold, the particle to be identified is marked as an unknown category.
[0047] As one embodiment, the color and texture features of the three images—single-polarized image PPL, cross-polarized image XPL, and cathodoluminescent image CL—of each standard sample particle are combined into a 27-dimensional multimodal basic feature vector. The 27-dimensional basic feature vector, together with particle morphology parameters and mineral category labels, is saved as a mineral feature reference library. The mineral feature reference library can be stored in CSV, database, tabular file, binary file, or other structured data formats.
[0048] The method also includes manual correction and model iteration steps: The obtained particle candidate instance mask and particle probability map file are exported to external image processing software, manual annotation software or interactive correction software for manual boundary correction, particle re-cutting or label correction, and the corrected particle instance mask is re-imported into steps S5 to S7 to continue particle feature extraction, mineral identification and particle-level traceability output. The particle-level tracing includes simultaneously associating the same particle ID with a particle candidate instance mask, a particle measurement table, a mineral identification result table, a PPL single particle cropped image, an XPL single particle cropped image, a CL single particle cropped image, a particle boundary overlay image, and a mineral classification overlay image. The method also includes generating digital lithofacies statistical results based on mineral category identification results. The digital lithofacies statistical results include one or more of the following: area, quantity, area percentage, quantity percentage, grain size distribution, morphological parameters, directional parameters, and spatial distribution parameters of different mineral categories.
[0049] As one example, before performing similarity matching, the corresponding features in the reference library of particle features and mineral features to be identified are standardized, normalized, or subjected to robust scale transformation to reduce the impact of dimensional differences between color features, texture features, and morphological features on the distance calculation results.
[0050] As one embodiment, weighted Euclidean distance calculation is performed using mineral-specific light source weights. Since different minerals have varying identification values in the three types of images—single-polarized image (PPL), cross-polarized image (XPL), and cathodoluminescent image (CL)—different modal weights can be assigned to different reference mineral categories in the mineral feature reference library for each of the three images. When calculating the distance between the particle to be identified and a specific reference mineral category or a standard particle of that category, the modal weight corresponding to that reference mineral category is used. For example, for minerals primarily identified by cathodoluminescent features, the CL weight is increased; for minerals with unstable or minimal cross-polarized features, the XPL weight is decreased; for minerals with identification significance in all three images, all three modal weights are retained; when the minimum similarity distance between the particle to be identified and the mineral feature reference library exceeds a preset threshold, the particle is marked as an unknown category to avoid forced misclassification.
[0051] As one embodiment, the manually corrected particle instance mask, the trimodal original image, the single-particle cropped image, particle morphology parameters, trimodal color statistical parameters, and mineral category labels can collectively constitute a high-quality training dataset for training a mineral particle segmentation or mineral classification model. The mineral particle segmentation or mineral classification model includes U-Net, convolutional neural networks, Transformer image models, random forests, support vector machines, or other supervised learning models. Therefore, this application can not only utilize existing pixel classification models to complete initial automatic analysis, but also gradually form an independent mineral particle segmentation and recognition model system through a closed-loop mechanism of "automatic segmentation—manual correction—standardized output—self-developed model training—model iterative update."
[0052] This application also discloses an electronic device. (See reference...) Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. The electronic device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.
[0053] The communication bus 502 is used to enable communication between these components.
[0054] The user interface 503 may include a display screen, and optionally, the user interface 503 may also include a standard wired interface or a wireless interface.
[0055] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0056] This application also discloses a computer-readable storage medium storing multiple instructions adapted for loading by a processor to execute the above-described digital petrographic automatic analysis method based on a trimodal microscopic image and a standard sample reference library.
[0057] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure.
[0058] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. An automated digital lithofacies analysis method based on three-modal microscopic images and a standard sample reference library, characterized in that, The method includes the following steps: S1: Obtain a three-mode aligned image by using the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescence image CL of the same sample area; S2: Generate a specimen region mask based on the trimodal aligned image, and use the specimen region mask to define the effective analysis area; S3: Construct multi-channel image data based on trimodal aligned images and effective analysis regions; S4: Input multi-channel image data into the pixel classification model for batch inference, output particle probability map file and perform automated post-processing to obtain a particle candidate instance mask with an independent particle ID. S5: Based on the particle candidate instance mask, each particle is uniquely numbered, its morphological parameters are measured, its three-modal color statistical parameters are extracted, and its single-particle multimodal image is cropped. S6: Construct a mineral feature reference library based on standard samples confirmed by experts. The mineral feature reference library includes mineral category labels, morphological parameters, and three-modal color statistical parameters of the standard sample particles. S7: Match the morphological parameters and trimodal color statistical parameters of the particle to be identified with the mineral feature reference library to obtain the mineral category identification result of the particle to be identified; S8: Output traceability results including particle ID, particle measurement parameters, mineral category identification results, and corresponding particle probability map file index.
2. The automatic digital lithofacies analysis method based on three-modal microscopic images and a standard sample reference library as described in claim 1, characterized in that, Step S1 includes: A three-modal image group is formed by automatically matching the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL of the same sample area. The automatic matching includes identifying the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL of the same sample area according to the file name, sample number, field of view number, or preset naming rules, and combining them into a three-modal image group. The three-modal image group is cropped, sized, and spatially registered to obtain a three-modal aligned image; The dimensional correction includes: When the size difference between the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL is less than the preset size tolerance, at least one of the images will be adjusted to the reference image size. When the size difference exceeds the preset size tolerance, an error message will be output or the processing of the three-modal image group will be stopped. The spatial registration includes one or more of the following methods: feature point matching, phase correlation, enhanced correlation coefficient registration, mutual information registration, affine transformation, perspective transformation, elastic registration, or manual control point correction.
3. The automatic digital lithofacies analysis method based on three-modal microscopic images and a standard sample reference library as described in claim 1, characterized in that, Step S2 includes: The specimen region mask is generated based on a combination criterion of the brightness of a single polarized image (PPL) and the brightness of an orthogonal polarized image (XPL), and is modified by one or more operations, including morphological closing operation, morphological opening operation, hole filling, and small object removal. The combined criteria include: identifying regions in the single-polarized image PPL with brightness higher than a first threshold and regions in the orthogonally polarized image XPL with brightness lower than a second threshold as candidate background regions; generating a background mask by combining one or more operations of morphological processing, connected component area filtering, and boundary position constraints; and identifying regions outside the background mask as valid analysis regions of the candidate specimens.
4. The automatic digital lithofacies analysis method based on three-modal microscopic images and a standard sample reference library as described in claim 1, characterized in that, Step S3 includes: The multi-channel image data includes at least a three-modal normalized intensity channel, a local contrast enhancement channel, an edge response channel, and a multi-modal fusion boundary channel; The multi-channel image data includes multiple channels from PPL_norm, XPL_norm, CL_norm, PPL_CLAHE, XPL_CLAHE, CL_CLAHE, PPL_edge, XPL_edge, CL_edge, edge_consensus, and CL_on_edge_guide; wherein: The PPL_norm, XPL_norm, and CL_norm are obtained by percentile normalization of the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL within the effective analysis area defined by the sample area mask, or by normalizing each RGB channel of the corresponding modal image and then fusing them according to a preset weight. The PPL_CLAHE, XPL_CLAHE and CL_CLAHE are obtained by performing contrast-limited adaptive histogram equalization on the single-polarized image PPL, the cross-polarized image XPL and the cathodoluminescent image CL, respectively. The PPL_edge, XPL_edge, and CL_edge are obtained by calculating the edge intensity of the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL, respectively. The edge intensity calculation includes first performing Gaussian blur preprocessing on the image, and then using the Sobel gradient magnitude or Scharr gradient magnitude method to generate a continuous intensity response. The edge_consensus channel is obtained by weighted fusion of PPL_edge, XPL_edge and CL_edge, satisfying edge_consensus = a × PPL_edge + b × XPL_edge + c × CL_edge, and the result is limited to the range of 0-255, where a, b, and c are preset positive real number weights, and a+b+c≠0; The CL_on_edge_guide channel is obtained by superimposing the CL normalized image with the edge_consensus channel according to the alpha blending formula, which is I_output = (1-α) × I_edge + α × I_CL, where: I_output represents the intensity of the output fused image, and the result is limited to a preset grayscale range; I_edge represents the intensity value of the edge consensus channel edge_consensus; I_CL represents the intensity value of the CL normalized channel CL_norm; and α is a preset transparency coefficient with a value range of 0≤α≤1.
5. The automatic digital lithofacies analysis method based on three-modal microscopic images and a standard sample reference library as described in claim 1, characterized in that, Step S4 includes: The multi-channel image data is saved as a format file that the model can read, and the format file is input into a pixel classification model that can output pixel-level probability maps for batch inference to obtain a particle probability map file. The format file includes: image dataset, channel name, dimension label, sample identifier, and preprocessing parameter information; the dimension label is used to indicate the spatial dimension and channel dimension of the image data; The pixel classification model is an image segmentation model that can output pixel-level category probability maps based on multi-channel image data, including one of the following: interactive pixel classification model, random forest pixel classification model, convolutional neural network segmentation model, U-Net class segmentation model, or Transformer image segmentation model; The batch inference is executed in command-line mode and automatically calls the same pixel classification model for multiple format files, outputting probability map files corresponding to each format file; the particle probability map file includes: particle region probability map and particle boundary probability map; The automated post-processing includes one or more of the following: probability map reading, probability value normalization, probability channel identification, threshold segmentation, specimen region mask constraint, morphological closing operation, small object removal, distance transformation, seed point extraction, watershed segmentation, secondary filtering, and instance renumbering. When watershed segmentation is used, a topographic map constructed from a distance transformation map and a boundary probability map is used, and the topographic map satisfies: elevation = -distance + p_boundary × boundary_weight; Here, `elevation` represents the terrain height value of the topographic map, used as the flooding benchmark for the watershed algorithm; `distance` represents the foreground region distance transformation map, defined as the Euclidean distance from each foreground pixel in the binary foreground image to the nearest background pixel; `p_boundary` represents the boundary probability map, which is directly output by the pixel classification model or obtained from the particle region probability map through edge detection; and `boundary_weight` represents the boundary probability weight, a preset positive real number used to adjust the contribution intensity of the boundary probability in the topographic map construction.
6. The automatic digital lithofacies analysis method based on three-modal microscopic images and a standard sample reference library as described in claim 1, characterized in that, Step S5 includes: The morphological parameters include one or more of the following: particle area, perimeter, equivalent diameter, major axis length, minor axis length, aspect ratio, roundness, orientation angle, centroid coordinates, circumscribed rectangle coordinates, and particle boundary coordinates. The three-modal color statistical parameters include one or more of the following in the particle region of the single-polarized image PPL, the cross-polarized image XPL, and the cathodoluminescent image CL: RGB mean, RGB standard deviation, gray mean, gray standard deviation, gray quantile, information entropy, color dispersion, and texture complexity. The single-particle multimodal image cropping includes obtaining the bounding rectangular region of the current particle based on the particle candidate instance mask, and using a local instance mask to retain the current particle pixels while removing non-current particle pixels within the bounding rectangular region.
7. The automatic digital lithofacies analysis method based on three-modal microscopic images and a standard sample reference library as described in claim 1, characterized in that, Step S6 includes: The standard samples are standard samples whose mineral categories have been confirmed by experts. The mineral feature reference library corresponding to the standard samples includes the color, brightness, texture, and morphological features of each mineral in single-polarized light image PPL, cross-polarized light image XPL, and cathodoluminescent image CL.
8. The automatic digital lithofacies analysis method based on three-modal microscopic images and a standard sample reference library as described in claim 1, characterized in that, The method also includes manual correction and model iteration steps: The obtained particle candidate instance mask and particle probability map file are exported to external image processing software, manual annotation software or interactive correction software for manual boundary correction, particle re-cutting or label correction, and the corrected particle instance mask is re-imported into steps S5 to S7 to continue particle feature extraction, mineral identification and particle-level traceability output. The particle-level tracing includes simultaneously associating the same particle ID with a particle candidate instance mask, a particle measurement table, a mineral identification result table, a PPL single particle cropped image, an XPL single particle cropped image, a CL single particle cropped image, a particle boundary overlay image, and a mineral classification overlay image. The method also includes generating digital lithofacies statistical results based on mineral category identification results. The digital lithofacies statistical results include one or more of the following: area, quantity, area percentage, quantity percentage, grain size distribution, morphological parameters, directional parameters, and spatial distribution parameters of different mineral categories.
9. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to enable the electronic device to perform the digital petrographic automatic analysis method based on a trimodal microscopic image and a standard sample reference library as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a computer, perform the digital lithofacies automatic analysis method based on a trimodal microscopic image and a standard sample reference library as described in any one of claims 1-8.