Light spot centroid extraction method based on multi-exposure accumulative fusion

Through the multi-exposure cumulative fusion method, dynamically adjust the exposure parameters, collect and superimpose the spectrogram, the problem of inaccurate spot center of mass positioning in the middle-step grating spectrometer is solved, and high-precision spot center of mass extraction and weak signal detection are achieved.

CN120411207APending Publication Date: 2025-08-01CHINA JILIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510485137.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the traditional single-shot exposure mode, there is a limited dynamic range and poor exposure time adaptability in the intermediate-step grating spectrometer, resulting in inaccurate center of mass positioning of the spot and difficulty in taking into account multiple spots with significant intensity differences, which can easily lead to missed judgment or center of mass extraction errors.

Method used

The multi-exposure cumulative fusion method is used to dynamically determine the optimal initial exposure parameters, collect multi-exposure spectrograms and perform superposition processing, and combine signal-to-noise ratio and pixel value judgment, and mercury lamps are used to verify the center of mass position of the spot.

Benefits of technology

It improves the accuracy of the position of the spot center of mass, shortens the spectrum acquisition time, improves the detection ability of weak signals, and optimizes the signal-to-noise ratio and coordinate positioning accuracy of the spot center of mass.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411207A_ABST
    Figure CN120411207A_ABST
Patent Text Reader

Abstract

The invention discloses a light spot centroid extraction method based on multi-exposure accumulative fusion, which belongs to the technical field of spectrometers, and comprises the following steps: dynamically determining the initial exposure time of a CMOS camera according to the property of a detector; the CMOS camera dynamically collects a multi-exposure spectrogram based on the initial exposure time; carrying out superposition and preprocessing on the multi-exposure spectrogram; extracting a light spot centroid based on the superposed and preprocessed multi-exposure spectrogram; a mercury lamp is used as a light source to verify the mass center position of the light spot. By the adoption of the method, the spectrogram collecting and processing speed is increased, the accuracy of determining the mass center position of the light spot is improved, and the weak signal detection capacity is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of spectrometers, and in particular to a method for extracting the centroid of a light spot based on multi-exposure cumulative fusion. Background Art

[0002] A spectrometer determines the composition of a substance to be measured by identifying the wavelength information of light. As one of the main spectral analysis instruments in recent years, an echelle grating spectrometer is a high-resolution spectral instrument based on cross-dispersion, which uses both a prism and an echelle grating for dispersion. The research on echelle spectrometers originated more than 70 years ago. Early echelle spectrometers were mainly used for the study of astrophysical plasmas. Echelle grating spectrometers have the advantages of a wide measurement band, high spectral resolution, small size, non-destructive and non-contact, and fast single-exposure detection speed. At present, echelle grating spectrometers are widely used in environmental detection, semiconductor testing, and material composition detection, and have become important in modern spectral analysis. The spectral image acquisition of echelle grating spectrometers mostly adopts the mode of using a large-area array camera to capture spectral images under a long exposure time. In the process of constructing a one-dimensional spectral image, it is necessary to accurately identify the position of the effective light spot and determine its coordinates. The setting of the exposure parameters and the accuracy of the light spot centroid coordinate positioning will directly affect the accuracy of the one-dimensional spectral image. The traditional single-exposure mode has limitations: 1) The dynamic range is limited. If the initial exposure time is not selected properly, it will result in large time loss, low capture efficiency, and large errors in the spectral image light intensity. 2) The adaptability of the exposure time is poor. If the selected exposure time is too short, the effective light spot signal will be weak and submerged in the noise, making it difficult to be effectively identified; if the exposure time is too long, the problem of overexposure of the light spot will occur, resulting in deviation in the positioning of the light spot centroid. For most position cameras, the single-exposure mode cannot take into account multiple light spots with significantly different intensities, easily causing missed judgment of light spots or incorrect extraction of centroids. Summary of the Invention

[0003] The purpose of the present invention is to provide a method for extracting the centroid of a light spot based on multi-exposure cumulative fusion. By dynamically determining the optimal initial exposure parameters, collecting multi-exposure spectral images based on the initial exposure parameters, and performing multi-frame data superposition on the saved spectral images, the accuracy of determining the centroid position of the light spot is improved, the speed of spectral image acquisition and processing is accelerated, and the detection ability of weak signals is enhanced.

[0004] To achieve the above purpose, the present invention provides a method for extracting the centroid of a light spot based on multi-exposure cumulative fusion, and the steps include:

[0005] S1. Dynamically determine the initial exposure time of the CMOS camera according to the properties of the detector;

[0006] S2. The CMOS camera dynamically collects multi-exposure spectral images based on the initial exposure time;

[0007] S3. Superimpose and preprocess the multi-exposure spectrograms;

[0008] S4. Extract the centroid of the light spot based on the superimposed and preprocessed multi-exposure spectrograms;

[0009] S5. Use a mercury lamp as the light source to verify the position of the centroid of the light spot.

[0010] Preferably, step S1 specifically includes:

[0011] Adopt a binary search iterative strategy to adjust the exposure time. For each captured spectrogram, interpret the spectrogram. If no saturated pixels are identified in the current spectrogram, extend the exposure time backward; if saturated pixels are detected, shorten the exposure time forward;

[0012] Combined with the pixel value and the signal-to-noise ratio, when no pixels reach saturation and the signal-to-noise ratio of the light spot is higher than the critical threshold, use this time as the initial exposure time.

[0013] Preferably, when adopting the binary search iterative strategy to adjust the exposure time, set the total exposure time range to 0 - 5000 ms, the initial exposure time to 2500 ms, and the signal-to-noise ratio not less than 10.

[0014] Preferably, step S2 specifically includes:

[0015] The CMOS camera automatically captures the spectrograms and performs real-time interpretation to detect whether there are saturated pixels in the spectrograms. If saturated pixels are first detected inside the light spot, directly save the spectrogram of the 10 ms before the current exposure time; if saturated pixels are detected inside the light spot not for the first time, if the spatial distance between the current saturated pixels and the historical light spot does not exceed 5 pixels, consider this saturated pixel as the time-domain evolution of the same light spot and do not save the current spectrogram; if the detected saturated pixels exceed the spatial distance threshold, determine it as a new saturated light spot and save the spectrogram of the 10 ms before the current exposure time;

[0016] Detect the number of light spots. If the number of light spots increases at adjacent exposure moments, continue to extend the exposure time to detect weak signals. If the number of light spots no longer increases, end the capture of the spectrograms and output the n saved spectral images for subsequent spectrogram processing.

[0017] Preferably, when the CMOS camera automatically captures the spectrograms, incremental exposure is performed at a time interval of 5 ms.

[0018] Preferably, step S3 specifically includes: superimpose the pixel values of the n saved spectrograms to generate an aggregated two-dimensional spectrogram, and normalize and denoise the two-dimensional spectrogram.

[0019] Preferably, step S4 specifically includes:

[0020] Set window discrimination conditions according to the signal spot dispersion characteristics. If the full width at half maximum of the spot does not exceed 3 pixels, use the discrete particle model; if the full width at half maximum of the spot is greater than 3 pixels, use the continuous mass distribution model, and each detection window only contains one spot signal;

[0021] Discriminate the spot detection window. If the central pixel value is higher than the neighborhood mean and the cumulative pixel value of the pixel area exceeds the sum of the adjacent areas, it is determined as a valid spot; otherwise, it is an invalid spot. Among them, the central pixel point of the valid spot is the pixel where the intensity maximum value of the spot is located, and the coordinate position of the spot centroid is extracted according to the pixel where the maximum value is located.

[0022] Preferably, step S5 specifically includes:

[0023] S51. Construct a spectral graph model based on the spot centroid position and extract the characteristic wavelength;

[0024] S52. Use a mercury lamp as the light source to collect the mercury lamp spectral graph, construct a mercury lamp spectral graph model, and extract the mercury lamp characteristic wavelength;

[0025] S53. Compare the characteristic wavelength obtained in step S51 with the mercury lamp characteristic wavelength obtained in step S52, calculate the average extraction error value, and verify the spot centroid position according to the average extraction error value.

[0026] Therefore, the present invention adopts the above-mentioned method for extracting the spot centroid based on multi-exposure cumulative fusion, and has the following beneficial effects:

[0027] (1) Adopt the FPGA timing control architecture to realize the automatic exposure management of the CMOS camera, dynamically determine the optimal initial exposure time, reduce manual intervention, shorten the spectral acquisition time, and ensure the spectral accuracy;

[0028] (2) Suppress the exposure time when dynamically collecting multi-exposure spectral graphs, reducing the missed detection rate at low exposure times;

[0029] (3) Combine linear normalization, smooth spatial filtering and threshold processing to greatly suppress noise and optimize the signal-to-noise ratio;

[0030] (4) Realize sub-pixel level positioning of the spot centroid coordinates through dynamic window discrimination and spot number statistics strategy;

[0031] (5) Dynamically determine the optimal initial exposure parameters, collect multi-exposure spectral graphs based on the initial exposure parameters, and perform multi-frame data superposition on the saved spectral graphs, improving the accuracy of determining the spot centroid position, accelerating the speed of spectral graph acquisition and processing, and enhancing the detection ability of weak signals.

[0032] The technical solution of the present invention will be further described in detail below through the drawings and embodiments. Brief Description of the Drawings

[0033] Figure 1 is the flowchart of the method according to the embodiment of the present invention;

[0034] Figure 2 is the flowchart of collecting multi-exposure spectrograms according to the embodiment of the present invention;

[0035] Figure 3 is the diagram of spot centroid extraction according to the embodiment of the present invention;

[0036] Figure 4 is the mercury lamp spectrogram according to the embodiment of the present invention. Detailed Embodiments

[0037] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Components of the embodiments of the present invention generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the inventive product is customarily placed during use. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention.

[0038] Embodiment

[0039] Referring to Figure 1 , the present invention provides a method for extracting spot centroid based on multi-exposure cumulative fusion, and the steps include:

[0040] S1. Dynamically determine the initial exposure time of the CMOS camera according to the properties of the detector.

[0041] In this embodiment, the CMOS camera is an eight-bit camera, and the pixel intensity range is 0-255. If a pixel value reaches 255 within a single spot in the spectrogram, it means that this spot is saturated. If there are two or more pixel saturations within a single spot, it is regarded as overexposure.

[0042] Implement automatic exposure management for CMOS cameras using an FPGA timing control architecture to improve the efficiency of spectral image acquisition. To adapt to the spectral detection requirements in complex application environments, a binary search iterative strategy is adopted to adjust the exposure time. Given a total exposure time range of 0 - 5000 ms as the search interval and an initial exposure time of 2500 ms, for each captured spectral image, the background program interprets the spectral image. If no saturated pixels are identified in the current spectral image, the exposure time is extended backward; if saturated pixels are detected, the exposure time is shortened forward.

[0043] Since the detection threshold of the spot signal is related to the signal-to-noise ratio, and the signal intensity must be greater than the noise intensity. Considering the reliability in practical applications, the signal-to-noise ratio is set to be greater than or equal to 10, and the signal can be reliably detected and extracted. Combining the pixel value and the signal-to-noise ratio, when no pixels reach saturation and the spot signal-to-noise ratio is higher than the critical threshold, this time is used as the initial exposure time t1.

[0044] S2. The CMOS camera dynamically acquires multi-exposure spectral images based on the initial exposure time, as Figure 2 shown.

[0045] In this embodiment, after determining the initial exposure time, the system enters the dynamic spectral acquisition stage. An incremental exposure is performed at 5 ms time intervals, which can effectively avoid uneven detector response. The CMOS camera automatically captures spectral images and performs real-time interpretation to detect whether there are saturated pixels in the spectral images. If so, there are two cases: (1) When saturated pixels are first detected inside the spot, directly save the spectral image 10 ms before the current exposure time; (2) When saturated pixels are detected inside the spot non-first time, there are also two cases: 1. If the spatial distance between the current saturated pixels and the historical spot does not exceed 5 pixels, it is considered that this saturated pixel is the time-domain evolution of the same spot, and the current spectral image is not saved; 2. If the detected saturated pixels exceed the spatial distance threshold, it is determined as a new saturated spot, and the spectral image 10 ms before the current exposure time is saved.

[0046] Detect the number of spots. The percentage method threshold processing is used to achieve accurate identification and statistics of the spot contours. The background area below the threshold is set to 0, and only the effective spot signals are set to 1. The threshold-processed image is binarized so that all pixel values are distributed between 0 or 1, strengthening the contrast between the background area and the effective spots. The contour detection algorithm is used to detect all spot contours in the binary image, and the number of spots is counted through the number of detected contours. The contour detection algorithm is the cv2.findContours() function in Opencv. If the number of spots increases at adjacent exposure times, continue to extend the exposure time to detect weak signals. If the number of spots no longer increases, end the capture of spectral images and output the n spectral images saved for subsequent spectral image processing.

[0047] S3. Superimpose and preprocess the multi-exposure spectrograms.

[0048] In this embodiment, the n spectrograms saved are superimposed in terms of pixel values to generate an aggregated two-dimensional spectrogram. For the original data contaminated with interference information such as noise and background, it directly affects the accuracy and results of spectrogram processing. To improve the quality of spectrogram processing, first, the pixel values are placed between 0 and 1 through linear normalization, thereby eliminating the dimensional difference and making the data comparable and consistent. Then, a smooth linear spatial filter is used to perform secondary processing on the spectrogram. By performing a convolution operation on the image and weighted averaging of the local neighborhood, the overall structure and shape of the two-dimensional spectrogram can be maintained, and background noise can be effectively removed. After maximizing the removal of background noise, by inversely applying the linear normalization formula, the pixel values are mapped back to the original range using coordinates.

[0049] S4. Extract the centroid of the light spot based on the superimposed and preprocessed multi-exposure spectrograms.

[0050] In this embodiment, the window discrimination condition is set according to the diffusion characteristics of the signal light spot. The detection window contains all the effective light intensity information of the light spot. For different light spot distribution forms, automatic window selection is adopted: if the full width at half maximum of the light spot does not exceed 3 pixels, a discrete particle model is used; if the full width at half maximum of the light spot is greater than 3 pixels, a continuous mass distribution model is used, and each detection window contains only one light spot signal, which can reduce the computational amount and improve the computational efficiency while accurately discriminating the signal light spot.

[0051] The light spot detection window is discriminated. If the central pixel value is higher than the neighborhood mean value and the cumulative value of the pixels in the pixel region exceeds the sum of the adjacent regions, it is determined as a valid light spot; otherwise, it is an invalid light spot. Among them, the central pixel point of the valid light spot is the pixel where the intensity maximum value of the light spot is located, and the coordinate position of the light spot centroid is extracted according to the pixel where the maximum value is located, as Figure 3 shown.

[0052] S5. Use a mercury lamp as a light source to verify the position of the light spot centroid.

[0053] In this embodiment, step S5 specifically includes:

[0054] S51. Construct a spectrogram model based on the position of the light spot centroid and extract the characteristic wavelength;

[0055] S52. Use a mercury lamp as a light source to collect the mercury lamp spectrogram, construct a mercury lamp spectrogram model, and extract the mercury lamp characteristic wavelength.

[0056] The premise of identifying the mercury lamp characteristic wavelength is to ensure that the actually captured mercury lamp spectrogram is consistent with the origin of the spectrogram model in the grating direction and the prism direction. If they are inconsistent, the algorithm model needs to be flipped. The mercury lamp spectrogram is as Figure 4As shown, since the spectral intensity of 253.652 nm in the characteristic wavelength of the mercury lamp is the strongest, during short-time exposure, the spot brightness of it is the strongest, representing the strongest light intensity. In addition, the spectral intensity of the characteristic wavelength of 407 nm is the weakest. Even during long-time exposure, its spot brightness is relatively weak and the light intensity is the lowest. Relying on this advantage of the mercury lamp, the origin of the spectral model in S1 and the mercury lamp spectral model in S2 are automatically corresponded. After the flipping is completed, the deviation of the coordinates of the spectral model in S1 and the mercury lamp spectral model in S2 is within a certain range. Search for the coordinates of the characteristic wavelength in the spectral model in S1. Taking this coordinate as the center, establish a 13×13 window. Search for the maximum value at this window as the coordinates of each characteristic wavelength of the mercury lamp spectral model in S2, and complete the identification of the characteristic wavelength of the mercury lamp. Among them, typical spectral lines such as 253.7 nm, 365.4 nm, 404.7 nm, 546.1 nm, and 577.0 nm show a wide-domain distribution on the detector image plane.

[0057] In addition, if the maximum value of the light intensity in the window is not unique, it can be judged that the exposure time during shooting is too long, and the correct extraction of the wavelength and light intensity cannot be completed.

[0058] S53. Compare the characteristic wavelength obtained in step S51 with the characteristic wavelength of the mercury lamp obtained in step S52. The characteristic wavelengths and the error values are shown in Table 1. Calculate the average extraction error value, and verify the position of the spot centroid according to the average extraction error value. The experimental results show that the average extraction error of the multi-exposure cumulative fusion method proposed in this scheme is 0.011 nm, and the deviation is less than 2 pixels, verifying the accuracy of the spot centroid position.

[0059] Table 1 Wavelength extraction accuracy

[0060]

[0061]

[0062] Therefore, the present invention adopts the above-mentioned method for extracting the spot centroid based on multi-exposure cumulative fusion. By dynamically determining the optimal initial exposure parameters, collecting multi-exposure spectral diagrams based on the initial exposure parameters, and performing multi-frame data superposition on the saved spectral diagrams, the accuracy of determining the spot centroid position is improved, the speed of spectral diagram acquisition and processing is accelerated, and the detection ability of weak signals is enhanced.

[0063] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that they can still modify or equivalently replace the technical solutions of the present invention, and these modifications or equivalent replacements cannot make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for extracting the centroid of a light spot based on multi-exposure cumulative fusion, characterized in that the steps Including: S1. Dynamically determine the initial exposure time of the CMOS camera according to the detector properties; S2. The CMOS camera dynamically acquires multi-exposure spectrograms based on the initial exposure time; S3. Perform superposition and preprocessing on the multi-exposure spectrograms; S4. Extract the spot centroid based on the multi-exposure spectrograms after superposition and preprocessing; S5. Use a mercury lamp as a light source to verify the position of the spot centroid.

2. The method for extracting the centroid of a light spot based on multi-exposure cumulative fusion according to claim 1, wherein Step S1 specifically includes: Adopt a binary search iterative strategy to adjust the exposure time. For each captured spectrogram, interpret the spectrogram. If no saturated pixels are identified in the current spectrogram, extend the exposure time backward; if saturated pixels are detected, shorten the exposure time forward; Combined with the pixel value and the signal-to-noise ratio, when no pixels reach saturation and the signal-to-noise ratio of the spot is higher than the critical threshold, use this time as the initial exposure time.

3. The method for extracting the centroid of a light spot based on multi-exposure cumulative fusion according to claim 2, wherein: When adopting the binary search iterative strategy to adjust the exposure time, set the total exposure time range to 0 - 5000 ms, the initial exposure time to 2500 ms, and the signal-to-noise ratio not less than 10.

4. A method for extracting the centroid of a light spot based on multi-exposure cumulative fusion according to claim 1, characterized in that, Step S2 specifically includes: The CMOS camera automatically captures spectrograms and performs real-time interpretation, detecting whether there are saturated pixels in the spectrograms. If saturated pixels are first detected inside the spot, directly save the spectrogram 10 ms before the current exposure time; if saturated pixels are detected inside the spot not for the first time, if the spatial distance between the current saturated pixels and the historical spot does not exceed 5 pixels, consider this saturated pixel as the time-domain evolution of the same spot and do not save the current spectrogram; if the detected saturated pixels exceed the spatial distance threshold, it is determined as a new saturated spot, and save the spectrogram 10 ms before the current exposure time; Detect the number of spots. If the number of spots increases at adjacent exposure times, continue to extend the exposure time to detect weak signals. If the number of spots no longer increases, end the capture of spectrograms and output the n saved spectral images for subsequent spectrogram processing.

5. A method for extracting the centroid of a light spot based on multi-exposure cumulative fusion according to claim 4, characterized in that: When the CMOS camera automatically captures spectrograms, it performs incremental exposure at a time interval of 5 ms.

6. A method for extracting the centroid of a light spot based on multi-exposure cumulative fusion according to claim 4, characterized in that, Step S3 specifically includes: Superimpose the pixel values of the n saved spectrograms to generate an aggregated two-dimensional spectrogram, and perform normalization and denoising on the two-dimensional spectrogram.

7. A method for extracting the centroid of a light spot based on multi-exposure cumulative fusion according to claim 1, characterized in that Step S4 specifically includes: Set window discrimination conditions according to the signal spot dispersion characteristics. If the full width at half maximum of the spot does not exceed 3 pixels, adopt a discrete particle model; if the full width at half maximum of the spot is greater than 3 pixels, adopt a continuous mass distribution model, and each detection window only contains one spot signal; Discriminate the spot detection window. If the central pixel value is higher than the neighborhood mean and the cumulative value of the pixels in the pixel region exceeds the sum of the adjacent regions, it is determined as a valid spot; otherwise, it is an invalid spot; among them, the central pixel point of the valid spot is the pixel where the intensity maximum value of the spot is located, and the coordinate position of the spot centroid is extracted according to the pixel where the maximum value is located.

8. A method for extracting the centroid of a light spot based on multi-exposure cumulative fusion according to claim 1, characterized in that, Step S5 specifically includes: S51. Construct a spectrogram model based on the spot centroid position and extract the characteristic wavelength; S52. Use a mercury lamp as a light source to collect the mercury lamp spectrogram, construct a mercury lamp spectrogram model, and extract the mercury lamp characteristic wavelength; S53. Compare the characteristic wavelengths obtained in step S51 with the characteristic wavelengths of the mercury lamp obtained in step S52, calculate the average extraction error value, and verify the centroid position of the light spot based on the average extraction error value.