A method for real-time correction of the lens view angle of a visual oral instrument
By combining a three-axis accelerometer, gyroscope, and magnetometer, the viewing angle of the visual dental instrument lens is adjusted in real time, solving the problem of non-real-time adjustment of the viewing angle in existing technologies. This enables the optimal viewing angle and automatic switching of modes during dental examinations, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2026-03-17
AI Technical Summary
Existing perspective correction methods cannot achieve real-time adjustment, resulting in the illusion of a difference between the actual direction of lens movement and the perceived direction, and the image suddenly rotates and jumps at critical values, requiring readjustment of the perspective.
The system collects data using a three-axis accelerometer to calculate the lens rotation angle, and combines a three-axis gyroscope and a three-axis magnetometer to automatically switch between mirror and non-mirror modes. It dynamically adjusts the rotation and flipping of the image captured by the lens, and creates a canvas based on the resolution of the display device to fill the image.
It enables real-time correction of the viewing angle of the visual dental instrument lens, ensuring the best viewing angle during the dental examination, automatically adapting to the examination needs of the inner and outer surfaces of the teeth, reducing image rotation and jitter, and improving the user experience.
Smart Images

Figure CN115633924B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of endoscopy, and more specifically, to a method for real-time correction of the lens angle of a visual oral instrument. Background Technology
[0002] How to inspect, brush, and remove plaque from the best angle is a question of whether efficiency can be improved during use.
[0003] Existing viewpoint correction methods: Rotate the image horizontally or vertically at a certain critical value using data from a three-axis accelerometer.
[0004] The drawbacks of existing perspective correction methods are: they cannot adjust the perspective in real time, which can cause the illusion of a difference between the actual direction of lens movement and the perceived direction; during use, the image suddenly rotates and jumps at a certain critical value, and the perspective needs to be readjusted after the jump. Summary of the Invention
[0005] The present invention aims to provide a method for real-time correction of the lens perspective of a visual dental instrument, in order to solve the problems of existing perspective correction methods that cannot adjust the perspective in real time, which will cause the illusion of a difference between the actual movement direction of the lens and the perceived direction; and the problem that the image suddenly rotates and jumps at a certain critical value during use, and the perspective needs to be readjusted after the jump.
[0006] The present invention provides a method for real-time correction of the lens angle of a visual dental instrument, comprising the following steps:
[0007] S1. Acceleration data of the visual dental instrument is collected by a triaxial accelerometer, and the rotation angle of the image captured by the lens of the visual dental instrument in the horizontal direction is calculated using the acceleration data.
[0008] S2. When examining the inner or outer surfaces of teeth in different modes, different rotation strategies are used to make the image captured by the lens of the visual dental instrument rotate according to the rotation angle.
[0009] S3. Automatically switch between mirror mode and non-mirror mode based on data from the three-axis gyroscope and / or the three-axis magnetometer;
[0010] S4, create a canvas and draw the image captured by the lens.
[0011] Furthermore, step S1 includes:
[0012] A triaxial accelerometer is installed in a visual dental instrument. The triaxial accelerometer collects acceleration data of the visual dental instrument in the x-axis, y-axis and z-axis directions in real time, which are recorded as Δx, Δy and Δz respectively.
[0013] The formula for calculating the rotation angle α of the image acquired by the lens of a visual dental instrument around the z-axis is:
[0014] When Δx > 0, it means that when the visual dental instrument is placed vertically and facing you directly, it rotates to the left by an angle α.
[0015] When Δx < 0, it means that when the visual dental instrument is placed vertically and facing you directly, it rotates to the right by an angle α.
[0016] In some embodiments, during step S2, when examining the inner or outer surface of a tooth using a self-use mode:
[0017] (1) When examining the outer surface of a tooth, simply rotate the lens to capture the image by an angle of -α.
[0018] (2) When examining the inner surface of a tooth, the image captured by the lens needs to be flipped left and right, and then the image is rotated by an angle α.
[0019] In some embodiments, during step S2, when examining the inner or outer surface of a tooth using a medical mode:
[0020] (1) When examining the outer surface of a tooth, the image captured by the lens needs to be flipped left and right, and then the image is rotated by an angle α.
[0021] (2) When examining the inner surface of a tooth, simply rotate the lens to capture the image by an angle of -α.
[0022] Optionally, in step S3, when only three-axis gyroscope data is used to automatically switch between mirror mode and non-mirror mode:
[0023] Zero bias correction is performed using the rotational angular velocity data of a three-axis gyroscope around the y-axis. The rotational angular velocity data is accumulated over time to obtain the orientation angle β. In the initial state, when the lens of the visual dental instrument is facing you directly: β = 0.
[0024] The orientation angle β is limited to the angle range (-180°, 180°). When the angle exceeds this range, the mirror mode or non-mirror mode is switched and the orientation angle β is set to 0.
[0025] Optionally, in step S3, when only triaxial magnetometer data is used to automatically switch between mirror mode and non-mirror mode:
[0026] In the initial state, the lens of the visual dental instrument faces directly towards the user. The initial angle γ of the lens's rotation around the y-axis is calculated using data from a triaxial magnetometer. When rotating clockwise by δ, the direction angle β = (γ + δ). 旋转后 -γ;
[0027] The orientation angle β is limited to the angle range (-180°, 180°). When the angle exceeds this range, the mirror mode or non-mirror mode is switched and the orientation angle β is set to 0.
[0028] Optionally, in step S3, when simultaneously using three-axis gyroscope data and three-axis magnetometer data to automatically switch between mirror mode and non-mirror mode:
[0029] The direction angle β is calculated using the following formula:
[0030] β=λβ 磁力计 +(1-λ)β 陀螺仪 ;
[0031] Where, β 磁力计 The direction angle is calculated using the rotational angular velocity data of a three-axis gyroscope around the y-axis; β 陀螺仪 The direction angle is calculated using data from a triaxial magnetometer; λ∈(0,1) represents the weights.
[0032] The orientation angle β is limited to the angle range (-180°, 180°). When the angle exceeds this range, the mirror mode or non-mirror mode is switched and the orientation angle β is set to 0.
[0033] Furthermore, step S4 includes:
[0034] S41, Create a canvas based on the resolution of the display device;
[0035] S42, Align the center of the image captured by the lens after being rotated and / or flipped in steps S1 to S3 with the center of the canvas.
[0036] S43 dynamically scales the lens to capture images and fill the canvas.
[0037] Furthermore, in step S41, the method for creating the canvas according to the resolution of the display device is as follows:
[0038] Use the largest inscribed square at the center of the image captured by the lens as the canvas; the aspect ratio of the created canvas is 1, and the resolution is the resolution of the display device, denoted as X.
[0039] Furthermore, in step S43, the method for dynamically scaling the lens to acquire images and fill the canvas according to a certain ratio is as follows:
[0040] Let the side length of the canvas be x. The calculation formula is: xsinθ + xcosθ = h, where h is the height of the image captured by the lens, representing the smallest side of the image captured by the lens.
[0041] After calculating the side length x of the canvas, calculate the minimum magnification ratio based on the canvas resolution. The calculation formula is: X / x.
[0042] The image captured by the lens is magnified according to the calculated minimum magnification ratio.
[0043] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0044] 1. This invention combines a triaxial accelerometer, a triaxial gyroscope, and a triaxial magnetometer to achieve real-time adjustment of the rotation angle of images captured by the lens of visual dental instruments (such as endoscopes, visual electric toothbrushes, and visual plaque cleaners), ensuring the optimal viewing angle during dental examinations; and automatic switching between mirror mode and non-mirror mode when examining the inner or outer surfaces of teeth. Therefore, while ensuring real-time adjustment of the rotation angle of the lens-captured images, the image rotation strategy used for examining the outer surface of teeth can be adapted for examining the upper surface of lower molars; and the image rotation strategy used for examining the inner surface of teeth can be adapted for examining the lower surface of upper molars.
[0045] 2. Based on the characteristic that image data outside the canvas is not drawn, this invention takes the largest inscribed square of the canvas and dynamically calculates the ratio between the resolution of the image captured by the lens and the resolution of the canvas, so as to display as much of the area of the image captured by the lens as possible. Attached Figure Description
[0046] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings in the embodiments will be briefly described 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.
[0047] Figure 1 This is a flowchart of a method for real-time correction of the lens angle of a visual dental instrument in an embodiment of the present invention.
[0048] Figure 2 This is a schematic diagram of the lens and coordinate system of the visual plaque cleaner in an embodiment of the present invention.
[0049] Figure 3 This is a schematic diagram of the inner and outer surfaces of a tooth in an embodiment of the present invention.
[0050] Figure 4 This is a schematic diagram illustrating the principle of creating a canvas in an embodiment of the present invention. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0052] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0053] Example
[0054] like Figure 1 As shown in the figure, this embodiment proposes a method for real-time correction of the lens angle of a visual dental instrument, including the following steps:
[0055] S1. Acceleration data of the visual dental instrument is collected by a triaxial accelerometer, and the rotation angle of the image captured by the lens of the visual dental instrument in the horizontal direction is calculated using the acceleration data.
[0056] Common visual dental instruments include endoscopes, visual electric toothbrushes, and visual plaque cleaners, all of which can capture images through lenses. A triaxial accelerometer is installed in the visual dental instrument, which collects acceleration data in real time along the x, y, and z axes, denoted as Δx, Δy, and Δz, respectively.
[0057] The formula for calculating the rotation angle α of the image acquired by the lens of a visual dental instrument around the z-axis (i.e., the xy-plane) is as follows:
[0058] When Δx > 0, it means that when the visual dental instrument is placed vertically and facing you directly, it rotates to the left by an angle α.
[0059] When Δx < 0, it means that when the visual dental instrument is placed vertically and facing you directly, it rotates to the right by an angle α.
[0060] S2. When examining the inner or outer surfaces of teeth in different modes, different rotation strategies are used to make the image captured by the lens of the visual dental instrument rotate according to the rotation angle.
[0061] The inner and outer surfaces of the tooth, such as Figure 3As shown. In this embodiment, it is also necessary to distinguish between self-use mode and medical mode. Simply put, self-use mode is when the user uses the lens to examine their own teeth; medical mode is when a doctor uses the lens to examine a patient's teeth. Mirror mode: The corrected image is flipped horizontally, like a plane mirror image; non-mirror mode: The corrected image is a pre-image, without horizontal flipping.
[0062] When using self-use mode to examine the inner or outer surfaces of teeth:
[0063] (1) When examining the outer surface of a tooth (mirror mode), simply rotate the lens to capture the image by an angle -α.
[0064] (2) When examining the inner surface of a tooth (non-mirror mode), the image captured by the lens needs to be flipped left and right, and then the image is rotated by an angle α.
[0065] When examining the inner or outer surfaces of teeth using a medical mode:
[0066] (1) When examining the outer surface of the tooth (mirror mode), the image captured by the lens needs to be flipped left and right, and then the image is rotated by an angle α.
[0067] (2) When examining the inner surface of a tooth (non-mirror mode), simply rotate the lens to capture the image by an angle of -α.
[0068] S3. Automatically switch between mirror mode and non-mirror mode based on data from the three-axis gyroscope and / or the three-axis magnetometer;
[0069] Option 1: Use only three-axis gyroscope data to automatically switch between mirror mode and non-mirror mode;
[0070] Zero bias correction is performed using the rotational angular velocity data of a three-axis gyroscope around the y-axis. The rotational angular velocity data is accumulated over time to obtain the direction angle β. In the initial state, when the lens of the visual dental instrument is facing you directly: β = 0.
[0071] Option 2: Use only triaxial magnetometer data to automatically switch between mirror mode and non-mirror mode;
[0072] In the initial state, the lens of the visual dental instrument faces directly towards the user. The initial angle γ of the lens's rotation around the y-axis is calculated using data from a triaxial magnetometer. When rotating clockwise by δ, the direction angle β = (γ + δ). 旋转后 -γ.
[0073] Option 3: Use both three-axis gyroscope data and three-axis magnetometer data simultaneously to automatically switch between mirror mode and non-mirror mode;
[0074] In principle, data from a three-axis magnetometer should be used primarily, supplemented by data from a three-axis gyroscope. The corrected formula is:
[0075] β=λβ 磁力计 +(1-λ)β 陀螺仪 ;
[0076] Where, β 磁力计 The direction angle is calculated using the rotational angular velocity data of a three-axis gyroscope around the y-axis; β 陀螺仪 The direction angle is calculated using data from a triaxial magnetometer; λ∈(0,1) is the weight.
[0077] After calculating the direction angle β using Scheme 1, Scheme 2 or Scheme 3, the direction angle β is restricted to the angle range (-180°, 180°). When it exceeds this angle range, the mirror mode or non-mirror mode is switched and the direction angle β is set to 0.
[0078] S4. Create a canvas and draw the lens-captured image.
[0079] S41, Create a canvas according to the resolution of the display device.
[0080] In this embodiment, the canvas is the area on the display device where images can be drawn. Since the image captured by the lens of the visual dental instrument will be rotated 360° after processing in steps S1 to S3, in order to ensure that no black area (undrawn area) is left on the canvas after the rotation of the lens captured image, due to symmetry, the largest inscribed square in the center of the lens captured image is taken as the canvas, that is, the image presentation area. Therefore, the aspect ratio of the created canvas is 1, and the resolution is the resolution of the display device, denoted as X.
[0081] S42, Align the center of the image captured by the lens after being rotated and / or flipped in steps S1 to S3 with the center of the canvas.
[0082] When the center of the image captured by the lens is shifted to the center of the canvas, the image captured by the lens will be drawn to the center of the canvas. When rotating, you will see a black undrawn area.
[0083] S43, dynamically scales the lens to capture images and fills the canvas according to a certain ratio;
[0084] The minimum magnification ratio is dynamically calculated based on the canvas resolution and the resolution of the lens-captured image after rotation. This magnification ratio ensures that there are no black undrawn areas in the lens-captured image during rotation. Let the side length of the canvas (the largest inscribed square) be x, and the calculation formula is: xsinθ + xcosθ = h, where h is the height of the lens-captured image, representing the smallest side of the lens-captured image. Figure 4As shown. After calculating the side length x of the canvas, the minimum magnification ratio is then calculated based on the canvas resolution using the formula: X / x. Finally, the image captured by the lens is magnified according to the calculated minimum magnification ratio. It should be noted that when magnifying the image captured by the lens, the magnification should be synchronized outwards from the center point of the canvas.
[0085] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method of real-time correction of the lens view angle of a visual oral instrument, characterized in that, The method comprises the following steps: S1, collecting acceleration data of the visual oral cavity instrument by a three-axis acceleration sensor, and calculating a rotation angle of a lens image collected by the visual oral cavity instrument in a horizontal direction by using the acceleration data; S2, when checking the inner side or the outer side of the tooth surface in different modes, different rotation strategies are respectively adopted to make the lens image collected by the visual oral cavity instrument rotate according to the rotation angle; S3, automatically switching the mirror image mode and the non-mirror image mode according to three-axis gyroscope data and / or three-axis magnetometer data; S4, creating a canvas and drawing the lens image; In step S3, when only the three-axis gyroscope data is used to automatically switch the mirror image mode or the non-mirror image mode: The rotation angular velocity data around the y axis of the three-axis gyroscope is used for zero offset correction, and the rotation angular velocity data is accumulated with respect to time to obtain a direction angle β ; at the initial state, that is, when the lens of the visible oral cavity instrument is directly opposite oneself: β = 0; Direction angle β Limited to an angle range of -180°, 180°. When the angle exceeds this range, switch between mirror mode and non-mirror mode and adjust the direction angle. β Set to 0; In step S3, when only the three-axis magnetometer data is used to automatically switch the mirror image mode or the non-mirror image mode: When in the initial state, the lens of the visual oral instrument is directly opposite to itself, and the initial angle of rotation of the lens of the visual oral instrument around the y axis for collecting images is calculated through three-axis magnetometer data γ ; clockwise rotation δ direction angle β ( γ + δ ) 旋转后 - γ ; Direction angle β Limited to an angle range of -180°, 180°. When the angle exceeds this range, switch between mirror mode and non-mirror mode and adjust the direction angle. β Set to 0; In step S3, when the three-axis gyroscope data and the three-axis magnetometer data are simultaneously used to automatically switch the mirror image mode or the non-mirror image mode: The directional angle is calculated using the following equation β : β = λβ 磁力计 +(1- λ ) β 陀螺仪 ; wherein, β 磁力计 is a direction angle calculated from the rotation angular velocity data of the triaxial gyroscope around the y-axis; β 陀螺仪 is a direction angle calculated from the triaxial magnetometer data; λ ∈(0,1) is a weight value; Direction angle β Limited to an angle range of -180°, 180°. When the angle exceeds this range, switch between mirror mode and non-mirror mode and adjust the direction angle. β Set to 0; Step S4 comprises: S41, creating a canvas according to the resolution of a display device; S42, aligning the center of the lens image rotated and / or flipped in steps S1-S3 with the center of the canvas; S43, dynamically scaling the lens image by a certain ratio and filling the canvas; In step S41, the method for creating a canvas according to the resolution of a display device is: Taking the largest inscribed square of the center of the lens image as the canvas; the created canvas has an aspect ratio of 1, and the resolution is the resolution of the display device, denoted as X; In step S43, the method for dynamically scaling the lens image by a certain ratio and filling the canvas is: The length of the canvas is x, and the calculation formula is: x sin θ + x cos θ = h , h is the height of the image captured by the lens, representing the minimum side of the image captured by the lens; After the side length x of the canvas is calculated, the minimum magnification ratio is calculated according to the resolution of the canvas, and the calculation formula is X / x; The lens image is magnified according to the calculated minimum magnification ratio.
2. The method of claim 1, wherein the method further comprises: Step S1 comprises: A three-axis acceleration sensor is installed in the visual oral instrument, which can collect acceleration data of the x-axis, y-axis and z-axis directions of the visual oral instrument in real time, respectively denoted as , and ; The rotation angle of the lens of the visual oral instrument around the z axis α The calculation formula is: When representing the visual oral instrument is vertically placed and faces itself, the angle of rotation to the left side α , ; When representing the visual oral instrument is placed vertically and faces itself, the angle of rotation to the right α , .
3. The method of claim 1, wherein the method further comprises: In step S2, when the self-use mode is adopted to check the inner side or the outer side of the tooth surface: (1) When checking the outer side of the tooth surface, only the rotation angle of the lens image acquisition is needed α ; (2) When checking the inner side of the tooth surface, the image captured by the lens needs to be flipped left and right, and then the image is rotated by an angle α .
4. The method of claim 1, wherein the method further comprises: In step S2, when the medical mode is adopted to check the inner side or the outer side of the tooth surface: (1) When checking the outer side of the tooth surface, the image captured by the lens needs to be flipped left and right, and then the image is rotated by an angle α ; (2) When checking the inner side of the tooth surface, only the rotation angle of the lens image pickup is required α .
Citation Information
Patent Citations
Pavement health condition rapid detection system and method
CN109870456A
Multi-sensor and multifunctional oral cavity problem positioning equipment and method
CN113768468A