A method, device, computer equipment and medium for acquiring light source spectrum image

By acquiring the peak curve and shape curve of the echo spectrum image in the spectral confocal measurement system, reassigning the value to form the light source spectrum image, solving the problem of introducing additional optical paths, realizing high-precision light source spectrum image acquisition, simplifying operation and reducing The cost.

CN115235626BActive Publication Date: 2024-12-24武汉德立赛科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110434900.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-22
Publication Date
2024-12-24
Estimated Expiration
2041-04-22

AI Technical Summary

Technical Problem

Existing spectral confocal measurement systems require additional optical paths when acquiring spectral images of light sources, resulting in complex operations and increased accuracy and increased costs.

Method used

By obtaining multiple echo spectral images of standard measurements in the online dispersion spectral confocal system, using the changes in the eigenvalue and shape curve of the echo peak curve, the reassignment transition area forms a light source spectral image, avoiding the introduction of additional optical paths.

Benefits of technology

It simplifies the operation process, improves the accuracy of the light source spectral image, reduces costs, and enhances the stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115235626B_ABST
    Figure CN115235626B_ABST
Patent Text Reader

Abstract

The invention discloses a method for acquiring a light source spectrum image, comprising the following steps: S1 acquiring a plurality of second-class echo spectrum images and corresponding measurement positions of a standard measurement object within a measurement width range of a line dispersion spectrum confocal system; S2 acquiring a second-class echo peak curve corresponding to each second-class echo spectrum image, wherein each second-class echo peak curve is characterized by a combination of a corresponding characteristic value and a standard shape curve, the standard shape curve is a one-dimensional curve with a fixed shape, and the characteristic value represents a curve offset of each second-class echo peak; S3 extracting a transition area between adjacent second-class echo peak curves and reassigning a transition area value, fusing the reassigned transition area with the second-class echo peak curve to form a light source spectrum image, wherein the method acquires the corresponding light source spectrum image based on an existing line dispersion spectrum confocal measurement system without introducing an additional optical path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of spectral confocal measurement, and in particular relates to a method, a device, a computer device and a storage medium for acquiring a light source spectral image. Background Art

[0002] The non-contact measurement method uses electromagnetics, photoelectricity, ultrasound and other means to measure without contacting the surface of the object to be measured, thereby obtaining information about the surface of the object. Optical measurement methods include structured light, laser triangulation, interferometry and spectral confocal measurement. Among them, the spectral confocal measurement method has been well developed and widely used in recent years due to its advantages such as sub-micron measurement accuracy, adaptability to a variety of materials including glass and metal, and multi-layer thickness measurement.

[0003] Linear dispersion spectral confocal technology realizes linear close arrangement of measurable points on the basis of traditional single-point spectral confocal technology. Similar to the measurement principle of single-point spectral confocal technology, linear dispersion spectral confocal technology also uses the light waves projected onto the surface of the object to calculate the distance of the object from the measurement system by judging the peak wavelength in the echo signal. Ideally, when the spectrum of the projected light source has the same intensity at each wavelength position, the peak wavelength of the echo signal collected by the system from the surface of the object directly corresponds to the distance. However, in reality, such an ideal light source does not exist. The actual light source spectrum has different intensity responses at different wavelength positions, and the light intensity distribution of the spectrum is uneven. In this way, the echo spectrum light intensity distribution curve obtained in the actual measurement is not a true confocal curve, and the corresponding peak wavelength is not the confocal wavelength.

[0004] As mentioned above, since the real echo confocal curve is modulated by the light source spectrum, when actually calculating the distance, it is necessary to normalize the echo spectrum intensity distribution curve by dividing it by the light source spectrum distribution curve. Therefore, the light source spectrum distribution curve is a link that must be measured. In the implementation of spectral confocal, considering the modulation effect of the confocal system on the light source, it is generally obtained by obtaining the light source spectrum image after passing through the linear dispersion spectral confocal system, and then extracting the light source spectrum distribution curve from the light source spectrum image.

[0005] At present, an additional optical path is usually added to the online dispersive spectral confocal system to obtain the light source spectrum image, thereby extracting the light source spectrum distribution curve to measure the light source spectrum image. Although adding an additional optical path to the online dispersive spectral confocal system can realize the measurement of the light source spectrum image, its operation is complicated. At the same time, the optical distortion and adjustment error introduced by the additional optical path will affect the accuracy of the obtained light source spectrum image. In addition, the introduction of the additional optical path will also increase the cost. Summary of the invention

[0006] The purpose of the present invention is to provide a method for acquiring a light source spectrum image, which can acquire a light source spectrum image based on an existing linear dispersion spectrum confocal measurement system without introducing an additional optical path, and meet the subsequent echo position calibration and echo spectrum intensity distribution curve normalization requirements, thereby reducing the complexity of the operation.

[0007] To achieve the above object, the present invention provides a method for measuring a standard measurement object via a linear dispersion spectral confocal system to obtain a light source spectrum image of the linear dispersion spectral confocal system, comprising the following steps:

[0008] S1 obtains a plurality of second-type echo spectrum images and corresponding measurement positions of a standard measurement object within a measurement width range of a linear dispersion spectrum confocal system, wherein the echo peak positions of the plurality of second-type echo spectrum images are sequentially moved along a preset direction and cover the measurement width range of the linear dispersion spectrum confocal system, and the preset direction is a direction perpendicular to a close-packed direction of the linear dispersion spectrum confocal system;

[0009] S2 obtains a second-type echo peak curve corresponding to each second-type echo spectrum image, wherein each second-type echo peak curve is characterized by a combination of a corresponding characteristic value and a standard shape curve, wherein the standard shape curve is a preset fixed-shape curve representing the curvature of the second-type echo peak curve; the characteristic value is related to the measurement position, representing the curve offset of each second-type echo peak;

[0010] S3 extracts the transition area between adjacent second-type echo peak curves and reassigns the grayscale value of each pixel in the transition area, and fuses the reassigned transition area and the second-type echo peak curve to form a light source spectrum image.

[0011] Preferably, in step S2, the characteristic value corresponding to each second-type echo spectrum image is determined based on the measurement position corresponding to each second-type echo spectrum image and a preset fitting function, and the fitting function is a fitting relationship function between the measurement position and the characteristic value.

[0012] Furthermore, in step S2, obtaining the fitting function includes the following steps:

[0013] S21 acquires first-type echo spectrum images of the standard measurement object at different measurement positions within the measurement width range of the online dispersive spectrum confocal system, wherein the echo peak positions of a plurality of the first-type echo spectrum images move sequentially along a preset direction within the measurement width range of the online dispersive spectrum confocal system;

[0014] S22 obtains a first-type echo peak curve corresponding to each of the first-type echo spectrum images;

[0015] S23: characterizing each first-type echo peak curve as a combination of a characteristic value and a standard shape curve based on a preset rule, wherein the characteristic value is related to the measurement position and represents a curve offset of each first-type echo peak, and the standard shape curve is a preset fixed-shape curve and represents a curvature of the first-type echo peak curve;

[0016] S24 establishes a fitting function between the plurality of characteristic values ​​and the corresponding plurality of measurement positions.

[0017] Furthermore, the acquisition of the first type echo peak curve includes the following steps:

[0018] S21 obtains all pixel rows of the first type echo spectrum along a preset direction, and obtains the row peak pixel in each pixel row;

[0019] S22: arranging the pixel points corresponding to the row peak pixels into a column matrix along the densely packed direction to form a first type echo peak curve;

[0020] or S21′ obtains all pixel columns of the first type echo spectrum along a preset direction, and obtains the column peak pixel in each pixel column;

[0021] S22′ organizes the pixel points corresponding to the column peak pixels into a row matrix along the densely packed direction to form a first type echo peak curve.

[0022] Furthermore, in the step S22 / S22', after obtaining the column matrix / row matrix, a step of smoothing the column matrix / row matrix is ​​also included to remove erroneous pixels.

[0023] Preferably, in step S1, two adjacent second-category echo spectrum images are partially overlapped.

[0024] Furthermore, the width of the overlapping portion of the two echo spectrum images is smaller than the moving distance setting of adjacent echo spectrum images.

[0025] Preferably, the step S3 of reassigning the grayscale value of each pixel in the transition area comprises the following steps:

[0026] S31 obtains the pixel gray value G of each pixel position in the overlapping area of ​​adjacent echo spectrum images on the two echo spectrum images. 1n , G 2n , and the distance L between each pixel and the center point of the adjacent echo peak curve 1n , L 2n ;

[0027] S32 is based on the pixel gray value G 1n , G 2nand L 1n , L 2n The size of is used to reassign the grayscale value of each pixel in the transition area.

[0028] The present invention also discloses a light source spectrum image acquisition device, comprising:

[0029] a second-class echo spectrum image acquisition module, used for acquiring a plurality of second-class echo spectrum images and corresponding measurement positions of a standard measurement object within the measurement width range of a linear dispersion spectrum confocal system, wherein the echo peak positions of the plurality of second-class echo spectrum images are sequentially moved along a preset direction and cover the measurement width range of the linear dispersion spectrum confocal system, and the preset direction is a direction perpendicular to the close-packed direction of the linear dispersion spectrum confocal system; a second-class echo peak curve acquisition module, used for acquiring a second-class echo peak curve corresponding to each second-class echo spectrum image, wherein each second-class echo peak curve is characterized by a combination of a corresponding characteristic value and a standard shape curve, and the standard shape curve is a preset fixed-shape curve representing the curvature of the second-class echo peak curve; the characteristic value is related to the measurement position, and represents the curve offset of each second-class echo peak;

[0030] The light source spectrum image acquisition module is used to extract the transition area between adjacent second-type echo peak curves and reassign the grayscale value of each pixel in the transition area, and fuse the reassigned transition area and the second-type echo peak curve to form a light source spectrum image.

[0031] Preferably, the second-type echo spectrum image acquisition module includes an eigenvalue calculation submodule, which is used to determine the eigenvalue corresponding to each second-type echo spectrum image based on the measurement position corresponding to each second-type echo spectrum image and a preset fitting function, wherein the fitting function is a fitting relationship function between the measurement position and the eigenvalue.

[0032] Furthermore, the second type echo spectrum image acquisition module also includes a fitting function acquisition submodule, and the fitting function acquisition submodule includes:

[0033] A first-type echo spectrum image acquisition unit is used to acquire first-type echo spectrum images at different measurement positions of the standard measurement object within the measurement width range of the online dispersive spectrum confocal system, wherein the echo peak positions of a plurality of the first-type echo spectrum images are moved sequentially along a preset direction within the measurement width range of the online dispersive spectrum confocal system;

[0034] A first-category echo peak curve acquisition unit, used for acquiring a first-category echo peak curve corresponding to each of the first-category echo spectrum images;

[0035] a splitting unit, configured to characterize each of the first-category echo peak curves as a combination of a characteristic value and a standard shape curve based on a preset rule, wherein the characteristic value is related to the measurement position and represents a curve offset of each of the first-category echo peaks, and the standard shape curve is a preset fixed-shape curve and represents a degree of curvature of the first-category echo peak curve;

[0036] The fitting function acquisition unit is used to establish a fitting function between the plurality of characteristic values ​​and the corresponding plurality of measurement positions based on the plurality of characteristic values.

[0037] Furthermore, the first type echo peak curve acquisition unit includes:

[0038] A row peak pixel acquisition subunit is used to acquire all pixel rows of the first type echo spectrogram along a preset direction, and acquire the row peak pixel in each pixel row;

[0039] and a first-type echo peak curve acquisition subunit, used for forming a column matrix of pixel points corresponding to the row peak pixels along their densely packed direction to form a first-type echo peak curve;

[0040] Or the first type echo peak curve acquisition unit includes:

[0041] A column peak pixel acquisition subunit is used to acquire the first type of echo spectrogram / all pixel columns along a preset direction, and acquire the column peak pixel in each pixel column;

[0042] The first type echo peak curve acquisition subunit is used to form a first type echo peak curve by arranging the pixel points corresponding to the column peak pixels into a row matrix along their dense arrangement direction.

[0043] The first type echo peak curve acquisition unit also includes a correction subunit, which is used for obtaining the column matrix / row matrix and then further includes a step of smoothing the column matrix / row matrix to eliminate erroneous pixels.

[0044] In the second-type echo spectrum image acquisition module, two adjacent second-type echo spectrum images are partially overlapped.

[0045] In the second type echo spectrum image acquisition module, the width of the overlapping portion of two echo spectrum images is smaller than the moving distance setting of adjacent echo spectrum images.

[0046] The light source spectrum image acquisition module includes:

[0047] The parameter acquisition submodule is used to obtain the pixel gray value G of each pixel position in the overlapping area of ​​adjacent echo spectrum images on the two echo spectrum images. 1n , G 2n, and the distance L between each pixel and the center point of the adjacent echo peak curve 1n , L 2n ;

[0048] The assignment submodule is used to assign a value based on the pixel gray value G 1n , G 2n and L 1n , L 2n The size of is used to reassign the grayscale value of each pixel in the transition area.

[0049] The present application also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above methods when executing the computer program.

[0050] The present application also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0051] For a standard measurement object with a high reflectivity, the intensity of its echo spectrum image at the peak position is consistent with the intensity of the light source spectrum image at the corresponding position. When the linear dispersion spectral confocal system and the standard measurement object are relatively displaced in the Z-axis direction, the peak position of the corresponding echo spectrum image is also displaced accordingly.

[0052] The method, device, computer equipment and storage medium for acquiring a light source spectrum image shown in the present invention utilize the peak position variation law of the standard measurement object when it is relatively displaced with the linear dispersion spectrum confocal system to acquire continuous echo spectrum images of the standard measurement object within the measurement width of the linear dispersion spectrum confocal system, and obtain the peak position of each echo spectrum image from these echo spectrum images, and then re-integrate the extracted echo peak positions to form a light source spectrum image corresponding to the linear dispersion spectrum confocal system, so that the corresponding light source spectrum image can be acquired according to the existing linear dispersion spectrum confocal measurement system without introducing an additional optical path. At the same time, the method for acquiring a light source spectrum image shown in the present invention utilizes the variation of the characteristic value to characterize and quantify the movement of the peak shape curve when acquiring the echo peak curve of the second type of echo spectrum image, and then fits the movement direction of the peak curve as the position moves, without the need to calculate each peak position separately according to each echo spectrum image, thereby simplifying the time consumption of the method and enhancing the stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A schematic diagram of the workflow of a method for acquiring a light source spectrum image of the present invention;

[0054] Figure 2It is a schematic diagram of the structure of a moving device for relative positions between a standard measurement object and a linear dispersion spectroscopy confocal system in the Z-axis direction;

[0055] Figure 3 It is a schematic diagram of the echo spectrum image of the standard measurement object;

[0056] Figure 4 It is a schematic diagram of the change of the echo peak shape curve as the position of the standard measurement object moves;

[0057] Figure 5 Schematic diagram of another embodiment of an echo spectrum image of a standard measurement object

[0058] Figure 6 A schematic diagram of a workflow for reassigning a transition area;

[0059] Figure 7 This is a schematic diagram of light source spectrum image fusion of the present invention;

[0060] Figure 8 It is a structural block diagram of an embodiment of a light source spectrum image acquisition device of the present invention;

[0061] Fig. 9 The hardware architecture of one embodiment of the computer device of the present application. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not intended to limit the scope of protection of the present invention in any way.

[0063] Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items. In the drawings, the thickness, size and shape of the objects have been slightly exaggerated for ease of explanation. The drawings are only examples and are not drawn strictly to scale.

[0064] It should also be understood that the terms “comprises,” “including,” “having,” “includes,” and / or “comprising,” when used in this specification, indicate the presence of stated features, steps, integers, operations, elements, and / or parts, but do not exclude the presence or addition of one or more other features, steps, integers, operations, elements, parts, and / or combinations thereof.

[0065] As used in the specification, the terms "substantially," "approximately," and the like are used as terms of approximation rather than degrees, and are intended to account for the inherent variations in measurements or calculations that would be recognized by those of ordinary skill in the art.

[0066] Unless otherwise defined, all terms (including technical terms and scientific terms) used in this article have the same meaning as commonly understood by ordinary technicians in the field to which this application belongs. It should also be understood that terms (such as terms defined in commonly used dictionaries) should be interpreted as having the same meaning as their meaning in the context of the relevant technology, and will not be interpreted in an idealized or overly formal sense unless explicitly defined in this article.

[0067] It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein may be combined with each other.

[0068] like Figure 1 As shown, the present invention discloses a method for acquiring a light source spectrum image of a linear dispersion spectrum confocal system, which measures a standard measurement object via the linear dispersion spectrum confocal system to acquire a light source spectrum image of the linear dispersion spectrum confocal system, comprising the following steps:

[0069] S1 obtains a plurality of second-type echo spectrum images and corresponding measurement positions of a standard measurement object within a measurement width range of a linear dispersion spectrum confocal system, wherein the echo peak positions of the plurality of second-type echo spectrum images are sequentially moved along a preset direction and cover the measurement width range of the linear dispersion spectrum confocal system, and the preset direction is a direction perpendicular to a close-packed direction of the linear dispersion spectrum confocal system;

[0070] S2 obtains a second-type echo peak curve corresponding to each second-type echo spectrum image, wherein each second-type echo peak curve is characterized by a combination of a corresponding characteristic value and a standard shape curve, wherein the standard shape curve is a preset fixed-shape curve representing the curvature of the second-type echo peak curve; the characteristic value is related to the measurement position, representing the curve offset of each second-type echo peak;

[0071] S3 extracts the transition area between adjacent second-type echo peak curves and reassigns the grayscale value of each pixel in the transition area, and fuses the reassigned transition area and the second-type echo peak curve to form a light source spectrum image.

[0072] For a standard measurement object with a high reflectivity, the intensity of its echo spectrum image at the peak position is consistent with the intensity at the corresponding position of the light source spectrum image. When the linear dispersion spectrum confocal system and the standard measurement object are relatively displaced in the Z-axis direction, the peak position of the corresponding echo spectrum image is also displaced accordingly. A method for acquiring a light source spectrum image shown in the present invention utilizes the peak position change law of the standard measurement object when it is relatively displaced with the linear dispersion spectrum confocal system to acquire continuous echo spectrum images of the standard measurement object within the measurement width range of the linear dispersion spectrum confocal system, and acquires the peak position of each echo spectrum image from these echo spectrum images, and then re-integrates the extracted echo peak positions to form a light source spectrum image of the corresponding linear dispersion spectrum confocal system, so that the corresponding light source spectrum image can be acquired based on the existing linear dispersion spectrum confocal measurement system without introducing an additional optical path. At the same time, a method for acquiring a light source spectral image shown in the present invention uses the change in the characteristic value to characterize and quantify the movement of the peak shape curve when acquiring the echo peak curve of the second type of echo spectral image, and then fits the direction of movement of the peak curve as the position moves. There is no need to calculate each peak position separately based on each echo spectral image, which simplifies the time consumption of the method and enhances stability.

[0073] The standard measurement object is a block with high reflectivity and a smooth surface, such as a standard block, a reflector, and a step difference gauge. In this embodiment, the size of the standard measurement object is not less than the length setting of the outgoing light of the linear dispersion spectral confocal system, so as to ensure that each time the echo spectrum image is obtained, the outgoing light can be fully projected onto the standard measurement object and reflected into the spectrometer of the linear dispersion spectral confocal system to finally obtain the echo spectrum image at the corresponding position.

[0074] In step S1, the echo spectrum image obtained each time is as follows: Figure 3 As shown, in order to ensure the integrity of the fused light source spectrum image, it is necessary to ensure that the multiple echo spectrum images obtained cover the measurement width of the line dispersion spectrum confocal system (that is, the first echo spectrum image and the last echo spectrum image must be located at Figure 3 The leftmost and rightmost ends of the measurement width in the middle), as a preferred solution, in this embodiment, the echo spectrum images of the standard measurement object at different measurement distances in the Z-axis direction are obtained via the linear dispersion spectral confocal system, wherein the multiple measurement distances cover the Z-vector range of the linear dispersion spectral confocal system (that is, the first measurement distance and the last measurement distance are the two extreme distance positions of the Z-vector range) and the echo peak position of the echo spectrum image formed between each measurement position moves according to a preset spacing.

[0075] In this embodiment, the following can be used: Figure 2The device shown realizes the relative position movement between the standard measurement object and the linear dispersion spectroscopy confocal system in the Z-axis direction (i.e., the change of the measurement distance). Figure 2 In the figure, 1 is a linear dispersion spectral confocal system, 3 is a standard measurement object for obtaining echo spectrum images, 2 is a motion device connecting 1 and 3, the motion device 2 can realize the relative movement between the linear dispersion spectral confocal system 1 and the standard measurement object 3 in the Z-axis direction, 4 is a host computer system for calculation and storage, the relative displacement between the linear dispersion spectral confocal system 1 and the standard measurement object 2 is controlled by the motion device 2, and then the echo spectrum image of the standard measurement object 3 is continuously recorded during the continuous relative displacement between the linear dispersion spectral confocal system 1 and the standard measurement object 2.

[0076] For a determined linear dispersion spectral confocal system, its Z vector range is determined. In step S1, first, the motion device 2 is adjusted to reach the specified first measurement position. At this time, the position of the first echo spectrum image is located at any end point of the measurement width of the linear dispersion spectral confocal system or just moves out of the end point of the measurement width of the linear dispersion spectral confocal system. Then, the distance between the linear dispersion spectral confocal system 1 and the standard measurement object 2 is controlled by the motion device 2 to move in the Z direction to reach the next measurement position and perform the next measurement. At this time, the echo peak position of the next group of echo spectrum images obtained is moved by a preset distance in a preset direction; after the next group of echo spectrum images is recorded, the linear dispersion spectral confocal system 1 and the standard measurement object 2 are continued to be controlled by the motion device 2 to move, and the echo spectrum image corresponding to the next position is recorded until the motion device 2 reaches the specified end position. At this time, the last echo spectrum image reaches the other end of the measurement width of the linear dispersion spectral confocal system 1.

[0077] At the same time, in step S1, in order to ensure the quality of the fused light source spectrum image on the entire format and ensure that the fused light source spectrum image truly and accurately reflects the actual state of the light source spectrum, it is necessary that the positions of the two adjacent echo images in the fusion process are close enough, that is, the two adjacent measurement positions are small enough, so as to avoid the fused image from appearing in a band-like fluctuation of light and dark, and at the same time avoid the image accuracy of the area between the two echo peaks from decreasing. Therefore, there are certain requirements for the preset spacing of each movement or the moving distance of the measurement position. As a preferred solution, in this embodiment, two adjacent echo spectrum images are partially overlapped to ensure the quality of the fused light source spectrum image on the entire format. Furthermore, the width of the overlapping portion is smaller than the moving distance setting of the adjacent echo spectrum images, that is, the width of the overlapping portion is smaller than the moving distance of the two adjacent echo peaks on the image.

[0078] S2: Obtaining a second-type echo peak curve corresponding to each of the second-type echo spectrum images.

[0079] The echo peak curve is a collection of echo peak positions at a certain position along the close-packed direction of the line-to-line dispersion spectral confocal system. The echo peak curve corresponding to each echo spectrum image can be obtained by setting threshold screening, image contour extraction and other methods. That is, after obtaining the second type of echo spectrum image, the corresponding echo peak curve is separately confirmed by the above method. This operation is simple and easy to use, and the algorithm level is also relatively simple to implement, but the amount of calculation is large. In addition, when there is stray light or other coupled signals in the echo image, as long as there is an inaccurate calculation of the echo peak position once, fusion errors will also occur in the local area of ​​the fused light source image, and the robustness is not high. Therefore, in the scheme shown in the present application, the transformation amount of the eigenvalue is used to characterize and quantify the movement amount of the second type of echo peak curve, so that it is no longer necessary to recalculate the peak position every time a position is moved.

[0080] Specifically, each second-class echo peak curve is characterized as a n +C, In this embodiment, the standard shape curve C is a pre-acquired one-dimensional curve with a fixed shape, representing the curvature of the echo peak curve; the characteristic value a n With the measurement position b n Correlation represents the curve offset of each of the second type echo peaks, so this characterization method is used, such as Figure 4 As shown, for the second type echo peak curve, its change is only related to the transformation of the characteristic value. Wherein, the characteristic value corresponding to each second type echo spectrum image is determined based on the measurement position and the preset fitting function, and the fitting function is the fitting relationship function between the measurement position and the characteristic value.

[0081] The fitting function f(a) is as described above. n , b n ) and the standard shape curve C are both obtained in advance. In step S2, obtaining the fitting function and the standard shape curve C includes the following steps:

[0082] S21 acquires first-type echo spectrum images of a standard measurement object at different measurement positions in an online dispersive spectrum confocal system, wherein the echo peak positions of a plurality of the first-type echo spectrum images are sequentially moved along a preset direction within a measurement width range of the online dispersive spectrum confocal system;

[0083] In this embodiment, both the first-class echo spectrum image and the second-class echo spectrum image are echo spectrum images formed at different measurement positions within the measurement width range of the online dispersive spectrum confocal system of the standard measurement object, but the first-class echo spectrum image is used to obtain the preset value, the moving step length between adjacent first-class echo spectrum images does not need to be particularly dense, and the coverage range of multiple first-class echo spectrum images does not need to be fully covered. Of course, only the second-class echo spectrum image can be collected, and then all or part of the collected second-class image is used as the first-class echo spectrum image for fitting the function f(a n , b n ) and the acquisition of the standard shape curve C.

[0084] S22 obtains a first-type echo peak curve corresponding to each of the first-type echo spectrum images;

[0085] The echo peak curve is a collection of echo peak positions at a specific position along the close-packed direction of the line-dispersion spectral confocal system. The echo peak curve corresponding to each echo spectrum image can be obtained by setting threshold screening, image contour extraction and other methods.

[0086] As a preferred solution, in this embodiment, the echo peak position of each echo peak curve is obtained through the following steps:

[0087] S21 obtains all pixel rows corresponding to the echo spectrum image along a preset direction, and obtains the row peak pixel in each pixel row;

[0088] In step S21, each row of pixels in the echo spectrum image is taken out along a preset direction, i.e., the moving direction of the echo spectrum image, and the grayscale values ​​of each pixel in each row are combined into one-dimensional data to form a pixel row, and then all pixel rows are traversed and the row peak position in the one-dimensional data is obtained through a peak finding algorithm.

[0089] S22 organizes the pixel points corresponding to the row peak pixels into a column matrix along the densely packed direction to form an echo peak curve.

[0090] In step S22, the pixel points corresponding to all row peak positions are taken out, and the pixel positions in the column direction are used to form a column matrix as the echo peak curve of the echo spectrum image. In this embodiment, further, after obtaining the column matrix in step S22, a step of smoothing the column matrix is ​​also included to delete the pixel points that may be misjudged as peaks and replace them with the correct row peak pixel positions. In this embodiment, the smoothing can be performed by median filtering, wavelet transform, and other methods.

[0091] Of course, if the close-packed direction is Figure 5When shown in , the row peak pixels are changed to the corresponding or column pixel peaks are obtained, and the echo peak position of each echo peak curve is obtained by the following steps:

[0092] S21′ obtains all pixel columns corresponding to the echo spectrum image along a preset direction, and obtains the column peak pixel in each pixel column;

[0093] S22′ organizes the pixel points corresponding to the column peak pixels into a row matrix along the densely packed direction to form an echo peak curve.

[0094] S23 characterizes each of the first-class echo peak curves as a combination of a characteristic value and a standard shape curve based on preset rules, wherein the characteristic value is related to the measurement position and represents the curve offset of each of the first-class echo peaks, and the standard shape curve is a preset fixed-shape curve and represents the degree of curvature of the first-class echo peak curve.

[0095] As mentioned above, within the measuring range, the echo spectrum images formed at different measuring positions are as follows: Figure 3 As shown, they all have a curved bright band. The difference is that the bright band will move left and right when the measurement position is different, but no matter how the bright band moves, its shape is the same. The echo peak curve also follows this feature. Therefore, in this embodiment, for the echo peak curve of each echo spectrum image, it is decomposed into two attributes according to the preset rules to represent it, namely: ① The position representing the size of the left and right movement - the characteristic value, which moves with the left and right movement; ② The relative position representing the degree of bending - the standard shape curve C. For a specific linear dispersion spectral confocal system, when the preset rules are determined, the shape of the standard shape curve C is fixed and unchanged. When the preset rules change, the specific value of the standard shape curve C will change, but the overall shape remains unchanged. In this representation method, the change of the echo peak curve is only related to the characteristic value.

[0096] The following specifically illustrates how to characterize one of the echo peak curves as a combination of a characteristic value and a standard shape curve C. The echo peak curve is a one-dimensional matrix, assuming that the value of one of the echo peak curves is [90, 91, 91, 92, 93, 94, 94, ..., 96, 95, 94], where each value represents the position of the peak value of the row / column obtained in the direction perpendicular to the close-packed direction;

[0097] Characterizing the echo peak curve as a combination of a characteristic value and a standard shape curve C comprises the following steps:

[0098] (1) Determine the peak shape curve calculation method, such as calculating the minimum value, calculating the average value, etc. Here, the calculation of the minimum value is taken as an example, where the minimum value is 90;

[0099] (2) Taking the minimum value as the characteristic value, the echo peak curve representation is expressed in the form of characteristic value + offset value, and the result is as follows:

[0100] [90+0, 90+1, 90+1, 90+2, 90+3, 90+4, 90+4, …, 90+6, 90+5, 90+4]

[0101] (3) The corresponding combination of the standard shape curve C is extracted, that is, [+0, +1, +1, +2, +3, +4, +4, …, +6, +5, +4]. This value will not change with the change of measurement position or peak movement;

[0102] Wherein, if in the above step (1), if the peak shape curve calculation method is to take the average value, assuming it is 92, then all corresponding values ​​are expressed in the form of characteristic value + offset value, and the result is as follows: [92+(-2), 92+(-1), 92+(-1), 92+0, 92+1, 92+2, 92+2, ..., 92+4, 92+3, 92+2], and the corresponding combination of the standard shape curve C is extracted, that is, [-2, -1, -1, 0, +1, +2, +2, ..., +4, +3, +2], which will not change with the change of measurement position and peak movement. S24 establishes a fitting function between the multiple characteristic values ​​and the corresponding multiple measurement positions;

[0103] A plurality of characteristic values ​​a are obtained by step S23 n The size and corresponding multiple measurement positions b n Since the characteristic value is related to the measurement position, in step S24, based on the above known values, a fitting function f (a n , b n ), where, within the full range, the position can be used as the independent variable and the characteristic value as the dependent variable to fit the two. You can also choose to use the set characteristic value as the independent variable and the position as the dependent variable to fit the two. There is no restriction here.

[0104] The above fitting function f(a n , b n ) and the standard shape curve C are determined, the acquisition of each second-type echo peak curve includes the following steps:

[0105] (1) Obtain the measurement position b corresponding to each of the second type echo spectrum images n ;

[0106] (2) Based on the fitting function f(a n , b n ) Determine the measurement position b nThe corresponding eigenvalue a n ;

[0107] (3) Based on the characteristic value a n The value of the standard shape curve C determines the echo peak curve corresponding to each second type echo spectrum image.

[0108] Therefore, in actual measurement, it is only necessary to directly obtain the second type echo peak curve corresponding to each echo spectrum image based on the specific positions of the standard peak shape curve and the peak shape curve without analyzing the image peak position.

[0109] S3 extracts the transition area between adjacent echo peak curves and reassigns the grayscale value of each pixel in the transition area, and fuses the reassigned transition area with the echo peak curve to form a light source spectrum image.

[0110] In step S3, after the peak position of each echo spectrum image is obtained, each echo peak curve and the transition area between adjacent echo peak curves are extracted to fuse and form a light source spectrum image.

[0111] Specifically, the following steps are included:

[0112] S31 obtains each pixel in the transition area between each adjacent echo peak curve; Figure 6 As shown, Figure 6 In (a), adjacent echo spectrum images are merged into the same coordinate system according to their respective displacement distances and the transition area between adjacent echo peak curves is extracted, as shown in Figure 6 (b) where “.” represents the peak curve and “△” represents the pixels in the transition area between adjacent echo peak curves. Figure 6 (c) shown.

[0113] S32 reassigns the gray value of each pixel in the transition area;

[0114] As mentioned above, the grayscale value at the peak position is consistent with the grayscale value of the actual light source spectrum, but the grayscale attenuation in the transition area occurs due to the defocusing of the linear dispersion spectral confocal system, resulting in a deviation between the grayscale value of this part and the actual value. Therefore, in this embodiment, it is necessary to obtain each transition area and reassign each pixel in the transition area to compensate for the deviation.

[0115] As a preferred solution, in this embodiment, S31 obtains the pixel gray value G of each pixel between adjacent echo peak curves on two adjacent echo spectrum images. 1n , G 2n , and the distance L between each pixel and the center point of the two echo peak curves 1n , L 2n ; S32 according to the pixel gray value G1n , G 2n and L 1n , L 2n The size of is used to reassign the grayscale value of each pixel in the transition area;

[0116] There are many ways to assign values. This application does not limit the value assignment method. It only needs to achieve compensation deviation. 1n and L 2n The size of the two echo spectrum images is taken as the gray value of the pixel point with a closer distance between them as the value of the corresponding position in the light source spectrum image; the pixels at the respective positions of the two peaks can also be taken and calculated by uniform over-interpolation as the gray value of the corresponding position of the light source spectrum image, such as by using the linear interpolation method, that is, Reassign values ​​to each pixel point in the transition area, where g1 and g2 are the grayscale values ​​corresponding to the first row of adjacent echo peak curves, L1 and L2 are the distances from a point in the transition area to the adjacent echo peak curves, and G is the reassigned value of the point; the average grayscale value of the pixels on the two echo spectrum images can also be taken as the grayscale value of the corresponding position in the transition area.

[0117] S33 merges all the peak curves and the reassigned transition regions to form a light source spectrum diagram.

[0118] like Figure 7 As shown, in step S33, all peak curves and re-assigned transition areas are extracted, and fused according to corresponding coordinate positions and corresponding grayscale values ​​to form a light source spectrum image, which is consistent with the actual light source spectrum image. Example

[0119] like Figure 8 As shown, the present invention also discloses a light source spectrum image acquisition device 10, comprising:

[0120] The second type echo spectrum image acquisition module 11 is used to acquire a plurality of second type echo spectrum images and corresponding measurement positions of the standard measurement object within the measurement width range of the linear dispersion spectrum confocal system, wherein the echo peak positions of the plurality of second type echo spectrum images are sequentially moved along a preset direction and cover the measurement width range of the linear dispersion spectrum confocal system, and the preset direction is a direction perpendicular to the close-packed direction of the linear dispersion spectrum confocal system;

[0121] A second-class echo peak curve acquisition module 12 is used to acquire a second-class echo peak curve corresponding to each second-class echo spectrum image, wherein each second-class echo peak curve is characterized by a combination of a corresponding characteristic value and a standard shape curve, wherein the standard shape curve is a preset fixed-shape curve representing the curvature of the second-class echo peak curve; the characteristic value is related to the measurement position, representing the curve offset of each second-class echo peak value;

[0122] The light source spectrum image acquisition module 13 is used to extract the transition area between adjacent second-type echo peak curves and reassign the grayscale value of each pixel in the transition area, and fuse the reassigned transition area with the second-type echo peak curve to form a light source spectrum image.

[0123] The device for acquiring a light source spectrum image shown in the present invention uses the peak position variation law of the standard measurement object when it is relatively displaced with the linear dispersion spectrum confocal system to acquire continuous echo spectrum images of the standard measurement object within the measurement width of the linear dispersion spectrum confocal system, and obtains the peak position of each echo spectrum image from these echo spectrum images, and then re-integrates the extracted echo peak positions to form a light source spectrum image of the corresponding linear dispersion spectrum confocal system, so that the corresponding light source spectrum image can be acquired according to the existing linear dispersion spectrum confocal measurement system without introducing an additional optical path. At the same time, when acquiring the echo peak curve of the second type of echo spectrum image, the device for acquiring a light source spectrum image shown in the present invention uses the variation of the characteristic value to characterize and quantify the movement of the peak shape curve, and then fits the movement direction of the peak curve as the position moves, without having to calculate each peak position separately according to each echo spectrum image, which simplifies the time consumption of the method and enhances stability.

[0124] Preferably, in the second-type echo spectrum image acquisition module 11, two adjacent second-type echo spectrum images are partially overlapped.

[0125] Furthermore, in the second-type echo spectrum image acquisition module 11, the width of the overlapping portion of two echo spectrum images is smaller than the moving distance setting of adjacent echo spectrum images.

[0126] Preferably, the second-type echo peak curve acquisition module 12 includes: an eigenvalue calculation submodule, used to determine the eigenvalue corresponding to each second-type echo spectrum image based on the measurement position corresponding to each second-type echo spectrum image and a preset fitting function, wherein the fitting function is a fitting relationship function between the measurement position and the eigenvalue.

[0127] Preferably, the second type echo peak curve acquisition module 12 further includes a fitting function acquisition submodule, and the fitting function acquisition submodule includes:

[0128] A first-type echo spectrum image acquisition unit is used to acquire first-type echo spectrum images at different measurement positions of the standard measurement object within the measurement width range of the online dispersive spectrum confocal system, wherein the echo peak positions of a plurality of the first-type echo spectrum images are moved sequentially along a preset direction within the measurement width range of the online dispersive spectrum confocal system;

[0129] A first-category echo peak curve acquisition unit, used for acquiring a first-category echo peak curve corresponding to each of the first-category echo spectrum images;

[0130] a splitting unit, configured to characterize each of the first-category echo peak curves as a combination of a characteristic value and a standard shape curve based on a preset rule, wherein the characteristic value is related to the measurement position and represents a curve offset of each of the first-category echo peaks, and the standard shape curve is a preset fixed-shape curve and represents a degree of curvature of the first-category echo peak curve;

[0131] And, a fitting function acquisition unit is used to establish a fitting function between the plurality of characteristic values ​​and the corresponding plurality of measurement positions based on the two.

[0132] Furthermore, the first type echo peak curve acquisition unit includes:

[0133] A row peak pixel acquisition subunit is used to acquire all pixel rows of the first type echo spectrogram along a preset direction, and acquire the row peak pixel in each pixel row;

[0134] and a first-type echo peak curve acquisition subunit, used for forming a column matrix of pixel points corresponding to the row peak pixels along their densely packed direction to form a first-type echo peak curve;

[0135] Or the first type echo peak curve acquisition unit includes:

[0136] A column peak pixel acquisition subunit is used to acquire the first type of echo spectrogram / all pixel columns along a preset direction, and acquire the column peak pixel in each pixel column;

[0137] And a first-type echo peak curve acquisition subunit is used to form a row matrix of pixel points corresponding to the column peak pixels along their densely packed direction to form a first-type echo peak curve.

[0138] Preferably, the first-type echo peak curve acquisition unit further includes a correction subunit, which is used for obtaining the column matrix / row matrix and then further including a step of smoothing the column matrix / row matrix to eliminate erroneous pixels.

[0139] Preferably, the light source spectrum image acquisition module 13 includes:

[0140] The parameter acquisition submodule is used to obtain the pixel gray value G of each pixel position in the overlapping area of ​​adjacent echo spectrum images on the two echo spectrum images. 1n , G 2n , and the distance L between each pixel and the center point of the adjacent echo peak curve 1n , L 2n ;

[0141] The assignment submodule is used to assign a value based on the pixel gray value G 1n , G 2n and L 1n , L 2n The size of is used to reassign the grayscale value of each pixel in the transition area.

[0142] There are many ways to assign values ​​in the assignment submodule. This application does not limit the assignment method. It only needs to achieve compensation deviation. 1n and L 2n The size of the two echo spectrum images is taken as the gray value of the pixel point with a closer distance between them as the value of the corresponding position in the light source spectrum image; the pixels at the respective positions of the two peaks can also be taken and calculated by uniform over-interpolation as the gray value of the corresponding position of the light source spectrum image, such as by using the linear interpolation method, that is, Reassign values ​​to each pixel point in the transition area, where g1 and g2 are the grayscale values ​​corresponding to the first row of adjacent echo peak curves, L1 and L2 are the distances from a point in the transition area to the adjacent echo peak curves, and G is the reassigned value of the point; the average grayscale values ​​of the pixels on the two echo spectrum images can also be taken as the grayscale value of the corresponding position in the transition area.

[0143] Embodiment 3

[0144] Fig. 9 1 is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention, such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. The computer device 20 of this embodiment includes at least but is not limited to: a memory 21 and a processor 22 that can communicate with each other via a system bus, such as Fig. 9 It should be pointed out that Fig. 9 Only computer device 20 is shown with components 21 - 22 , but it should be understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.

[0145] In this embodiment, the memory 21 (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), and the memory 21 can also be an external storage device of the computer device 20, such as a plug-in hard disk equipped on the computer device 20, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 21 can also include both the internal storage unit of the computer device 20 and its external storage device. In this embodiment, the memory 21 is generally used to store the operating system and various application software installed in the computer device 20, such as the program code of the light source spectrum image acquisition device in the method embodiment. In addition, the memory 21 can also be used to temporarily store various data that have been output or are to be output.

[0146] The processor 22 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 22 is generally used to control the overall operation of the computer device 20. In this embodiment, the processor 22 is used to run the program code stored in the memory 21 or process data, such as running the light source spectrum image acquisition device 10 to implement the light source spectrum image acquisition method in the method embodiment.

[0147] Embodiment 4

[0148] The present application also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, and the program realizes the corresponding function when executed by the processor. The computer-readable storage medium of this embodiment is used to store the program code of the light source spectrum image acquisition device 10, and when executed by the processor, the light source spectrum image acquisition method in the method embodiment is realized.

[0149] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0150] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for acquiring a light source spectrum image, which measures a standard measurement object via a linear dispersion spectrum confocal system to acquire a light source spectrum image of the linear dispersion spectrum confocal system, comprising the following steps: S1 obtains multiple second-class echo spectrum images and corresponding measurement positions within the measurement width range of the online dispersion spectrum confocal system of the standard measurement object, where: The echo peak positions of the plurality of the second-type echo spectrum images are sequentially moved along a preset direction and cover the measurement width range of the linear dispersion spectrum confocal system, wherein the preset direction is a direction perpendicular to the close-packed direction of the linear dispersion spectrum confocal system; S2 obtains a second-type echo peak curve corresponding to each second-type echo spectrum image, wherein each second-type echo peak curve is characterized by a combination of a corresponding characteristic value and a standard shape curve, wherein the standard shape curve is a preset fixed-shape curve representing the curvature of the second-type echo peak curve; the characteristic value is related to the measurement position, representing the curve offset of each second-type echo peak; S3 extracts a transition region between adjacent peak curves of the second-type echo and reassigns a gray value of each pixel in the transition region, and fuses the reassigned transition region and the peak curve of the second-type echo to form a light source spectrum image; Wherein, in the step S2, the characteristic value corresponding to each second-type echo spectrum image is determined based on the measurement position corresponding to each second-type echo spectrum image and a preset fitting function, and the fitting function is a fitting relationship function between the measurement position and the characteristic value; In step S2, obtaining the fitting function includes the following steps: S21 acquires first-type echo spectrum images of the standard measurement object at different measurement positions within the measurement width range of the online dispersive spectrum confocal system, wherein the echo peak positions of a plurality of the first-type echo spectrum images move sequentially along a preset direction within the measurement width range of the online dispersive spectrum confocal system; S22 obtains a first-type echo peak curve corresponding to each of the first-type echo spectrum images; S23: characterizing each first-type echo peak curve as a combination of a characteristic value and a standard shape curve based on a preset rule, wherein the characteristic value is related to the measurement position and represents a curve offset of each first-type echo peak, and the standard shape curve is a preset fixed-shape curve and represents a curvature of the first-type echo peak curve; S24, based on the plurality of characteristic values ​​and the corresponding plurality of measurement positions, establishing a fitting function between the two; The step S3 of reassigning the grayscale value of each pixel in the transition area comprises the following steps: S31 obtains the pixel gray value G of each pixel position in the overlapping area of ​​adjacent echo spectrum images on the two echo spectrum images. 1n , G 2n , and the distance L between each pixel and the center point of the adjacent echo peak curve 1n , L 2n ; S32 is based on the pixel gray value G 1n , G 2n and L 1n , L 2n The size of is used to reassign the grayscale value of each pixel in the transition area.

2. The method for acquiring a light source spectrum image according to claim 1, characterized in that: The acquisition of the first type echo peak curve comprises the following steps: S21 obtains all pixel rows of the first type echo spectrum along a preset direction, and obtains the row peak pixel in each pixel row; S22: arranging the pixel points corresponding to the row peak pixels into a column matrix along the densely packed direction to form a first type echo peak curve; or S21′ obtains all pixel columns of the first type echo spectrum along a preset direction, and obtains the column peak pixel in each pixel column; S22′ organizes the pixel points corresponding to the column peak pixels into a row matrix along the densely packed direction to form a first type echo peak curve.

3. The method for acquiring a light source spectrum image according to claim 2, characterized in that: In step S22 / S22′, after obtaining the column matrix / row matrix, a step of smoothing the column matrix / row matrix is ​​further included to remove erroneous pixels.

4. The method for acquiring a light source spectrum image according to claim 1, characterized in that: In the step S1, two adjacent second-category echo spectrum images are partially overlapped.

5. The method for acquiring a light source spectrum image according to claim 4, characterized in that: The width of the overlapping portion of the two echo spectrum images is smaller than the moving distance setting of adjacent echo spectrum images.

6. A light source spectrum image acquisition device, characterized in that: include: A second-type echo spectrum image acquisition module is used to acquire a plurality of second-type echo spectrum images and corresponding measurement positions of a standard measurement object within a measurement width range of a linear dispersion spectrum confocal system, wherein the echo peak positions of the plurality of second-type echo spectrum images are sequentially moved along a preset direction and cover the measurement width range of the linear dispersion spectrum confocal system, and the preset direction is a direction perpendicular to a close-packed direction of the linear dispersion spectrum confocal system; A second-class echo peak curve acquisition module, used for acquiring a second-class echo peak curve corresponding to each second-class echo spectrum image, wherein each second-class echo peak curve is characterized by a combination of a corresponding characteristic value and a standard shape curve, wherein the standard shape curve is a preset fixed-shape curve representing the curvature of the second-class echo peak curve; the characteristic value is related to the measurement position, representing the curve offset of each second-class echo peak value; A light source spectrum image acquisition module, used for extracting a transition area between adjacent second-type echo peak curves and reassigning the grayscale value of each pixel in the transition area, and fusing the reassigned transition area with the second-type echo peak curve to form a light source spectrum image; Wherein, in the second-type echo peak curve acquisition module, the characteristic value corresponding to each second-type echo spectrum image is determined based on the measurement position corresponding to each second-type echo spectrum image and a preset fitting function, and the fitting function is a fitting relationship function between the measurement position and the characteristic value; In the second type echo peak curve acquisition module, the acquisition of the fitting function includes the following steps: Acquire first-type echo spectrum images of the standard measurement object at different measurement positions within the measurement width range of the online dispersive spectrum confocal system, wherein the echo peak positions of a plurality of the first-type echo spectrum images move sequentially along a preset direction within the measurement width range of the online dispersive spectrum confocal system; Acquire a first-type echo peak curve corresponding to each of the first-type echo spectrum images; Characterizing each first-type echo peak curve as a combination of a characteristic value and a standard shape curve based on a preset rule, wherein the characteristic value is related to the measurement position and represents the curve offset of each first-type echo peak, and the standard shape curve is a preset fixed-shape curve and represents the curvature of the first-type echo peak curve; Based on the plurality of characteristic values ​​and the corresponding plurality of measurement positions, establishing a fitting function between the two; The reassignment of the grayscale value of each pixel point in the transition area in the light source spectrum image acquisition module comprises the following steps: Obtain the pixel gray value G of each pixel position in the overlapping area of ​​adjacent echo spectrum images on the two echo spectrum images 1n , G 2n , and the distance L between each pixel and the center point of the adjacent echo peak curve 1n , L 2n ; Based on the pixel gray value G 1n , G 2n and L 1n , L 2n The size of is used to reassign the grayscale value of each pixel in the transition area.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.