A confocal laser scanning endoscope galvanometer driving method, device and equipment
By controlling the vertical galvanometer deflection angle of the confocal endoscope, the image shift problem was solved, achieving stable and clear image acquisition and improving the imaging quality of the scanning system.
Patent Information
- Application Number
- CN202510677433.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2026-11-27
AI Technical Summary
In existing confocal endoscope scanning systems, the rotational inertia of the vertical galvanometer lens causes a vertical offset between the upward and downward field images, resulting in multi-frame image jitter, which increases system complexity and design difficulty.
By continuously controlling the deflection angle of the vertical galvanometer, the horizontal galvanometer is driven to scan the target scanning area, and after the scanning is completed, the vertical galvanometer is returned to the initial deflection angle, ensuring that image acquisition is performed in only one direction in the vertical direction, thus avoiding image differences.
Without increasing the complexity of system design, image jitter is eliminated, stable and clear video images are generated, and imaging quality is improved.
Smart Images

Figure CN123177002A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of confocal laser scanning endoscopes, and particularly to a method, apparatus, and device for driving a confocal laser scanning endoscope galvanometer. Background Technology
[0002] Confocal laser scanning endoscopy technology originates from the confocal microscope commonly used in laboratories. It applies the principles of traditional desktop confocal microscopy to endoscopic technology, enabling endoscopic detection capabilities to achieve micrometer-level resolution and real-time cellular imaging. Clinical practice has shown that confocal endoscopy has the advantages of speed and accuracy in diagnosing certain common gastrointestinal diseases, and has the potential to replace traditional endoscopic biopsies and pathological examinations in the future, demonstrating a very broad clinical application prospect.
[0003] A schematic diagram of the opto-electro-mechanical system of a confocal endoscope is shown below. Figure 1 As shown, the laser emits a laser beam of a certain intensity under command control. After being expanded by a beam expander lens, the laser beam is reflected by a dichroic mirror to a galvanometer system consisting of a horizontal and a vertical galvanometer. Driven by a control signal, the galvanometer system deflects the laser beam to perform planar scanning. The scanning laser beam passes through a relay lens and a coupling lens before being coupled into the imaging probe. A focusing motor drives the position of the coupling lens to ensure accurate coupling of the laser beam to the end face of the imaging probe. After the laser beam enters the imaging probe and irradiates the sample tissue, it excites fluorescence of different wavelengths. The excitation fluorescence returns through the same optical path to the dichroic mirror, penetrates the dichroic mirror, and reaches the photomultiplier tube. The photomultiplier tube outputs a voltage signal, which is sampled and then output to the host computer for image display.
[0004] In a confocal endoscopic scanning system, the galvanometer system, consisting of a horizontal galvanometer and a vertical galvanometer, is the core component. The horizontal galvanometer scans horizontally, while the vertical galvanometer performs a two-dimensional planar scan using the line-scanning laser reflected from the horizontal galvanometer, thereby obtaining a scanned image of the target tissue. Current control methods ultimately produce an image composed of an upward field image and a downward field image. Theoretically, the upward and downward field images should have good overlap. However, in reality, due to the rotational inertia of the vertical galvanometer lenses, there is a slight deviation in the scanning angle of the galvanometer, resulting in a significant vertical offset between the upward and downward field images. Figure 6a As shown by the dashed lines, the position of the dashed lines is different in each frame, meaning the position of the circular inspection image within the square frame is not fixed. This causes jitter and blurriness in the video stream formed by multiple frames. Existing technologies require the introduction of additional image algorithms to eliminate this offset in order to align the upper and lower field images and enable the system to image normally. This not only increases the system's operational burden but also increases design complexity and reduces reliability. Summary of the Invention
[0005] This invention provides a method, apparatus, and device for driving a confocal laser scanning endoscope galvanometer, which solves the technical problems mentioned above.
[0006] A first aspect of this invention provides a method for driving a confocal laser scanning endoscope galvanometer, wherein the galvanometer system of the confocal laser scanning endoscope includes a horizontal galvanometer and a vertical galvanometer, and the method includes the following steps:
[0007] Step 1: Continuously control the deflection angle of the vertical galvanometer to drive the horizontal galvanometer to scan each row of the target scanning area sequentially;
[0008] Step 2: After the horizontal galvanometer finishes scanning the target area, the vertical galvanometer is controlled to return to the initial deflection angle within a preset time period, and Step 1 is repeated until the preset scanning end condition is met.
[0009] A second aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the confocal laser scanning endoscope galvanometer driving method described above.
[0010] A third aspect of the present invention provides an apparatus including a computer-readable storage medium and a processor, wherein the processor executes a computer program on the computer-readable storage medium to implement the steps of the confocal laser scanning endoscope galvanometer driving method described above.
[0011] A fourth aspect of the present invention provides a confocal laser scanning endoscope galvanometer driving device, including a data sampling module and a reset module.
[0012] The data sampling module is used to continuously control the real-time deflection angle of the vertical galvanometer to drive the horizontal galvanometer to scan each row of the target scanning area sequentially.
[0013] The reset module is used to control the vertical galvanometer to return to the initial deflection angle within a preset time after the horizontal galvanometer has finished scanning the target scanning area, and to drive the data sampling module to scan each row of the target scanning area again until the preset scanning end condition is reached.
[0014] The beneficial effects of this invention are as follows: This invention provides a method, apparatus, and device for driving a confocal laser scanning endoscope galvanometer. Without increasing the complexity of the system design, it proposes a method to eliminate the vertical offset of the upper and lower field images in the confocal endoscope scanning system. That is, it only takes one direction in the vertical direction for image scanning and acquisition, which essentially avoids the occurrence of image differences. This results in a jitter-free, stable, clear, and intuitive final video image, ensuring the imaging quality of the confocal endoscope scanning system.
[0015] To make the above-mentioned objects, features and advantages of the invention more apparent and understandable, preferred embodiments of the invention are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of the opto-electro-mechanical system of a confocal endoscope in the prior art;
[0018] Figure 2 This is a schematic flowchart of a confocal laser scanning endoscope galvanometer driving method provided in one embodiment;
[0019] Figure 3 This is a timing diagram of scanning data acquisition for a galvanometer system in one embodiment;
[0020] Figure 4 This is a timing diagram showing the relationship between the horizontal galvanometer scanning speed and the line synchronization signal in one embodiment;
[0021] Figure 5 This is a waveform diagram of the driving voltage of the vertical galvanometer in one embodiment;
[0022] Figure 6a These are multi-frame scan images formed by galvanometer shifting in existing technology;
[0023] Figure 6b These are multi-frame scan images formed using an embodiment of the method of the present invention;
[0024] Figure 7 This is a schematic diagram of a confocal laser scanning endoscope galvanometer driving device provided in one embodiment;
[0025] Figure 8This is a schematic diagram of the structure of a confocal laser scanning endoscope galvanometer driving device provided in one embodiment. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.
[0027] It should be noted that, unless otherwise specified, the various features in the embodiments of this invention can be combined with each other, all of which are within the protection scope of this invention. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this invention do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0028] For example, in a confocal endoscopic scanning system, the horizontal galvanometer is typically a resonant galvanometer. After being reflected by the horizontal galvanometer, the point laser beam becomes a line-scanning laser that scans back and forth in the horizontal direction, with its scanning period being the vibration frequency of the horizontal galvanometer. The vertical galvanometer, on the other hand, is a galvanometer galvanometer, meaning that the galvanometer angle is proportional to the applied control voltage. By adjusting the control voltage, the timing and angle of the vertical galvanometer's deflection are precisely controlled, allowing the line-scanning laser reflected by the horizontal galvanometer to form a two-dimensional planar scan, thereby obtaining an image of the target scanning area, i.e., a scanned image of the target tissue.
[0029] In existing technology, after the horizontal galvanometer completes a horizontal scan of one line, the control module increases the driving voltage applied to the vertical galvanometer by a small unit step voltage. Since the deflection angle of the vertical galvanometer is proportional to the applied control voltage, the vertical galvanometer will deflect by a small step angle in the vertical direction, allowing the laser scanning beam to scan the next line. This process is repeated, with the driving voltage applied to the vertical galvanometer gradually increasing from a minimum. This process of changing the driving voltage from low to high is called upward field scanning. When the scanning position reaches the scanning boundary (i.e., the top of the target scanning area), the driving voltage reaches its peak. When the horizontal galvanometer completes the last horizontal scan, the driving voltage to the vertical galvanometer is decreased by a small unit step voltage, causing the vertical galvanometer to deflect by a small step angle in the opposite direction, thus forming continuous alternating upward and downward field images.
[0030] and Figure 2 This is a flowchart illustrating a confocal laser scanning endoscope galvanometer driving method according to Embodiment 1 of the present invention. The galvanometer system of the confocal laser scanning endoscope includes a horizontal galvanometer and a vertical galvanometer, such as... Figure 2 As shown, the method includes the following steps:
[0031] Step 1: Continuously control the deflection angle of the vertical galvanometer to drive the horizontal galvanometer to scan each row of the target scanning area once in sequence;
[0032] Step 2: After the horizontal galvanometer completes scanning of the target scanning area, the vertical galvanometer is controlled to return to its initial deflection angle within a preset time period, and Step 1 is repeated until a preset scanning end condition is met. For example, the preset scanning end condition includes generating a preset number of target scanning area images or the real-time scanning time reaching a target duration. The specific scanning direction can be downward scanning from the top to the bottom of the target scanning area, or upward scanning from the bottom to the top. When scanning downwards, the initial deflection angle is the first deflection angle corresponding to the top boundary; when scanning upwards, the initial deflection angle is the second deflection angle corresponding to the bottom boundary, thereby generating multiple consecutive downward or upward field images of the target scanning area (i.e., the target tissue).
[0033] The above embodiments provide a confocal laser scanning endoscope galvanometer driving method. Unlike traditional scanning methods that generate images in both upward and downward scanning directions, this method returns the vertical galvanometer to its initial deflection angle within a short time after each scan. This not only ensures image continuity but also avoids image differences by repeatedly scanning upward or downward in only one direction in the vertical direction. Consequently, the final generated video image is free from jitter caused by multi-frame image field-of-view deviation, resulting in better image stability and clarity. Figure 6b As shown.
[0034] For example, in the galvanometer system of this embodiment, the horizontal galvanometer is configured as a resonant galvanometer, and the vertical galvanometer is a galvanometer galvanometer. The horizontal galvanometer reciprocates at its inherent resonant frequency, while the deflection angle of the vertical galvanometer is controlled in real time, enabling the horizontal and vertical galvanometers to work in tandem according to a predetermined timing sequence. This achieves efficient beam deflection and point scanning, resulting in a stable image output. Specifically, since the horizontal galvanometer is a self-resonant galvanometer, its motion follows its own physical laws. In order for the horizontal and vertical galvanometers to work in tandem, the motion state of the horizontal galvanometer must be acquired to drive the vertical galvanometer.
[0035] In step 1 of a preferred embodiment, the real-time deflection angle of the vertical galvanometer is continuously controlled to drive the horizontal galvanometer to scan each row of the target scanning area sequentially, specifically as follows:
[0036] Step 101: Obtain the scanning duration T1 and preset delay duration T2 for each row in the target scanning area. Here, the scanning duration T1 is related to the scanning cycle of the horizontal galvanometer, while the preset delay duration T2 is determined according to the data acquisition delay requirements of the confocal laser scanning endoscope.
[0037] Step 102: When a change in the motion direction of the horizontal galvanometer is detected, the corresponding change time t is acquired, and the next deflection angle adjustment time t' of the vertical galvanometer is generated, where t' = t + T1 + T2. For example, as shown... Figure 3 The scanning data acquisition timing diagram is shown below. Arrows in the diagram indicate the field width and scanning direction covered by the laser spot scan. Boxes represent the acquisition window for one row of data. "S" indicates the start point of one row of data acquisition, "E" indicates the end point, and circles indicate the driving moment when the vertical galvanometer is driven to move in steps after one row of data acquisition is completed. Starting from the top of the target scanning area, the moment t when the horizontal galvanometer changes its direction of motion is first acquired. From time t, image data sampling begins after a delay of T2, and ends at the red dot in the diagram after the current row's scanning duration T1.
[0038] Step 103: At the corresponding next deflection angle adjustment time t', control the real-time deflection angle of the vertical galvanometer to increase or decrease by a preset step angle, so as to drive the horizontal galvanometer to scan the next or previous row. For example, as... Figure 3 As shown, at the next deflection angle adjustment time t' (i.e. t+T1+T2), the control voltage of the vertical galvanometer is increased, thereby controlling the vertical galvanometer to step in a small step angle in the positive direction, so that the scanning laser spot reaches the position of the next row of data sampling and scans that row.
[0039] Step 104: Repeat steps S102-S103 until a complete image of the target scanning area is acquired. When the movement direction of the horizontal galvanometer changes again, repeat the above steps to sample a new row of data. This process is repeated until the deflection angle of the vertical galvanometer reaches the bottom of the scanning boundary. After the system has acquired the last row of data, the acquisition of a complete image corresponding to the target scanning area is complete.
[0040] For example, a horizontal galvanometer is a resonant galvanometer, and its drive circuit board typically includes a synchronization indicator signal, which uses high and low levels to indicate the direction of the galvanometer's movement, such as... Figure 4As shown, when the horizontal galvanometer accelerates from a stationary state to move in the positive direction, the synchronization signal is at a high level; when the horizontal galvanometer decelerates to a stationary state and then accelerates from a stationary state to move in the opposite direction, the synchronization signal outputs a low level. Therefore, by detecting the switching time between the high and low levels of the synchronization signal, the moment when the direction of motion of the horizontal galvanometer changes can be obtained.
[0041] In other embodiments, the rotation angle of the horizontal galvanometer can be obtained through a position sensor, and the moment corresponding to the maximum deflection angle can be used as the direction change time t. Alternatively, the preset scanning duration of the horizontal galvanometer for each row in the target scanning area can be obtained, and the real-time scanning duration of the horizontal galvanometer for the current row can be compared with the preset scanning duration. The direction change time t can be generated based on the comparison result. In other preferred embodiments, the above evaluation results can be combined, for example, multiple methods can be used simultaneously to detect the direction change time t. For each method, the real-time scanning duration of multiple rows can be calculated separately, and then the difference between the real-time scanning durations of two or more adjacent rows can be calculated. The direction change time t of each subsequent row can be obtained based on the detection method with the most stable real-time scanning duration, such as the smallest difference, to avoid inaccurate detection results of the motion direction change time due to the failure of position sensors, etc.
[0042] In a specific embodiment, if the time taken for the horizontal galvanometer to complete one scan of the target scanning area is denoted as T, then the preset duration can be any value within the range of 1 / 200-1 / 300 of the time T, such as T / 220, T / 250, T / 280, etc., thereby satisfying temporal continuity. For example, taking an image containing 1024 rows in the vertical direction as an example, under the driving method of the present invention, the driving voltage waveform of the vertical galvanometer is as follows... Figure 5 As shown, this includes a descent phase lasting 150ms, which corresponds to the data sampling phase in step 1. This phase involves sequentially scanning each row of the target scanning area from top to bottom, acquiring one frame of the target scanning area image. After the data acquisition phase ends, the vertical galvanometer driving voltage decreases within a short time, as shown... Figure 5 The voltage value corresponding to the return to the top of the scanning boundary after 600µs is displayed, thereby driving the vertical galvanometer to quickly return to the top of the vertical scanning boundary. Then, step 1 is repeated to start acquiring the next frame of the target scanning area image. Under this driving method, the continuously acquired images are all downward field images, and the consistency between adjacent images is good, so the final generated video image is stable and clear.
[0043] For example, in a preferred embodiment, the method of this embodiment of the invention further includes a preset duration acquisition step, specifically:
[0044] Obtain the maximum deflection angle of the vertical galvanometer in the current usage scenario and the target deflection angle corresponding to the top to bottom of the target scanning area;
[0045] Compare the target deflection angle with the maximum deflection angle, and generate the range of angle adjustment times corresponding to the vertical galvanometer based on the comparison result;
[0046] Obtain the maximum interval duration corresponding to two adjacent frames of target scan area images, and select and generate the target adjustment count from the range of angle adjustment counts based on the maximum interval duration;
[0047] A preset duration is generated based on the target adjustment number.
[0048] For example, the maximum deflection angle is determined based on the design parameters of the vertical galvanometer, the usage time, and the current usage scenario, while the target deflection angle can be obtained by looking up a table based on the distance from the top to the bottom of the target scanning area or the scanning time. In a preferred embodiment, by comparing the target deflection angle and the maximum deflection angle, such as calculating the ratio or difference between the target deflection angle and the maximum deflection angle, and obtaining the corresponding range of angle adjustment times based on the calculation results, and then combining the maximum interval time corresponding to two adjacent frames of the target scanning area image, a more reasonable target adjustment number can be obtained from the range of angle adjustment times. Since the duration of each adjustment, i.e., the voltage control duration, is based on the design parameters of the galvanometer, a preset duration that conforms to the current usage scenario can be generated based on the target adjustment number, which satisfies both temporal continuity and avoids damage to the device.
[0049] For example, after the horizontal galvanometer has finished scanning the target scanning area, in order to ensure that the vertical galvanometer can deflect from the top to the bottom of the target scanning area, or from the bottom to the top, that is, to ensure that each scanned image is a complete image of the target scanning area, a preferred embodiment further includes an angle compensation step, specifically:
[0050] Acquire two adjacent scan images of the target scan area, select at least one corresponding image region in the two adjacent scan images, and perform a similarity judgment;
[0051] The offset degree of the two adjacent scanned images is generated based on the judgment result, and a preset mapping table is queried to generate the compensation angle of the vertical galvanometer according to the offset degree, so as to ensure that the vertical galvanometer can deflect from the top position to the bottom position or from the bottom position to the top position of the target scan area each time, thus ensuring image integrity.
[0052] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0053] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the confocal laser scanning endoscope galvanometer driving method described above.
[0054] Figure 7 This is a schematic diagram of the structure of a confocal laser scanning endoscope galvanometer driving device provided in one embodiment, as shown below. Figure 7 As shown, it includes a data sampling module 100 and a reset module 200.
[0055] The data sampling module 100 is used to continuously control the real-time deflection angle of the vertical galvanometer to drive the horizontal galvanometer to scan each row of the target scanning area sequentially.
[0056] The reset module 200 is used to control the vertical galvanometer to return to the initial deflection angle within a preset time period after the horizontal galvanometer has finished scanning the target scanning area, and to drive the data sampling module to scan each row of the target scanning area again until the preset scanning end condition is reached.
[0057] The above embodiments provide a confocal laser scanning endoscope galvanometer driving device. Without increasing the complexity of the system design, a method is proposed to eliminate the vertical offset of the upper and lower field images of the confocal endoscope scanning system. The image is scanned and acquired in only one direction in the vertical direction, which essentially avoids the occurrence of image differences. This results in a jitter-free, stable, clear and intuitive final video image, ensuring the imaging quality of the confocal endoscope scanning system.
[0058] In a preferred embodiment, the reset module 200 further includes a duration acquisition unit, which specifically includes:
[0059] The first acquisition unit is used to acquire the maximum deflection angle of the vertical galvanometer in the current usage scenario and the target deflection angle corresponding to the top to the bottom of the target scanning area;
[0060] The comparison unit is used to compare the target deflection angle with the maximum deflection angle, and generate the range of angle adjustment times corresponding to the vertical galvanometer based on the comparison result;
[0061] The selection unit is used to obtain the maximum interval duration corresponding to two adjacent frames of target scan area images, and select and generate the target adjustment number from the range of angle adjustment times according to the maximum interval duration.
[0062] The result generation unit is used to generate a corresponding preset duration based on the target adjustment number.
[0063] In a preferred embodiment, the confocal laser scanning endoscope galvanometer driving device further includes an angle compensation module, the angle compensation module comprising:
[0064] The second acquisition unit is used to acquire two adjacent frames of scanned images of the target scanned area, select at least one corresponding image region in the two adjacent frames of scanned images, and perform similarity judgment.
[0065] The compensation angle generation unit is used to generate the offset degree of the two adjacent scanned images according to the judgment result, and query the preset mapping relationship table to generate the compensation angle of the vertical galvanometer according to the offset degree, so as to ensure that the vertical galvanometer can deflect from the top position to the bottom position or from the bottom position to the top position of the target scan area each time, thus ensuring image integrity.
[0066] It should be noted that the foregoing explanation of the embodiments of the confocal laser scanning endoscope galvanometer driving method also applies to the confocal laser scanning endoscope galvanometer driving device of the above embodiments, and will not be repeated here.
[0067] This invention also provides a confocal laser scanning endoscope galvanometer driving device, including a computer-readable storage medium and a processor. When the processor executes a computer program on the computer-readable storage medium, it implements the steps of the confocal laser scanning endoscope galvanometer driving method described above.
[0068] Figure 8 This is a schematic diagram of the structure of a confocal laser scanning endoscope galvanometer driving device according to an embodiment of the present invention, as shown below. Figure 8 As shown, the confocal laser scanning endoscope galvanometer driving device 8 of this embodiment includes: a processor 80, a readable storage medium 81, and a computer program 82 stored in the readable storage medium 81 and executable on the processor 80. When the processor 80 executes the computer program 82, it implements the steps in the various method embodiments described above, for example... Figure 2 The steps shown. Alternatively, when the processor 80 executes the computer program 82, it implements the functions of each module in the above-described device embodiments, for example... Figure 7 The functions of the module shown.
[0069] For example, the computer program 82 may be divided into one or more modules, which are stored in the readable storage medium 81 and executed by the processor 80 to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 82 in the confocal laser scanning endoscope galvanometer drive device 8.
[0070] The confocal laser scanning endoscope galvanometer drive device 8 may include, but is not limited to, a processor 80 and a readable storage medium 81. Those skilled in the art will understand that... Figure 8 This is merely an example of the confocal laser scanning endoscope galvanometer driving device 8 and does not constitute a limitation on the confocal laser scanning endoscope galvanometer driving device 8. It may include more or fewer components than shown, or combine certain components, or different components. For example, the confocal laser scanning endoscope galvanometer driving device may also include a power management module, a computing module, input / output devices, network access devices, buses, etc.
[0071] The processor 80 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0072] The readable storage medium 81 can be an internal storage unit of the confocal laser scanning endoscope galvanometer drive device 8, such as a hard disk or memory of the confocal laser scanning endoscope galvanometer drive device 8. The readable storage medium 81 can also be an external storage device of the confocal laser scanning endoscope galvanometer drive device 8, such as a plug-in hard disk, SmartMediaCard (SMC), SecureDigital (SD) card, or FlashCard equipped on the confocal laser scanning endoscope galvanometer drive device 8. Furthermore, the readable storage medium 81 can include both internal storage units and external storage devices of the confocal laser scanning endoscope galvanometer drive device 8. The readable storage medium 81 is used to store the computer program and other programs and data required by the confocal laser scanning endoscope galvanometer drive device. The readable storage medium 81 can also be used to temporarily store data that has been output or will be output.
[0073] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0074] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0075] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0076] In the embodiments provided by this invention, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0077] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0078] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0079] The present invention is not limited to the description in the specification and embodiments, and thus other advantages and modifications can be readily realized by those skilled in the art. Therefore, the present invention is not limited to the specific details, representative devices and illustrated examples shown and described herein without departing from the spirit and scope of the general concept as defined by the claims and their equivalents.
Claims
1. A method for driving a confocal laser scanning endoscope galvanometer, characterized in that: The confocal laser scanning endoscope's galvanometer system includes a horizontal galvanometer and a vertical galvanometer, and the method includes the following steps: Step 1: Continuously control the deflection angle of the vertical galvanometer to drive the horizontal galvanometer to scan each row of the target scanning area sequentially; Step 2: After the horizontal galvanometer finishes scanning the target area, the vertical galvanometer is controlled to return to the initial deflection angle within a preset time period, and Step 1 is repeated until the preset scanning end condition is met.
2. The confocal laser scanning endoscope galvanometer driving method according to claim 1, characterized in that, When the horizontal galvanometer is driven to scan downwards from the top to the bottom of the target scanning area, the initial deflection angle is the first deflection angle corresponding to the top boundary; When the horizontal galvanometer is driven to scan upwards from the bottom to the top of the target scanning area, the initial deflection angle is the second deflection angle corresponding to the bottom boundary.
3. The confocal laser scanning endoscope galvanometer driving method according to claim 1, characterized in that, The preset scan end conditions include generating a preset number of target scan area images or the real-time scan duration reaching the target duration.
4. The confocal laser scanning endoscope galvanometer driving method according to claim 1, characterized in that, Let T be the time it takes for the horizontal galvanometer to scan the target scanning area once. Then, the range of the preset duration is T / 200-T / 300.
5. The confocal laser scanning endoscope galvanometer driving method according to claim 4, characterized in that, It also includes a preset duration acquisition step, specifically: Obtain the maximum deflection angle of the vertical galvanometer in the current usage scenario and the target deflection angle corresponding to the top to bottom of the target scanning area; Compare the target deflection angle with the maximum deflection angle, and generate the range of angle adjustment times corresponding to the vertical galvanometer based on the comparison result; Obtain the maximum interval duration corresponding to two adjacent frames of target scan area images, and select and generate the target adjustment count from the range of angle adjustment counts based on the maximum interval duration; A preset duration is generated based on the target adjustment number.
6. The confocal laser scanning endoscope galvanometer driving method according to any one of claims 1-5, characterized in that, The horizontal galvanometer is a resonant galvanometer, and the vertical galvanometer is a galvanometer galvanometer. The real-time deflection angle of the vertical galvanometer is continuously controlled to drive the horizontal galvanometer to scan each row of the target scanning area sequentially. Specifically: Step 101: Obtain the scanning duration T1 and the preset delay duration T2 for each row in the target scanning area; Step 102: When a change in the motion direction of the horizontal galvanometer is detected, the corresponding change in direction time t is collected, and the next deflection angle adjustment time t of the vertical galvanometer is generated. ’ , t ’ = t + T1 + T2; Step 103, at the corresponding next deflection angle adjustment time t ’ The real-time deflection angle of the vertical galvanometer is controlled to increase or decrease by a preset step angle to drive the horizontal galvanometer to scan the next or previous row. Step 104: Repeat steps S102-S103 until a complete image of the target scanning area is acquired.
7. The confocal laser scanning endoscope galvanometer driving method according to claim 6, characterized in that, The time t corresponding to the direction change of the horizontal galvanometer is collected, specifically: Acquire the synchronization indication signal of the horizontal galvanometer, and take the switching time of the high and low levels in the synchronization indication signal as the direction change time t; And / or obtain the rotation angle of the horizontal galvanometer through a position sensor, and take the time corresponding to the maximum deflection angle as the time t of the direction change; And / or obtain the preset scanning duration of the horizontal galvanometer for each row in the target scanning area, compare the real-time scanning duration of the horizontal galvanometer for the current row with the preset scanning duration, and generate the direction change time t based on the comparison result.
8. A confocal laser scanning endoscope galvanometer driving device, based on the method of any one of claims 1-7, characterized in that, Includes a data sampling module and a reset module. The data sampling module is used to continuously control the real-time deflection angle of the vertical galvanometer to drive the horizontal galvanometer to scan each row of the target scanning area sequentially. The reset module is used to control the vertical galvanometer to return to the initial deflection angle within a preset time after the horizontal galvanometer has finished scanning the target scanning area, and to drive the data sampling module to scan each row of the target scanning area again until the preset scanning end condition is reached.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the confocal laser scanning endoscope galvanometer driving method according to any one of claims 1-7.
10. An apparatus comprising a computer-readable storage medium and a processor, characterized in that, When the processor executes the computer program on the computer-readable storage medium, it implements the steps of the confocal laser scanning endoscope galvanometer driving method according to any one of claims 1-7.
