A detection method, system, and medium based on line spectral confocal microscopy.

By adjusting the exposure time and light intensity threshold, the height difference of the specular reflection area is identified and corrected, thus solving the accuracy problem of line spectral confocal sensors when detecting specular and diffuse reflection areas on the surface of the object under test, and achieving higher detection accuracy and signal-to-noise ratio.

CN122083839BActive Publication Date: 2026-07-31HEFEI I TEK OPTOELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEFEI I TEK OPTOELECTRONICS CO LTD
Filing Date
2026-04-22
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing line spectral confocal sensors cannot simultaneously and accurately detect both specular and diffuse reflection regions on the surface of the object being measured. Furthermore, they are susceptible to interference when there are multiple peak wavelengths in the spectrum, leading to inaccurate height detection.

Method used

By identifying the number of peaks and light intensity values ​​in the spectral image, adjusting the exposure time and light intensity threshold, analyzing the height difference of the reflection area, adjusting the sensor distance to ensure that the light intensity value is within the working range, and identifying and correcting the height of the specular reflection area.

Benefits of technology

It improves the signal-to-noise ratio, enhances detection accuracy, expands the application range of various reflective areas, and ensures the accuracy of high-precision detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122083839B_ABST
    Figure CN122083839B_ABST
Patent Text Reader

Abstract

This invention discloses a detection method, system, and medium based on line spectral confocalization. The method includes: determining the number of peaks; if the number of peaks is one, adjusting the light intensity value corresponding to the peak wavelength to be within the light intensity working range; if the number of peaks is not less than two, extracting the light intensity value corresponding to the peak wavelength, analyzing the peak morphology, and identifying the peak wavelength associated with each reflection region; analyzing the offset of the height of the specular reflection region, correcting the detection height of the specular reflection region to obtain the height difference between the reflection regions covered within the width of the line spot at any position on the scanning line; and adjusting the distance of the sensor relative to the surface of the object under test according to the height difference, so that there is one and only one valid peak in the spectral image at any position on the scanning line. This invention can accurately calculate the height difference between the specular reflection region and the diffuse reflection region covered within the width of the line spot, improving the signal-to-noise ratio of the spectral image and expanding the application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of spectral confocalization, and relates to a detection method, system and medium based on line spectral confocalization. Background Technology

[0002] Linear spectral confocal sensors extend single-point measurements to line measurements, and then achieve surface measurements through high-speed scanning, thereby enabling rapid, high-precision, non-contact detection of complex surface three-dimensional morphology. Linear spectral confocal sensors utilize the different focal lengths of different monochromatic lights in a dispersive objective for measurement. A line source emits white light, which, after passing through the dispersive objective, produces continuous monochromatic light along the optical axis. Light of different wavelengths is converged at different axial positions by the dispersive objective. The specific wavelength of light converged on the surface of the object being measured and reflected back is received by a spectrometer. The spectrometer analyzes the spectrum of the reflected light to obtain the distance from the surface of the object being measured.

[0003] When the surface of the object under test has both diffuse and specular reflection areas, adding a polarizer and analyzer to the optical system makes it impossible to detect the height of the specular reflection area. Because of this problem, it's impossible to simultaneously detect areas of varying sizes on the object's surface, making it difficult to obtain accurate measurement data. Furthermore, when there are at least two peak wavelengths in the spectrum, it becomes impossible to distinguish them from other reflection areas. When detecting the height of the diffuse reflection area, it is easily interfered with by the specular reflection area. Summary of the Invention

[0004] The purpose of this invention is to overcome the above-mentioned problems in the prior art and to provide a detection method, system and medium based on line spectral confocalization.

[0005] To achieve the above-mentioned technical objectives and effects, the present invention is implemented through the following technical solution:

[0006] A detection method based on line spectral confocal microscopy is used to identify the height of specular reflection regions and diffuse reflection regions with height differences on the surface of a test object, including:

[0007] Identify the number of peaks in the spectrum and extract the light intensity values ​​corresponding to the peak wavelengths;

[0008] The number of peaks is determined. If the number of peaks is equal to 1, it is determined whether the light intensity value corresponding to the peak wavelength is within the light intensity working range. If it is not within the light intensity working range, the light intensity value corresponding to the peak wavelength is adjusted to ensure that the light intensity value corresponding to the adjusted peak wavelength is within the light intensity working range. The light intensity working range is composed of a first light intensity threshold and a second light intensity threshold, wherein the first light intensity threshold is less than the second light intensity threshold.

[0009] If the number of peaks is not less than two, extract the light intensity value corresponding to the peak wavelength, analyze the peak shape, and identify the peak wavelength associated with each reflection area.

[0010] Analyze the height offset of the specular reflection area and correct the detection height of the specular reflection area to obtain the height difference between the reflection areas covered within the width of the line spot at any position on the scanning line.

[0011] Based on the height difference, the distance between the sensor and the surface of the object to be measured is adjusted so that there is only one valid peak in the spectral image at any position on the scanning line. The valid peak is the peak corresponding to the wavelength that converges to the diffuse reflection region or the specular reflection region.

[0012] Furthermore, when the light intensity value corresponding to the peak wavelength is not within the light intensity operating range, adjustment is made based on the light intensity value corresponding to the peak wavelength. The adjustment method includes:

[0013] Determine whether the light intensity value corresponding to the peak wavelength is less than the set first light intensity threshold. If it is less than the set first light intensity threshold, increase the exposure time. If it is greater than the set second light intensity threshold, decrease the exposure time so that after the exposure time is adjusted, the light intensity value corresponding to the peak wavelength in the spectrum is within the light intensity working range.

[0014] Furthermore, select any light intensity value within the light intensity working range, and based on the selected light intensity value, the light intensity value corresponding to the current peak wavelength, and the current exposure time, analyze the exposure time corresponding to the light intensity value corresponding to the adjusted peak wavelength within the light intensity working range.

[0015] Furthermore, the method for adjusting the exposure time includes: based on a first light intensity threshold, a second light intensity threshold, the light intensity value corresponding to the current peak wavelength, and the current exposure time, calculating the exposure time corresponding to the adjusted peak wavelength light intensity value being within the light intensity working range, wherein a ratio coefficient is used to determine the weights of the first light intensity threshold and the second light intensity threshold, the ratio coefficient taking values ​​of [0,1], and the sum of the weights of the first light intensity threshold and the second light intensity threshold equals 1.

[0016] Furthermore, when light of one wavelength converges to the diffuse reflection region, the number of peaks in the spectral image corresponding to each position on the scanning line is determined by the number of specular reflection regions with height differences covered within the width range of the line spot.

[0017] Furthermore, when there are at least two peaks in the spectrum, the method identifies the peak wavelength associated with each reflection region, comprising:

[0018] Extract the peak value of each peak in the spectrum and calculate whether the peak ratio of each peak is within the allowable ratio range [r, 1 / r]. r represents the minimum allowable peak ratio of two peaks, and r is less than 1.

[0019] If the ratio of the peak values ​​of the two peaks is within the allowable range, then determine the half-peak width of each peak.

[0020] The reflection area of ​​the object surface detected by each peak wavelength is determined based on the ratio between the half-peak widths of each peak.

[0021] Furthermore, based on the obtained spectral maps at different positions along the optical axis and the light intensity values ​​corresponding to the peak values ​​in the spectral maps, a defocus response curve of the line spectral confocal sensor in the specular reflection region is constructed. Combined with the light intensity value of the peak wavelength corresponding to the current specular reflection region, the offset of the height of the specular reflection region is analyzed.

[0022] The defocus response curve: ,I max Let λ represent the light intensity corresponding to the wavelength λ0 that converges to the specular reflection region, e represent the natural constant, Δz represent the distance the plane mirror deviates from the focal point, and I represent the light intensity. △z Δz represents the light intensity at wavelength λ0 when the distance from the focal point is Δz, and X represents the defocus coefficient, which is a constant related to the optical parameters of the sensor.

[0023] Furthermore, based on the offset of the height of the specular reflection area, and combined with the measurement distance corresponding to the wavelength associated with the specular reflection area, the measurement distance of the specular reflection area is corrected.

[0024] A detection system based on line spectral confocal microscopy, applied to any of the above-described detection methods based on line spectral confocal microscopy, includes:

[0025] The peak extraction module is used to identify the number of peaks in the spectrum and extract the light intensity value corresponding to the peak wavelength;

[0026] The adjustment module determines the number of peaks. If the number of peaks is equal to 1, it determines whether the light intensity value corresponding to the peak wavelength is within the light intensity working range. If it is not within the light intensity working range, it adjusts the light intensity value based on the peak wavelength to ensure that the light intensity value corresponding to the adjusted peak wavelength is within the light intensity working range.

[0027] If the number of peaks is not less than two, extract the light intensity value corresponding to the peak wavelength, analyze the peak shape, and identify the peak wavelength associated with each reflection area.

[0028] The height correction module is used to analyze the offset of the peak wavelength associated with the specular reflection area and correct the detection height of the specular reflection area to obtain the height difference between each reflection area within the width range of the line spot at any position on the scan line.

[0029] The drive control module is used to adjust the distance between the sensor and the surface of the object to be measured according to the height difference, so that there is only one valid peak in the spectral image at any position on the scanning line.

[0030] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the detection method based on line spectral confocalization as described above.

[0031] The beneficial effects of this invention are:

[0032] This invention determines whether the light intensity value of the peak wavelength is within the light intensity working range, and adjusts the exposure time or current accordingly to ensure that the light intensity value is within the light intensity working range, thereby improving the signal-to-noise ratio.

[0033] By performing correlation analysis between peak wavelengths in the spectrum and each reflection region, the peak wavelengths associated with each reflection region can be identified. Then, the peak wavelengths associated with the specular reflection region can be processed to obtain the deviation of the height of the specular reflection region. This allows for correction of the actual height of the specular reflection region, thereby improving the height difference between the specular reflection region and the diffuse reflection region covered in the width direction of the line light source.

[0034] By adjusting the distance between the objective lens and the object under test based on the obtained height difference, there is only one effective peak in the spectral image at any position on the scanning line. Based on the light intensity value of the effective peak, enhancement processing is performed to improve the signal-to-noise ratio, thereby improving the height detection accuracy of the object under test surface and expanding the application range of various reflection areas. Attached Figure Description

[0035] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0036] Figure 1 This is a spectral diagram showing the coexistence of multiple reflective regions in this invention;

[0037] Figure 2 This is a flowchart of the detection method based on line spectral confocalization in this invention;

[0038] Figure 3 This is a flowchart of the peak identification method in the spectral image of the present invention;

[0039] Figure 4 This is a schematic diagram of the measurement in this invention;

[0040] Figure 5 This is a schematic diagram of the detection system based on line spectral confocalization in this invention. Detailed Implementation

[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0042] Linear spectral confocal sensors illuminate the object under test with a broadband light source and use dispersive objectives to focus different wavelengths at different axial positions. Only the reflected light that meets the confocal condition can be effectively detected by the spectrometer. By analyzing the peak wavelength of the reflected light, the height above the surface of the object can be accurately calculated.

[0043] Inside the sensor, the slit is located on a plane conjugate to the focal point of the dispersive lens, allowing only light converging at that focal point to pass through. When the surface of the object under test is at the focal point of a certain wavelength, light of that wavelength converges on the surface of the object. After passing through the slit in front of the spectrometer (the width of the converged spot is smaller than the width of the slit), the light is received by the spectrometer, resulting in a strong light intensity value. When the focal point of a certain wavelength is not on the surface of the object under test, the light spot of that wavelength on the surface of the object is diffuse. After being blocked by the slit, at least part of the light is received by the spectrometer, resulting in a weak light intensity value.

[0044] When light shines on a smooth mirror reflection area, the reflected light is highly concentrated in a single direction according to the law that the angle of reflection is equal to the angle of incidence. When light shines on a diffuse reflection surface, the incident light is scattered in all directions, and only a portion of the light enters the sensor after passing through the slit, resulting in extremely low signal strength.

[0045] like Figure 1 As shown, when both specular and diffuse reflection regions exist on the surface of the object under test, and there is a height difference between the specular and diffuse reflection regions, the signals reflected back from the specular region and the signals reflected back from the diffuse reflection region coexist. This means that the signal that converges to the diffuse reflection region and is reflected back from the diffuse reflection region may have a similar intensity to the signal reflected back from the specular region, or even a stronger signal reflected back from the specular region than the signal reflected back from the diffuse reflection region. As a result, the diffuse reflection signal that converges to the diffuse reflection region cannot be effectively separated and identified.

[0046] Based on the above technical issues, such as Figure 2As shown, this invention provides a detection method based on line spectral confocal microscopy for identifying the height of specular reflection regions and diffuse reflection regions with height differences on the surface of an object to be tested, including:

[0047] Step 1: Identify the number of peaks in the spectrum and extract the light intensity value corresponding to the wavelength of the peak.

[0048] Because the surface of the object under test has specular reflection and diffuse reflection areas, it is not possible to directly add a polarizer and analyzer to the optical path system to eliminate the influence of the signal reflected from the specular reflection area on the signal reflected from the diffuse reflection area. If a polarizer is used in combination with an analyzer, it will be impossible to detect the height of the specular reflection area on the surface of the object under test.

[0049] When the linear light source passes through the polarizer, it is adjusted to be linearly polarized light vibrating in one direction. After passing through the dispersive objective lens, the linearly polarized light is incident on the surface of the object under test. After being reflected by the surface of the object under test, it enters the analyzer, whose polarization direction is perpendicular to the polarization direction of the analyzer. This prevents the signal reflected by the specular reflection area from passing through the analyzer and entering the spectrometer. Therefore, it is impossible to detect the high degree of the simultaneous existence of specular reflection area and diffuse reflection area on the surface of the object under test.

[0050] Step 2: Determine the number of peaks. When the number of peaks is equal to 1, determine whether the light intensity value corresponding to the peak wavelength is within the light intensity working range. If it is not within the light intensity working range, adjust the light intensity value based on the peak wavelength to ensure that the light intensity value corresponding to the adjusted peak wavelength is within the light intensity working range.

[0051] The light intensity working area range is composed of a first light intensity threshold and a second light intensity threshold. The first light intensity threshold is less than the second light intensity threshold. The values ​​of the first light intensity threshold and the second light intensity threshold are determined based on the light intensity value reflected by the specular reflection area when the light is not focused on the specular reflection area and the light intensity value reflected by the diffuse reflection area when the light converges to the diffuse reflection area.

[0052] If the width range of the line spot of the online spectral confocal sensor (the position where light of different wavelengths converges to the optical axis after passing through the dispersive lens and covers the surface of the object to be measured to form a line spot) contains only a diffuse reflection area, the signal reflected by the diffuse reflection area is too weak, and its light intensity value is small. At this time, the light intensity value is lower than the first light intensity threshold. If the width range of the line spot of the online spectral confocal sensor contains only a specular reflection area, the signal reflected by the specular reflection area is too strong, and its light intensity value is large. At this time, the light intensity value is higher than the second light intensity threshold.

[0053] The second light intensity threshold is less than the light intensity value under saturation. The light intensity value under saturation is affected by the full-well capacity of the sensor's photosensitive element. When there are too many incident photons and the accumulated charge exceeds its maximum capacity, the output light intensity value is in a saturated state and does not increase with the continued increase of incident photons. The light intensity value under saturation depends on the sensor's hardware settings and the amplification gain of the subsequent circuitry.

[0054] By setting a first light intensity threshold and a second light intensity threshold, the light intensity value is ensured to be within the optimal range, thereby enhancing the light intensity value while preventing the light intensity signal from reaching the exposure limit, improving the signal-to-noise ratio, and thus improving the accuracy of peak wavelength extraction.

[0055] When the detected light intensity value is less than the first light intensity threshold, the signal is too weak and the light intensity value needs to be increased to improve the signal-to-noise ratio. If the detected light intensity value is greater than the second light intensity threshold, the signal is too strong and the light intensity value needs to be reduced to prevent the light intensity value from reaching saturation. This ensures that the detected light intensity value is within the light intensity working range, where the light intensity value within the light intensity working range is greater than the first light intensity threshold and less than the second light intensity threshold.

[0056] When the light intensity value corresponding to the peak wavelength is not within the light intensity operating range, adjustment is made based on the light intensity value corresponding to the peak wavelength. The adjustment method includes:

[0057] Determine whether the light intensity value corresponding to the peak wavelength is less than the set first light intensity threshold. If it is less than the set first light intensity threshold, increase the exposure time. If it is greater than the set second light intensity threshold, decrease the exposure time so that after the exposure time is adjusted, the light intensity value corresponding to the peak wavelength in the spectrum is within the light intensity working range.

[0058] The adjustment of the exposure time can be achieved by selecting any light intensity value within the light intensity working range. Based on the selected light intensity value, the light intensity value corresponding to the current peak wavelength, and the current exposure time, the exposure time corresponding to the light intensity value corresponding to the adjusted peak wavelength within the light intensity working range is analyzed.

[0059] During the adjustment of exposure time, any light intensity value is selected from the light intensity working range. The light intensity value can be selected in various ways, such as random selection or intermediate value, to ensure that any selected light intensity value is within the light intensity working range.

[0060] The adjusted exposure time T is calculated using the following formula: T = T d *G target / G d G target The light intensity is expressed as a numerical value, which is within the working range of light intensity. T represents the light intensity value G. targetThe corresponding exposure time, T d Indicates the current exposure time, G d This represents the light intensity value corresponding to the peak wavelength at the current exposure time. d When G is greater than the second light intensity threshold, target / G d <1, at this point, reduce the exposure time to avoid the light intensity value corresponding to the peak wavelength reaching saturation. When G d When the light intensity is less than the first light intensity threshold, G target / G d >1, at this point, increase the exposure time to improve the signal-to-noise ratio of the light intensity signal at the peak wavelength. target / G d When = 1, do not adjust the exposure time.

[0061] By judging the light intensity value corresponding to the peak wavelength at the current exposure time, and based on the current effective light intensity value, the current exposure time, and the light intensity value corresponding to the current peak wavelength, the exposure time corresponding to the peak wavelength that is not within the light intensity working range is adjusted. This ensures that the light intensity value corresponding to the peak wavelength is within the light intensity working range at the adjusted exposure time. As a result, the line spectrum confocal sensor dynamically adjusts the exposure time according to the detected light intensity value, realizing automatic exposure adjustment between specular reflection and diffuse reflection areas, and improving the stability of the detected light intensity value.

[0062] This embodiment also discloses a method for adjusting exposure time, including: based on a first light intensity threshold, a second light intensity threshold, the light intensity value corresponding to the current peak wavelength, and the current exposure time, calculating the exposure time corresponding to the adjusted peak wavelength light intensity value within the light intensity working range, wherein a ratio coefficient is used to determine the weight of the first light intensity threshold and the second light intensity threshold, the ratio coefficient taking the value [0,1], and the sum of the weights of the first light intensity threshold and the second light intensity threshold equals 1.

[0063] The adjusted exposure time calculation formula is as follows: η represents the ratio coefficient, taking values ​​[0,1], G1 and G2 represent the first and second light intensity thresholds, respectively, and T d Indicates the current exposure time, G d This represents the light intensity value corresponding to the peak wavelength at the current exposure time.

[0064] By using a first light intensity threshold, a second light intensity threshold, and the light intensity value corresponding to the current peak wavelength, the current exposure time is adjusted so that the light intensity value corresponding to the adjusted peak wavelength is within the light intensity working range. This allows for dynamic adjustment of the target light intensity value based on the first and second light intensity thresholds, thereby achieving the adjustment of the current exposure time.

[0065] This embodiment also discloses a current adjustment method for a line light source. Based on the light intensity value of the peak wavelength corresponding to the current of the current of the current line light source, the current of the line light source is driven and adjusted so that the light intensity value corresponding to the peak wavelength in the adjusted spectrum is within the light intensity working range.

[0066] The adjusted formula for the current I of a line light source is: I = I d *G target / G d G target This is expressed as an effective light intensity value, which is located within the light intensity operating range. d G represents the current driving current of the current line light source. d This represents the light intensity value corresponding to the peak wavelength at the current exposure time.

[0067] This application is not limited to the above-mentioned current adjustment formula for a line light source. Its purpose is to ensure that after the driving current of the line light source is adjusted, the light emitted by the line light source, after being processed by the optical system of the line spectrum confocal sensor, has a light intensity value corresponding to the peak wavelength in the spectrum that is within the light intensity working range.

[0068] Step 3: If the number of peaks is not less than two, extract the light intensity value corresponding to the peak wavelength, analyze the peak shape, and identify the peak wavelength associated with each reflection area.

[0069] Linear spectral confocal sensors detect the surface of an object. When the line spot width simultaneously covers both the specular reflection and diffuse reflection regions, a height difference exists between them. When light converges to the diffuse reflection region, the direction of light reflection changes, forming a weak signal peak. Conversely, the wavelength of light incident on the specular reflection region does not converge there, so the direction of light reflected back from the specular surface remains unchanged, also forming a weak signal peak.

[0070] If, within the depth of field of the line spectral confocal sensor, light of one wavelength converges to the diffuse reflection region, and within the depth of field, at any position along the scan line, there is at least one specular reflection region with a height difference from the diffuse reflection region within the width of the line spot, then the number of peaks on the spectrum corresponding to that position is not less than two.

[0071] When light of a certain wavelength converges into the diffuse reflection region, and within the depth of field of the line spectral confocal sensor, there exists a specular reflection region and a height difference between the diffuse reflection region and the line spot at a certain position on the scanning line, then the number of peaks in the spectrum corresponding to that position is equal to two.

[0072] When the measurement light converges to the diffuse reflection region, and within the depth of field of the line spectral confocal sensor, the measurement light at a position on the scanning line has two specular reflection regions with different heights in the width direction, and there is a height difference between the specular reflection region and the diffuse reflection region, then the number of peaks in the spectrum corresponding to that position is equal to three.

[0073] Furthermore, when light of one wavelength converges to the diffuse reflection region, the number of peaks in the spectral image corresponding to each position on the scanning line is determined by the number of specular reflection regions with height differences covered by the measurement light of the line spectral confocal sensor in the width direction.

[0074] The light intensity values ​​of at least two peaks in the above spectrum are relatively low.

[0075] When the measurement light of the line spectral confocal sensor converges to the specular reflection region, and there is at least one diffuse reflection region or specular reflection region with a height difference in the width direction of the measurement light, the light intensity information of the measurement light converged to the specular reflection region is much greater than the light intensity information reflected back from the diffuse reflection region or specular reflection region with a height difference in the width direction of the measurement light. This results in the light intensity being weaker reflected back from the diffuse reflection region or specular reflection region, ultimately resulting in only one peak in the spectrum.

[0076] In this embodiment, as Figure 3 As shown, when there are no fewer than two peaks in the spectrum, the method for identifying the peak wavelengths associated with each reflection region includes:

[0077] Step 31: Extract the peak value of each peak in the spectrum and calculate whether the peak value ratio of each peak is within the allowable ratio range [r, 1 / r], where r represents the minimum allowable peak value ratio between two peaks, 0.4 < r < 1. The ratio range can be determined based on the ratio between the light intensity reflected back from the diffuse reflection region and the light intensity reflected back from the specular reflection region.

[0078] Step 32: If the ratio of the peak values ​​of the two peaks is within the allowable range, then determine the half-peak width of each peak.

[0079] Based on the peak value, count the intersections between half of the peak values ​​and the spectrum. If there are two intersections, the difference between the wavelengths corresponding to the two intersections is the half-width at half-maximum (WWHM) of the peak. If there are more than two intersections, select the intersection with the smallest sum of distances from the peak wavelength. The difference between the wavelengths corresponding to the two intersections with the smallest sum of distances from the peak wavelength is the WWHM of the peak.

[0080] The wavelengths corresponding to the two intersection points are selected based on minimizing the sum of the distances from the peak wavelength, using the following selection formula: , λ fRepresented as peak wavelength, λ i and λ j These represent the wavelengths corresponding to the i-th and j-th intersection points, respectively.

[0081] Step 33: Determine the reflection area of ​​the object surface detected by each peak wavelength based on the ratio between the half-widths of each peak.

[0082] When the ratio of the half-width at half maximum (WHM) of each peak to the maximum value among all peaks is less than a first ratio factor, the wavelength corresponding to the largest WHM is the wavelength reflected back from the diffuse reflection region of the test object's surface, and the wavelengths corresponding to the other peaks are the wavelengths reflected back from the specular reflection region of the test object's surface; or when the ratio of the half-width at half maximum (WHM) of each peak to the minimum value among all peaks is greater than a second ratio factor, the wavelength corresponding to the WHM greater than the second ratio factor is the wavelength reflected back from the diffuse reflection region of the test object's surface, and the wavelengths of the other peaks are the wavelengths reflected back from the specular reflection region of the test object's surface.

[0083] By using the ratio between the peak values ​​of any two peaks and combining it with the ratio between the half-widths of each peak, the light intensity values ​​corresponding to each wavelength in the spectrum can be analyzed to identify the reflection areas of the test object surface detected by each peak wavelength. This realizes the correlation between each reflection area and each peak wavelength, improves the accuracy of the correspondence between each peak wavelength and the reflection area reflected back from the test object surface, and helps to determine the area type of the test object surface in a quasi-focused state.

[0084] Step 4: Based on the peak wavelength and the light intensity corresponding to the peak wavelength, analyze the offset of the height of the specular reflection area, and correct the detection height of the specular reflection area to obtain the height difference between each reflection area covered within the width of the line spot at any position on the scanning line. The reflection area includes a diffuse reflection area with a height difference and at least one specular reflection area.

[0085] For a standard plane mirror, the line-spectrum confocal sensor moves along the optical axis to obtain spectral images at different positions along the optical axis and the light intensity values ​​corresponding to the peaks in the spectral images. This allows for the construction of the defocus response curve of the line-spectrum confocal sensor in the mirror reflection region, i.e.: ,I max Let λ represent the light intensity corresponding to the wavelength λ0 that converges to the specular reflection region, e represent the natural constant, Δz represent the distance the plane mirror deviates from the focal point, and I represent the light intensity. △z Δz represents the light intensity at wavelength λ0 when the distance from the focal point is Δz, and X represents the defocus coefficient, which is a constant related to the optical parameters of the sensor.

[0086] The defocus coefficient can be determined by placing the plane mirror at the focal point and measuring the light intensity I.max Move the objective lens until the light intensity becomes I max When / 2, the corresponding moving distance d0 is substituted into the above defocus response curve to obtain the specific value of the defocus coefficient X.

[0087] like Figure 4 As shown, the light intensity value is based on the peak wavelength corresponding to the current specular reflection area. Calculate the offset of the height of the specular reflection area. , .

[0088] Based on the offset of the peak wavelength corresponding to the specular reflection area, and combined with the measured distance d2 of the peak wavelength corresponding to the specular reflection area, the distance from the specular reflection area to the sensor objective lens is obtained by difference calculation: Where d2 represents the calibrated peak wavelength λ i Distance to the sensor objective lens.

[0089] Based on the difference between the corrected distance between the specular reflection area and the sensor objective lens and the measured distance d1 of the peak wavelength corresponding to the diffuse reflection area, the height difference between the diffuse reflection area and the specular reflection area covered within the width of the line spot at any position on the scanning line is obtained.

[0090] Through the above analysis, the distance from the specular reflection area covered by the line spot width at any position on the scanning line to the sensor objective lens can be accurately obtained. Based on the distances from the specular reflection area to the sensor objective lens and the distances from the diffuse reflection area to the sensor objective lens, the height difference between the specular reflection area and the diffuse reflection area covered by the line spot width at any position on the scanning line can be obtained. This provides reliable data for determining the distance the objective lens moves along the optical axis based on the height difference in the later stages.

[0091] Step 5: Adjust the distance between the sensor and the surface of the object to be measured according to the height difference, so that there is only one effective peak in the spectrum at any position on the scanning line. The effective peak is the peak corresponding to the wavelength that converges to the diffuse reflection region or the specular reflection region.

[0092] In this embodiment, only light of a certain wavelength converges to the diffuse reflection region, and the height difference between the specular reflection region and the diffuse reflection region is less than the measurement range of the sensor. Based on the height difference between the reflection regions covered within the width of the line spot, the distance between the objective lens and the surface of the object to be measured is adjusted so that the diffuse reflection region is within the measurement range of the sensor, while the specular reflection region is outside the measurement range of the sensor.

[0093] The dispersive objective lens decomposes a broadband light source into monochromatic light of different wavelengths and focuses each wavelength of light at a different position on the optical axis, forming a continuous measurement range. The measurement range is the optical axis position that converges to the farthest point from the objective lens and the optical axis position that converges to the closest point to the objective lens along the optical axis direction.

[0094] In this embodiment, the distance between the sensor and the surface of the object to be measured is adjusted so that light of a certain wavelength is focused into the diffuse reflection region. The light after passing through the dispersive objective lens is not reflected back by the specular reflection region, so that the specular reflection region is in deep defocus.

[0095] By adjusting the distance between the sensor and the surface of the object to be measured, there is one and only one peak in the spectrum at any position on the scanning line. In order to improve the height detection accuracy of the diffuse reflection region, the light intensity value of the peak wavelength corresponding to the one and only peak in the spectrum at any position on the scanning line is determined. If it is less than the set light intensity threshold, the exposure time or the current of the line light source is increased so that the light intensity value of the peak wavelength is greater than the set light intensity threshold.

[0096] Since the light intensity reflected back from the diffuse reflection region is relatively low, by increasing the exposure time or the current of the line light source, the light that converges to the diffuse reflection region is reflected back by the diffuse reflection region, and the light intensity corresponding to the peak wavelength in the spectrum is enhanced. The enhanced spectrum is then processed to obtain the wavelength that converges to the diffuse reflection region.

[0097] The calculation of the peak wavelength in the diffuse reflection region is as follows: ,λ1 to λ m The range represents the set of wavelengths after dispersion by the objective lens, I λ λ represents the light intensity corresponding to the wavelength λ, and C represents the peak wavelength in the spectrum corresponding to a position in the diffuse reflection region.

[0098] By adjusting the position of the objective lens according to the height difference between each reflection area, the spectral image at any position on the scanning line contains only one peak. This avoids the light signal reflected back from the mirror reflection area and retains only the light intensity information that converges to the diffuse reflection area. By adjusting the exposure time or current, the signal-to-noise ratio of the light signal reflected back from the diffuse reflection area is improved. Thus, based on the enhanced spectral image, the wavelength that converges to the diffuse reflection area can be accurately located, improving the height detection accuracy of the object's surface.

[0099] Based on the same inventive concept, such as Figure 5 As shown, this application also proposes a detection system based on line spectral confocal microscopy, comprising:

[0100] The peak extraction module is used to identify the number of peaks in the spectrum and extract the light intensity value corresponding to the peak wavelength;

[0101] The adjustment module determines the number of peaks. If the number of peaks is equal to 1, it determines whether the light intensity value corresponding to the peak wavelength is within the light intensity working range. If it is not within the light intensity working range, it adjusts the light intensity value based on the peak wavelength to ensure that the light intensity value corresponding to the adjusted peak wavelength is within the light intensity working range.

[0102] If the number of peaks is not less than two, extract the light intensity value corresponding to the peak wavelength, analyze the peak shape, and identify the peak wavelength associated with each reflection area.

[0103] The height correction module is used to analyze the offset of the peak wavelength associated with the specular reflection area and correct the detection height of the specular reflection area to obtain the height difference between each reflection area within the coverage of the line spot width at any position on the scan line.

[0104] The drive control module is used to adjust the distance between the sensor and the surface of the object to be measured according to the height difference, so that there is only one valid peak in the spectral image at any position on the scanning line.

[0105] The specific implementation of the detection system based on line spectral confocalization provided in this application can be referred to the above-described detection method based on line spectral confocalization, and will not be repeated here.

[0106] In another embodiment, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements any of the above-described line spectral confocal detection methods.

[0107] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0108] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

[0109] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A detection method based on line spectral confocal microscopy, characterized in that, Used to identify the height of specular reflection and diffuse reflection areas on the surface of an object where there is a height difference, including: Identify the number of peaks in the spectrum and extract the light intensity values ​​corresponding to the peak wavelengths; The number of peaks is determined. If the number of peaks is equal to 1, it is determined whether the light intensity value corresponding to the peak wavelength is within the light intensity working range. If it is not within the light intensity working range, the light intensity value corresponding to the peak wavelength is adjusted to ensure that the light intensity value corresponding to the adjusted peak wavelength is within the light intensity working range. The light intensity working range is composed of a first light intensity threshold and a second light intensity threshold, wherein the first light intensity threshold is less than the second light intensity threshold. If the number of peaks is not less than two, extract the light intensity value corresponding to the peak wavelength, analyze the peak shape, and identify the peak wavelength associated with each reflection area. Analyze the height offset of the specular reflection area and correct the detection height of the specular reflection area to obtain the height difference between the reflection areas covered within the width of the line spot at any position on the scanning line. Based on the height difference, the distance between the sensor and the surface of the object to be measured is adjusted so that there is only one valid peak in the spectral image at any position on the scanning line. The valid peak is the peak corresponding to the wavelength that converges to the diffuse reflection region or the specular reflection region.

2. The detection method based on line spectral confocalization according to claim 1, characterized in that, When the light intensity value corresponding to the peak wavelength is not within the light intensity operating range, adjustment is made based on the light intensity value corresponding to the peak wavelength. The adjustment method includes: Determine whether the light intensity value corresponding to the peak wavelength is less than the set first light intensity threshold. If it is less than the set first light intensity threshold, increase the exposure time. If it is greater than the set second light intensity threshold, decrease the exposure time so that after the exposure time is adjusted, the light intensity value corresponding to the peak wavelength in the spectrum is within the light intensity working range.

3. The detection method based on line spectral confocalization according to claim 1, characterized in that, Select any light intensity value within the light intensity working range. Based on the selected light intensity value, the light intensity value corresponding to the current peak wavelength, and the current exposure time, analyze the exposure time corresponding to the adjusted peak wavelength light intensity value within the light intensity working range.

4. The detection method based on line spectral confocalization according to claim 2, characterized in that, The method for adjusting the exposure time includes: calculating the exposure time corresponding to the light intensity value corresponding to the adjusted peak wavelength being within the light intensity working range based on a first light intensity threshold, a second light intensity threshold, the light intensity value corresponding to the current peak wavelength, and the current exposure time. The weights of the first light intensity threshold and the second light intensity threshold are determined by a ratio coefficient, wherein the ratio coefficient takes the value [0,1], and the sum of the weights of the first light intensity threshold and the second light intensity threshold is equal to 1.

5. The detection method based on line spectral confocalization according to claim 1, characterized in that, When light of one wavelength converges into the diffuse reflection region, the number of peaks in the spectral image corresponding to each position on the scanning line is determined by the number of specular reflection regions with height differences covered within the width of the line spot.

6. The detection method based on line spectral confocalization according to claim 1, characterized in that, When there are at least two peaks in the spectrum, the method for identifying the peak wavelengths associated with each reflection region includes: Extract the peak value of each peak in the spectrum and calculate whether the peak ratio of each peak is within the allowable ratio range [r, 1 / r]. r represents the minimum allowable peak ratio of two peaks, and r is less than 1. If the ratio of the peak values ​​of the two peaks is within the allowable range, then determine the half-peak width of each peak. The reflection area of ​​the object surface detected by each peak wavelength is determined based on the ratio between the half-peak widths of each peak.

7. The detection method based on line spectral confocalization according to claim 1, characterized in that, Based on obtaining the spectral maps at different positions along the optical axis and the light intensity values ​​corresponding to the peak values ​​in the spectral maps, a defocus response curve of the line spectral confocal sensor in the specular reflection region is constructed. Combined with the light intensity value of the peak wavelength corresponding to the current specular reflection region, the offset of the height of the specular reflection region is analyzed. The defocus response curve: ,I max Let λ represent the light intensity corresponding to the wavelength λ0 that converges to the specular reflection region, e represent the natural constant, Δz represent the distance the plane mirror deviates from the focal point, and I represent the light intensity. △z Δz represents the light intensity at wavelength λ0 when the distance from the focal point is Δz, and X represents the defocus coefficient, which is a constant related to the optical parameters of the sensor.

8. The detection method based on line spectral confocalization according to claim 7, characterized in that, Based on the offset of the height of the specular reflection area, and combined with the measurement distance corresponding to the wavelength associated with the specular reflection area, the measurement distance of the specular reflection area is corrected.

9. A detection system based on line spectral confocal microscopy, applied to the detection method based on line spectral confocal microscopy as described in any one of claims 1-8, characterized in that, include: The peak extraction module is used to identify the number of peaks in the spectrum and extract the light intensity value corresponding to the peak wavelength; The adjustment module determines the number of peaks. If the number of peaks is equal to 1, it determines whether the light intensity value corresponding to the peak wavelength is within the light intensity working range. If it is not within the light intensity working range, it adjusts the light intensity value based on the peak wavelength to ensure that the light intensity value corresponding to the adjusted peak wavelength is within the light intensity working range. If the number of peaks is not less than two, extract the light intensity value corresponding to the peak wavelength, analyze the peak shape, and identify the peak wavelength associated with each reflection area. The height correction module is used to analyze the offset of the peak wavelength associated with the specular reflection area and correct the detection height of the specular reflection area to obtain the height difference between each reflection area within the width range of the line spot at any position on the scan line. The drive control module is used to adjust the distance between the sensor and the surface of the object to be measured according to the height difference, so that there is only one valid peak in the spectral image at any position on the scanning line.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the detection method based on line spectral confocalization as described in any one of claims 1-8.