Method and device for processing images taken by spectrometer

By annotating and solving the carbon line spot coordinates in the spectrometer image, a conversion matrix is ​​created to correct the spectrogram to be processed, which solves the problem of inconsistent with the theoretical position of the spectrometer image and the accuracy of spectrometer analysis is achieved.

CN114240790BActive Publication Date: 2025-03-14JIANGSU SKYRAY INSTR
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111569540.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2025-03-14
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

In a spectrometer based on SCMOS cameras, there are optical processing errors and debugging deviations, resulting in the actual spectral line position being inconsistent with the theoretical position, and the images obtained by the spectrometer need to be processed to correspond to the theoretical position.

Method used

By obtaining the to-process spectrogram and theoretical spectrogram taken by the spectrometer, marking out the coordinates of the three carbon line spots, creating two sets of equations for solving, obtaining a transformation matrix, and correcting the to-process spectrogram based on this matrix.

Benefits of technology

The correction of the spectrogram to be processed by the spectrometer is achieved, ensuring that it corresponds to the theoretical position and improving the accuracy of spectral analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114240790B_ABST
    Figure CN114240790B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for processing images taken by a spectrometer. The processing method includes: obtaining a spectrum to be processed taken by the spectrometer and three carbon line spots therein, three corresponding first coordinates, a theoretical spectrum and three carbon line spots therein, three corresponding second coordinates, calculating a conversion matrix between the coordinates of the three first carbon line spots and the coordinates of the three second carbon line spots, and then correcting the spectrum to be processed taken by the spectrometer based on the conversion matrix. In summary, the processing method can correct the spectrum to be processed taken by the spectrometer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of ICP (Inductive Coupled Plasma Emission Spectrometer) spectrometers, and in particular to a method and a device for processing images taken by a spectrometer. Background Art

[0002] Image sensors are the core components of optical imaging cameras and are an essential part of optical imaging cameras. They are used to convert the target's optical signal into an electrical signal output. Among them, SCMOS (complementary metal oxide semiconductor) cameras are a commonly used scientific instrument. Many spectrometers are manufactured based on SCMOS cameras.

[0003] In a real spectrometer based on a SCMOS camera, there may be optical processing errors, actual debugging deviations, etc., which may cause the actual spectral line position to be different from the theoretical position. Therefore, it is necessary to process the image obtained by the spectrometer so that it corresponds to the theoretical position. Summary of the invention

[0004] The object of the present invention is to provide a method and device for processing images taken by a spectrometer.

[0005] In order to achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention provides a method for processing an image taken by a spectrometer including a SCMOS camera, comprising the following steps: obtaining a first spectrum to be processed, a theoretical spectrum, and three carbon line spots S′1, S′2, and S′3 in the theoretical spectrum taken by the spectrometer, wherein the coordinate systems corresponding to the first spectrum to be processed and the theoretical spectrum are the same, and the coordinates of the three carbon line spots S′1, S′2, and S′3 are respectively (x′1, y′1), (x′2, y′2), and (x′3, y′3); marking three regions from the first spectrum to be processed, wherein the three regions respectively include three pixels whose coordinates are respectively (x′1, y′1), (x′2, y′2), and (x′3, y′3); marking three carbon line spots S1, S2, and S3 from the three regions, wherein the coordinates of the three carbon line spots S1, S2, and S3 are respectively (x1, y1), (x2, y2), and (x3, y3); creating two sets of equations Solving these two equations, we obtain {α, β, γ} and Obtain the coordinates (x, y) of the line spot corresponding to the target element in the theoretical spectrum. Then the coordinates of the target element in the second spectrum to be processed taken by the spectrometer are

[0006] As a further improvement of an embodiment of the present invention, the first spectrum to be processed is obtained by the following method: performing an ICP ignition test, introducing a pure water blank sample, and controlling the spectrometer to take pictures.

[0007] As a further improvement of an embodiment of the present invention, both the first spectrum graph to be processed and the theoretical spectrum graph are grayscale graphs.

[0008] As a further improvement of an embodiment of the present invention, the “marking out three regions from the first spectrum map to be processed” specifically includes: marking out three regions from the first spectrum map to be processed, and performing the following processing on each pixel point P in the three regions: Where T is the threshold value, and T>0, e is a natural constant, p' is the gray value of the pixel P before modification, Num=2 L -1, L is the maximum binary length of the grayscale value of the pixel point in the first spectrum image to be processed, and then the grayscale value of the pixel point P is modified to Q.

[0009] As a further improvement of an embodiment of the present invention, L=16.

[0010] An embodiment of the present invention further provides a processing device for an image captured by a spectrometer including a SCMOS camera, comprising the following modules: an initialization module, used to obtain a first spectrum to be processed, a theoretical spectrum, and three carbon line spots S′1, S′2, and S′3 in the theoretical spectrum captured by the spectrometer, wherein the coordinate systems corresponding to the first spectrum to be processed and the theoretical spectrum are the same, and the coordinates of the three carbon line spots S′1, S′2, and S′3 are respectively (x′1, y′1), (x′2, y′2), and (x′3, y′3); three regions are marked from the first spectrum to be processed, wherein the three regions respectively include three pixels whose coordinates are respectively (x′1, y′1), (x′2, y′2), and (x′3, y′3); three carbon line spots S1, S2, and S3 are respectively marked from the three regions, and the coordinates of the three carbon line spots S1, S2, and S3 are respectively (x1, y1), (x2, y2), and (x3, y3); a processing module, used to create two sets of equations Solving these two equations, we can obtain {α, β, γ} and The correction module is used to obtain the coordinates (x, y) of the line spot corresponding to the target element in the theoretical spectrum. The coordinates of the target element in the second spectrum to be processed taken by the spectrometer are:

[0011] As a further improvement of an embodiment of the present invention, the first spectrum to be processed is obtained by the following method: performing an ICP ignition test, introducing a pure water blank sample, and controlling the spectrometer to take pictures.

[0012] As a further improvement of an embodiment of the present invention, both the first spectrum graph to be processed and the theoretical spectrum graph are grayscale graphs.

[0013] As a further improvement of an embodiment of the present invention, the initialization module is further used to: mark three areas from the first spectrum map to be processed, and perform the following processing on each pixel point P in the three areas: Where T is the threshold value, and T>0, e is a natural constant, p' is the gray value of the pixel P before modification, Num=2 L -1, L is the maximum binary length of the grayscale value of the pixel point in the first spectrum image to be processed, and then the grayscale value of the pixel point P is modified to Q.

[0014] As a further improvement of an embodiment of the present invention, L=16.

[0015] Compared with the prior art, the technical effect of the present invention is that: an embodiment of the present invention provides a method and device for processing an image taken by a spectrometer, the processing method comprising: obtaining the spectrum graph to be processed taken by the spectrometer and the three carbon line spots therein, the corresponding three first coordinates, the theoretical spectrum graph and the three carbon line spots therein, the corresponding three second coordinates, calculating the conversion matrix between the coordinates of the three first carbon line spots to the coordinates of the three second carbon line spots, and then correcting the spectrum graph to be processed taken by the spectrometer based on the conversion matrix; in summary, the processing method can correct the spectrum graph to be processed taken by the spectrometer. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flowchart of the processing method in the embodiment of the present invention. DETAILED DESCRIPTION

[0017] The present invention will be described in detail below in conjunction with the various embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on these embodiments are all within the scope of protection of the present invention.

[0018] As used herein, terms indicating spatial relative positions such as "upper," "above," "lower," and "below" are used for the purpose of convenience to describe the relationship of one unit or feature relative to another unit or feature as shown in the accompanying drawings. Terms of spatial relative position may be intended to include different orientations of the device in use or operation in addition to the orientation shown in the drawings. For example, if the device in the figure is turned over, units described as being "below" or "beneath" other units or features will be located "above" the other units or features. Thus, the exemplary term "below" can encompass both above and below orientations. The device may be oriented in other ways (rotated 90 degrees or in other orientations), and the spatially relative descriptors used herein interpreted accordingly.

[0019] Furthermore, it should be understood that although the terms first, second, etc. may be used to describe various elements or structures in this article, these described objects should not be limited by these terms. These terms are only used to distinguish these described objects from each other. For example, the first spectrogram to be processed may be referred to as the second spectrogram to be processed, and similarly the second spectrogram to be processed may also be referred to as the first spectrogram to be processed, without departing from the scope of protection of this application.

[0020] Embodiment 1 of the present invention provides a method for processing an image captured by a spectrometer including a SCMOS (complementary metal oxide semiconductor) camera, such as Figure 1 As shown, the following steps are included:

[0021] Step 101: obtain a first spectrum to be processed, a theoretical spectrum, and three carbon line spots S′1, S′2, and S′3 in the theoretical spectrum taken by the spectrometer, wherein the coordinate systems corresponding to the first spectrum to be processed and the theoretical spectrum are the same, and the coordinates of the three carbon line spots S′1, S′2, and S′3 are (x′1, y′1), (x′2, y′2), and (x′3, y′3), respectively; mark three areas from the first spectrum to be processed, the three areas respectively contain three pixels with coordinates (x′1, y′1), (x′2, y′2), and (x′3, y′3), respectively, mark three carbon line spots S1, S2, and S3 from the three areas, and the coordinates of the three carbon line spots S1, S2, and S3 are (x1, y1), (x2, y2), and (x3, y3), respectively; here, the three carbon line spots S1, S2, and S3 and their coordinate points can be marked by software or manually.

[0022] Here, the following method can be used to mark the three areas: use the minMaxLoc() function in OPENCV to find the maximum value maxVlaue and its position coordinates in a certain area around the theoretical position, then determine that the point and the surrounding data are distributed in a curve to exclude non-abnormal points, confirm the actual carbon line spot position, and then obtain the coordinates.

[0023] Step 102: Create two systems of equations

[0024] Solving these two equations, we obtain {α, β, γ} and

[0025] Step 103: Obtain the coordinates (x, y) of the line spot corresponding to the target element in the theoretical spectrum. Then, the coordinates of the target element in the second spectrum to be processed taken by the spectrometer are:

[0026] Here, the carbon element is selected as the positioning element because: (1) Even in pure water, there are trace amounts of C element, so there is no need to prepare a separate solution; (2) In the case of pure water sampling, the C element has four characteristic light spots at two wavelengths, namely 193.091nm, wavelength m=177 and m=176 (order), 247.856nm, m=137 and m=138m (order), which will appear in a clearer area. The characteristic wavelengths of other elements in pure water or argon are concentrated on the image and are difficult to distinguish.

[0027] After the above steps are completed, the actual and theoretical coordinates of all elements will be mapped one by one according to the new correction parameters, thus completing the real-time correction of the full spectrum band without the need to prepare correction fluid.

[0028] In this embodiment, the first spectrogram to be processed is obtained by the following method: an ICP ignition test is performed, a pure water blank sample is introduced, and the spectrometer is controlled to take pictures. Here, ICP is an emission spectrometer, and an ICP emission spectrometer is an inductively coupled plasma spectrometer. ICP emission spectrometry is a method for analyzing the element to be tested based on the characteristic spectral lines emitted when the atoms of the element to be tested in an excited state return to the ground state. ICP emission spectrometers are mainly used for qualitative and quantitative analysis of inorganic elements. When performing an ICP ignition test, if only pure water is introduced, a clear carbon line characteristic spot can be obtained.

[0029] In this embodiment, both the first spectrum image to be processed and the theoretical spectrum image are grayscale images.

[0030] In this embodiment, the “marking out three regions from the first spectrum map to be processed” specifically includes: marking out three regions from the first spectrum map to be processed, and performing the following processing on each pixel point P in the three regions: Where T is the threshold value, and T>0, e is a natural constant, p' is the gray value of the pixel P before modification, Num=2 L -1, L is the maximum binary length of the grayscale value of the pixel in the first spectrum to be processed, and then the grayscale value of the pixel P is modified to Q. Here, due to the exposure time and dark current of the SCMOS camera, the difference between the grayscale values ​​of different pixels in the first spectrum to be processed is relatively small, which makes it difficult to find the three carbon line spots S1, S2 and S3. Therefore, the contrast of the first spectrum to be processed can be improved by the above formula.

[0031] In this embodiment, L=16.

[0032] Embodiment 2 of the present invention provides a device for processing images captured by a spectrometer including a SCMOS camera, comprising the following modules:

[0033] An initialization module is used to obtain a first spectrum to be processed, a theoretical spectrum, and three carbon line spots S′1, S′2, and S′3 in the theoretical spectrum taken by the spectrometer, wherein the coordinate systems corresponding to the first spectrum to be processed and the theoretical spectrum are the same, and the coordinates of the three carbon line spots S′1, S′2, and S′3 are (x′1, y′1), (x′2, y′2), and (x′3, y′3), respectively; three regions are marked from the first spectrum to be processed, and the three regions respectively contain three pixels with coordinates of (x′1, y′1), (x′2, y′2), and (x′3, y′3), and three carbon line spots S1, S2, and S3 are marked from the three regions, and the coordinates of the three carbon line spots S1, S2, and S3 are (x1, y1), (x2, y2), and (x3, y3), respectively;

[0034] Processing module, used to create two systems of equations

[0035] Solving these two equations, we can obtain {α, β, γ} and

[0036] The correction module is used to obtain the coordinates (x, y) of the line spot corresponding to the target element in the theoretical spectrum. The coordinates of the target element in the second spectrum to be processed taken by the spectrometer are:

[0037] In this embodiment, the first spectrum to be processed is obtained by the following method: performing an ICP ignition test, introducing a pure water blank sample, and controlling the spectrometer to take pictures.

[0038] In this embodiment, both the first to-be-processed spectrum image and the theoretical spectrum image are grayscale images.

[0039] In this embodiment, the initialization module is further used to: mark three areas from the first spectrum image to be processed, and perform the following processing on each pixel point P in the three areas: Where T is the threshold value, and T>0, e is a natural constant, p' is the gray value of the pixel P before modification, Num=2 L -1, L is the maximum binary length of the grayscale value of the pixel point in the first spectrum image to be processed, and then the grayscale value of the pixel point P is modified to Q.

[0040] In this embodiment, L=16.

[0041] It should be understood that although this specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each implementation mode may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

[0042] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention. They are not intended to limit the scope of protection of the present invention. Any equivalent implementation methods or changes that do not deviate from the technical spirit of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for processing an image captured by a spectrometer comprising a SCMOS camera, characterized in that: The following steps are involved: Obtain the first spectrum to be processed, the theoretical spectrum, and the three carbon line spots S′1, S′2, and S′3 in the theoretical spectrum taken by the spectrometer. The coordinate systems corresponding to the first spectrum to be processed and the theoretical spectrum are the same. The coordinates of the three carbon line spots S′1, S′2, and S′3 are (x′1, y′1), (x′2, y′2), and (x′3, y′3), respectively. Mark three areas from the first spectrum to be processed, and perform the following processing on each pixel point P in the three areas: Where T is the threshold value, and T>0, e is a natural constant, p' is the gray value of the pixel P before modification, Num=2 L -1, L is the maximum binary length of the grayscale value of the pixel point in the first spectrum map to be processed, and then the grayscale value of the pixel point P is modified to Q, the three regions respectively contain three pixels with coordinates (x′1, y′1), (x′2, y′2) and (x′3, y′3), and three carbon line spots S1, S2 and S3 are marked from the three regions, and the coordinates of the three carbon line spots S1, S2 and S3 are (X1, y1), (x2, y2) and (X3, y3), respectively. The first spectrum map to be processed and the theoretical spectrum map are both grayscale maps; Create two systems of equations Solving these two equations, we obtain {α, β, γ} and Obtain the coordinates (x, y) of the line spot corresponding to the target element in the theoretical spectrum. Then the coordinates of the target element in the second spectrum to be processed taken by the spectrometer are:

2. The processing method according to claim 1, characterized in that: The first spectrum to be processed is obtained by the following method: performing an ICP ignition test, introducing a pure water blank sample, and controlling the spectrometer to take pictures.

3. The processing method according to claim 1, characterized in that: L=16。 4. A device for processing images captured by a spectrometer including a SCMOS camera, characterized in that: Includes the following modules: An initialization module is used to obtain the first spectrum to be processed, the theoretical spectrum, and the three carbon line spots S′1, S′2, and S′3 in the theoretical spectrum taken by the spectrometer. The coordinate systems corresponding to the first spectrum to be processed and the theoretical spectrum are the same. The coordinates of the three carbon line spots S′1, S′2, and S′3 are (x′1, y′1), (x′2, y′2), and (x′3, y′3), respectively; mark three areas from the first spectrum to be processed, and perform the following processing on each pixel point P in the three areas: Where T is the threshold value, and T>0, e is a natural constant, p' is the gray value of the pixel P before modification, Num=2 L -1, L is the maximum binary length of the grayscale value of the pixel point in the first spectrum map to be processed, and then the grayscale value of the pixel point P is modified to Q, the three regions respectively contain three pixels with coordinates (X1, y1), (X2, y2) and (X3, y3), and three carbon line spots S1, S2 and S3 are marked from the three regions, and the coordinates of the three carbon line spots S1, S2 and S3 are (X1, y1), (x2, y2) and (X3, y3), respectively. The first spectrum map to be processed and the theoretical spectrum map are both grayscale maps; Processing module, used to create two systems of equations Solving these two equations, we obtain {α, β, γ} and The correction module is used to obtain the coordinates (x, y) of the line spot corresponding to the target element in the theoretical spectrum. The coordinates of the target element in the second spectrum to be processed taken by the spectrometer are:

5. The processing device according to claim 4, characterized in that The first spectrum to be processed is obtained by the following method: performing an ICP ignition test, introducing a pure water blank sample, and controlling the spectrometer to take pictures.

6. The processing device according to claim 4, characterized in that: L=16。

Citation Information

Patent Citations

  • Photovoltaic panel hot spot positioning method and system

    CN111860404A