An imaging method and device based on cosine scanning
By using nonlinear lookup tables and laser correction power in cosine scanning technology, and combining position correction coefficients to calculate the count value of the logic clock, the spatial tensile and intensity inhomogeneity problems caused by cosine scanning are solved, and efficient and uniform image scanning and imaging are achieved.
Patent Information
- Application Number
- CN202510038772.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-01-10
AI Technical Summary
While the existing cosine scanning technology increases the scanning speed, it leads to spatial stretching and scanning intensity unevenness problems, affecting the sharpness and resolution of the image.
By constructing a nonlinear lookup table that stores the count values and power correction coefficients corresponding to each sampling clock, a cosine scanning is performed using laser correction power, and the count values of the logic clock are calculated by the position correction coefficient, uniform sampling at non-fixed time intervals is achieved.
While maintaining the high-speed scanning capability, the problems of spatial tensile and uneven distribution of intensity are solved, and a target image with uniform spatial and uniform intensity is generated.
Smart Images

Figure CN119438168B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of scanning imaging technology, and in particular to an imaging method and device based on cosine scanning. Background Art
[0002] In the prior art, in order to achieve efficient and fast scanning, devices such as laser confocal microscopes and optical coherence tomography usually use cosine scanning. Compared with the traditional linear scanning method, cosine scanning can significantly improve the scanning speed by optimizing the scanning path. However, this scanning method also brings some new problems, such as spatial stretching and uneven intensity distribution caused by changes in scanning speed, which will seriously affect the clarity and resolution of the final image. Therefore, it is urgent to propose a method that can maintain the system's high-speed scanning capability while solving the problems of spatial stretching and uneven scanning intensity, so as to ensure that fast scanning generates clear and high-resolution images. Summary of the invention
[0003] The present disclosure provides an imaging method and device based on cosine scanning to solve the problems of space stretching, scanning intensity non-uniformity, etc. caused by cosine scanning in the prior art.
[0004] In a first aspect, the present disclosure provides an imaging method based on cosine scanning, the method comprising:
[0005] A laser beam with initial power emitted by a laser is used to perform a cosine scan on the sample surface to obtain a reference signal and a logic clock signal;
[0006] A pixel counter is used to count the logic clock signal, and when the number of the logic clock signal is equal to the count value corresponding to the current sampling clock, a trigger signal is sent to the lookup table and a collection signal is sent to the detector;
[0007] In response to receiving the trigger signal, the lookup table searches for a count value and a power correction coefficient corresponding to a next sampling clock, and sends the count value corresponding to the next sampling clock to the pixel counter; the lookup table is a nonlinear lookup table storing count values and power correction coefficients corresponding to each sampling clock;
[0008] In response to receiving the acquisition signal, the detector performs detection imaging based on each sampling clock and a power correction coefficient corresponding to each sampling clock to obtain a target image.
[0009] According to an imaging method based on cosine scanning provided by the present disclosure, in response to receiving the acquisition signal, the detector performs detection imaging based on each sampling clock and the power correction coefficient corresponding to each sampling clock to obtain a target image, including: calculating the laser correction power of each sampling clock according to the power correction coefficient corresponding to each sampling clock and the initial power; for each sampling clock, using a laser beam with a power of the laser correction power to perform a cosine scan on the sample surface, and using the detector to complete the signal acquisition of each sampling clock to obtain the target image.
[0010] According to an imaging method based on cosine scanning provided by the present disclosure, in response to receiving the acquisition signal, the detector performs detection imaging based on each sampling clock and the power correction coefficient corresponding to each sampling clock to obtain a target image, and also includes: for each sampling clock, using a laser beam with a power of the initial power to perform a cosine scan on the sample surface, and using the detector to complete the signal acquisition of each sampling clock to obtain an initial image; and obtaining the target image based on the power correction coefficient corresponding to each sampling clock and the initial image.
[0011] According to an imaging method based on cosine scanning provided by the present disclosure, a nonlinear lookup table storing count values and power correction coefficients corresponding to each sampling clock is constructed, specifically including: constructing a first nonlinear functional relationship between the sampling clock and the count value, and a second nonlinear functional relationship between the sampling clock and the power correction coefficient; selecting a target number of sampling clocks as sampling points, and calculating the count values and power correction coefficients corresponding to the sampling points based on the first nonlinear functional relationship and the second nonlinear functional relationship for storage.
[0012] According to an imaging method based on cosine scanning provided by the present disclosure, in response to receiving the trigger signal, the lookup table searches for the count value and power correction coefficient corresponding to the next sampling clock, including: in response to receiving the trigger signal, searching for the sampling point closest to the next sampling clock from the sampling points stored in the lookup table; obtaining the count value corresponding to the closest sampling point as the count value corresponding to the next sampling clock, and obtaining the power correction coefficient corresponding to the closest sampling point as the power correction coefficient corresponding to the next sampling clock; or, interpolating the closest sampling point to determine the interpolation point of the next sampling clock, and using the count value and power correction coefficient corresponding to the interpolation point as the count value and power correction coefficient corresponding to the next sampling clock.
[0013] According to an imaging method based on cosine scanning provided by the present disclosure, the nonlinear lookup table is a dynamic nonlinear lookup table that dynamically adjusts the number of targets and the distribution of sampling points according to imaging requirements and sample characteristics.
[0014] According to an imaging method based on cosine scanning provided by the present disclosure, the count value of a logic clock signal is determined, specifically including: calculating a position correction coefficient of a pixel change from a logic clock to a sampling clock; for any sampling clock, according to the current sampling clock, the next sampling clock and the position correction coefficient, calculating the number of logic clocks between the current sampling clock and the next sampling clock as the count value of the logic clock signal.
[0015] According to an imaging method based on cosine scanning provided by the present disclosure, a power correction coefficient corresponding to each sampling clock is determined, specifically including: for any sampling clock, a preset modulation function is used to calculate the power correction coefficient corresponding to each sampling clock, wherein the preset modulation function is determined according to an intensity stability rule.
[0016] According to an imaging method based on cosine scanning provided by the present disclosure, a laser beam with an initial power emitted by a laser is used to perform a cosine scan on the surface of a sample to obtain a reference signal and a logic clock signal, including: using a laser to emit a laser beam with an initial power; using the laser beam with the initial power to perform a cosine scan on the surface of the sample to obtain a reference signal; using a phase detector to detect the difference between the reference signal and the divided signal of a divider to obtain a difference signal; and using a filter and a voltage-controlled oscillator to output a logic clock signal synchronized with the reference signal.
[0017] In a second aspect, the present disclosure provides an imaging device based on cosine scanning, the device comprising:
[0018] A scanning module, used for performing a cosine scan on the sample surface using a laser beam of initial power emitted by a laser to obtain a reference signal and a logic clock signal;
[0019] A counting module, used to count the logic clock signal using a pixel counter, and when the number of the logic clock signal meets the count value corresponding to the current sampling clock, send a trigger signal to the lookup table and send a collection signal to the detector;
[0020] A table lookup module, configured to, in response to receiving the trigger signal, look up the count value and power correction coefficient corresponding to the next sampling clock in the lookup table, and send the count value corresponding to the next sampling clock to the pixel counter; the lookup table is a nonlinear lookup table storing the count value and power correction coefficient corresponding to each sampling clock;
[0021] The correction imaging module is used for, in response to receiving the acquisition signal, the detector performs detection imaging based on each sampling clock and the power correction coefficient corresponding to each sampling clock to obtain a target image.
[0022] In summary, the present invention provides an imaging method and device based on cosine scanning, which improves the scanning speed by adopting cosine scanning; calculates the count value of the logic clock by the position correction coefficient to achieve uniform sampling at non-fixed time intervals, and solves the spatial stretching problem caused by cosine scanning; performs cosine scanning with laser correction power, while maintaining the high-speed scanning capability of cosine scanning, solves the problem of uneven intensity distribution in cosine scanning imaging; uses nonlinear functions to store and search in the lookup table, reduces storage costs, and improves search efficiency; adjusts the number and distribution of sampling points in combination with imaging requirements and sample characteristics, and achieves accurate acquisition of key information of the image with fewer sampling points and improves the query efficiency of the lookup table; quickly obtains the sampling count value and the power correction coefficient by calling the lookup table, and accurately controls the output time and power of the laser, thereby solving the problems caused by cosine scanning, and generating a target image with uniform space and uniform intensity while ensuring a fast system scanning speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the present disclosure or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 It is a schematic flow chart of an imaging method based on cosine scanning provided by the present disclosure;
[0025] Figure 2 It is a flow chart of a method for determining a count value of a logic clock signal provided by the present disclosure;
[0026] Figure 3 It is a flowchart of a method for constructing a lookup table provided by the present disclosure;
[0027] Figure 4 It is a structural schematic diagram of an imaging device based on cosine scanning provided by the present disclosure. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions in the present disclosure will be clearly and completely described below in conjunction with the drawings in the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0029] Figure 1 is a schematic diagram of a cosine scanning-based imaging method provided by the present disclosure; see Figure 1 , the method comprising:
[0030] Step S11, using a laser beam with initial power emitted by a laser to perform cosine scanning on the surface of the sample to obtain a reference signal and a logic clock signal.
[0031] Among them, cosine scanning refers to a scanning method in which the scanning speed and scanning angle change both present cosine changes. The cosine scanning is generally faster in the middle of the scanning range and slower at the edge of the scanning range.
[0032] Specifically, it can be understood that a laser beam is emitted by a laser, and the laser beam after being reflected by a scanner is irradiated onto the surface of a sample. The scanning mode of the scanner is controlled to be a cosine scanning mode, and the surface of the sample is scanned in a cosine scanning mode. During the scanning process, a position detector is used to detect the scanning range and the scanning direction to obtain a synchronization signal, and the synchronization signal is used as a reference signal for subsequent signal synchronization operations to obtain a logic clock signal.
[0033] Specifically, it can also be understood that since the synchronization signal mainly reflects the time synchronization of the scan during the scanning process, in order to obtain a logical clock signal synchronized with the reference signal, a phase detector, a filter, a voltage-controlled oscillator and a frequency divider are used to obtain a logical clock signal synchronized with the reference signal through detection, filtering, frequency division and other operations. In some embodiments, other methods for obtaining a synchronized logical clock signal can also be used according to the actual application scenario, and the present disclosure does not limit this.
[0034] Furthermore, the laser beam with initial power emitted by the laser is used to perform cosine scanning on the sample surface to obtain a reference signal and a logic clock signal, which specifically includes:
[0035] Step S111, using a laser to emit a laser beam with an initial power.
[0036] Specifically, the power of the laser beam emitted by the laser is controlled by a laser controller; the initial power can be determined according to the power of a standard light source, or can be selected according to the sample type, which is not limited in the present disclosure.
[0037] Step S112: Use the laser beam with the initial power to perform cosine scanning on the sample surface to obtain a reference signal.
[0038] Specifically, a laser beam of initial power emitted by a laser is reflected by a scanner and then irradiated onto the surface of a sample; the laser beam emitted by the scanner is controlled to perform a cosine scan on the surface of the sample; a position detector is used to detect the scanning range and scanning direction of the sample surface to obtain a synchronization signal, wherein the position detector is a photodiode, which can be installed inside a scanner or in an optical system, and the present disclosure does not limit this; the synchronization signal is transmitted as a feedback signal to a scanner driver, and the scanner driver is used to provide a driving signal to the scanner according to the feedback signal, so that the scanner swings back and forth; at the same time, the synchronization signal is used as a reference signal as an input for subsequently acquiring a logic clock signal.
[0039] Step S113: using a phase detector to detect the difference between the reference signal and the frequency-divided signal of the frequency divider to obtain a difference signal.
[0040] Specifically, the phase detector is used to detect the difference between the reference signal and the divided signal of the frequency divider to obtain a difference signal. The difference signal is obtained by using the phase detector to detect the difference between the reference signal and the divided signal of the frequency divider in terms of frequency and phase. In the initial state, the divided signal of the frequency divider is zero.
[0041] Step S114, using a filter and a voltage-controlled oscillator to output a logic clock signal synchronized with a reference signal.
[0042] Specifically, the voltage-controlled oscillator is an electronic device capable of generating a periodic voltage or current waveform, and is used to convert the input filtered difference signal into a logic clock. The filter is used to filter the difference signal to obtain the filtered difference signal. The frequency divider is used to divide the output frequency of the voltage-controlled oscillator with a preset frequency division coefficient, that is, to divide the output clock signal. In an optical system, the preset frequency division coefficient is the same value, and the specific value is determined according to the empirical value, which is not limited in the present disclosure. A control system that realizes negative feedback through a phase detector, a filter, a voltage-controlled oscillator, and a frequency divider realizes synchronization and stable output by comparing the phase of the input signal with the output signal.
[0043] It should be noted that steps S113-S114 are a loop process, and the condition for terminating the loop is that the frequency of the clock signal output by the voltage-controlled oscillator is the same as the frequency of the reference signal after frequency division.
[0044] Step S12: Use a pixel counter to count the logic clock signal. When the number of the logic clock signal is equal to the count value corresponding to the current sampling clock, send a trigger signal to the lookup table and send a collection signal to the detector.
[0045] Specifically, it can be understood that when cosine scanning is adopted, since the scanning speed in the middle of the scanning range is relatively high and the scanning speed at the edge of the scanning range is relatively slow, if the image obtained by sampling at a fixed time interval will appear spatially stretched, so in order to avoid the problem of spatial stretching of the image, the present disclosure proposes a method for correcting the image position, and sampling is performed at a non-fixed time interval, that is, sampling is performed at intervals of the sampling clock to ensure that the distance scanned by the scanner on the sample surface in each sampling clock is the same, that is, the sampling clock between the pixel point collected by the current sampling clock and the pixel point collected by the next sampling clock is 1, and the logical clock between the pixel point collected by the current sampling clock and the pixel point collected by the next sampling clock is one or more, and the pixel counter is used to count the logical clock signal in units of the logical clock, so step S12 is to use the pixel counter to count the logical clock signal to realize sampling at a non-fixed time interval, and when the number of the logical clock signals is equal to the count value corresponding to the current sampling clock, a trigger signal is sent to the lookup table and a collection signal is sent to the detector.
[0046] In some embodiments, step S12 may also be to directly collect signals according to the logic clock, that is, to collect signals at fixed time intervals, to obtain images with spatial stretching and non-uniform intensity distribution, and then to obtain images with uniform spatial distribution and uniform intensity distribution through image processing. That is, after step S12, the method further includes:
[0047] Step S121, in response to receiving the logic clock signal, the detector collects the reflected light or fluorescence signal of the sample surface of the current logic clock, and performs imaging to obtain a stretched image.
[0048] Step S122: performing image processing on the stretched image to obtain an image with uniform spatial distribution.
[0049] Among them, the image processing performed on the stretched image to obtain the image with uniform spatial distribution may be to convert the stretched image into the image with uniform spatial distribution by using image transformation, or to convert the stretched image into the image with uniform spatial distribution by using image interpolation, or to convert the stretched image into the image with uniform spatial distribution by using other image processing methods, and the present disclosure does not make any limitation on this.
[0050] Step S13, in response to receiving the trigger signal, the lookup table searches for the count value and the power correction coefficient corresponding to the next sampling clock, and sends the count value corresponding to the next sampling clock to the pixel counter.
[0051] The lookup table is a nonlinear lookup table storing count values and power correction coefficients corresponding to each sampling clock. The lookup table is mainly used for when the number of logic clocks corresponding to the current sampling clock is full, the pixel counter sends a trigger signal to the lookup table, the trigger signal is used to command the lookup table to find the count value and power correction coefficient corresponding to the next sampling clock, and send the count value corresponding to the next sampling clock to the pixel counter.
[0052] The count value is the number of logic clock signals between adjacent sampling clocks. Due to the scanning characteristics of cosine scanning, the scanning speed in the middle of the scanning range is faster, and the corresponding number of logic clocks is smaller; the scanning speed at the edge of the scanning range is slower, and the corresponding number of logic clocks is larger. Therefore, without changing the scanning speed, in order to achieve uniform sampling in units of sampling clocks, the number of logic clock signals between the next sampling clock and the current sampling clock can be calculated as the count value corresponding to the current sampling clock.
[0053] The power correction coefficient is used to adjust the laser power emitted by the laser. Due to the scanning characteristics of cosine scanning, if the laser uses the same power for scanning, the intensity will be lower in places with faster scanning speeds, and the brightness of the generated image will be darker, while the intensity will be higher in places with slower scanning speeds, and the brightness of the generated image will be stronger, resulting in uneven image intensity or uneven brightness in the final imaging. In order to obtain an image with uniform brightness, the power of the laser beam emitted by the laser is adjusted to ensure that a stable and consistent intensity value can be maintained at different scanning speeds, so as to ensure that an image with uniform brightness is finally generated.
[0054] Specifically, it can be understood that determining the power correction coefficient corresponding to each sampling clock specifically includes: for any sampling clock, using a preset modulation function to calculate the power correction coefficient corresponding to each sampling clock, wherein the preset modulation function is determined according to an intensity stability rule, and the intensity stability rule means that a laser beam with different laser powers emitted by a laser can maintain a stable intensity value during the scanning of the sample surface, that is, the laser beam has the same power per unit area.
[0055] In some embodiments, for any sampling clock, using a preset modulation function to calculate the power correction coefficient corresponding to each sampling clock includes:
[0056] Step a1, calculate the scanning intensity of the cosine scan I ( x );
[0057]
[0058] Among them, the cosine scan is , x (t ) is the sampling clock t The scanning position at is the angular velocity, the scanning range is 0-2 A , P 0 is the power of the laser beam.
[0059] Step a2, according to the scanning intensity I ( x ) and the modulation function is a stable intensity value, and the modulation function is calculated;
[0060]
[0061]
[0062] Among them, M( x ) is the modulation function, I 0 is a stable intensity value.
[0063] Step a3: x ( t ) into M( x ), the modulation function M corresponding to the sampling clock is obtained ( t ).
[0064]
[0065] Step a4, according to the modulation function M( t ) calculates the power correction factor for each sampling clock.
[0066] Step S14: in response to receiving the acquisition signal, the detector performs detection imaging based on each sampling clock and a power correction coefficient corresponding to each sampling clock to obtain a target image.
[0067] Specifically, it can be understood that the lookup table looks up the power correction coefficient corresponding to the next sampling clock in response to the received trigger signal and sends it to the laser controller. When the laser controller receives the power correction coefficient sent by the lookup table, it calculates the laser correction power, which is the product of the initial laser power and the power correction coefficient. The laser controller adjusts the power of the laser beam emitted by the laser at the next sampling clock according to the laser correction power.
[0068] In some embodiments, in response to receiving the acquisition signal, the detector performs detection imaging based on each sampling clock and a power correction coefficient corresponding to each sampling clock to obtain a target image, including:
[0069] Step S141, calculating the laser correction power of each sampling clock according to the power correction coefficient corresponding to each sampling clock and the initial power.
[0070] The laser correction power of any sampling clock is equal to the product of the initial power and the power correction coefficient corresponding to the sampling clock. After the power correction coefficient corresponding to the next sampling clock is found in the lookup table, the power correction coefficient corresponding to the next sampling clock is sent to the laser controller, and the laser controller controls the power of the laser beam emitted by the laser at the next sampling clock to be the laser correction power, thereby realizing scanning imaging using laser beams of different powers at different sampling clocks.
[0071] Step S142, for each sampling clock, a laser beam with a power equal to the laser calibration power is used to perform a cosine scan on the sample surface, and the detector is used to complete signal acquisition for each sampling clock to obtain a target image.
[0072] The detector is used to complete the signal acquisition of each sampling clock, which can be that for any sampling clock, the detector is used to collect the reflected light or fluorescence signal of the sample surface scanned by the laser beam with laser correction power, and obtain a target image with uniform sampling in units of sampling clocks. The generation process of the target image maintains the high-speed scanning capability of cosine scanning, and solves the problems of spatial stretching and uneven intensity distribution in cosine scanning imaging by collecting with sampling clocks and scanning with laser correction power.
[0073] Specifically, it can also be understood that, in response to receiving the trigger signal, the lookup table looks up the power correction coefficient corresponding to the next sampling clock and sends it to the detector; the detector stores the power correction coefficient corresponding to each sampling clock, and collects signals from the sample surface according to the sampling clock to generate an initial image, and then corrects the initial image based on the power correction coefficient of each sampling clock to obtain the target image.
[0074] In some embodiments, in response to receiving the acquisition signal, the detector performs detection imaging based on each sampling clock and a power correction coefficient corresponding to each sampling clock to obtain a target image, further comprising:
[0075] Step S143, for each sampling clock, use a laser beam with a power equal to the initial power to perform a cosine scan on the sample surface, and use the detector to complete signal acquisition for each sampling clock to obtain an initial image.
[0076] The detector is used to complete signal acquisition for each sampling clock. For any sampling clock, the detector is used to collect reflected light or fluorescence signal from the sample surface scanned by a laser beam of initial power, and an initial image is obtained by detecting and imaging the reflected light or fluorescence signal after uniform sampling in units of sampling clocks.
[0077] Step S144, obtaining a target image according to the power correction coefficient corresponding to each sampling clock and the initial image.
[0078] Among them, due to the speed change of cosine scanning, when the same power scanning is used, the brightness will be darker where the scanner speed is faster, and the brightness will be stronger where the scanner speed is slower, resulting in uneven brightness of the acquired initial image. In order to generate a target image with uniform brightness, the initial image is corrected by using the power correction coefficient corresponding to each sampling clock to obtain the target image. For example, the power correction coefficient is directly multiplied by the initial image to generate a new target image with uniform brightness.
[0079] It should be noted that steps S141-S142 and steps S143-S144 are two different power correction methods. Steps S141-S142 are to realize a target image with uniform spatial distribution and uniform intensity distribution by feeding back the power correction coefficient of each sampling clock or the laser correction power to the laser controller in real time through real-time power adjustment; steps S143-S144 are to generate an initial image with uniform spatial distribution but uneven intensity distribution according to the sampling clock, and then correct the initial image according to the power correction coefficient to obtain a target image with uniform spatial distribution and uniform intensity distribution.
[0080] In some embodiments, when the parameters of the laser meet the preset conditions, step S14 can use the method of steps S141-S142 to generate the target image; when the parameters of the laser do not meet the preset conditions, that is, the laser controller cannot adjust the power of the laser beam emitted by the laser in real time and accurately, step S14 can use the method of steps S143-S144 to generate the target image; wherein, the parameters of the laser include laser material, wavelength of the emitted laser beam, structural parameters, etc., and the structural parameters include resonant cavity length, reflector curvature, etc., and the preset conditions include at least one of the following: the material of the laser is semiconductor material or optical fiber material; the wavelength range of the laser beam emitted by the laser is short wavelength range such as ultraviolet and blue light; the structural parameters meet the optimal parameter rule; the optimal parameter rule is that the current structural parameters can effectively improve the performance and response speed of the laser.
[0081] In the above embodiment, the scanning speed is improved by adopting cosine scanning; the logical clock count value is calculated by the position correction coefficient to achieve uniform sampling at non-fixed time intervals, thereby solving the spatial stretching problem caused by cosine scanning; cosine scanning is performed with laser correction power, while maintaining the high-speed scanning capability of cosine scanning, the problem of uneven intensity distribution existing in cosine scanning imaging is solved; the count value and the power correction coefficient are stored in a lookup table, and the sampling count value and the power correction coefficient are quickly obtained by calling the lookup table, so as to accurately control the output time and laser power of the laser, thereby solving the problems caused by cosine scanning and generating a spatially uniform and intensity-uniform image while ensuring a fast scanning speed of the system.
[0082] Figure 2 This is a flow chart of a method for determining the count value of a logic clock signal provided by the present disclosure; due to the characteristics of cosine scanning, if sampling is performed directly according to the logic clock, then from a temporal perspective, the intervals between the two sides of the final image are relatively large due to the slow scanning speed, and the intervals between the middle positions are relatively small due to the fast scanning speed, resulting in spatial stretching in the final image. To this end, the present disclosure proposes calculating the number of logic clocks between adjacent sampling clocks through position correction, and then performing uniform sampling at non-fixed time intervals in units of sampling clocks to solve the spatial stretching problem.
[0083] In order to clearly and accurately express the process of position correction, the present disclosure defines the sampling pixel distribution diagram at fixed time intervals as an uneven sampling raster diagram, and defines the uniform sampling at non-fixed time intervals as a uniform sampling raster diagram, that is, the uneven sampling raster diagram is a raster diagram sampled in units of logical clocks, and the uniform sampling raster diagram is a raster diagram sampled in units of sampling clocks. Assume that the positions of the K sampling pixels corresponding to the uneven sampling raster diagram are L o-1 , L o-2 , ...L o-K , the position of K sampling pixels corresponding to the uniformly sampled raster image is L n-1 , L n-2 , ...L n-K For an unevenly sampled raster image, the time between two adjacent sampled pixels is equally spaced but the distance is not equally spaced. For an evenly sampled raster image, the distance between two adjacent sampled pixels is equally spaced and the sampling clock between two adjacent sampled pixels is 1.
[0084] See also Figure 2 , the method for determining the count value of the logic clock signal specifically includes:
[0085] Step S21, calculating the position correction coefficient of the pixel change from the logic clock to the sampling clock;
[0086] Specifically, the position correction coefficient is calculated, that is, the position change relationship of each sampling pixel from the non-uniformly sampled raster image to the uniformly sampled raster image is calculated. Step S21 includes the following steps:
[0087] Step S211, calculating the phase of the scanning change under each logical clock in the uneven sampling raster image during the cosine scanning process ,
[0088]
[0089] in, p is the period of the scan line, f is the frequency of the logic clock.
[0090] Step S212, calculate any sampling pixel L in the uniformly sampled raster image n-i To the center pixel L n-k The number of pixels between the sampling pixels and the center pixel is used to calculate the pixel phase value. .
[0091]
[0092] Step S213, calculating the position correction coefficient of the pixel change from the logic clock to the sampling clock according to the first formula, the first formula is,
[0093]
[0094] Specifically, since the cosine scanning is non-uniform scanning, the scanning speed of the middle position is faster and the scanning speed of the edge position is slower, and the scanning mirror rotation angle changes with time and presents a sinusoidal change. However, under uniform sampling, the scanning mirror rotation angle changes with time and presents a linear change, and the slope of the linear change is generally determined according to the derivative value of the function of the scanning mirror rotation angle changing with time at time zero. Therefore, in order to achieve uniform sampling, position correction is required. The position correction at any time can be determined according to the position on the linear change and the position on the sinusoidal change, that is, the position correction coefficient is calculated according to the first formula mentioned above.
[0095] Step S22, for any sampling clock, according to the current sampling clock, the next sampling clock and the position correction coefficient, the number of logic clocks between the current sampling clock and the next sampling clock is calculated as the count value of the logic clock signal.
[0096] Specifically, for any sampling clock i , the position of the sampling pixel corresponding to the unevenly sampled raster image corresponds to L o-i , the position of the sampling pixel corresponding to the uniformly sampled raster image corresponds to L n-i , L n-iand L o-i Need to meet: L n-i = L o-i / Position correction coefficient, then the current sampling clock i With the next sampling clock i +1 Yes,
[0097] L n-i = L o-i / Position correction factor
[0098] L n-(i+1) = L o-(i+1) / Position correction factor
[0099] Since the position L in the uniformly sampled raster image n-i With position L n-(i+1) The sampling pixel interval is 1 sampling clock, and the corresponding number of logic clocks is the position L in the uneven sampling raster image. o-i With position L o-(i+1) The position difference of the sampling pixels, therefore, the number of logic clocks corresponding to the current sampling clock can be calculated according to the second formula, and the number of logic clocks is used as the count value of the logic clock signal. The second formula is:
[0100]
[0101]
[0102] In the above embodiment, the position correction coefficient is calculated by analyzing the phase change of the pixel, and the phase under the logical clock is accurately converted to the phase under the sampling clock; the number of logical clocks of adjacent sampling clocks is calculated through position correction, and equally spaced sampling is achieved by counting the logical clocks, thereby solving the problem of spatial stretching of the image caused by uneven spatial distribution caused by cosine scanning.
[0103] Figure 3 The present invention provides a flowchart of a method for constructing a lookup table. In an embodiment of the present invention, the lookup table is used to store the count value and power correction coefficient corresponding to each sampling clock. When the amount of sampled data is too large, the storage burden is increased and the query effect is reduced. Therefore, the present invention proposes a method for constructing a lookup table. By constructing a nonlinear lookup table, reasonable storage of sampled data is achieved, which reduces the memory occupied by storage and improves the subsequent lookup rate.
[0104] Specifically, it can be understood that the lookup table can be stored according to a nonlinear functional relationship between input values and output values. Figure 3, construct a nonlinear lookup table storing the count value and power correction coefficient corresponding to each sampling clock, specifically including:
[0105] Step S31 : constructing a first nonlinear functional relationship between a sampling clock and a count value, and a second nonlinear functional relationship between a sampling clock and a power correction coefficient.
[0106] Specifically, a first nonlinear functional relationship between the sampling clock and the count value can be constructed, that is, a nonlinear functional relationship between the sampling clock and the count value of the logic clock signal can be constructed, and a second nonlinear functional relationship between the sampling clock and the power correction coefficient can be constructed. In some embodiments, since the power correction coefficient is calculated using a preset modulation function, the preset modulation function can be directly used as the second nonlinear function.
[0107] Step S32: Select a target number of sampling clocks as sampling points, and calculate and store the count values and power correction coefficients corresponding to the sampling points based on the first nonlinear functional relationship and the second nonlinear functional relationship.
[0108] Specifically, the target number is determined according to the function complexity of the first nonlinear function and the second nonlinear function, and the target number of sampling points is evenly distributed in the first nonlinear function and the second nonlinear function.
[0109] In some embodiments, the number of sampling points for the first nonlinear function and the number of sampling points for the second nonlinear function can be the same, and both use the target number. At this time, the target number needs to be determined by comprehensively considering the function complexity of the first nonlinear function and the second nonlinear function. The more complex the function, the more the target number and the target number of sampling points are evenly distributed. For complex functions, the target number of sampling points can also be partially distributed at representative positions of the function and partially distributed at positions of discrete data. It is specifically determined according to the nonlinear function actually simulated, and the present disclosure does not make any special restrictions on this.
[0110] More specifically, step S32 specifically includes:
[0111] Step S321, determining a target number of sampling points and a distribution of the target number of sampling points according to the complexity of the first nonlinear function and the complexity of the second nonlinear function, wherein the distribution of the target number of sampling points may be the same in the first nonlinear function and the second nonlinear function or may be different.
[0112] Step S322, for the target number of sampling points, the count values and power correction coefficients corresponding thereto are stored. Note that the count values and power correction coefficients corresponding to the target number of sampling points stored at this time are actual values, not function simulation values.
[0113] In some embodiments, the number of sampling points for the first nonlinear function and the number of sampling points for the second nonlinear function may also be different. In this case, the target number corresponding to the count value is determined according to the function complexity of the first nonlinear function, and the target number corresponding to the power correction coefficient is determined according to the function complexity of the second nonlinear function. Since the target numbers are different, they need to be stored separately, and they also need to be looked up separately in the subsequent table lookup.
[0114] More specifically, step S32 specifically includes:
[0115] Step S323, determining a first target number of sampling points and a distribution of the first target number of sampling points according to the complexity of the first nonlinear function, and determining a second target number of sampling points and a distribution of the second target number of sampling points according to the complexity of the second nonlinear function.
[0116] Step S324: for the first target number of sampling points, store the corresponding count values in a table of sampling clocks and count values.
[0117] Step S325 , for the second target number of sampling points, the power correction coefficients corresponding thereto are stored in a table of sampling clocks and power correction coefficients.
[0118] In some embodiments, the nonlinear lookup table is a dynamic nonlinear lookup table that dynamically adjusts the number of targets and the distribution of sampling points according to imaging requirements and sample characteristics.
[0119] The imaging requirement refers to the imaging requirement, which may be the imaging resolution, contrast, imaging speed and other parameters, or the key areas of the sample surface. For example, there are areas on the sample surface that need to be focused on, such as lesion areas, specific cells, characteristic tissues, etc. The sample characteristics include: sample type, shape, size, surface roughness, reflectivity and absorption rate of laser, etc. The sampling point distribution refers to the overall distribution form of the target number of sampling points, including but not limited to: uniform distribution, random distribution, grid distribution, etc.
[0120] More specifically, the lookup table is a dynamic nonlinear lookup table, that is, the lookup table uses a nonlinear function to store data, and the stored data can be dynamically adjusted according to imaging requirements and sample characteristics, so as to realize a lookup table with different target numbers and different sampling point distributions under different requirements. The dynamic nonlinear lookup table that dynamically adjusts the target number and sampling point distribution according to imaging requirements and sample characteristics specifically includes:
[0121] Step b1: determining a target number of sampling points and a distribution of the target number of sampling points based on the complexity of the first nonlinear function and the complexity of the second nonlinear function.
[0122] Step b2, dividing the sample surface into at least three areas, and determining the imaging requirement level and sample characteristic level corresponding to each area according to the imaging requirement and the sample characteristic.
[0123] For example, the imaging requirement level can be determined as follows: the imaging requirement level of high-resolution areas is level one, and the imaging requirement level of medium and low-resolution areas is level two; the imaging requirement level of high contrast is level one, and the imaging requirement level of medium and low contrast is level two; in areas where there are key areas, the imaging requirement level is determined according to the proportion of key areas. When the proportion of key areas exceeds or is equal to 50%, the imaging requirement level of the area is level one; when the proportion of key areas is less than 50%, the imaging requirement level is level two; when the proportion of key areas is less than 10%, the imaging requirement level is level three; when there are no key areas, the imaging requirement level is level four.
[0124] For example, the determination of the sample characteristic level can be: the sample characteristic level of a rough surface is level one, the sample characteristic level of a smooth surface is level three, and the level in between is level two; the sample characteristic level of a laser reflectivity lower than a certain threshold is level one, and the sample characteristic level of a laser reflectivity equal to or higher than a certain threshold is level two. Similarly, the parameters of other sample characteristics can also be graded, and the present disclosure does not limit this.
[0125] Step b3, determining the importance of each area based on the imaging requirement level and sample characteristic level of each area.
[0126] For example, at least one imaging requirement level and at least one sample characteristic level of each region are directly summed, and the smaller the sum value, the higher the ranking of importance, and the larger the sum value, the lower the ranking of importance. The importance of each region can also be determined by first assigning different weights to different parameters and then calculating the weighted sum, and judging the ranking of importance according to the size of the weighted sum, which is not limited in the present disclosure.
[0127] Step b4, determining a dynamic adjustment rule based on the importance of each area, and adjusting the number and distribution of the sampling points according to the dynamic adjustment rule.
[0128] For example, the distribution of sampling points of the target number is determined according to the complexity of the first nonlinear function and the complexity of the second nonlinear function. When there are fewer sampling points in an area with a higher degree of importance, the number of sampling points in the area can be increased, thereby increasing the number of targets; when the sampling points in an area with a higher degree of importance are sparsely distributed, the number of sampling points in the area can be increased to make the sampling points more densely distributed, thereby increasing the number of targets and changing the distribution of sampling points.
[0129] For the above embodiment, in adopting Figure 3After the lookup table construction method shown constructs a nonlinear lookup table and stores the count value and the power correction coefficient, the data corresponding to the sampling point closest to the sampling clock can be directly returned during the specific search, or more accurate data can be returned after interpolation. The specific interpolation method can be selected based on actual needs, and the present disclosure does not limit this.
[0130] Specifically, in response to receiving the trigger signal, the lookup table searches for a power correction coefficient corresponding to a next sampling clock, including:
[0131] Step c1, in response to receiving the trigger signal, searching for a sampling point closest to a next sampling clock from the sampling points stored in the lookup table.
[0132] Step c2, obtaining the power correction coefficient corresponding to the most recent sampling point as the power correction coefficient corresponding to the next sampling clock, or interpolating the most recent sampling point to determine the interpolation point of the next sampling clock, and using the power correction coefficient corresponding to the interpolation point as the power correction coefficient corresponding to the next sampling clock.
[0133] Similarly, in response to receiving the trigger signal, the method for the lookup table to search for the count value corresponding to the next sampling clock is the same as the method for searching for the power correction coefficient corresponding to the next sampling clock, which will not be repeated here.
[0134] Specifically, it can also be understood that the lookup table can also be stored according to the mapping relationship between the input value and the output value, that is, the lookup table pre-stores the count value corresponding to each sampling clock and the power correction coefficient corresponding to each sampling clock, and also includes: storing the sampling rules and power correction coefficient corresponding to each sampling clock according to the mapping relationship between the sampling clock and the count value and the power correction coefficient.
[0135] In some embodiments, the sampling rules and power correction coefficients corresponding to each sampling clock are stored according to the mapping relationship between the sampling clock and the sampling rules and the power correction coefficient. This can be done by establishing a first storage table, using the sampling clock as a key and the sampling rules and the power correction coefficient as values, and storing the sampling rules and the power correction coefficients corresponding to each sampling clock in the first storage table to obtain a lookup table; or by establishing two storage tables for separate storage, such as establishing a second storage table and a third storage table, using the sampling clock as a key and the sampling rules as a value to store the sampling rules corresponding to each sampling clock in the second storage table, and using the sampling clock as a key and the power correction coefficient as a value to store the power correction coefficients corresponding to each sampling clock in the third storage table, and using the association table formed based on the same keys of the second storage table and the third storage table as the lookup table.
[0136] For the above embodiment, after the mapping relationship between the input value and the output value is used for storage, the data corresponding to the sampling clock can be directly returned according to the mapping relationship during the specific search. In response to receiving the trigger signal, the lookup table searches for the sampling rule corresponding to the next sampling clock and the power correction coefficient corresponding to the next sampling clock, including: determining the next sampling clock according to the current sampling clock; determining the sampling rule corresponding to the next sampling clock according to the mapping relationship between the sampling clock and the sampling rule, and determining the power correction coefficient corresponding to the next sampling clock according to the mapping relationship between the sampling clock and the power correction coefficient.
[0137] In other embodiments, laser correction power may be used instead of the power correction coefficient, that is, the lookup table pre-stores the count value corresponding to each sampling clock and the laser correction power corresponding to each sampling clock, and stores the count value and laser correction power corresponding to each sampling clock according to the mapping relationship between the sampling clock, the count value and the laser correction power.
[0138] In the above embodiment, by using nonlinear functions to store and search the lookup table, storage costs are reduced and search efficiency is improved; by adjusting the number and distribution of sampling points in combination with imaging requirements and sample characteristics, it is possible to accurately capture key information of the image with fewer sampling points and improve the query efficiency of the lookup table.
[0139] Figure 4 FIG. 1 is a schematic diagram of a cosine scanning-based imaging device provided by the present disclosure. Figure 4 , the calibration device 400 comprises:
[0140] The scanning module 410 is used to perform a cosine scan on the sample surface using a laser beam with an initial power emitted by a laser to obtain a reference signal and a logic clock signal;
[0141] The counting module 420 is used to count the logic clock signal using a pixel counter, and when the number of the logic clock signal meets the count value corresponding to the current sampling clock, send a trigger signal to the lookup table and send a collection signal to the detector;
[0142] A table lookup module 430, configured to, in response to receiving the trigger signal, look up the count value and the power correction coefficient corresponding to the next sampling clock in the lookup table, and send the count value corresponding to the next sampling clock to the pixel counter; the lookup table is a nonlinear lookup table storing the count value and the power correction coefficient corresponding to each sampling clock;
[0143] The correction imaging module 440 is used for, in response to receiving the acquisition signal, the detector performs detection imaging based on each sampling clock and the power correction coefficient corresponding to each sampling clock to obtain a target image.
[0144] For a detailed description of the above-mentioned imaging device based on cosine scanning, please refer to the description of the relevant method steps in the above-mentioned embodiment, and the repeated parts will not be repeated. The embodiments of the imaging method and imaging device described above are merely schematic, and the "units" used as separate components may be a combination of software and / or hardware that implements a predetermined function, and may or may not be physically separated. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without paying any creative labor.
[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be covered by the protection scope of the present invention.
Claims
1. An imaging method based on cosine scanning, characterized in that: The method comprises: A laser beam with initial power emitted by a laser is used to perform a cosine scan on the sample surface to obtain a reference signal and a logic clock signal; A pixel counter is used to count the logic clock signal, and when the number of the logic clock signal is equal to the count value corresponding to the current sampling clock, a trigger signal is sent to the lookup table and a collection signal is sent to the detector; In response to receiving the trigger signal, the lookup table searches for a count value and a power correction coefficient corresponding to a next sampling clock, and sends the count value corresponding to the next sampling clock to the pixel counter; the lookup table is a nonlinear lookup table storing count values and power correction coefficients corresponding to each sampling clock; In response to receiving the acquisition signal, the detector performs detection imaging based on each sampling clock and a power correction coefficient corresponding to each sampling clock to obtain a target image.
2. The imaging method based on cosine scanning according to claim 1, characterized in that: In response to receiving the acquisition signal, the detector performs detection imaging based on each sampling clock and a power correction coefficient corresponding to each sampling clock to obtain a target image, including: Calculating the laser correction power of each sampling clock according to the power correction coefficient corresponding to each sampling clock and the initial power; For each sampling clock, a laser beam with a power equal to the laser correction power is used to perform a cosine scan on the sample surface, and the detector is used to complete signal acquisition for each sampling clock to obtain a target image.
3. The imaging method based on cosine scanning according to claim 1, characterized in that: In response to receiving the acquisition signal, the detector performs detection imaging based on each sampling clock and a power correction coefficient corresponding to each sampling clock to obtain a target image, and further includes: For each sampling clock, a laser beam having a power equal to the initial power is used to perform a cosine scan on the sample surface, and the detector is used to complete signal acquisition for each sampling clock to obtain an initial image; A target image is obtained according to the power correction coefficient corresponding to each sampling clock and the initial image.
4. The imaging method based on cosine scanning according to claim 1, characterized in that: Constructing a nonlinear lookup table storing count values and power correction coefficients corresponding to each sampling clock, specifically including: Constructing a first nonlinear functional relationship between a sampling clock and a count value, and a second nonlinear functional relationship between a sampling clock and a power correction coefficient; A target number of sampling clocks are selected as sampling points, and count values and power correction coefficients corresponding to the sampling points are calculated and stored based on the first nonlinear functional relationship and the second nonlinear functional relationship.
5. The imaging method based on cosine scanning according to claim 4, characterized in that: In response to receiving the trigger signal, the lookup table searches for a count value and a power correction coefficient corresponding to a next sampling clock, including: In response to receiving the trigger signal, searching for a sampling point closest to a next sampling clock from the sampling points stored in the lookup table; The count value corresponding to the most recent sampling point is obtained as the count value corresponding to the next sampling clock, and the power correction coefficient corresponding to the most recent sampling point is obtained as the power correction coefficient corresponding to the next sampling clock; or, the interpolation point of the next sampling clock is determined by interpolation for the most recent sampling point, and the count value and power correction coefficient corresponding to the interpolation point are used as the count value and power correction coefficient corresponding to the next sampling clock.
6. The imaging method based on cosine scanning according to claim 1, characterized in that: The nonlinear lookup table is a dynamic nonlinear lookup table that dynamically adjusts the number of targets and the distribution of sampling points according to imaging requirements and sample characteristics.
7. The imaging method based on cosine scanning according to claim 1, characterized in that: Determine the count value of the logic clock signal, specifically including: Calculate a position correction coefficient for pixel change from logic clock to sampling clock; For any sampling clock, the number of logic clocks between the current sampling clock and the next sampling clock is calculated as the count value of the logic clock signal according to the current sampling clock, the next sampling clock and the position correction coefficient.
8. The imaging method based on cosine scanning according to claim 1, characterized in that: Determining the power correction coefficient corresponding to each sampling clock specifically includes: for any sampling clock, using a preset modulation function to calculate the power correction coefficient corresponding to each sampling clock, wherein the preset modulation function is determined according to an intensity stability rule.
9. The imaging method based on cosine scanning according to claim 1, characterized in that: The method of using a laser beam with initial power emitted by a laser to perform cosine scanning on the sample surface to obtain a reference signal and a logic clock signal includes: A laser is used to emit a laser beam having an initial power; Performing a cosine scan on the sample surface using the laser beam with the initial power to obtain a reference signal; A phase detector is used to detect the difference between the reference signal and the frequency-divided signal of the frequency divider to obtain a difference signal; A filter and a voltage-controlled oscillator are used to output a logic clock signal synchronized with a reference signal.
10. An imaging device based on cosine scanning, characterized in that: The device comprises: A scanning module, used for performing a cosine scan on the sample surface using a laser beam of initial power emitted by a laser to obtain a reference signal and a logic clock signal; A counting module, used to count the logic clock signal using a pixel counter, and when the number of the logic clock signal is equal to the count value corresponding to the current sampling clock, send a trigger signal to the lookup table and send a collection signal to the detector; A table lookup module, configured to, in response to receiving the trigger signal, look up the count value and power correction coefficient corresponding to the next sampling clock in the lookup table, and send the count value corresponding to the next sampling clock to the pixel counter; the lookup table is a nonlinear lookup table storing the count value and power correction coefficient corresponding to each sampling clock; The correction imaging module is used for, in response to receiving the acquisition signal, the detector performs detection imaging based on each sampling clock and the power correction coefficient corresponding to each sampling clock to obtain a target image.
Citation Information
Patent Citations
Optical imaging method adopting single pixel prober
CN104154878A
Three-dimensional image reconstruction method and system based on DR device
CN111184523A