A dual-camera automatic calibration method and system for a 3D endoscope imaging system
Patent Information
- Application Number
- CN202311457451.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-11-03
AI Technical Summary
[0013]为了克服现有技术的不足,本发明提供一种3D内窥镜影像系统的双相机自动调校方法及系统,用于解决现有的调校方法存在调校效率低和调校精度的重复性差的技术问题,从而达到提高3D内窥镜的调校效率和调校精度的重复性的目的
[0075](1)本发明通过全局化阈值、去噪、取边界以及拟合直线等步骤,使得第一相机和第二相机所形成的标靶为对焦清晰的黑色十字图像,该黑色十字图像便于获取到标靶的中心坐标以及偏移角度,从而能够更好地获取到标靶在水平方向、垂直方向以及旋转角度上所存在的偏差,从而分别基于水平偏差、垂直偏差以及旋转角度偏差驱动第一相机和第二相机在不同的方位上,进行相应的调整,准确地实现第一相机和第二相机的自动调校;
Smart Images

Figure CN117481578B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D endoscope calibration technology, specifically to a dual-camera automatic calibration method and system for a 3D endoscope imaging system. Background Technology
[0002] The advent of endoscopic technology is a significant milestone in the history of medical technology. Its application has made minimally invasive medical examinations and surgeries possible, greatly reducing the harm to patients, lowering the risk of postoperative complications such as infection, and shortening recovery time.
[0003] The basic imaging principle of 3D imaging lies in the fact that, due to parallax, the observer's left and right eyes perceive different images of objects in the real world. These image information is then superimposed and reconstructed by the brain, creating a stereoscopic image with front-back, up-down, left-right, and near-far dimensions. The basic principle of a 3D endoscope system is similar. By using stereoscopic imaging technology, a 3D endoscope system can generate two independent video signals with a certain parallax between them. The acquired video signals are not directly displayed to the operator but are instead displayed separately for the operator's left and right eyes using specific display techniques, thus achieving 3D visualization of the endoscopic image.
[0004] Based on the basic working principle of medical 3D endoscope systems, we know that the most basic medical 3D endoscope consists of two main parts: a 3D video signal acquisition system and a 3D image display system.
[0005] A 3D video signal acquisition system includes an illumination system located at the distal end of the endoscope, an optical lens system, and an image transmission system. Once the distal end of the endoscope is placed inside the body to be examined, the optical lens system, aided by the endoscope's illumination system, can capture images of the tissue of interest. The image transmission system typically uses an image sensor and an image encoding chip. The image sensor generally uses a miniature image capture device such as a CCD to convert the image generated by the optical lens into data. The video encoding signal encodes and compresses the image data, enabling high-quality data transmission and display.
[0006] The main steps for installing and calibrating a dual-camera system in a current 3D endoscope include:
[0007] Step 1: Connect the dual cameras to the imaging system and project images onto the medical monitor in real time.
[0008] Step 2: Manually adjust the position of the camera with the installation misalignment, and at the same time visually observe whether the imaging target coincides with the standard position.
[0009] Step 3: Repeat step 2 until the images from both cameras reach the expected standard position. Fix the cameras in place to complete the calibration.
[0010] The disadvantages of current technology:
[0011] (1) Manual calibration is inefficient. It generally takes 0.5-1 hour for a specialist to complete the calibration of a set of cameras.
[0012] (2) The accuracy of manual calibration varies from person to person, and the repeatability of the accuracy of batch products is not good. Summary of the Invention
[0013] To overcome the shortcomings of existing technologies, this invention provides a dual-camera automatic calibration method and system for a 3D endoscope imaging system, which solves the technical problems of low calibration efficiency and poor repeatability of calibration accuracy in existing calibration methods, thereby achieving the goal of improving the calibration efficiency and repeatability of calibration accuracy of 3D endoscopes.
[0014] To solve the above problems, the technical solution adopted by the present invention is as follows:
[0015] This invention discloses an automatic dual-camera calibration method for a 3D endoscopic imaging system, comprising the following steps:
[0016] The first and second cameras used in the 3D endoscope are respectively mounted on the fixture, and the first and second cameras are powered on. The first and second cameras output a first video stream and a second video stream.
[0017] The first video stream and the second video stream are acquired and processed to obtain the currently captured first target position and second target position;
[0018] Obtain a first difference between the first target position and the first target position, and obtain a second difference between the second target position and the second target position;
[0019] Based on the first difference, a specified command is sent to drive the first camera to move and obtain the real-time first difference.
[0020] Based on the second difference, a specified command is sent to drive the second camera to move and acquire the real-time second difference;
[0021] The position of the first camera is continuously adjusted according to the real-time first difference until the real-time first difference is less than a threshold, thus completing the calibration of the first camera.
[0022] The position of the second camera is continuously adjusted based on the real-time second difference until the real-time second difference is less than a threshold, thus completing the calibration of the second camera.
[0023] In a preferred embodiment of the present invention, when obtaining the currently captured first target position and second target position, the following steps are included:
[0024] A global threshold is applied to the first video stream and the second video stream to obtain a first binarized image and a second binarized image;
[0025] The first binarized image and the second binarized image are denoised to obtain a first denoised image and a second denoised image;
[0026] The first denoised image and the second denoised image are subjected to boundary selection and straight line fitting to obtain the first target and the second target;
[0027] Obtain the center coordinates and deflection angles of the first and second targets to obtain the current captured positions of the first and second targets.
[0028] In a preferred embodiment of the present invention, the global threshold is calculated as follows:
[0029] Image frames are extracted from the first video stream and the second video stream to obtain a first frame image and a second frame image;
[0030] The first and second thresholds that maximize the inter-class variance between the first and second frame images are obtained using the maximum inter-class variance algorithm.
[0031] Binarization of the first frame image and the second frame image is performed based on the first threshold and the second threshold to obtain the first binarized image and the second binarized image.
[0032] In a preferred embodiment of the present invention, the noise reduction process includes:
[0033] The first binarized image and the second binarized image are closed by structuring element B, as shown in Formula 1:
[0034]
[0035] In the formula, A is the first binarized image or the second binarized image, A·B represents the closing operation between A and B, and the operator is... The operator Θ represents the expansion operation, and the operator Θ represents the erosion operation.
[0036] In a preferred embodiment of the present invention, the boundary selection process includes:
[0037] Obtain the gradient values in the horizontal and vertical directions of the target, as shown in Formula 2:
[0038]
[0039] In the formula, G x G represents the gradient value in the horizontal direction of the target. y I is the gradient value in the vertical direction of the target. gray For either the first denoised image or the second denoised image, * represents the convolution operator;
[0040] The gradient intensity of each pixel is obtained based on the gradient values in the horizontal and vertical directions of the target, as shown in Formula 3:
[0041]
[0042] In the formula, M(x,y) represents the gradient intensity of pixel (x,y), and θ(x,y) represents the gradient direction of pixel (x,y). Non-maximum suppression is performed based on the gradient intensity and the gradient direction, as shown in Formula 4:
[0043]
[0044] In the formula, M L The low threshold representing the gradient strength, δ x and δ y δ represents the offset value in the gradient direction. x =cosθ(x,y),δ y =sinθ(x,y);
[0045] Perform double threshold processing, as shown in Formula 5:
[0046]
[0047] In the formula, M H The high threshold represents the gradient strength. Strong, Weak, and Non-edge represent strong edges, weak edges, and non-edges, respectively.
[0048] In a preferred embodiment of the present invention, fitting a straight line includes:
[0049] Let the horizontal and vertical lines of the target be as shown in Formula 6:
[0050] y = k*x + b (6);
[0051] The slopes k of the horizontal and vertical lines are fitted using the least squares method, as shown in Formula 7:
[0052]
[0053] The intercept b is obtained by using the method of undetermined coefficients based on the slope obtained from the fitting.
[0054] In a preferred embodiment of the present invention, the process of obtaining the center coordinates and the deflection angle includes:
[0055] Let the horizontal and vertical lines of the target be as shown in Formula 8 and Formula 9, respectively:
[0056] a1x+b1y+c1=0 (8);
[0057] a²x + b²y + c² = 0 (9);
[0058] In the formula, a, b, and c are coefficients;
[0059] By combining the horizontal and vertical lines, and using elimination, we can obtain the values of x and y, which are the center coordinates of the first target and the second target.
[0060] The deflection angles of the first and second targets are obtained using the arctangent function, as shown in Formula 10:
[0061] θ = arctan(k) (10);
[0062] In the formula, k is the slope of the horizontal line.
[0063] In a preferred embodiment of the present invention, obtaining the first difference and the second difference includes:
[0064] Obtain the first horizontal difference, the first vertical difference, and the first angular difference between the first target position and the first target position;
[0065] Obtain the second horizontal difference, the second vertical difference, and the second angular difference between the second target position and the second objective position.
[0066] In a preferred embodiment of the present invention, when driving the first camera and the second camera to move, the following is included:
[0067] The first camera is driven to perform horizontal movement, vertical movement, and rotational movement based on the first horizontal difference, the first vertical difference, and the first angular difference, respectively.
[0068] The second camera is driven to perform horizontal movement, vertical movement, and rotational movement based on the second horizontal difference, the second vertical difference, and the second angular difference, respectively.
[0069] A dual-camera automatic calibration system for a 3D endoscopic imaging system includes:
[0070] Target position generation unit: used to acquire the first video stream and the second video stream, process them, and obtain the currently captured first target position and second target position;
[0071] Difference acquisition unit: used to acquire a first difference between the first target position and the first target position, acquire a second difference between the second target position and the second target position; acquire real-time first difference and real-time second difference;
[0072] The calibration unit is configured to: send a specified command based on the first difference to drive the first camera to move; send a specified command based on the second difference to drive the second camera to move; continuously adjust the position of the first camera based on the real-time first difference until the real-time first difference is less than a threshold, thereby completing the calibration of the first camera; and continuously adjust the position of the second camera based on the real-time second difference until the real-time second difference is less than a threshold, thereby completing the calibration of the second camera.
[0073] The first and second cameras used in the 3D endoscope are respectively mounted on the fixture, and the first and second cameras are powered on. The first and second cameras output a first video stream and a second video stream.
[0074] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0075] (1) The present invention uses steps such as global thresholding, noise reduction, boundary selection and line fitting to make the target formed by the first camera and the second camera a black cross image with clear focus. The black cross image makes it easy to obtain the center coordinates and offset angle of the target, so as to better obtain the deviation of the target in the horizontal direction, vertical direction and rotation angle. Based on the horizontal deviation, vertical deviation and rotation angle deviation, the first camera and the second camera are driven to make corresponding adjustments in different positions, so as to accurately realize the automatic adjustment of the first camera and the second camera.
[0076] (2) The present invention can control the first camera and the second camera simultaneously in the horizontal direction, vertical direction and rotation angle, so that the most effective adjustment method can be adopted at the same time according to the deviation in different directions, which greatly improves the adjustment efficiency, and the adjustment between the two cameras will not cause interference.
[0077] (3) The automatic calibration method provided by the present invention is highly efficient and suitable for large-scale mass production. The 3D imaging module that needs to be calibrated is placed in place and the calibration can be completed with one click. The time can be controlled within a short range.
[0078] (4) The calibration algorithm provided by this invention can achieve high-precision calibration and good repeatability of batch products.
[0079] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0080] Figure 1 - A step diagram of the automatic dual-camera calibration method for the 3D endoscopic imaging system according to an embodiment of the present invention;
[0081] Figure 2 - A schematic diagram of motor propulsion control for dual cameras according to an embodiment of the present invention;
[0082] Figure 3 - A diagram of the dual-camera calibration software interface according to an embodiment of the present invention;
[0083] Figure 4 -Flowchart of the dual-camera calibration software control according to an embodiment of the present invention.
[0084] Explanation of reference numerals in the attached diagram: 1. First camera; 2. Second camera; 3. Linear motor X; 4. Linear motor Y; 5. Stepper motor Z. Detailed Implementation
[0085] The dual-camera automatic calibration method for the 3D endoscopic imaging system provided by this invention includes the following steps:
[0086] Step S1: Mount the first camera 1 and the second camera 2 used in the 3D endoscope onto the fixture, and power on the first camera 1 and the second camera 2. The first camera 1 and the second camera 2 output the first video stream and the second video stream.
[0087] Step S2: Obtain the first video stream and the second video stream and process them to obtain the currently captured first target position and second target position;
[0088] Step S3: Obtain the first difference between the first target position and the first target position, and obtain the second difference between the second target position and the second target position;
[0089] Step S4: Send a specified command based on the first difference to drive the first camera 1 to move and obtain the real-time first difference;
[0090] Step S5: Send a specified command based on the second difference to drive the second camera 2 to move and obtain the real-time second difference;
[0091] Step S6: Continuously adjust the position of the first camera 1 according to the real-time first difference until the real-time first difference is less than the threshold, and complete the calibration of the first camera 1.
[0092] Step S7: Continuously adjust the position of the second camera 2 according to the real-time second difference until the real-time second difference is less than the threshold, and complete the calibration of the second camera 2.
[0093] Specifically, by connecting the dual-camera module to the endoscope camera system, a video stream can be acquired, which can then be directly used by the calibration software.
[0094] In step S2 above, when obtaining the currently captured positions of the first and second targets, the following steps are included:
[0095] A global threshold is applied to the first video stream and the second video stream to obtain a first binarized image and a second binarized image;
[0096] The first binarized image and the second binarized image are denoised to obtain the first denoised image and the second denoised image;
[0097] The first and second denoised images are subjected to boundary selection and straight line fitting to obtain the first target and the second target;
[0098] Obtain the center coordinates and deflection angles of the first and second targets to determine the current positions of the first and second targets.
[0099] Furthermore, when applying a global threshold, the following is included:
[0100] Image frames are extracted from the first video stream and the second video stream to obtain the first frame image and the second frame image;
[0101] The first and second thresholds that maximize the inter-class variance of the first and second frame images are obtained using the maximum inter-class variance algorithm.
[0102] The first frame image and the second frame image are binarized according to the first threshold and the second threshold to obtain the first binarized image and the second binarized image.
[0103] Specifically, the global thresholding method sets pixels in an image below a certain threshold to black, and others to white. Under suitable lighting conditions, this invention utilizes the maximum inter-class variance algorithm of the global thresholding method to binarize images with relatively high accuracy.
[0104] In the Otsu's algorithm, variance is a measure of the uniformity of gray-level distribution. The larger the variance value, the greater the difference between the two parts that make up the image. When part of the target is misclassified as background or part of the background is misclassified as target, the difference between the two parts will become smaller. Therefore, the segmentation that maximizes the inter-class variance means that the misclassification probability is minimized.
[0105] The Otsu's algorithm analyzes the histogram of the input grayscale image, divides it into two parts, and maximizes the distance between them, i.e., maximizes the inter-class variance. The split point is the obtained threshold.
[0106] The algorithm for maximizing inter-class variance is as follows:
[0107] Let the original grayscale image extracted from the video stream have grayscale level z-1 and the number of pixels with grayscale level i be m. i Then the total number of pixels in the image is:
[0108] M = m0 + m1 + ... + m z-1 ;
[0109] The probability of each value:
[0110]
[0111] The gray levels are divided into two groups using a threshold Y: V0 = (0, 1, 2, ..., Y-1) and V1 = (Y, Y+1, ..., z-1); the probabilities of each group are as follows:
[0112] The probability of class V0 occurring:
[0113] Probability of V1 class occurrence:
[0114] The average value of class V0:
[0115] The average value of class V1:
[0116] in, It is the average grayscale value of the entire image; This is the average grayscale value when the threshold is T, so the average grayscale value of all samples is:
[0117] η = σ0η0 + σ1η1;
[0118] The variance between classes V0 and V1 can be obtained by the following formula:
[0119]
[0120] By varying Y from 1 to z-1, we find the Y that reaches its maximum value in the above expression, i.e., we find maxγ. 2 Y at (Y) * Value, at this time, Y * That is, the threshold, γ 2 (Y) is called the threshold selection function.
[0121] Furthermore, the denoising process includes:
[0122] The first and second binarized images are closed using structuring element B, as shown in Formula 1:
[0123]
[0124] In the formula, A is the first or second binarized image, A·B represents the closing operation between A and B, and the operator is... The operator Θ represents the expansion operation, and the operator Θ represents the erosion operation.
[0125] Specifically, in this invention, the closing operation is actually A being expanded by B first, and then eroded by B.
[0126] Function: Closing operations are well-suited for removing foreground noise from images. After closing, the discontinuities of the original target in the image can be connected, and holes inside the target can be filled, with minimal change to the size and shape of the original image. It also smooths out convex corners that protrude into the image.
[0127] Furthermore, when taking the boundary, the following is included:
[0128] Obtain the gradient values in the horizontal and vertical directions of the target, as shown in Formula 2:
[0129]
[0130] In the formula, G x G represents the gradient value in the horizontal direction of the target. y I is the gradient value in the vertical direction of the target. gray For either the first or second denoised image, * represents the convolution operator;
[0131] The gradient intensity of each pixel is obtained based on the gradient values in the horizontal and vertical directions of the target, as shown in Formula 3:
[0132]
[0133] In the formula, M(x,y) represents the gradient intensity of pixel (x,y), and θ(x,y) represents the gradient direction of pixel (x,y).
[0134] Non-maximum suppression is performed based on gradient strength and gradient direction, as shown in Equation 4:
[0135]
[0136] In the formula, M L The low threshold representing the gradient strength, δ x and δ y δ represents the offset value in the gradient direction. x =cosθ(x,y),δ y =sinθ(x,y);
[0137] Perform double threshold processing, as shown in Formula 5:
[0138]
[0139] In the formula, M H The high threshold represents the gradient strength. Strong, Weak, and Non-edge represent strong edges, weak edges, and non-edges, respectively.
[0140] Furthermore, when fitting a straight line, the following is included:
[0141] Let the horizontal and vertical lines of the target be as shown in Formula 6:
[0142] y = k*x + b (6);
[0143] The slopes k of the horizontal and vertical lines are fitted using the least squares method, as shown in Formula 7:
[0144]
[0145] The intercept b is obtained by using the method of undetermined coefficients based on the slope obtained from the fitting.
[0146] Furthermore, in obtaining the center coordinates and deflection angle, the following steps are included:
[0147] Let the horizontal and vertical lines of the target be as shown in Formula 8 and Formula 9, respectively:
[0148] a1x+b1y+c1=0 (8);
[0149] a²x + b²y + c² = 0 (9);
[0150] In the formula, a, b, and c are coefficients;
[0151] By combining the horizontal and vertical lines, and using elimination, we can obtain the values of x and y, which are the center coordinates of the first and second targets.
[0152] The deflection angles of the first and second targets are obtained using the arctangent function, as shown in Formula 10:
[0153] θ = arctan(k) (10);
[0154] In the formula, k is the slope of the horizontal line.
[0155] In step S3 above, obtaining the first difference and the second difference includes:
[0156] Obtain the first horizontal difference, the first vertical difference, and the first angular difference between the first target position and the first objective position;
[0157] Obtain the second horizontal difference, the second vertical difference, and the second angular difference between the second target position and the second target position.
[0158] In steps S4 and S5 above, when driving the first camera 1 and the second camera 2 to move, the following steps are included:
[0159] The first camera 1 is driven to move horizontally, vertically, and rotate according to the first horizontal difference, the first vertical difference, and the first angular difference.
[0160] The second camera 2 is driven to move horizontally, vertically, and rotate according to the second horizontal difference, the second vertical difference, and the second angular difference.
[0161] The dual-camera automatic calibration system for the 3D endoscopic imaging system provided by the present invention includes: a target position generation unit, a difference acquisition unit, and a calibration unit.
[0162] Target position generation unit: used to acquire the first video stream and the second video stream for processing to obtain the currently captured first target position and second target position.
[0163] Difference acquisition unit: used to acquire the first difference between the first target position and the first target position, acquire the second difference between the second target position and the second target position; acquire the real-time first difference and the real-time second difference;
[0164] The calibration unit is used to send a specified command based on the first difference to drive the first camera 1 to move; send a specified command based on the second difference to drive the second camera 2 to move; continuously adjust the position of the first camera 1 based on the real-time first difference until the real-time first difference is less than a threshold, thus completing the calibration of the first camera 1; and continuously adjust the position of the second camera 2 based on the real-time second difference until the real-time second difference is less than a threshold, thus completing the calibration of the second camera 2.
[0165] The first camera 1 and the second camera 2 used in the 3D endoscope are respectively mounted on the fixture, and the first camera 1 and the second camera 2 are powered on. The first camera 1 and the second camera 2 output the first video stream and the second video stream.
[0166] The following embodiments are further illustrations of the present invention, but the scope of the present invention is not limited thereto.
[0167] 1. Dual-camera calibration fixture and motor propulsion method:
[0168] like Figure 2 As shown, the first camera 1 and the second camera 2 are fixed in place by a special fixture, and then their movement is controlled by three motors (linear motor X 3, linear motor Y 4, and stepper motor Z 5), with three possible movement directions:
[0169] X-direction (guide rail propulsion): Linear motor X3 controls the horizontal movement of the first camera 1 and the second camera 2.
[0170] Y-direction (guide rail propulsion): Linear motor Y4 controls the vertical movement of the first camera 1 and the second camera 2.
[0171] Z-direction (gear propulsion): Stepper motor Z5 controls the rotation around the geometric center of the first camera 1 and the second camera 2.
[0172] 2. Real-time image calibration software:
[0173] Dual-camera calibration software interface, such as Figure 3 As shown.
[0174] Software operating platform: PC;
[0175] Operating system: Windows / Linux;
[0176] Communication method: Serial port;
[0177] Software flowchart, such as Figure 4 As shown.
[0178] Specific steps:
[0179] 1. Mount the dual cameras used in the 3D endoscope into a special fixture.
[0180] 2. Power on the camera and confirm that both cameras can output video signals normally.
[0181] 3. The video signal passes through the image processing module of the imaging system to calculate the currently captured target position and the difference between the target position and the target position.
[0182] 4. After the calibration software obtains the difference, it sequentially sends specified commands to drive the dual cameras to move horizontally, vertically, and rotate. At the same time, it obtains the difference in real time until the dual cameras reach the precise target position.
[0183] To ensure the imaging quality of the dual cameras, the present invention has the following environmental requirements:
[0184] (1) The target being photographed is two clearly focused black crosshairs against a white background.
[0185] (2) During calibration, only the highly uniform white light test light source used by the target is used, and there is no interference from other ambient light sources.
[0186] The above embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the present invention. Any non-substantial changes and substitutions made by those skilled in the art based on the present invention shall fall within the scope of protection claimed by the present invention.
Claims
1. A method for automatic dual-camera calibration of a 3D endoscopic imaging system, characterized in that, Includes the following steps: The first and second cameras used in the 3D endoscope are respectively mounted on the fixture, and the first and second cameras are powered on. The first and second cameras output a first video stream and a second video stream. The first video stream and the second video stream are acquired and processed to obtain the currently captured first target position and second target position; Obtain the first difference between the first target position and the first target position, and obtain the second difference between the second target position and the second target position; Based on the first difference, a specified command is sent to drive the first camera to move and obtain the real-time first difference. Based on the second difference, a specified command is sent to drive the second camera to move and acquire the real-time second difference; The position of the first camera is continuously adjusted according to the real-time first difference until the real-time first difference is less than a threshold, thus completing the calibration of the first camera. The position of the second camera is continuously adjusted according to the real-time second difference until the real-time second difference is less than the threshold, thus completing the calibration of the second camera. Among them, when obtaining the currently captured positions of the first and second targets, the following is included: A global threshold is applied to the first video stream and the second video stream to obtain a first binarized image and a second binarized image; The first binarized image and the second binarized image are denoised to obtain a first denoised image and a second denoised image; The first denoised image and the second denoised image are subjected to boundary selection and straight line fitting to obtain the first target and the second target; Obtain the center coordinates and deflection angles of the first and second targets to obtain the current captured positions of the first and second targets.
2. The dual-camera automatic calibration method for the 3D endoscopic imaging system according to claim 1, characterized in that, When applying a global threshold, the following is included: Image frames are extracted from the first video stream and the second video stream to obtain a first frame image and a second frame image; The first and second thresholds that maximize the inter-class variance between the first and second frame images are obtained using the maximum inter-class variance algorithm. Binarization of the first frame image and the second frame image is performed based on the first threshold and the second threshold to obtain the first binarized image and the second binarized image.
3. The dual-camera automatic calibration method for the 3D endoscopic imaging system according to claim 1, characterized in that, During noise reduction, the following are included: Through structural elements The closing operation is performed on the first binarized image and the second binarized image respectively, as shown in Formula 1: (1); In the formula, It is either the first binarized image or the second binarized image. express and Perform closing operation, operator Indicates the expansion operation, operator This indicates a corrosion operation.
4. The dual-camera automatic calibration method for the 3D endoscopic imaging system according to claim 1, characterized in that, When taking boundaries, the following is included: Obtain the gradient values in the horizontal and vertical directions of the target, as shown in Formula 2: (2); In the formula, The gradient value in the horizontal direction of the target. The gradient value is located in the vertical direction of the target. The first denoised image or the second denoised image. This represents the convolution operator; The gradient intensity of each pixel is obtained based on the gradient values in the horizontal and vertical directions of the target, as shown in Formula 3: (3); In the formula, Represents pixels gradient strength, Represents pixels The gradient direction; Non-maximum suppression is performed based on the gradient strength and gradient direction, as shown in Equation 4: (4); In the formula, The low threshold representing the gradient strength. and This represents the offset value in the gradient direction. , ; Perform double threshold processing, as shown in Formula 5: (5); In the formula, The high threshold representing the gradient strength, , , These represent strong edges, weak edges, and non-edges, respectively.
5. The dual-camera automatic calibration method for the 3D endoscopic imaging system according to claim 1, characterized in that, When fitting a straight line, the following are included: Let the horizontal and vertical lines of the target be as shown in Formula 6: (6); The slopes of the horizontal and vertical lines are fitted using the least squares method. As shown in Formula 7: (7); The intercept is obtained using the method of undetermined coefficients based on the fitted slope. .
6. The dual-camera automatic calibration method for the 3D endoscopic imaging system according to claim 1, characterized in that, When obtaining the center coordinates and deflection angle, the following is included: Let the horizontal and vertical lines of the target be as shown in Formula 8 and Formula 9, respectively: (8); (9); In the formula, , , They are coefficients, respectively. By combining the horizontal and vertical lines and using elimination, we obtain... and The value of , i.e., the center coordinates of the first target and the second target; The deflection angles of the first and second targets are obtained using the arctangent function, as shown in Formula 10: (10); In the formula, Let be the slope of the horizontal line.
7. The dual-camera automatic calibration method for the 3D endoscopic imaging system according to claim 1, characterized in that, When obtaining the first difference and the second difference, the following is included: Obtain the first horizontal difference, the first vertical difference, and the first angular difference between the first target position and the first target position; Obtain the second horizontal difference, the second vertical difference, and the second angular difference between the second target position and the second objective position.
8. The dual-camera automatic calibration method for the 3D endoscopic imaging system according to claim 7, characterized in that, When driving the first camera and the second camera to move, the following are included: The first camera is driven to perform horizontal movement, vertical movement, and rotational movement based on the first horizontal difference, the first vertical difference, and the first angular difference, respectively. The second camera is driven to perform horizontal movement, vertical movement, and rotational movement based on the second horizontal difference, the second vertical difference, and the second angular difference, respectively.
9. A dual-camera automatic calibration system for a 3D endoscopic imaging system, characterized in that, The system is applied to a dual-camera automatic calibration method for a 3D endoscopic imaging system as described in any one of claims 1 to 8, comprising: Target position generation unit: used to acquire the first video stream and the second video stream, process them, and obtain the currently captured first target position and second target position; Difference acquisition unit: used to acquire a first difference between the first target position and the first target position, acquire a second difference between the second target position and the second target position; acquire real-time first difference and real-time second difference; The calibration unit is configured to: send a specified command based on the first difference to drive the first camera to move; send a specified command based on the second difference to drive the second camera to move; continuously adjust the position of the first camera based on the real-time first difference until the real-time first difference is less than a threshold, thereby completing the calibration of the first camera; and continuously adjust the position of the second camera based on the real-time second difference until the real-time second difference is less than a threshold, thereby completing the calibration of the second camera. The first and second cameras used in the 3D endoscope are respectively mounted on the fixture, and the first and second cameras are powered on. The first and second cameras output a first video stream and a second video stream.
Citation Information
Patent Citations
Image picking-up apparatus for endoscope
JP2012147882A
A system and method for detection of suspicious tissue regions in an endoscopic procedure
US20180253839A1