Spectrum confocal ranging method, device and equipment based on short-range scanning
Technical Field
The invention relates to the technical field of spectrum confocal displacement measurement, in particular to a spectrum confocal distance measuring method, a spectrum confocal distance measuring device and spectrum confocal distance measuring equipment based on short-range scanning.
Background
The spectrum confocal displacement detection technology utilizes an optical dispersion phenomenon to focus light with different wavelengths on different optical axis positions to form a one-to-one correspondence relationship between the wavelength and the axial distance. Through confocal light path design, the spectral peak wavelength reflected from the surface to be measured and passing through the conjugated pinhole is obtained, and the axial distance of the surface to be measured can be solved.
At present, all spectrum confocal displacement sensors need to be calibrated with high precision before instruments leave a factory, and a search relation curve between an axial distance and a focusing wavelength is stored in storage equipment of the instruments. However, since the surface to be measured used in the calibration process is not exactly the same as the surface to be measured in the actual measurement, some error occurs in the measurement of the customer, which is also the reason why the individual product needs the customer to provide the sample to be measured for accurate calibration.
Disclosure of Invention
The present invention aims to solve the problems of the related art at least to some extent. Therefore, an object of the present invention is to provide a spectral confocal ranging method, device and apparatus based on short-range scanning, which can improve the measurement accuracy and reduce the measurement error.
The technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a spectral confocal ranging method based on short-range scanning, including:
s1, establishing a search relation curve between the axial distance of the measuring head and the pixel serial number of the spectrometer;
s2: acquiring a second noise spectrum signal;
s3: the measuring head detects the surface of an object to be measured, and when the surface of the object to be measured enters a measuring range of a light path, a reflection spectrum signal of the current position is recorded;
s4: the measuring head scans the current position in a short range to obtain an actually measured reference light intensity signal;
s5: and obtaining the real-time dispersion reflectivity spectrum of the current position according to the noise spectrum signal, the reflection spectrum signal and the actually measured reference light intensity signal, obtaining a spectrometer pixel sequence number value corresponding to the peak of the real-time dispersion reflectivity spectrum by utilizing a peak searching algorithm, and substituting the pixel sequence number value into the searching relation curve to obtain the axial distance of the current position of the surface of the object to be detected.
Further, the step S1 includes the sub-steps of:
s11, fixing the surface of any measurable object on a positioning scanning mechanism, scanning in the axial measurement range of a measuring head, recording the axial distance and the reflection spectrum signal of each scanning position, comparing to obtain the maximum light intensity which can be generated by each spectrometer pixel in the measurement range, and grouping the maximum light intensity as a group of reference light intensity signals;
s12, obtaining a first noise spectrum signal;
s13, calculating the dispersion reflectivity spectrum of each scanning position according to the reference light intensity signal, the noise spectrum signal and the reflection spectrum signal;
and S14, acquiring spectrometer pixel serial number values corresponding to the wave crests of the dispersion reflectivity spectrum of each scanning position, and establishing a search relation curve between the axial distance of the measuring head and the spectrometer pixel serial numbers.
Further, in step S5, the formula for obtaining the real-time chromatic dispersion reflectance spectrum of the current position according to the noise spectrum signal, the reflected spectrum signal and the measured reference light intensity signal is as follows: etak=(Ik-Inoise)/(Imax-Inoise) In which ImaxFor actually measuring reference light intensity signal, InoiseAs a noisy spectral signal, IkIs a reflected spectral signal.
Further, the step 4 specifically includes: the measuring head detects the surface of an object to be measured, when the surface of the object to be measured enters a measuring range of a light path, the detected reflection spectrum signals are recorded, the maximum light intensity which can be obtained on each pixel of the spectrometer is obtained through comparison, and the maximum light intensity is classified into a group to be used as an actual measurement reference light intensity signal.
Further, the motion trail of the measuring head in short-range scanning at the current position is S-shaped.
Further, the second noise spectrum signal includes spectrometer detection noise or optical element reflection noise.
In a second aspect, the present invention provides a spectral confocal ranging apparatus based on short-range scanning, including:
the relation curve creating module is used for creating a relation curve between the axial distance of the measuring head and the focusing wavelength;
noise acquisition: acquiring a second noise spectrum signal;
the reflection spectrum acquisition module is used for scanning and measuring the surface of an object to be measured by the measuring head, and recording a reflection spectrum signal of the current position when the surface of the object to be measured enters the measuring range of the light path;
the short-range scanning module is used for scanning the current position in a short-range manner to obtain an actually-measured reference light intensity signal;
and the table look-up module is used for obtaining the real-time chromatic dispersion reflectivity spectrum of the current position according to the noise spectrum signal, the reflection spectrum signal and the actually measured reference light intensity signal, obtaining a spectrometer pixel serial number value corresponding to a peak of the real-time chromatic dispersion reflectivity spectrum by utilizing a peak searching algorithm, substituting the pixel serial number value into the look-up relation curve and obtaining the axial distance of the current position of the surface of the object to be measured.
Furthermore, the scanning module can drive the measuring head to scan the surface of the object to be measured in an S-shaped motion track.
In a third aspect, the present invention provides a spectral confocal ranging apparatus based on short-range scanning, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described short range scan-based spectroscopic confocal ranging method.
The invention has the beneficial effects that:
the invention uses the measuring head to scan the current position in a short range, obtains the maximum reference light intensity signal in real time, does not need to store the maximum reference light intensity signal and the relation curve in the calibration process in advance, only needs to store the relation curve in advance once, does not need to provide an actually measured object sample in the calibration process, and improves the measurement precision and the adaptability. In addition, because only the peak pixel sequence number value needs to be solved, full-range scanning is not needed, only short-range scanning covering the current position is needed, and no positioning requirement is required on a scanning device, so that the cost of the instrument is reduced.
Drawings
FIG. 1 is a flow chart of spectral confocal ranging based on short-range scanning according to the present invention;
FIG. 2 is a short range scan route diagram in accordance with the present invention;
fig. 3 is a schematic structural diagram of a spectral confocal distance measuring device based on short-range scanning according to the invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Example 1
In order to solve the problem that in the calibration process of searching a relation curve between an axial distance and a spectrometer pixel serial number, an adopted surface to be measured is not completely the same as a surface to be measured in real measurement, so that certain errors are generated in actual measurement, as shown in figure 1, the invention provides a spectrum confocal ranging method based on short-range scanning, which comprises the following steps:
s1, establishing a relation curve between the axial distance of the measuring head and the pixel serial number of the spectrometer;
in step 1, calibration of the relationship curve may be performed by using any measurable object without providing a measured object sample, and specifically, the step S1 includes the following sub-steps:
s11, fixing the surface of any measurable object on a positioning scanning mechanism, scanning in the axial measurement range of a measuring head, recording the axial distance and the reflection spectrum signal of each scanning position, comparing to obtain the maximum light intensity which can be generated by each spectrometer pixel in the measurement range, and grouping the maximum light intensity as a group of reference light intensity signals;
s12, obtaining a first noise spectrum signal;
s13, calculating the dispersion reflectivity spectrum of each scanning position according to the reference light intensity signal, the noise spectrum signal and the reflection spectrum signal;
and S14, acquiring spectrometer pixel serial number values corresponding to the wave crests of the dispersion reflectivity spectrum of each scanning position, and establishing a search relation curve between the axial distance of the measuring head and the spectrometer pixel serial numbers.
In the prior art, the reference light intensity signal and the search relation curve need to be stored in advance, and an actually measured object sample needs to be provided for calibration.
S2: obtaining a second noise spectrum signal Inoise,
Specifically, the method can be performed when the surface to be measured is shielded or positioned outside the measurement range, wherein the method includes spectrometer detection noise, optical element reflection noise and the like;
s3: the measuring head scans and measures the surface of an object to be measured, and when the surface of the object to be measured enters the measuring range of the light path, the reflection spectrum signal I of the current position is recordedk,
Specifically, the measurement is a signal reflected from the surface of the object to be measured back to the spectrometer at the current position, and since the conjugate aperture has a certain size, the full width at half maximum of the obtained signal is large, and the serial number value of the focusing pixel cannot be simply calculated according to the maximum method.
S4: the measuring head scans the current position in a short range to obtain an actually measured reference light intensity signal,
referring to fig. 2, specifically, the motion trajectory of the measuring head for short-range scanning of the current position is S-shaped, and the scanning trajectory 2 needs to cover the current position 1. During scanning, the reflected spectrum signals detected by the spectrograph are recorded, the maximum light intensity which can be obtained on each pixel of the spectrograph is obtained through comparison, and the maximum light intensity is classified into a group to be used as an actually measured reference light intensity signal Imax;
S5: and obtaining the real-time dispersion reflectivity spectrum of the current position according to the noise spectrum signal, the reflection spectrum signal and the actually measured reference light intensity signal, obtaining a spectrometer pixel sequence number value corresponding to the peak of the real-time dispersion reflectivity spectrum by utilizing a peak searching algorithm, and substituting the pixel sequence number value into the searching relation curve to obtain the axial distance of the current position of the surface of the object to be detected.
Specifically, the formula for obtaining the real-time chromatic dispersion reflectance spectrum of the current position according to the noise spectrum signal, the reflectance spectrum signal and the actually measured reference light intensity signal is as follows: etak=(Ik-Inoise)/(Imax-Inoise) In which ImaxFor actually measuring reference light intensity signal, InoiseAs a noisy spectral signal, IkIs a reflected spectral signal.
The invention provides a spectrum confocal ranging device based on short-range scanning, which comprises:
the scanning module is used for driving the side head to scan the surface of the object to be detected;
the relation curve creating module is used for creating a relation curve between the axial distance of the measuring head and the pixel serial number of the spectrometer;
noise acquisition: acquiring a second noise spectrum signal;
the reflection spectrum acquisition module is used for scanning and measuring the surface of an object to be measured by the measuring head, and recording a reflection spectrum signal of the current position when the surface of the object to be measured enters the measuring range of the light path;
the short-range scanning module is used for scanning the current position in a short-range manner to obtain an actually-measured reference light intensity signal;
and the table look-up module is used for obtaining the real-time chromatic dispersion reflectivity spectrum of the current position according to the noise spectrum signal, the reflection spectrum signal and the actually measured reference light intensity signal, obtaining a spectrometer pixel serial number value corresponding to a peak of the real-time chromatic dispersion reflectivity spectrum by utilizing a peak searching algorithm, substituting the pixel serial number value into the look-up relation curve and obtaining the axial distance of the current position of the surface of the object to be measured.
Referring to fig. 3, the scanning module (the spectrum confocal ranging device based on short-range scanning) includes a base 1, a short-range scanner 2, a moving holder 3 and a track shell 4, one end of the base 1, the track shell 4 and the short-range scanner 2 is fixedly connected, the moving holder 3 is connected with the other end of the short-range scanner 2, the moving holder 3 fixes a measuring head 5 and moves axially under the driving of the short-range scanner 2, and the displacement device does not need to be positioned accurately. The short-range scanner 2 is made of PZT ceramic.
Referring to fig. 2, the scanning module may drive the measuring head to scan the surface of the object to be measured with an S-shaped motion trajectory.
The invention provides a spectrum confocal ranging device based on short-range scanning, which comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described short range scan-based spectroscopic confocal ranging method.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.