CN111276195A - Method for calculating number of compounds in gel energy spectrum by using maximum inter-class variance method - Google Patents
Method for calculating number of compounds in gel energy spectrum by using maximum inter-class variance method Download PDFInfo
- Publication number
- CN111276195A CN111276195A CN202010064631.5A CN202010064631A CN111276195A CN 111276195 A CN111276195 A CN 111276195A CN 202010064631 A CN202010064631 A CN 202010064631A CN 111276195 A CN111276195 A CN 111276195A
- Authority
- CN
- China
- Prior art keywords
- energy
- calculating
- energy spectrum
- image
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16C—COMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
- G16C20/00—Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
- G16C20/70—Machine learning, data mining or chemometrics
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16C—COMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
- G16C20/00—Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
- G16C20/60—In silico combinatorial chemistry
Landscapes
- Chemical & Material Sciences (AREA)
- Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Crystallography & Structural Chemistry (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Health & Medical Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Software Systems (AREA)
- Medical Informatics (AREA)
- Evolutionary Computation (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Medicinal Chemistry (AREA)
- Analysing Materials By The Use Of Radiation (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to a method for calculating the number of compounds in a gel energy spectrum by using a maximum inter-class variance method, which comprises the following steps: s11, obtaining energy spectrograms of Q elements of the tested sample, wherein the tested sample comprises Q elements, and each element obtains one energy spectrogram; s12, obtaining a conversion threshold value of each element energy spectrogram by using a maximum inter-class variance method according to the energy spectrogram; s13, converting the energy spectrum image of each element into a binary image by taking the conversion threshold as a demarcation point to obtain an element binary image and obtain an element binary image; s15, performing matrix dot multiplication on all binary images to obtain a result image of the tested sample of the compound; and S16, summing all compound pixel points in the result image matrix of the tested sample to obtain the number of the tested sample. The invention solves the quantitative problem of the element bright spots in the energy spectrogram, introduces a computer simulation mode, rapidly calculates the number and the contact ratio of the spots and provides a new idea for a more accurate quantitative mode.
Description
Technical Field
The invention relates to the technical field of scanning energy spectrum analysis, in particular to a method for calculating the number of compounds in a gel energy spectrum by using a maximum inter-class variance method.
Background
The use of a scanning electron microscope makes the observation of the microstructure of the material more convenient. If the types and contents of the component elements in the material micro-area are analyzed, various methods are provided, and electron microscope energy spectrum is the most common method. The energy spectrum has the characteristics of simple operation, high analysis speed, visual result and the like, so the energy spectrum also becomes the standard matching of the current electron microscope.
The energy spectrum analysis is to analyze the components by utilizing the characteristic that the photon characteristic energy of different element X-ray is different. If the electron beam is scanned over a rectangular area, the energy spectrum at each point is collected at the same time. Obtaining the composition and content distribution of each element in the rectangular area is called a spectral surface analysis method, also called spectral surface scanning, and can give very intuitive results. The incident electron beam performs raster scanning on a certain area on the surface of a sample, the energy spectrometer fixedly receives characteristic X-ray information of a certain element, and when one characteristic X-ray photon is collected, a bright spot is marked at a corresponding position on a screen, and the part where the bright spot is concentrated is the surface distribution map of the element. If the sample to be measured is composed of a plurality of elements, a surface distribution map of each element can be obtained. For example, a certain area of the cross section of the capacitor is swept to obtain a distribution map of each element. Each element is represented by a different color, and its distribution within the analyzed area is clear and very intuitive. The area scan is the elemental distribution over the area, primarily to estimate the enrichment region for certain elements. The number of points of different elements can objectively reflect the enrichment degree of the elements, but the existing energy spectrometer cannot give the number of the points; electron microscopy spectroscopy can only obtain the element species and the substantial content of the element, but the number and density of the compound or nanoparticle cannot be accurately known, which limits the accurate comparison of the enrichment degree of the element or compound.
Disclosure of Invention
Aiming at the problem that the quantity and the density of a compound or a nanoparticle cannot be accurately known in the prior art, the invention provides a method for calculating the quantity of the compound in a gel energy spectrum by using a maximum inter-class variance method.
The specific scheme of the application is as follows:
a method for calculating the amount of a compound in a gel energy spectrum by using the maximum between-class variance method, comprising:
s11, obtaining energy spectrograms of Q elements of the tested sample, wherein the tested sample comprises Q elements, and each element obtains one energy spectrogram;
s12, obtaining a conversion threshold value of each element energy spectrogram by using a maximum inter-class variance method according to the energy spectrogram;
s13, converting the energy spectrum image of each element into a binary image by taking the conversion threshold as a demarcation point to obtain an element binary image; if Q is 1, the sample to be measured contains one element, and step S14 is executed; if Q is more than or equal to 2, the tested sample is a compound, and the steps S15 and S16 are executed;
s14, obtaining the number of elements according to the element binary image;
s15, performing matrix dot multiplication on all binary images to obtain a result image of the tested sample;
and S16, summing all compound pixel points in the result image matrix of the tested sample to obtain the number of the tested sample.
Preferably, step S12 includes:
s121, calculating the probability of each gray value according to the energy spectrogram, calculating the distribution probability of the target and the background in the energy spectrogram respectively, calculating the average gray value of the target and the background in the energy spectrogram respectively, and calculating the variance of the target and the background in the energy spectrogram respectively;
s122, calculating the inter-class variance of the target and the background in the energy spectrogram;
and S123, taking the corresponding gray value when the inter-class variance value is maximum as a conversion threshold value.
Preferably, the assumption of the maximum inter-class variance method is that a transformation threshold TH exists to divide all pixels of the energy spectrum into a background C1 and a target C2, wherein the gray level value of the pixel of the background C1 is smaller than the transformation threshold TH, and the gray level value of the pixel of the target C2 is greater than or equal to the transformation threshold TH, then the respective average gray values of the two types of pixels are m1 and m2 respectively, the image global gray value of the energy spectrum is mG, and the distribution probabilities of all pixels of the energy spectrum being divided into the background C1 and the target C2 are p1 and p2 respectively, so that:
p1*m1+p2*m2=mG (1)
p1+p2=1 (2)
according to the concept of variance, the inter-class variance expression is:
σ2=p1(m1-mG)2+p2(m2-mG)2(3)
by substituting formula (1) for formula (3) and simplifying formula (3), the following can be obtained:
σ2=p1p2(m1-m2)2(4)
solving a gray level k which can maximize the formula (4) as a conversion threshold value TH of a maximum inter-class variance method;
the formula for calculating the probability of each gray value according to the energy spectrum diagram is as follows:
formulas for calculating the distribution probability p1 of the background and the distribution probability p2 of the target in the energy spectrum are respectively as follows:
wherein i is the gray value in the image, L is the gray level in the image, the value in the gray image is 256, niIs the number of pixels with a gray level value of i, N is the total number of pixels in the image, piI.e. the probability of a grey level value of i;
and traversing 0-255 gray levels according to the formulas (1) - (9) to obtain the maximum k of the formula (4) which is the conversion threshold TH of the maximum inter-class variance method.
Preferably, Q is 2, and the sample to be measured is a FeS composite material containing an S element and an Fe element.
Preferably, step S11 includes; and performing surface scanning on the sample to be detected by using a scanning electron microscope to obtain an energy spectrum diagram of the elements in the sample to be detected.
Compared with the prior art, the invention has the following beneficial effects:
the method comprises the steps of obtaining energy spectrograms of Q elements of a tested sample, obtaining a conversion threshold value of each element energy spectrogram by using a maximum inter-class variance method according to the energy spectrograms, obtaining an element binary image, carrying out matrix point multiplication on all binary images to obtain a tested sample result image, and summing all pixel points in a tested sample result image matrix to obtain the number of the tested sample. The invention solves the quantitative problem of the element bright spots in the energy spectrogram, introduces a computer simulation mode, and further calculates the quantity of the composite material through the quantity of the element pixel points and the element contact ratio, thereby providing a new idea for a more accurate quantitative mode.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention for calculating the amount of compounds in a gel energy spectrum using the method of variance between maximum classes.
FIG. 2 is an energy spectrum of Fe element of the present invention.
FIG. 3 is an energy spectrum of the S element of the present invention.
Fig. 4 is a Fe element binary image of the present invention.
Fig. 5 is an S-element binary image of the present invention.
FIG. 6 is a result image of a sample to be tested having both Fe element and S element according to the present invention.
Detailed Description
The invention is further illustrated by the following figures and examples.
Referring to fig. 1, a method for calculating the amount of compounds in a gel energy spectrum by using the variance method between maximum classes, comprises:
s21, respectively obtaining an energy spectrum of the Fe element and an energy spectrum of the S element of the detected sample, wherein the detected sample is the FeS hydrogel nanocomposite; step S11 includes; and performing surface scanning on the sample to be detected by using a scanning electron microscope to obtain an energy spectrum diagram of the elements in the sample to be detected. The spectrum of Fe element is shown in FIG. 2, and the spectrum of S element is shown in FIG. 3.
S22, respectively obtaining a conversion threshold value of the Fe element and a conversion threshold value of the S element by using a maximum inter-class variance method according to the energy spectrum of the Fe element and the energy spectrum of the S element;
s23, converting the element image in the energy spectrogram into a binary image by taking the conversion threshold of the Fe element and the conversion threshold of the S element as demarcation points respectively to obtain an Fe element binary image (figure 4) and an S element binary image (figure 5);
s24, performing matrix dot multiplication on the two binary images to obtain a result image of the detected sample with both Fe elements and S elements, as shown in FIG. 6; performing matrix dot multiplication on all binary images, and proving that the same pixel point contains all elements of the composite material, thereby obtaining a result image of the detected sample;
and S25, summing all pixel points of the FeS composite material in the result image matrix of the detected sample to obtain 1385 detected samples.
It should be noted that the detected sample contains a plurality of elements, each element obtains a surface distribution map, and the existence of the detected sample at the same position of each element can be proved only if the same position of each element has a bright point, which is called as a detected sample point, and the number of the sample points in the image is determined.
The method for calculating the variance between the maximum classes comprises the following steps:
the maximum inter-class variance method was proposed in 1979 by Otsu (Qobuyuki Otsu), a Japanese scholars, and is a method for determining adaptive threshold, which is called Otsu, called OTSU for short. It is to divide the image into background and object 2 parts according to the gray scale characteristics of the image. The larger the inter-class variance between the background and the object, the larger the difference of 2 parts constituting the image, and the smaller the difference of 2 parts is caused when part of the object is mistaken for the background or part of the background is mistaken for the object. Thus, a segmentation that maximizes the inter-class variance means that the probability of false positives is minimized. And calculating the variance between classes of the segmentation taking each gray value as a threshold, wherein the value with the maximum variance between classes is the threshold.
In the present embodiment, step S22 includes:
s221, calculating the probability of each gray value according to the energy spectrogram, calculating the distribution probability of the target and the background in the energy spectrogram respectively, calculating the average gray value of the target and the background in the energy spectrogram respectively, and calculating the variance of the target and the background in the energy spectrogram respectively;
s122, calculating the inter-class variance of the target and the background in the energy spectrogram;
and S123, taking the corresponding gray value when the inter-class variance value is maximum as a conversion threshold value.
The method comprises the following specific steps:
the assumption of the maximum inter-class variance method is that a conversion threshold TH exists to divide all pixels of the energy spectrum into a background C1 and a target C2, wherein the gray level value of the pixel of the background C1 is smaller than the conversion threshold TH, and the gray level value of the pixel of the target C2 is greater than or equal to the conversion threshold TH, then the respective average gray values of the two types of pixels are m1 and m2 respectively, the image global gray value of the energy spectrum is mG, and the distribution probabilities that all pixels of the energy spectrum are divided into the background C1 and the target C2 are p1 and p2 respectively, so that:
p1*m1+p2*m2=mG (1)
p1+p2=1 (2)
according to the concept of variance, the inter-class variance expression is:
σ2=p1(m1-mG)2+p2(m2-mG)2(3)
by substituting formula (1) for formula (3) and simplifying formula (3), the following can be obtained:
σ2=p1p2(m1-m2)2(4)
solving a gray level k which can maximize the formula (4) as a conversion threshold value TH of a maximum inter-class variance method;
the formula for calculating the probability of each gray value according to the energy spectrum diagram is as follows:
formulas for calculating the distribution probability p1 of the background and the distribution probability p2 of the target in the energy spectrum are respectively as follows:
wherein i is the gray value in the image, L is the gray level in the image, the value in the gray image is 256, niIs the number of pixels with a gray level value of i, N is the total number of pixels in the image, piI.e. the probability of a grey level value of i;
and traversing 0-255 gray levels according to the formulas (1) - (9) to obtain the maximum k of the formula (4) which is the conversion threshold TH of the maximum inter-class variance method.
In this example, the preparation method of the FeS hydrogel nanocomposite material includes the following steps:
(1) adding water into lignin, acrylamide, maleic anhydride, a cross-linking agent and ferric salt, and stirring until the lignin, the acrylamide, the maleic anhydride, the cross-linking agent and the ferric salt are completely dissolved;
(2) adjusting the pH value of the solution obtained in the step (1) to be alkaline, adding an initiator, adding tetramethylethylenediamine, fully stirring, and standing to obtain composite hydrogel;
(3) and (3) soaking the composite hydrogel obtained in the step (2) in a sodium sulfide solution to obtain black hydrogel, washing with water, freezing, and freeze-drying to obtain the FeS hydrogel nanocomposite.
In conclusion, the method introduces a computer simulation mode, rapidly calculates the number of elements and the contact ratio of the elements, further calculates the number of compounds, and provides a new idea for a more accurate quantitative mode.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (5)
1. A method for calculating the amount of a compound in a gel energy spectrum by using a maximum between-class variance method, comprising:
s11, obtaining energy spectrograms of Q elements of the tested sample, wherein the tested sample comprises Q elements, and each element obtains one energy spectrogram;
s12, obtaining a conversion threshold value of each element energy spectrogram by using a maximum inter-class variance method according to the energy spectrogram;
s13, converting the energy spectrum image of each element into a binary image by taking the conversion threshold as a demarcation point to obtain an element binary image and obtain an element binary image; if Q is 1, the sample to be measured contains one element, and step S14 is executed; if Q is more than or equal to 2, the tested sample is a compound, and the steps S15 and S16 are executed;
s14, obtaining the number of elements according to the element binary image;
s15, performing matrix dot multiplication on all binary images to obtain a result image of the tested sample;
and S16, summing all compound pixel points in the result image matrix of the tested sample to obtain the number of the tested sample.
2. The method for calculating the amount of compounds in gel energy spectrum by using the method of variance between maximum classes as claimed in claim 1, wherein step S12 comprises:
s121, calculating the probability of each gray value according to the energy spectrogram, calculating the distribution probability of the target and the background in the energy spectrogram respectively, calculating the average gray value of the target and the background in the energy spectrogram respectively, and calculating the variance of the target and the background in the energy spectrogram respectively;
s122, calculating the inter-class variance of the target and the background in the energy spectrogram;
and S123, taking the corresponding gray value when the inter-class variance value is maximum as a conversion threshold value.
3. The method for calculating the amount of compounds in a gel energy spectrum by using the variance method between maximum classes as claimed in claim 2, wherein the assumption of the variance method between maximum classes is that there is a transformation threshold TH to divide all pixels in the energy spectrum into a background C1 and a target C2, wherein the gray scale value of the pixel of the background C1 is less than the transformation threshold TH, and the gray scale value of the pixel of the target C2 is greater than or equal to the transformation threshold TH, then the respective average gray scale values of the two types of pixels are m1 and m2 respectively, the image global gray scale value of the energy spectrum is mG, and the distribution probabilities of all pixels in the energy spectrum divided into the background C1 and the target C2 are p1 and p2 respectively, so that:
p1*m1+p2*m2=mG (1)
p1+p2=1 (2)
according to the concept of variance, the inter-class variance expression is:
σ2=p1(m1-mG)2+p2(m2-mG)2(3)
by substituting formula (1) for formula (3) and simplifying formula (3), the following can be obtained:
σ2=p1p2(m1-m2)2(4)
solving a gray level k which can maximize the formula (4) as a conversion threshold value TH of a maximum inter-class variance method; the formula for calculating the probability of each gray value according to the energy spectrum diagram is as follows:
formulas for calculating the distribution probability p1 of the background and the distribution probability p2 of the target in the energy spectrum are respectively as follows:
wherein i is the gray value in the image, L is the gray level in the image, the value in the gray image is 256, niIs the number of pixels with a gray level value of i, N is the total number of pixels in the image, piI.e. the probability of a grey level value of i;
and traversing 0-255 gray levels according to the formulas (1) - (9) to obtain the maximum k of the formula (4) which is the conversion threshold TH of the maximum inter-class variance method.
4. The method for calculating the amount of a compound in a gel energy spectrum by using the method of the maximum between-classes variance as claimed in claim 1, wherein Q is 2, and the sample to be measured is a FeS composite material which contains S element and Fe element.
5. The method for calculating the amount of a compound in a gel energy spectrum by using the variance method between maximum classes as claimed in claim 1, wherein the step S11 comprises;
and performing surface scanning on the sample to be detected by using a scanning electron microscope to obtain an energy spectrum diagram of the elements in the sample to be detected.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010064631.5A CN111276195B (en) | 2020-01-20 | 2020-01-20 | Method for calculating number of gel energy spectrogram compounds by using maximum inter-class variance method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010064631.5A CN111276195B (en) | 2020-01-20 | 2020-01-20 | Method for calculating number of gel energy spectrogram compounds by using maximum inter-class variance method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111276195A true CN111276195A (en) | 2020-06-12 |
CN111276195B CN111276195B (en) | 2023-09-19 |
Family
ID=71002202
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010064631.5A Active CN111276195B (en) | 2020-01-20 | 2020-01-20 | Method for calculating number of gel energy spectrogram compounds by using maximum inter-class variance method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111276195B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104182759A (en) * | 2014-08-20 | 2014-12-03 | 徐州坤泰电子科技有限公司 | Scanning electron microscope based particle morphology identification method |
CN106483550A (en) * | 2015-08-28 | 2017-03-08 | 易良碧 | A kind of simulation spectrum curve emulation mode |
CN109632858A (en) * | 2019-01-07 | 2019-04-16 | 天津力神电池股份有限公司 | The rapid detection method of different element relative amounts in a kind of element map |
-
2020
- 2020-01-20 CN CN202010064631.5A patent/CN111276195B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104182759A (en) * | 2014-08-20 | 2014-12-03 | 徐州坤泰电子科技有限公司 | Scanning electron microscope based particle morphology identification method |
CN106483550A (en) * | 2015-08-28 | 2017-03-08 | 易良碧 | A kind of simulation spectrum curve emulation mode |
CN109632858A (en) * | 2019-01-07 | 2019-04-16 | 天津力神电池股份有限公司 | The rapid detection method of different element relative amounts in a kind of element map |
Also Published As
Publication number | Publication date |
---|---|
CN111276195B (en) | 2023-09-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10783641B2 (en) | Systems and methods for adaptive histopathology image unmixing | |
EP1416262B1 (en) | Color space transformations for use in identifying objects of interest in biological specimens | |
US11462032B2 (en) | Stain normalization for automated whole-slide image classification | |
CN109284786B (en) | SAR image terrain classification method for generating countermeasure network based on distribution and structure matching | |
EP1912060A1 (en) | Light intensity measuring method and light intensity measuring device | |
CN111879710A (en) | Steel structure coating corrosion resistance evaluation method, system, server and storage medium | |
CN116758081B (en) | Unmanned aerial vehicle road and bridge inspection image processing method | |
CN114694143B (en) | Cell image recognition method and device based on optical means | |
CN111276195A (en) | Method for calculating number of compounds in gel energy spectrum by using maximum inter-class variance method | |
US12008775B2 (en) | Method and device for image registration, and computer program product | |
RU2439560C1 (en) | Method for computer-based determination of change in colour of textile fabric when assessing resistance thereof to physical and chemical action | |
CN113537253B (en) | Infrared image target detection method, device, computing equipment and storage medium | |
WO2021080007A1 (en) | Cancer assessment device, cancer assessment method, and program | |
CN114694128A (en) | Pointer instrument detection method and system based on abstract metric learning | |
CN113506312A (en) | Ultraviolet discharge image segmentation method and computer readable medium | |
CN109632858A (en) | The rapid detection method of different element relative amounts in a kind of element map | |
CN115166649B (en) | Polarization detection method for ultra-narrow pulse radar scattering point characteristic aggregation target | |
Hurn et al. | High-level image priors in confocal microscopy applications | |
Siteleki | DETECTING ASH MIDDENS USING REMOTE SENSING TECHNIQUES | |
Figueroa III et al. | Resolving and Quantifying Viral-Like Particles via Blind Deconvolution | |
CN116482682A (en) | Near field RCS measurement method based on ISAR imaging and sequence CLEAN | |
JP2023015633A (en) | Analysis device and image processing method | |
Pei et al. | Researches on Pre-processing for Pointer Meter Automatic Recognition | |
CN115639557A (en) | Synthetic aperture radar typical interference detection and identification method | |
CN117952953A (en) | Optical element surface defect detection method based on fluorescence lifetime data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |