STEM atomic image peak searching system, method, equipment and medium
Through the improved centroid method, adaptive threshold segmentation, normalized cross-correlation method and weighted over-determined regression method, the problems of insufficient atomic positioning accuracy and high computational cost in STEM images are solved, and high-precision and high efficiency atomic positioning are achieved, which is suitable for processing complex and severe noise images.
Patent Information
- Application Number
- CN202510118577.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-27
AI Technical Summary
The prior art has problems such as insufficient accuracy, noise sensitivity, high calculation cost and dependence on initial parameter setting when positioning atoms in STEM images, especially when processing images with uneven brightness, severe noise and complex peak shapes, it is difficult to meet high-precision requirements.
The improved centroid method combined with adaptive threshold segmentation is used to locate weak signal atoms through normalized cross-correlation method, and two-dimensional Gaussian fit is performed using weighted superficial regression method, which improves the accuracy and computational efficiency of atomic positioning.
It significantly improves the accuracy and robustness of atomic positioning, and can provide high-precision atomic positioning results under high noise and uneven lighting conditions, improves computing efficiency and reduces the requirements for hardware and software environments.
Smart Images

Figure CN120047408A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of microstructure characterization of various materials, and in particular to a STEM atomic image peak finding system, method, device and medium. Background Art
[0002] Aberration-corrected scanning transmission electron microscopy (AC-STEM) has become an important tool for characterizing the microstructures of various materials due to its excellent sub-angstrom resolution. On this basis, extracting pixel-level discrete data from high-resolution scanning images and converting it into atomic-level information has become an effective strategy to enhance the value of electron microscope images. By quantitatively analyzing this atomic-level data, in-depth statistical calculations can be performed on the material systems of interest, further revealing the microstructures and physical property characteristics of the materials, thus providing strong technical support for the design and optimization of new materials.
[0003] In the research of functional materials such as perovskite oxides, the key physical properties of the materials are often closely related to the quantitative analysis of microstructures such as atomic displacements and lattice distortions. In the quantitative analysis of atomic-level imaging, accurately identifying and locating the atomic scattering peaks in the image is an important prerequisite for understanding the microstructure of the materials. To this end, researchers have proposed various automatic or semi-automatic peak finding methods, which take into account the operation efficiency and positioning accuracy to varying degrees. In the prior art, the most commonly used and relatively easy-to-implement method is the centroid method. This method regards the gray-scale distribution of atoms in the image as a "mass distribution", and then calculates its centroid position to obtain the coordinates of the atomic peak. It has the advantages of simple algorithm and fast calculation speed, and is suitable for preliminary analysis of a small number of images or samples with high imaging quality. However, the centroid method is relatively sensitive to noise and background intensity changes, and is easily affected by instrument noise or probe non-uniformity; at the atomic-level resolution, any slight image fluctuation may cause a significant deviation between the centroid position and the actual peak position. Therefore, when the research object has high requirements for measurement accuracy, or the noise in the experimental data is large, the centroid method often fails to meet the requirements.
[0004] In contrast, locating atomic peaks by the Gaussian fitting method can greatly improve the accuracy. However, this excellent accuracy usually means higher computational costs. If fitting analysis is to be performed on a large-scale image dataset one by one, powerful computing hardware is often required. In addition, Gaussian fitting is relatively dependent on the setting of initial parameters. If the initial guess value deviates too much, the situation of slow convergence or falling into local minima may occur, and certain experience or auxiliary algorithms are also needed to select reasonable initial values in practical applications.
[0005] In addition to the centroid method and Gaussian fitting, the use of deep learning models such as convolutional neural networks for peak detection and coordinate regression is expected to show strong adaptability when dealing with complex noise backgrounds or anisotropic peak shapes. However, artificial intelligence methods usually require a large amount of labeled data for training, the interpretability of the model is also limited, and it has high requirements for the hardware and software environment. Therefore, there is an urgent need to develop more efficient fitting methods to quickly obtain accurate initial values and fitting parameters, thereby improving the overall analysis efficiency and accuracy.
[0006] In addition to the problem of positioning accuracy, the uneven background illumination in STEM images is also a challenge that needs to be solved urgently. In addition, aberrations and diffraction effects are also factors that cannot be ignored in STEM imaging. This phenomenon is particularly prominent in high-resolution imaging, especially for atomic-level images, where it becomes very difficult to locate the position of atoms, and even impossible to accurately distinguish neighboring atoms. In addition, the signal intensity in STEM images is closely related to the atomic number. For elements with smaller atomic numbers, such as nitrogen (N) and oxygen (O), the atomic scattering intensity is weak, which makes their signals in the image not significant enough, resulting in large errors in positioning.
[0007] In the field of commercial software, there is not much software for peak detection and quantitative analysis of atomic-level images. Most of them are built on the supporting platforms of microscope or analytical instrument manufacturers, or developed by specialized software companies. The original software of many transmission electron microscopes or scanning transmission electron microscopes itself has a preliminary peak search function. For example, DigitalMicrograph provided by Gatan. It has relatively mature image acquisition and preliminary analysis modules, and users can perform custom peak detection based on scripts (DM scripts). However, the built-in peak detection tool mainly uses simple centroid algorithms or threshold detection. Improving the accuracy often requires users to write additional scripts or purchase third-party plugins. At the same time, the versatility of DigitalMicrograph is relatively limited, mainly centered around Gatan's own detectors and post-processing hardware, and the cost is also relatively high. Additional adaptation is required for non-Gatan systems or other multi-source data; Another common commercial solution comes from general image analysis software companies, such as Dragonfly provided by ORS, Image-Pro of Media Cybernetics, etc. These software platforms are aimed at a wider microscopic image processing market, including various imaging methods such as optical microscopes, electron microscopes, and X-ray tomography. They usually have a series of filtering, segmentation, and feature detection functions built-in. For high-precision requirements such as atomic-level positioning, the algorithms provided by the software by default are often relatively general and difficult to rival dedicated Gaussian fitting or advanced machine learning algorithms; when encountering severe noise, obvious peak shape distortion, or complex defect structures, a large amount of parameter tuning or secondary development by users is also required. Tempas is a software specifically for TEM / STEM image quantitative analysis, covering relatively comprehensive functions such as image preprocessing, automatic peak search, lattice and strain analysis, etc. However, when performing Gaussian fitting, Tempas requires users to set and continuously adjust the fitting parameters by themselves. Moreover, due to the differences in intensity, background, and local noise of different atomic peaks, a single parameter setting often cannot "cover" all atomic peaks. Furthermore, the function of Tempas itself is relatively closed. If deep customization or combination with self-developed scripts is required, it may be limited by its license and development interface; for ultra-large-scale data sets or extremely high-resolution scenarios, the calculation efficiency may also become a bottleneck. At the same time, the commercial license fee is relatively high, which is not very friendly to teams with limited funds or strong customization requirements. Summary of the Invention
[0008] In order to overcome the problems of the above-mentioned existing technologies, the purpose of the present invention is to propose a STEM atomic image peak-finding system, method, device and medium, which adopts an improved centroid method combined with adaptive threshold segmentation, effectively overcoming the accuracy limitation of the traditional centroid method in images with uneven brightness; by introducing the normalized cross-correlation method, it can effectively locate weak-signal atoms in STEM images; adopting the weighted overdetermined regression method for two-dimensional Gaussian fitting significantly improves the fitting accuracy and calculation efficiency; it can accurately calibrate the positions of atoms with different strengths and weaknesses and output relevant information in txt format, providing strong support for subsequent quantitative analysis and the actual applications of researchers; when processing scanning transmission electron microscope (STEM) images, by accurately locating the positions of atoms, it provides key data for research in fields such as materials science and nanotechnology; it has the advantages of high precision, high efficiency, simple operation and high benefit.
[0009] In order to achieve the above purpose, the present invention adopts the following technical solutions:
[0010] A STEM atomic image peak-finding system, comprising:
[0011] The main program module: responsible for importing the STEM image provided by the user, and dividing each atom in the STEM image into a separate cluster through the improved centroid method to roughly locate the position of each atom;
[0012] The weak-signal atom finding module: for atoms with weak signals that cannot be processed by the improved centroid method, make a template of the atom, and find the image of the atom that conforms to the template in the image through the normalized cross-correlation method to roughly locate the weak-signal atoms;
[0013] The tool module: used to perform improved two-dimensional Gaussian fitting on the obtained rough atom positions to obtain accurate atom positions, and then display them to the user through a graphical interface, and support exporting the accurately calibrated atom position information in txt format.
[0014] The improved centroid method is specifically: in the traditional centroid method, an adaptive threshold segmentation method is introduced: by manually selecting a threshold as the sensitivity factor, and then for each pixel, calculate the local mean intensity of the pixel neighborhood through the following formula:
[0015]
[0016] where I mean I is the local mean intensity, (x', y') is the intensity of each point, and W is the neighborhood window; compare the obtained local mean intensity with the sensitivity factor, and regard the local area smaller than the sensitivity factor as the background of the STEM image, and the rest of the area as the information contained in the STEM image;
[0017] The traditional centroid method only considers the atomic positions as weights, and the formula is as follows:
[0018]
[0019] where C is the centroid, n is the number of vectors, d is the vector dimension, and x i =(x i1 ,x i2 ,…,x id ) is each vector.
[0020] The improved two-dimensional Gaussian fitting is specifically as follows: The fitting parameters are automatically estimated by weighted overdetermined regression, and the formula is as follows:
[0021]
[0022] where I xy is the intensity of the pixel, A is the peak amplitude, x and y are the coordinates of a single pixel, and x and y are the positions of the Gaussian center; for atoms with different signal intensities, 85% - 95% of the maximum contrast of each atom is selected as the peak amplitude; the standard deviation or width w is automatically estimated according to the full width at half maximum (FWHM) method of the peak, that is where FWHM is the distance between two symmetric points corresponding to half of the peak height, and is obtained by using the interpolation method, that is, between every two pixel points, according to their contrast differences, it is divided into small regions equal to the number of contrast differences to obtain a more accurate distance.
[0023] The tool module is configured with the parallel computing toolbox provided by MATLAB for multi-threaded parallel processing of the improved two-dimensional Gaussian fitting.
[0024] A STEM atomic image peak finding method based on the above system is specifically as follows:
[0025] Step 1: Based on the main program module, import the STEM image provided by the user, and divide each atom in the STEM image into separate clusters through the improved centroid method to roughly locate the position of each atom;
[0026] Step 2: Based on the weak signal atom finding point module, for strong signal atoms that are difficult to process by the improved centroid method in Step 1, make a template of the atom, and use the normalized cross-correlation method to find the image of the atom that conforms to the template in the image to roughly locate the weak signal atoms;
[0027] Step 3: Based on the tool module, perform improved two-dimensional Gaussian fitting on the atomic positions obtained through Steps 1 and 2 to obtain accurate atomic positions.
[0028] The specific method of Step 1 is as follows:
[0029] 1.1. Import the STEM image provided by the user. On the basis of the traditional centroid method, introduce the adaptive threshold segmentation method. Manually select a threshold as the sensitivity factor. Then, for each pixel, calculate the local mean intensity of the pixel neighborhood:
[0030]
[0031] where I mean I is the local mean intensity, (x', y') is the intensity of each point, and W is the neighborhood window; compare the obtained local mean intensity with the sensitivity factor, and regard the local area smaller than the sensitivity factor as the background of the STEM image, and the remaining areas as the information contained in the STEM image;
[0032] 1.2. Isolate each atom in the STEM image into a separate cluster, and represent the area outside the cluster with a pure color with obvious contrast, to obtain the intensity map of the atomic contrast, that is, the intensity map after adaptive threshold segmentation. Subsequently, based on the intensity map after adaptive threshold segmentation, use the improved centroid method for each cluster, and calculate the weighted mean according to the contrast and coordinates of each pixel point in each cluster to roughly locate the position of each atom. The position of the atom is determined by the following formula:
[0033] and
[0034] where C x , C y are the X and Y coordinates of the atomic centroid, x i ., x j is the position of each pixel point, I ij is the contrast of each pixel point, and the A matrix is the threshold matrix. The threshold is between 0 and 1, with 1 being the minimum threshold and 0 being the maximum threshold.
[0035] The specific method of step 2 is as follows:
[0036] 2.1. The user selects n regions centered on the required atoms in the initially imported STEM image. The system generates n templates containing the positional relationship between weak-signal atoms and strong-signal atoms according to the selected regions. By performing cross-correlation calculations on the generated n templates containing the positional relationship between weak-signal atoms and strong-signal atoms, an average template is obtained:
[0037]
[0038] where Δx, Δy are displacement parameters;
[0039] 2.2. The system compares the average template with the original image, and uses the normalized cross-correlation method to accurately locate the positions of the weak-signal atoms that meet the requirements. The formula is as follows:
[0040]
[0041] Among them, f is the pixel value of the average template containing the positional relationship between weak-signal atoms and strong-signal atoms. is the average value of the pixels corresponding to the initially imported image at the local position (x±u, y±v). is the average pixel value of f within the local position (x±u, y±v).
[0042] Thus, a cross-correlation map is obtained, which amplifies weak signals. By improving the threshold of the centroid method to determine weak signals, the initial centroid positions of the clusters of each atom in the cross-correlation map are obtained.
[0043] The specific method of step 3 is as follows:
[0044] 3.1. Automatically estimate the initial parameters required for fitting each atom: For atoms with different signal intensities, select 85% - 95% of the maximum contrast of each atom as the peak amplitude, and automatically estimate the standard deviation or width w according to the full width at half maximum (FWHM) method of the peak, that is where FWHM is the distance between two symmetric points corresponding to half the height of the peak, obtained using the interpolation method, that is, between every two pixel points, according to their contrast difference, it is divided into small regions equal to the number of contrast differences to obtain a more accurate distance;
[0045] 3.2. Use the method of background region statistics to estimate the background noise ε xy , that is, for each atom, automatically find a region with the lowest average value among the regions that are two standard deviations or widths w to four standard deviations or widths w away from the initial centroid position obtained in steps 1 to 2, regarded as the no-information region, and obtain the standard deviation of the intensity of this no-information region as the background noise ε xy ;
[0046] 3.3. Finally, take all the pixel points inside the circle with the centroid as the center and the standard deviation or width w as the radius for each atom as the fitting region, and use the weighted overdetermined regression method for two-dimensional Gaussian fitting to obtain the accurate atomic positions. The formula is as follows:
[0047]
[0048] where I xy is the intensity of the pixel, A is the peak amplitude, x and y are the coordinates of a single pixel, x and y are the positions of the Gaussian center, that is, the coordinates of the atom obtained by the centroid method first, w is the standard deviation or width, and ε xy corresponds to the background noise;
[0049] The atomic positions are presented to the user in a graphical interface, and it is supported to export the accurately calibrated atomic position information in txt format.
[0050] An electronic device for peak finding in STEM atomic images, comprising:
[0051] A memory and a processor, the memory stores a computer program, so that the processor executes the STEM atomic image peak finding method described in steps 1 to 3 based on the STEM atomic image peak finding system.
[0052] A program storage medium for receiving user input, the stored computer program can, when executed by a processor, based on the STEM atomic image peak finding method, accurately calibrate atomic position information, and support separating different types of atoms according to contrast.
[0053] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0054] The main function of the present invention is to calibrate the atomic positions in the STEM image through the STEM atomic image peak finding system. Aiming at the defects and deficiencies of the prior art mentioned above, the present invention has significantly improved the accuracy and efficiency of atomic positioning through multiple technical improvements, and has the following specific advantages:
[0055] 1. Improve positioning accuracy and robustness: The present invention adopts an improved centroid method combined with adaptive threshold segmentation, effectively overcoming the accuracy limitation of the traditional centroid method in images with uneven brightness. When the traditional centroid method processes regions with high brightness differences, it is prone to large positioning errors, while the adaptive threshold segmentation method can dynamically adjust the threshold according to the local brightness of each pixel to ensure more accurate centroid calculation; in addition, through the integrated design of multiple algorithms, the system has higher robustness and reliability when processing STEM images under different conditions. Whether there is high noise, uneven illumination or obvious aberration effects in the image, the system can stably provide high-precision atomic positioning results. This comprehensive improvement significantly reduces the positioning error. Especially in atomic-level imaging, it significantly improves the positioning accuracy and stability, meeting the requirements of high-precision atomic positioning.
[0056] 2. Efficient Weak Signal Atomic Localization: By introducing the normalized cross - correlation method, the present invention can effectively localize weak signal atoms in STEM images. Users select multiple templates and perform averaging processing, which improves the signal - to - noise ratio and ensures the accurate localization of weak signal atoms. This method is particularly suitable for localizing elements with small atomic numbers and weak scattering intensities, such as nitrogen (N) and oxygen (O), significantly reducing the localization error and enhancing the detection ability of low - signal atoms. In addition, the system automatically estimates and fits the initial parameters required for each atom, which can effectively handle the situation where multiple strong and weak signal atoms coexist and the situation where the image background has a large impact, further improving the localization accuracy and stability in complex images.
[0057] 3. Efficient and Fast Two - Dimensional Gaussian Fitting and Parallel Computing: The present invention uses the weighted over - determined regression method for two - dimensional Gaussian fitting, significantly improving the fitting accuracy and computing efficiency. Compared with the traditional Gaussian fitting method, the improved two - dimensional Gaussian fitting of the present invention can still maintain high accuracy under low signal - to - noise ratio conditions and has stronger robustness to noise. This not only improves the accuracy of the fitting results but also greatly shortens the computing time, making the processing of large - scale data sets more efficient and feasible, and solving the problems of complex calculation and long time consumption of the existing Gaussian fitting methods. In addition, the system uses the parallel computing toolbox provided by MATLAB to achieve parallel operation, greatly improving the overall processing efficiency. By parallel - processing multiple computing tasks through multi - threading, the data processing and analysis time is significantly shortened, especially when dealing with large - scale data sets. This parallel computing ability makes the system more efficient in high - demand scientific research environments, meeting the need for quickly obtaining high - precision results.
[0058] 4. The System Automatically Estimates and Fits the Initial Parameters Required for Each Atom: The system separately estimates the initial parameters for each atom based on its peak value, which can effectively handle the situation where multiple strong and weak signal atoms coexist and the situation where the image background has a large impact. By independently estimating the parameters for each atom, the system reduces the possibility of interference between different atoms and ensures that the localization of each atom is not significantly affected by other factors. This improvement enhances the localization accuracy and stability in complex images, especially suitable for atomic localization in multi - component materials.
[0059] 5. User - friendly and convenient operation: Through automated parameter estimation and integrated design of multiple algorithms (such as centroid method, two - dimensional Gaussian fitting algorithm of weighted over - determined regression, etc.), the present invention greatly simplifies the operation process, reduces the usage threshold, and eliminates the need to spend a large amount of time on complex parameter adjustment and algorithm selection. At the same time, the system supports exporting the positioning results in txt format, facilitating subsequent data analysis and research applications. The efficient data output method has strong compatibility and can be seamlessly integrated with other analysis tools or research processes, improving the overall work efficiency. Users can easily import the accurately calibrated atomic position information into various data analysis systems for further quantitative analysis and research, meeting diverse research needs.
[0060] In summary, through multiple technical improvements, the system of the present invention comprehensively improves the accuracy and efficiency of atomic positioning, has the advantages of high precision, high efficiency, simple operation, and high benefits, making the present invention have broad application prospects in the research of functional materials and being able to provide strong technical support for the research in fields such as materials science and nanotechnology. Brief Description of the Drawings
[0061] Figure 1 are images of the interface of the present invention and the interactive pages that appear during actual operation. Among them, Figure 1 (a) is the interface diagram displayed by this system, Figure 1 (b) is the interface diagram displayed when selecting a template, Figure 1 (c) is the interface diagram displayed when classifying atoms according to contrast.
[0062] Figure 2 is the operation flow chart of the present invention.
[0063] Figure 3 is the comparison between the present invention and traditional methods. Among them, Figure 3 (a) is a partial enlarged view of images with different signal - to - noise ratios (SNR), Figure 3 (b) is the accuracy graph of different methods under different SNR conditions, Figure 3 (c) is a radar graph illustrating the accuracy, processing speed, and robustness of three methods. Detailed Description of the Invention
[0064] The system of the present invention realizes high - precision and high - efficiency atomic positioning of scanning transmission electron microscope (STEM) images by integrating multiple image - processing algorithms. The following, in combination with the specific operation process, details the implementation method of this system and its core functional modules to ensure that those skilled in the art can implement the present invention according to this specification.
[0065] A STEM atomic image peak - finding system includes:
[0066] Main program module: Responsible for importing the STEM images provided by the user. By using the improved centroid method, each atom in the STEM image is divided into separate clusters, and the position of each atom is roughly located.
[0067] Weak signal atom point-finding module: For atoms with weak signals that cannot be processed by the improved centroid method, a template of the atom is made. By using the normalized cross-correlation method, the image of the atom that matches the template is found in the image, and the atoms with weak signals are roughly located.
[0068] Tool module: Used to perform improved two-dimensional Gaussian fitting on the obtained rough atom positions to obtain accurate atom positions, display them to the user through a graphical interface, and support exporting the accurately calibrated atom position information in txt format.
[0069] A STEM atom image peak-finding method based on the above system is as follows:
[0070] Step 1: Based on the main program module, import the STEM images provided by the user. By using the improved centroid method, each atom in the STEM image is divided into separate clusters, and the position of each atom is roughly located.
[0071] 1.1, Import the STEM images provided by the user. On the basis of the traditional centroid method, introduce the adaptive threshold segmentation method. By manually selecting a threshold as the sensitivity factor, then for each pixel, calculate the local mean intensity of the pixel neighborhood:
[0072]
[0073] where, I mean I is the local mean intensity, (x', y') is the intensity of each point, and W is the neighborhood window; compare the obtained local mean intensity with the sensitivity factor, and regard the local area smaller than the sensitivity factor as the background of the STEM image, and the rest of the area as the information contained in the STEM image.
[0074] 1.2, Isolate each atom in the STEM image into a separate cluster, and represent the area outside the cluster with a pure color with obvious contrast to obtain the intensity map of the atom contrast, that is, the intensity map after adaptive threshold segmentation. Subsequently, based on the intensity map after adaptive threshold segmentation, use the improved centroid method for each cluster. According to the contrast and coordinates of each pixel point in each cluster, calculate the weighted mean value to roughly locate the position of each atom. The position of the atom is determined by the following formula:
[0075] and
[0076] where, C x , C yare the X and Y coordinates of the atomic centroid, x i . , x j ij is the position of each pixel, Iis the contrast of each pixel. The A matrix is the threshold matrix, and the threshold is between 0 and 1, where 1 is the minimum threshold and 0 is the maximum threshold.
[0077] Step 2: Based on the weak signal atom finding module, for the strong signal atoms that are difficult to handle by the improved centroid method in Step 1, make a template of the atom, and use the normalized cross-correlation method to find the image of the atom that matches the template in the image, and roughly locate the weak signal atoms;
[0078] 2.1 The user selects n regions centered on the required atoms in the initially imported STEM image. The system generates n templates containing the positional relationship between weak signal atoms and strong signal atoms based on the selected regions. By performing cross-correlation calculations on the generated n templates containing the positional relationship between weak signal atoms and strong signal atoms, an average template is obtained:
[0079]
[0080] where Δx and Δy are displacement parameters;
[0081] 2.2 The system compares the average template with the original image and accurately locates the positions of the weak signal atoms that meet the requirements using the normalized cross-correlation method. The formula is as follows:
[0082]
[0083] where f is the pixel value of the average template containing the positional relationship between weak signal atoms and strong signal atoms, is the average value of the pixels corresponding to the initially imported image at the local position (x ± u, y ± v), is the average pixel value of f within the local position (x ± u, y ± v);
[0084] Thus, a cross-correlation map is obtained, which amplifies the weak signal. The initial centroid positions of the clusters of each atom in the cross-correlation map are obtained by determining the weak signal through the threshold of the improved centroid method.
[0085] Step 3: The position error of the atoms obtained by the improved centroid method is relatively large and needs further processing; based on the tool module, the atomic positions obtained in Steps 1 and 2 are subjected to improved two-dimensional Gaussian fitting to obtain accurate atomic positions:
[0086] 3.1. Automatically estimate and fit the initial parameters required for each atom: For atoms with different signal intensities, select 85% - 95% of the maximum contrast of each atom as the peak amplitude, and automatically estimate the standard deviation or width w according to the full width at half maximum (FWHM) method of the peak, that is where FWHM is the distance between two symmetric points corresponding to half the height of the peak, obtained by interpolation method, that is, between every two pixel points, according to their contrast difference, it is divided into small regions equal to the number of contrast differences to obtain a more accurate distance;
[0087] 3.2. Use the method of background region statistics to estimate the background noise ε xy , that is, for each atom, automatically find a region with the lowest average value among the regions that are two standard deviations or widths w to four standard deviations or widths w away from the initial centroid position obtained in steps 1 to 2 as the informationless region, and obtain the standard deviation of the intensity of this informationless region as the background noise ε xy ;
[0088] 3.3. Finally, take all pixel points inside the circle with the centroid as the center and the standard deviation or width w as the radius for each atom as the fitting region, and use the weighted overdetermined regression method for two-dimensional Gaussian fitting to obtain the accurate atom position. The formula is as follows:
[0089]
[0090] where I xy is the intensity of the pixel, A is the peak amplitude, x and y are the coordinates of a single pixel, x and y are the positions of the Gaussian center, that is, the coordinates of the atom obtained by the centroid method first, w is the standard deviation or width, and ε xy corresponds to the background noise;
[0091] Show the atom positions to the user in a graphical interface, and support exporting the accurately calibrated atom position information in txt format.
[0092] Embodiment 1
[0093] A STEM atom image peak searching system mainly uses a modular design and mainly includes three main modules, as shown in Figure 1 (a). They are the main program module, the weak signal atom point searching module, and the final tool module respectively.
[0094] A STEM atom image peak searching method, the specific processing process is as follows:
[0095] In the first step, the user imports the STEM image. Subsequently, by selecting an appropriate threshold, each atom cluster is separated. This step is checked through "Preview", and the positions of the atoms are obtained by the improved centroid method and saved.
[0096] In the second step, the "Weak Signal Atom Search" script is used to find weak signal atoms that cannot be found in the first step. Of course, if there are no such atoms, this script can be skipped directly. In this step, three templates of the same size need to be selected. Finally, based on the average value of the three templates, similar regions in the image are found to obtain the positions of atoms with very weak intensities.
[0097] In the third step, a suitable truncation radius is selected to truncate the incomplete lattice regions at the image edges, and an improved two-dimensional Gaussian fitting method is used to refine the initially located atom positions, further improving the positioning accuracy. Finally, the processing results are presented graphically, and it is supported to export the accurately calibrated atom position information in txt format for subsequent analysis and research by users. In addition, it also supports separating different types of atoms according to contrast.
[0098] Example 2
[0099] During operation through the software system, the process is as Figure 2 shown.
[0100] The user first opens the main program of STEMax and uses the "Load Image" script to read the image file to be processed. This script supports multiple mainstream image formats, including JPEG, PNG, BMP, TIFF, as well as the DM3 and DM4 formats dedicated to STEM images. When the system imports the image, it will automatically output the actual size of each pixel to ensure that the spatial resolution of the image corresponds to the actual physical size. Considering that the main application object of this system is STEM images, the user can choose to use HAADF (High Angle Annular Dark Field) images or ABF (Atomic Scattering Bright Field) images for processing, and the system will adjust the corresponding processing parameters according to the selected image type to optimize the processing effects of different types of images.
[0101] After the image import is completed, the user separates the atom clusters in the image by selecting a suitable threshold. This step is checked in real time through the "Preview" function to ensure that the threshold segmentation effect meets the requirements. The system adopts an improved centroid method, combined with an adaptive threshold segmentation method, to accurately calculate the centroid positions of each atom, thereby determining the specific positions of the atoms. This process significantly improves the positioning accuracy in images with uneven brightness and saves the obtained atom position information.
[0102] For weak signal atoms that cannot be recognized in the preliminary positioning step, the user can run the "Weak Signal Atom Search" script for further positioning. If there are no weak signal atoms in the image, this step can be skipped. When executing this script, the user needs to select three templates of the same size, and the size of the template is determined by the "radius" parameter. The selection page is as Figure 1(as shown in (b)). The system ensures that the selected template contains the position information of different types of atoms to utilize the positional relationships between different atoms. The system generates relevant graphs based on the template selected by the user and aligns the template through the normalized cross-correlation method. After maximizing the cross-correlation value, the aligned template is averaged point by point in pixels to generate an average template. The average template is used to perform normalized cross-correlation calculations with the original image to accurately locate the positions of atoms with extremely weak intensities in the image, and these position information are saved. After obtaining satisfactory atomic position information, the user selects the "Cut Edge" function through the "Tools" script to truncate the incomplete lattice regions at the image edges to avoid interference from edge effects on atomic positioning. Subsequently, the system applies an improved two-dimensional Gaussian fitting method to refine all the initially located atomic positions. This method uses a weighted overdetermined regression method to automatically estimate the initial fitting parameters for each atom (including peak amplitude, standard deviation, and noise level) without the need for manual adjustment by the user, greatly reducing the operation difficulty.
[0103] To further improve the calculation efficiency, the system needs to configure and start a parallel pool (parpool) when first using the two-dimensional Gaussian fitting method, which takes about a few minutes. After configuration, the built-in parallel computing toolbox of MATLAB will be utilized to achieve parallel processing of Gaussian fitting. By parallelly processing multiple computing tasks through multi-threading, the time for data processing and analysis is significantly shortened. Especially when dealing with large-scale data sets, the computing speed is increased by an order of magnitude. Finally, the user exports all atomic information in txt format by clicking the "Save" button, including the X coordinate, Y coordinate, and signal intensity of each atom, and saves it in the directory of the first imported image. When calibrating multiple types of atoms simultaneously, the software also provides a discrimination function. It will plot the Z intensities of all atoms and then allow the user to separate different atoms according to the numerical input of "Types of Atoms", as Figure 1 (as shown in (c)). Then the "Display" function below can be used to view the positions of each type of atom. The information of different types of atoms is also stored in separate TXT files for detailed structural analysis.
[0104] Figure 3 quantitatively illustrates the superior performance of the present invention; among them, Figure 3 (a) shows a partial enlarged view of images with different signal-to-noise ratios (SNRs), Figure 3(b) shows the accuracies of different methods under different SNR conditions. It can be seen that when the SNR of the image is 5, the accuracy of the ordinary centroid method is 4.3217 pm, the accuracy of the traditional two-dimensional Gaussian method is 2.2355 pm, and the accuracy of the present invention is 2.3782 pm. When the SNR is 15, the accuracy of the ordinary centroid method is 2.6851 pm, the accuracy of the traditional two-dimensional Gaussian method is 1.2589 pm, and the accuracy of the present invention is 1.2846 pm. When the SNR is 50, the accuracy of the ordinary centroid method is 1.9797 pm, the accuracy of the traditional two-dimensional Gaussian method is 1.1076 pm, and the accuracy of the present invention is 1.1897 pm. It can be seen that for images with different SNRs, the present invention is significantly superior to the ordinary centroid method in terms of accuracy, and compared with the traditional two-dimensional Gaussian method, the accuracy only maintains a slight difference. In addition, at a higher SNR level, the accuracy gap between the method of the present invention and the traditional two-dimensional Gaussian method even shrinks, which may be because the system separately estimates the fitting parameters of each atom, thereby reducing the influence of different peak intensities between different atoms. Finally Figure 3 (c) uses a radar chart to illustrate the accuracy, processing speed, and robustness of the ordinary centroid method (red), the traditional two-dimensional Gaussian method (blue), and the method proposed in the present invention (green): The speed of the present invention is half lower than that of the ordinary centroid method, but 100 times faster than the traditional two-dimensional Gaussian method. The accuracy and robustness of the present invention are much higher than those of the ordinary centroid method and are close to those of the traditional two-dimensional Gaussian method, showing obvious advantages.
[0105] The system of the present invention performs excellently in terms of hardware requirements. Even on an ordinary computer equipped with Core TM an i5-8400 CPU @ 2.80 GHz and 7.8 GB of memory, it can also run quickly. This shows that the system has low requirements for computing resources, reduces the user's dependence on high-performance hardware, and expands the applicable range of the system. The low hardware requirements not only reduce the user's equipment upgrade cost, but also make the system easier to deploy and use in various laboratory and research environments, improving the overall economic efficiency and convenience. In addition, by adopting efficient algorithms and automated processing, the system of the present invention significantly reduces the consumption of computing resources while ensuring high accuracy, reducing the operating cost. The modular design not only improves the maintainability and scalability of the system, but also facilitates future function upgrades and the integration of new algorithms, further enhancing the service life and return on investment of the system. This efficient and economical design concept makes the system have extremely high cost performance in scientific research and industrial applications.
Claims
1. A STEM atomic image peak finding system, characterized in that: include: Main program module: responsible for importing the STEM image provided by the user, dividing each atom in the STEM image into a separate cluster through the improved centroid method, and roughly locating the position of each atom; Weak signal atom point finding module: For atoms with weak signals that cannot be processed by the improved centroid method, a template of the atom is made, and the image of the atom that meets the template is found in the image through the normalized cross-correlation method to roughly locate the atom with weak signals; Tool module: used to perform improved two-dimensional Gaussian fitting on the rough atomic positions obtained to obtain accurate atomic positions, which are displayed to users in a graphical interface and support the export of precisely calibrated atomic position information in txt format.
2. The STEM atomic image peak finding system according to claim 1, characterized in that: The improved centroid method is specifically as follows: in the traditional centroid method, an adaptive threshold segmentation method is introduced: a threshold is manually selected as a sensitivity factor, and then for each pixel, the local mean intensity of the pixel neighborhood is calculated by the following formula: Among them, I mean I is the local mean intensity, (x', y') is the intensity of each point, and W is the neighborhood window; the obtained local mean intensity is compared with the sensitivity factor, and the local area less than the sensitivity factor is regarded as the background of the STEM image, and the rest of the area is regarded as the information contained in the STEM image.
3. The STEM atomic image peak finding system according to claim 1, characterized in that: The improved two-dimensional Gaussian fitting is specifically: using weighted overdetermined regression to automatically estimate fitting parameters, the formula is as follows: Among them, I xy is the intensity of the pixel, A is the peak amplitude, x and y are the coordinates of a single pixel, and x and y are the positions of the Gaussian center; for atoms with different signal intensities, 85% to 95% of the maximum contrast of each atom is selected as the peak amplitude; the standard deviation or width w is automatically estimated based on the half-maximum width (FWHM) method of the peak, that is, Among them, FWHM is the distance between two symmetrical points corresponding to half the peak height, which is obtained using the interpolation method, that is, every two pixels are divided into small areas equal to the number of contrast differences according to their contrast difference, so as to obtain a more accurate distance.
4. The STEM atomic image peak finding system according to claim 1, characterized in that: The tool module is configured with a parallel computing toolbox provided by MATLAB, which is used for multi-threaded parallel processing of improved two-dimensional Gaussian fitting.
5. A STEM atomic image peak finding method based on the system of claim 1 or 4, characterized in that: The specific steps are as follows: Step 1: Based on the main program module, the STEM image provided by the user is imported, and each atom in the STEM image is divided into a separate cluster by the improved centroid method, and the position of each atom is roughly located; Step 2: Based on the weak signal atom point finding module, for the strong signal atom that is difficult to be processed by the improved centroid method in step 1, a template of the atom is made, and the image of the atom that meets the template is found in the image using the normalized cross-correlation method to roughly locate the weak signal atom; Step 3: Based on the tool module, the atomic positions obtained in steps 1 and 2 are subjected to improved two-dimensional Gaussian fitting to obtain accurate atomic positions.
6. A STEM atomic image peak finding method according to claim 5, characterized in that: The specific method of step 1 is: 1.1, import the STEM image provided by the user, and introduce the adaptive threshold segmentation method based on the traditional centroid method. A threshold is manually selected as the sensitivity factor, and then for each pixel, the local mean intensity of the pixel neighborhood is calculated: Among them, I mean I is the local mean intensity, (x', y') is the intensity of each point, and W is the neighborhood window; the obtained local mean intensity is compared with the sensitivity factor, and the local area less than the sensitivity factor is regarded as the background of the STEM image, and the rest of the area is regarded as the information contained in the STEM image; 1.2, isolate each atom in the STEM image into a separate cluster, and the area outside the cluster is represented by a pure color with obvious contrast, and the intensity map of the atomic contrast is obtained, that is, the intensity map after adaptive threshold segmentation. Subsequently, based on the intensity map after adaptive threshold segmentation, the centroid method of adaptive threshold segmentation is used for each cluster. According to the contrast and coordinates of each pixel point in each cluster, the weighted mean is calculated to roughly locate the position of each atom. The position of the atom is determined by the following formula: and Among them, C x , C y are the X and Y coordinates of the center of mass of the atom, x i. , x j is the position of each pixel, I ij is the contrast of each pixel, and the A matrix is the threshold matrix. The threshold is between 0 and 1, 1 is the minimum threshold, and 0 is the maximum threshold.
7. A STEM atomic image peak finding method according to claim 5, characterized in that: The specific method of step 2 is: 2.1 The user selects n areas centered on the desired atoms in the initially imported STEM image. The system generates n templates containing the positional relationship between weak signal atoms and strong signal atoms based on the selected areas. By performing cross-correlation calculation on the generated n templates containing the positional relationship between weak signal atoms and strong signal atoms, an average template is obtained: Among them, C(T i , T j ) is the average template, T i (x, y) and T j (x, y) is the coordinate of the pixel point of the selected template, △x, △y are the displacement parameters; 2.2, the system compares the average template with the original image, and uses the normalized cross-correlation method to accurately locate the weak signal atom position that meets the requirements. The formula is as follows: Where γ(u, v) is the pixel value of the calculated cross-correlation map, f(x, y) is the pixel value of the average template containing the positional relationship between the weak signal atoms and the strong signal atoms, and t is the coordinate of the initially imported image at (x, y). is the average value of the pixels corresponding to the local position (x±u, y±v) of the initially imported image, is the pixel mean of f in the local position (x±u, y±v); Thus, a cross-correlation diagram is obtained, weak signals are amplified, and the position of the initial center of mass of each atom cluster in the cross-correlation diagram is obtained by determining the weak signal through the threshold of the improved center of mass method.
8. A STEM atomic image peak finding method according to claim 5, characterized in that: The specific method of step 3 is: 3.1, automatically estimate the initial parameters required for fitting each atom: for atoms with different signal intensities, select 85% to 95% of the maximum contrast of each atom as the peak amplitude; automatically estimate the standard deviation or width w based on the half-width at half maximum (FWHM) method of the peak, that is, Among them, FWHM is the distance between two symmetrical points corresponding to half the peak height, which is obtained using the interpolation method, that is, the distance between every two pixels is divided into small areas equal to the number of contrast differences according to their contrast difference, so as to obtain a more accurate distance; 3.2, use the background area statistics method to estimate the background noise ε xy That is, for each atom, automatically find an area with the lowest average value in the area with a difference of two standard deviations or width w to four standard deviations or width w from the initial centroid position obtained from step 1 to step 2, regard it as a no-information area, and obtain the standard deviation of the intensity of this no-information area as the background noise ε xy ; 3.
3. Finally, all the pixels inside the circle with the center of mass of each atom as the center and the standard deviation or width w as the radius are taken as the fitting area, and the weighted overdetermined regression method is used for two-dimensional Gaussian fitting to obtain the precise atomic position. The formula is as follows: Among them, I xy is the intensity of the pixel, A is the peak amplitude, x and y are the coordinates of a single pixel, x and y are the location of the center of the Gaussian, i.e. the coordinates of the atom we first obtained using the centroid method, w is the standard deviation or width, and ε xy Corresponding to background noise; The atomic positions are displayed to the user in a graphical interface, and the accurately calibrated atomic position information can be exported.
9. An electronic device for peak finding in STEM atomic images, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, so that the processor executes the STEM atomic image peak finding method described in steps 1 to 3 based on the STEM atomic image peak finding system.
10. A program storage medium for receiving user input, characterized in that: When the stored computer program is executed by the processor, it can accurately calibrate the atomic position information based on the STEM atomic image peak finding method and support the separation of different types of atoms according to contrast.