Endoscope registration method and device, and endoscope calibration system
Through the improved checkerboard calibration tool and epipolar geometric constraints, the precise registration of the endoscope electromagnetic sensor and the virtual camera is achieved, which solves the problem of poor endoscope field of view matching in the existing technology and improves the reliability of navigation. and security.
Patent Information
- Application Number
- PCT/CN2024/072895
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-23
- Filing Date
- 2024-01-18
- Publication Date
- 2024-08-29
AI Technical Summary
The existing calibration method of the electromagnetic sensor of an endoscope can only determine the coordinate transformation relationship between the electromagnetic sensor and the endoscope, and cannot accurately match the real field of view and the virtual field of view of the endoscope, leading to the possibility of serious medical accidents during navigation. .
An improved checkerboard calibration tool is used to determine the position of the checkerboard and the posture of the electromagnetic sensor by acquiring three-dimensional tomography images. Combined with the results of the endoscope taking pictures at different angles, the camera internal parameters and coordinate system transformation of the endoscope are calculated. relationship, realize the setting of the virtual camera's pose and field of view, and perform precise registration of the real field of view and the virtual field of view through epipolar geometric constraints.
The registration accuracy of the endoscope and the electromagnetic sensor is improved, ensuring an accurate match between the virtual camera and the real camera, enhancing the reliability of intraoperative navigation and reducing the risk of medical accidents.
Smart Images

Figure CN2024072895_29082024_PF_FP_ABST
Abstract
Description
Endoscope registration method, device and calibration system
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on February 23, 2023, with application number CN 202310154245.9 and application name “Endoscope alignment method, device and calibration system”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the technical field of medical devices, and in particular to an endoscope registration method, an endoscope registration device, and an endoscope calibration system. Background Art
[0003] In modern minimally invasive or non-invasive surgeries, a commonly used intraoperative navigation method is based on electromagnetic positioning. Specifically, it includes: obtaining the current position of the endoscope based on electromagnetic positioning, obtaining the virtual field of view captured by the virtual camera corresponding to the endoscope at the current moment in the preoperative three-dimensional medical image, and superimposing it with the real field of view captured by the endoscope at the current moment to achieve intraoperative navigation.
[0004] Typically, both the electromagnetic sensor and the endoscope's lens are located at the end of the medical device being inserted into the human body, and their relative positional relationship is relatively fixed. During surgery, the position data provided by the electromagnetic sensor is used as the basis for determining the endoscope's position. However, due to the relative displacement and deflection between the endoscope and the electromagnetic sensor, direct positioning using the electromagnetic sensor's position data can produce errors, leading to inaccurate actual position parameters for the endoscope. This, in turn, can cause a mismatch between the endoscope's real field of view and the virtual three-dimensional image during navigation. This mismatch can potentially lead to serious medical accidents.
[0005] Currently, the calibration of electromagnetic sensors and endoscopes primarily uses a checkerboard grid as a medium. The endoscope captures multiple frames of images, capturing image information from the checkerboard grid. Zhang Zhengyou's method is then used to determine the internal and external parameters of the endoscope's camera, yielding a coordinate transformation relationship between the checkerboard grid and the endoscope. The electromagnetic sensor constructs an electromagnetic coordinate system based on the grid size and number of the checkerboard grids. Simultaneously, during the endoscope's capture process, the electromagnetic sensor, mounted on the end of the medical device, moves synchronously with the endoscope, recording its coordinate values for each frame. This allows for a coordinate transformation relationship between the checkerboard grid and the electromagnetic sensor. Ultimately, the coordinate transformation relationship between the electromagnetic sensor and the endoscope is determined, completing the calibration process.
[0006] However, the inventors discovered that this calibration process only determined the coordinate transformation relationship between the electromagnetic sensor and the endoscope, but did not achieve the matching of the real field of view and the virtual field of view of the endoscope.
[0007] Summary of the Invention
[0008] To overcome the deficiencies of the prior art, embodiments of the present application provide an endoscope registration method, an endoscope registration device, and an endoscope calibration system.
[0009] Specifically, an endoscope registration method provided in an embodiment of the present application includes the following steps:
[0010] (a) acquiring a three-dimensional tomographic image comprising a checkerboard calibration tool, the checkerboard calibration tool comprising a calibration plate printed with a checkerboard of known dimensions and a plurality of identification members identifiable in the three-dimensional tomographic image, the calibration plate being provided with a plurality of first mounting members for placing first electromagnetic sensors, the relative positions of the checkerboard, the identification members, and the first mounting members being known;
[0011] (b) obtaining a position of the checkerboard in the three-dimensional tomographic image based on the coordinates of the identification element in the three-dimensional tomographic image;
[0012] (c) obtaining a position of the checkerboard in the electromagnetic space and a first transformation relationship of the three-dimensional tomographic image relative to the electromagnetic space based on the position of the first electromagnetic sensor in the electromagnetic space obtained from an electromagnetic locator, wherein the first electromagnetic sensor is placed on the first mounting member;
[0013] (d) calibrating the endoscope based on results of photographing the checkerboard calibration tool at multiple different angles using an endoscope having a second electromagnetic sensor fixed thereto, to obtain camera intrinsic parameters of the endoscope and a second transformation relationship between a camera coordinate system of the endoscope and a coordinate system of the second electromagnetic sensor;
[0014] (e) obtaining a position of a virtual camera corresponding to the endoscope in the three-dimensional tomographic image based on the first transformation relationship, the second transformation relationship, and the position of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when taking a picture using the endoscope, setting the internal parameters of the virtual camera as the camera internal parameters of the endoscope, and obtaining a virtual field of view in combination with the position of the checkerboard in the three-dimensional tomographic image;
[0015] (f) registering the real field of view with the virtual field of view to obtain a third transformation relationship between the virtual field of view and the real field of view, where the real field of view is an image obtained by photographing with the endoscope; and
[0016] (g) According to the first transformation relationship, the second transformation relationship, and the third transformation relationship, a transformation relationship is obtained between the position of the virtual camera in the three-dimensional tomographic image and the position of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when the endoscope takes pictures.
[0017] On the other hand, an embodiment of the present application provides an endoscope registration device, for example, including: a processor and a memory connected to the processor; wherein the memory stores instructions executed by the processor, and when the instructions are executed by the processor, the endoscope registration method described below is implemented:
[0018] (a) acquiring a three-dimensional tomographic image comprising a checkerboard calibration tool, the checkerboard calibration tool comprising a calibration plate printed with a checkerboard of known dimensions and a plurality of identification members identifiable in the three-dimensional tomographic image, the calibration plate being provided with a plurality of first mounting members for placing first electromagnetic sensors, the relative positions of the checkerboard, the identification members, and the first mounting members being known;
[0019] (b) obtaining a position of the checkerboard in the three-dimensional tomographic image based on the coordinates of the identification element in the three-dimensional tomographic image;
[0020] (c) obtaining a position of the checkerboard in the electromagnetic space and a first transformation relationship of the three-dimensional tomographic image relative to the electromagnetic space based on the position of the first electromagnetic sensor in the electromagnetic space obtained from an electromagnetic locator, wherein the first electromagnetic sensor is placed on the first mounting member;
[0021] (d) calibrating the endoscope based on results of photographing the checkerboard calibration tool at multiple different angles using an endoscope having a second electromagnetic sensor fixed thereto, to obtain camera intrinsic parameters of the endoscope and a second transformation relationship between a camera coordinate system of the endoscope and a coordinate system of the second electromagnetic sensor;
[0022] (e) obtaining a position of a virtual camera corresponding to the endoscope in the three-dimensional tomographic image based on the first transformation relationship, the second transformation relationship, and the position of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when taking a picture using the endoscope, setting the internal parameters of the virtual camera as the camera internal parameters of the endoscope, and obtaining a virtual field of view in combination with the position of the checkerboard in the three-dimensional tomographic image;
[0023] (f) registering the real field of view with the virtual field of view to obtain a third transformation relationship between the virtual field of view and the real field of view, where the real field of view is an image obtained by photographing with the endoscope; and
[0024] (g) According to the first transformation relationship, the second transformation relationship, and the third transformation relationship, a transformation relationship is obtained between the position of the virtual camera in the three-dimensional tomographic image and the position of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when the endoscope takes pictures.
[0025] On the other hand, an embodiment of the present application provides an endoscope calibration system, for example, including: the endoscope alignment device of the aforementioned embodiment and a checkerboard calibration tool, the checkerboard calibration tool including a calibration plate printed with a checkerboard of known size and a plurality of identification members identifiable in the three-dimensional tomographic image, the calibration plate being provided with a plurality of first mounting members for placing a first electromagnetic sensor, and the relative positions among the checkerboard, the identification members and the first mounting members being known.
[0026] In summary, the endoscope registration method, endoscope registration device, and endoscope calibration system of various embodiments of the present application utilize an improved checkerboard calibration tool as a medium. In addition to aligning the second electromagnetic sensor with the endoscope, they also align the real field of view with the virtual field of view, achieving registration between the second electromagnetic sensor and the virtual camera. Furthermore, a first mounting member is used to position the first electromagnetic sensor, improving the accuracy of the checkerboard's position in electromagnetic space. Combined with the precise alignment between the real field of view and the virtual field of view, this improves the accuracy of the registration between the second electromagnetic sensor and the virtual camera, thereby facilitating intraoperative navigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0028] FIG1 is a flow chart of an endoscope registration method provided in an embodiment of the present application.
[0029] FIG2 is a schematic structural diagram of a checkerboard calibration tool provided in an embodiment of the present application.
[0030] FIG3 is a schematic cross-sectional view of the checkerboard calibration tool shown in FIG2 .
[0031] FIG4 is a schematic diagram of relevant process states in the endoscope registration method shown in FIG1 .
[0032] FIG5 is a schematic diagram of epipolar geometry constraints of a binocular camera used in the endoscope registration method shown in FIG1 .
[0033] FIG6 is a schematic diagram of a module of an endoscope registration device provided in an embodiment of the present application.
[0034] FIG7 is a schematic structural diagram of another endoscope registration device provided in an embodiment of the present application.
[0035] FIG8 is a schematic diagram of the architecture of an endoscope calibration system provided in an embodiment of the present application.
[0036] FIG9 is a schematic structural diagram of another endoscope calibration system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0038] Referring to FIG. 1 , an endoscope registration method provided in an embodiment of the present application includes the following steps S11 to S17 .
[0039] Step S11: Acquire a three-dimensional tomographic image containing a checkerboard calibration tool, wherein the checkerboard calibration tool includes a calibration plate printed with a checkerboard of known size and a plurality of identification members identifiable in the three-dimensional tomographic image, wherein the calibration plate is provided with a plurality of first mounting members for placing a first electromagnetic sensor, and the relative positions of the checkerboard, the identification members, and the first mounting members are known.
[0040] In order to improve the calibration method of the endoscope and the electromagnetic sensor, the embodiment of the present application proposes a new checkerboard calibration tool 50 as a medium. For example, as shown in Figures 2 and 3, the checkerboard calibration tool 50 may include a calibration plate 51 printed with a checkerboard of known size and a plurality of identification members 54, and the calibration plate 51 is provided with a plurality of receiving holes 55 for placing electromagnetic sensors, and the relative positions between the checkerboard, the identification members 54 and the receiving holes 55 are known. Specifically, the checkerboard typically includes a plurality of black and white grids 53, and the size of each grid 53 is known; the identification members 54 can be fixedly arranged at each corner of the calibration plate 51, and the number of the identification members 54 and the receiving holes 55 can be four as shown in Figures 2 and 3, but the embodiment of the present application is not limited thereto, and can also be three or more. The receiving holes 55 can be cylindrical holes recessed at the corners of the calibration plate 51 to facilitate the fixing of the electromagnetic sensor. The identification members 54 can be embedded in the corners of the calibration plate 51 at positions corresponding to the receiving holes 55. They can be polyvinyl chloride (PVC) beads with a high Hu (Hounsfield Unit) value. Of course, they can also be replaced with other materials with a HU value significantly different from that of the calibration plate 51 to facilitate the establishment of the coordinate system of the checkerboard in the three-dimensional CT image. In addition, it is worth mentioning that in some embodiments, the identification member 54 can also be set separately from the calibration plate 51, and its shape can also be changed, as long as it can be identified in the three-dimensional tomography image and its relative position with the receiving hole 55 is known. The receiving hole 55 can also be replaced with other forms of first mounting members, such as a clamp to clamp the electromagnetic sensor, as long as the electromagnetic sensor can be fixed / clamped. The equipment subsequently used in this embodiment typically involves an electromagnetic locator, a plurality of electromagnetic sensors (including a first electromagnetic sensor and a second electromagnetic sensor), an endoscope, and the checkerboard calibration tool 50 .
[0041] Specifically, in step S11, the checkerboard calibration tool 50 can be fixed on the operating table, and a CT scan (Computer Tomography) is performed to obtain a three-dimensional CT image including the checkerboard calibration tool 50 as the three-dimensional tomography image. The coordinate system of the three-dimensional CT image is, for example, set to S i (x i ,y i ,z i ), hereinafter referred to as CT coordinate system S i (x i ,y i ,z iOptionally, the checkerboard calibration tool 50 can be fixed to the operating table and performed together with the patient during CT scanning (either before or during surgery). In this case, the obtained three-dimensional CT image includes the patient's surgical site in addition to the checkerboard calibration tool 50. In this case, if the electromagnetic locator and the patient's posture do not undergo unknown changes, the transformation relationship between the virtual camera and the second electromagnetic sensor obtained by the final calibration can be directly used for intraoperative navigation.
[0042] Step S12: obtaining the position of the checkerboard in the three-dimensional tomographic image according to the coordinates of the identification element in the three-dimensional tomographic image.
[0043] Specifically, in step S12, the coordinates of each identification element 54 in the 3D CT image, such as the CT coordinates of its center point, can be extracted based on the 3D CT image segmentation combined with a threshold value (e.g., a HU threshold). Furthermore, based on the CT coordinates of each identification element 54 and the actual size of each grid cell 53 in the checkerboard calibration tool 50, the coordinates of the corner points of each grid cell 53 in the 3D CT image, i.e., the CT coordinates, can be obtained. Here, the corner points of a grid cell 53 are the vertices of that grid cell 53.
[0044] Step S13: Obtaining the position of the checkerboard in the electromagnetic space and a first transformation relationship of the three-dimensional tomography image relative to the electromagnetic space based on the position of the first electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator, wherein the first electromagnetic sensor is placed on the first mounting member.
[0045] Specifically, in step S13, the electromagnetic space can be constructed by the electromagnetic locator, and its world coordinate system can be set as S w (x w ,y w ,z w ). Take four electromagnetic sensors as the first electromagnetic sensors and place them in the respective receiving holes 55 of the checkerboard calibration tool 50. Then, based on the position of the first electromagnetic sensors in the electromagnetic space obtained from the electromagnetic locator, the position of the checkerboard of the checkerboard calibration tool 50 in the electromagnetic space can be obtained. The electromagnetic coordinate system of the checkerboard can be set to S t (x t ,y t ,z t ).
[0046] Furthermore, point matching can be performed based on the position of the first electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator and the CT coordinates of each identification member 54 in the three-dimensional CT image, so as to obtain the first transformation relationship of the three-dimensional CT image with respect to the electromagnetic space, that is, the CT coordinate system Si (x i ,y i ,z i ) relative to the world coordinate system S w (x w ,y w ,z w )’s rotation matrix R wi and the translation vector T wi This process can also be called spatial registration. It is worth mentioning that if the checkerboard calibration tool 50 is fixed to the operating table and scanned together with the patient (either before or during surgery), the resulting 3D CT image will include not only the checkerboard calibration tool 50 but also the patient's surgical site. The spatial registration here refers to the registration between the CT image of the patient's surgical site and the electromagnetic space.
[0047] Step S14: Calibrate the endoscope based on the results of taking pictures of the checkerboard calibration tool at multiple different angles using an endoscope fixed with a second electromagnetic sensor, and obtain the camera internal parameters of the endoscope and the second transformation relationship between the camera coordinate system of the endoscope and the coordinate system of the second electromagnetic sensor.
[0048] Specifically, in step S14, the endoscope and the electromagnetic sensor serving as the second electromagnetic sensor are fixed, and the coordinate system constructed based on the second electromagnetic sensor can be the sensor coordinate system S s (x s ,y s ,z s ), the camera coordinate system constructed based on the endoscope can be S c (x c ,y c ,z c ), and each coordinate system is shown in Figure 4. Next, a calibration process of the endoscope and the second electromagnetic sensor can be performed.
[0049] Based on the above, the checkerboard calibration tool 50 is photographed at multiple different angles through the endoscope to collect checkerboard image information at multiple different angles, and the Zhang Zhengyou calibration method is used to solve the endoscope camera intrinsic parameter K and the external parameters at different angles. Among them, R tc and T tc They are the camera coordinate system S c (x c ,y c ,z c ) relative to the position of the chessboard in the electromagnetic space (corresponding to the electromagnetic coordinate system S of the chessboard t (x t ,y t ,zt )) of the rotation matrix and translation vector. The camera intrinsic number K is, for example, a camera intrinsic parameter matrix, which is typically (dx, dy, r, u, v, f); where dx and dy represent the physical size of a pixel, f represents the focal length, r represents the distortion factor of the image physical coordinates, and u and v (in pixels) represent the horizontal and vertical offsets of the image origin relative to the optical center imaging point.
[0050] Furthermore, since the second electromagnetic sensor moves with the endoscope, the position of the second electromagnetic sensor in the electromagnetic space when taking pictures at different angles of the endoscope is synchronously collected, so that the position of the chessboard in the electromagnetic space can be obtained (corresponding to the electromagnetic coordinate system S of the chessboard). t (x t ,y t ,z t ))Relative to the sensor coordinate system S s (x s ,y s ,z s )’s rotation matrix R st and the translation vector T st .
[0051] According to the above rotation matrix R tc 、R st and the translation vector T tc 、T st , the camera coordinate system S of the endoscope can be calculated c (x c ,y c ,z c ) relative to the sensor coordinate system S s (x s ,y s ,z s ) to complete the calibration of the endoscope. If the position and posture of the second electromagnetic sensor in the electromagnetic space are respectively p s 、R s , the position and posture of the endoscope in the electromagnetic space are p c 、R c ,but:
[0052] Among them, R c 、p c Together, we define the pose of the endoscope in the electromagnetic space, R s 、p s The position and posture of the second electromagnetic sensor in the electromagnetic space are jointly defined.
[0053] Since the second electromagnetic sensor can output the angles α, β, and γ with the X, Y, and Z axes in the current position, the position of the second electromagnetic sensor in the world coordinate system S w (x w ,y w ,z w ), the posture of the endoscope can be obtained through the transformation matrix in formula (1). c Specifically, it represents the endoscope in the world coordinate system S w (x w ,y w ,z w ), that is, the camera coordinate system S of the endoscope c (x c ,y c ,z c ) relative to the world coordinate system S w (x w ,y w ,z w )’s rotation; R s Specifically, it represents that the second electromagnetic sensor is in the world coordinate system S w (x w ,y w ,z w ), that is, the sensor coordinate system S s (x s ,y s ,z s ) relative to the world coordinate system S w (x w ,y w ,z w ) can be calculated from the angles α, β, and γ.
[0054] Step S15: Based on the first transformation relationship, the second transformation relationship, and the posture of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when taking pictures with the endoscope, the posture of the virtual camera corresponding to the endoscope in the three-dimensional tomographic image is obtained, the internal parameters of the virtual camera are set as the camera internal parameters of the endoscope, and the virtual field of view is obtained in combination with the position of the chessboard in the three-dimensional tomographic image.
[0055] Specifically, in step S15, a three-dimensional reconstruction can be performed on the CT image to obtain a three-dimensional model of the checkerboard of the checkerboard calibration tool 50. Furthermore, according to the first transformation relationship and the second transformation relationship obtained in the above steps S13 and S14, and the posture of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when taking pictures with the endoscope, the posture of the endoscope in the electromagnetic space can be transformed to the CT space, thereby obtaining the posture of the virtual camera corresponding to the endoscope in the three-dimensional CT image (see the right part of Figure 4). In addition, the internal parameter of the virtual camera is set to the camera internal parameter K of the endoscope. Assume that the position and posture of the endoscope in the electromagnetic space are p respectively. c 、R c , the position and posture of the virtual camera in the three-dimensional CT image (ie, CT space) are p i 、R i ,but
[0056] Combined with formula (1), formula (2) is transformed into:
[0057] Furthermore, the virtual field of view can be obtained by combining the position of the virtual camera in the 3D CT image with the position of the chessboard in the 3D CT image. Thus, the real field of view and the virtual field of view can be preliminarily aligned. The real field of view here is the image obtained by taking a photo with an endoscope; the virtual field of view is the image obtained by "taking a photo" of the virtual camera in the 3D CT image. The external parameters of the 3D CT image and the virtual camera can be used to calculate the virtual field of view. And the internal reference is calculated.
[0058] Step S16: registering the real field of view and the virtual field of view to obtain a third transformation relationship of the virtual field of view relative to the real field of view, where the real field of view is an image obtained by taking a photo with the endoscope.
[0059] Since there may be errors in the initial registration accuracy, in order to make the real field of view and the virtual field of view consistent as much as possible, the virtual field of view can be further accurately registered based on the real field of view.
[0060] As mentioned above, since the real and virtual fields of view are actually very close, similar to the images of a binocular camera, epipolar geometry constraints can be used to match the two cameras. A schematic diagram of the epipolar geometry constraints for a binocular camera is shown in Figure 5. In Figure 5, P is a spatial point (representing an object in space), p1 and p2 are the image points of point P in the real and virtual fields of view, respectively, e1 and e2 are the poles (i.e., the intersection of the line connecting the optical centers O1 and O2 and the imaging plane), the plane formed by P, O1, and O2 is the epipolar plane, and the line connecting p1 and e1, as well as the line connecting p2 and e2, are the epipolar lines, i.e., the intersection lines of the epipolar plane and the imaging plane.
[0061] Specifically, in step S16, multiple pairs of matching pixel points can be randomly sampled. The pixel points here can be the grid corner points on the chessboard, and the pixel points can come from one or more pairs of real fields of view and virtual fields of view, and different real fields of view have different postures. Suppose a pair of matching pixel points are p1 and p2, p1 comes from the real field of view, and p2 comes from the virtual field of view corresponding to the real field of view, then the positions of the two pixel points are: s1p1=KPs2p2=K(R 12 P+T 12 )
[0062] Among them, K is the camera intrinsic parameter matrix (corresponding to the camera intrinsic parameter of the endoscope), R 12 、T 12 is the coordinate transformation matrix from point p1 to point p2, that is, the rotation matrix and translation vector in the third transformation relationship. s1 is the depth of point P in the camera coordinate system corresponding to the real field of view, and s2 is the depth of point P in the camera coordinate system corresponding to the virtual field of view. Finally, the epipolar constraint formula can be obtained:
[0063] Substituting multiple pairs of sampled matching pixels, we can finally find the rotation matrix R 12 and the translation vector T 12 , get the target transformation matrix
[0064] Step S17: According to the first transformation relationship, the second transformation relationship, and the third transformation relationship, obtain the transformation relationship of the position of the virtual camera in the three-dimensional tomography image relative to the position of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when the endoscope takes pictures.
[0065] Specifically, in step S17, since the target transformation matrix It is transformed from the real field of view to the virtual field of view. In fact, the virtual field of view needs to be adjusted to be consistent with the real field of view. Therefore, it is necessary to invert the target transformation matrix to obtain the target inverse transformation matrix
[0066] Afterwards, based on the target inverse transformation matrix and the first and second transformation relationships obtained in the above steps S13 and S14 and The transformation relationship between the position of the virtual camera in the three-dimensional CT image and the position of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when the endoscope is photographed can be obtained. When the position of the second electromagnetic sensor fixed to the endoscope is known, the position of the endoscope in the electromagnetic space can be transformed into the virtual CT space by the following formula (4), thereby guiding the virtual camera to align with the observation angle of the real endoscope, thereby ensuring the accurate matching of the real field of view and the virtual field of view.
[0067] Assume that the position and posture of the second electromagnetic sensor fixed to the endoscope in the electromagnetic space are known to be p and s 、R s , the position and posture of the virtual camera in the 3D CT image are p i 、R i , then the transformation relationship between the two is:
[0068] In summary, the endoscope registration method of the present embodiment utilizes an improved checkerboard calibration tool as a medium. In addition to registering the second electromagnetic sensor with the endoscope, it also aligns the real field of view with the virtual field of view, achieving registration between the second electromagnetic sensor and the virtual camera. Furthermore, the first mounting member is used to position the first electromagnetic sensor, improving the accuracy of the checkerboard's position in electromagnetic space. Combined with the precise registration between the real field of view and the virtual field of view, this improves the accuracy of the registration between the second electromagnetic sensor and the virtual camera, thereby facilitating intraoperative navigation.
[0069] Referring to Figure 6, an endoscope alignment device provided in an embodiment of the present application includes: an image acquisition module 110, a checkerboard position determination module 120, a checkerboard posture and spatial transformation relationship determination module 130, an endoscope calibration module 140, a virtual camera and virtual field of view determination module 150, a field of view transformation relationship determination module 160 and a posture transformation relationship determination module 170.
[0070] The image acquisition module 110 is used, for example, to acquire a three-dimensional tomographic image including a checkerboard calibration tool, wherein the checkerboard calibration tool includes a calibration plate printed with a checkerboard of known size and a plurality of identification members that can be identified in the three-dimensional tomographic image, and the calibration plate is provided with a plurality of first mounting members for placing a first electromagnetic sensor, and the relative positions of the checkerboard, the identification members, and the first mounting members are known; the checkerboard position determination module 120 is used, for example, to obtain the position of the checkerboard in the three-dimensional tomographic image based on the coordinates of the identification members in the three-dimensional tomographic image. The chessboard posture and spatial transformation relationship determination module 130 is used, for example, to obtain the posture of the chessboard in the electromagnetic space and the first transformation relationship of the three-dimensional tomography image relative to the electromagnetic space based on the posture of the first electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator, wherein the first electromagnetic sensor is placed on the first mounting member; the endoscope calibration module 140 is used, for example, to calibrate the endoscope based on the results of taking pictures of the chessboard calibration tool at multiple different angles using an endoscope fixed with a second electromagnetic sensor, and obtain the camera endoscope of the endoscope. parameters, and a second transformation relationship of the camera coordinate system of the endoscope relative to the coordinate system of the second electromagnetic sensor; the virtual camera and virtual field of view determination module 150 is used, for example, to obtain the position of the virtual camera corresponding to the endoscope in the three-dimensional tomographic image based on the first transformation relationship, the second transformation relationship, and the position of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when taking pictures with the endoscope, set the internal parameters of the virtual camera as the camera internal parameters of the endoscope, and obtain the virtual field of view in combination with the position of the checkerboard in the three-dimensional tomographic image; the field of view transformation relationship determination module 160 is used, for example, to align the real field of view and the virtual field of view to obtain a third transformation relationship of the virtual field of view relative to the real field of view, where the real field of view is an image obtained by taking pictures with the endoscope; and the posture transformation relationship determination module 170 is used, for example, to obtain the transformation relationship of the position of the virtual camera in the three-dimensional tomographic image relative to the position of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when taking pictures with the endoscope based on the first transformation relationship, the second transformation relationship, and the third transformation relationship.
[0071] As for the specific functional details of the image acquisition module 110, the checkerboard position determination module 120, the checkerboard pose and spatial transformation relationship determination module 130, the endoscope calibration module 140, the virtual camera and virtual field of view determination module 150, the field of view transformation relationship determination module 160, and the pose transformation relationship determination module 170, please refer to the detailed description of the relevant embodiments of the aforementioned endoscope registration method, and will not be repeated here. In addition, it is worth mentioning that the image acquisition module 110, the checkerboard position determination module 120, the checkerboard pose and spatial transformation relationship determination module 130, the endoscope calibration module 140, the virtual camera and virtual field of view determination module 150, the field of view transformation relationship determination module 160, and the pose transformation relationship determination module 170 can be software modules, stored in a non-volatile memory and executed by a processor to perform relevant operations to perform steps S11, S12, S13, S14, S15, S16, and S17 in the aforementioned embodiments.
[0072] 7 , an embodiment of the present application provides an endoscope registration device 10, comprising: a processor 11 and a memory 13 connected to the processor 11. The memory 13 stores instructions to be executed by the processor 11, and when the instructions are executed by the processor 11, the endoscope registration method described in any of the aforementioned embodiments is implemented.
[0073] In addition, other embodiments of the present application also provide a computer-readable storage medium, which is a non-volatile memory and stores program code. When the program code is executed by one or more processors, for example, the one or more processors execute the endoscopic alignment method described in any of the aforementioned embodiments.
[0074] Referring to Figure 8, an endoscope calibration system provided in an embodiment of the present application includes: an endoscope alignment device 10, an electromagnetic locator 20, a computer three-dimensional tomography scanner 40, a checkerboard calibration tool 50, multiple first electromagnetic sensors 60, an endoscope 70 and a second electromagnetic sensor 80.
[0075] The endoscope registration device 10 is used to perform the endoscope registration method described in any of the aforementioned embodiments. The electromagnetic locator 20 and the computer three-dimensional tomography scanner 40 are respectively connected to the endoscope registration device 10 for communication. The computer three-dimensional tomography scanner 40 (hereinafter referred to as the CT machine) is used to provide a three-dimensional tomography image, such as a CT image containing a checkerboard calibration tool. The electromagnetic locator 20 is used to construct an electromagnetic space and sense the position of the first electromagnetic sensor 60 and the second electromagnetic sensor 80 in the electromagnetic space. Furthermore, each first electromagnetic sensor 60 can be placed on each first mounting member of the checkerboard calibration tool 50, and the second electromagnetic sensor 80 can be fixed to the endoscope 70 when the endoscope 70 is used to take pictures of the checkerboard calibration tool 50 at multiple different angles.
[0076] Referring to FIG9 , another endoscope calibration system provided in an embodiment of the present application includes: an endoscope alignment device 10 and a checkerboard calibration tool 50. The endoscope alignment device 10 is, for example, the endoscope alignment device 10 described in FIG7 . The checkerboard calibration tool 50, as shown in FIG2 and FIG3 , includes a calibration plate 51 printed with a checkerboard of known size and a plurality of identification members 54 that can be identified in a three-dimensional tomographic image. The calibration plate 51 is provided with a plurality of first mounting members (such as accommodating holes 55 or clamps) for placing a first electromagnetic sensor. The relative positions of the checkerboard, the identification members 54, and the first mounting members are known.
[0077] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0078] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and / or methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units / modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0079] The units / modules described as separate components may or may not be physically separate, and the components shown as units / modules 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 / modules may be selected to achieve the objectives of this embodiment according to actual needs.
[0080] In addition, the functional units / modules in the various embodiments of the present application may be integrated into a single processing unit / module, or each unit / module may exist physically separately, or two or more units / modules may be integrated into a single unit / module. The aforementioned integrated units / modules may be implemented in the form of hardware or in the form of hardware plus software functional units / modules.
[0081] The above-mentioned integrated unit / module implemented in the form of a software functional unit / module can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing one or more processors of a computer device (which can be a personal computer, server, or network device, etc.) to execute some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., various media that can store program code.
[0082] The above-described embodiments merely represent several embodiments of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of protection of the present patent application. It should be noted that a person of ordinary skill in the art could make various modifications and improvements without departing from the inventive concept of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. An endoscope registration method, wherein: include: Acquire a three-dimensional tomographic image including a chessboard calibration tool, wherein the chessboard calibration tool comprises a calibration plate printed with a chessboard of known size and a plurality of identification members identifiable in the three-dimensional tomographic image, wherein the calibration plate is provided with a plurality of first mounting members for placing first electromagnetic sensors, and the relative positions of the chessboard, the identification members and the first mounting members are known; Obtaining the position of the chessboard in the three-dimensional tomographic image according to the coordinates of the identification element in the three-dimensional tomographic image; Obtaining the position of the chessboard in the electromagnetic space and a first transformation relationship of the three-dimensional tomography image relative to the electromagnetic space according to the position of the first electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator, wherein the first electromagnetic sensor is placed on the first mounting member; Calibrate the endoscope based on the results of taking photos of the checkerboard calibration tool at multiple different angles using an endoscope fixed with a second electromagnetic sensor, and obtain the camera internal parameters of the endoscope and a second transformation relationship between the camera coordinate system of the endoscope and the coordinate system of the second electromagnetic sensor; According to the first transformation relationship, the second transformation relationship, and the posture of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when taking pictures with the endoscope, the posture of the virtual camera corresponding to the endoscope in the three-dimensional tomographic image is obtained, the internal parameters of the virtual camera are set as the camera internal parameters of the endoscope, and the virtual field of view is obtained in combination with the position of the chessboard in the three-dimensional tomographic image; Registering the real field of view with the virtual field of view to obtain a third transformation relationship between the virtual field of view and the real field of view, wherein the real field of view is an image obtained by taking a photo with the endoscope; According to the first transformation relationship, the second transformation relationship, and the third transformation relationship, the transformation relationship of the position of the virtual camera in the three-dimensional tomography image relative to the position of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when the endoscope takes pictures is obtained.
2. The endoscope registration method according to claim 1, wherein: The three-dimensional tomographic image includes the surgical site of the patient.
3. The endoscope registration method according to claim 1, wherein: Obtaining the position of the chessboard in the three-dimensional tomography image according to the coordinates of the multiple identification elements in the three-dimensional tomography image specifically includes: Extracting the coordinates of the identification element in the three-dimensional tomographic image according to the three-dimensional tomographic image combined with threshold segmentation; According to the coordinates of the identification element in the three-dimensional tomographic image and the size of each grid of the chessboard, the coordinates of multiple grid corner points of the chessboard in the three-dimensional tomographic image are obtained.
4. The endoscope registration method according to claim 1, wherein: According to the first transformation relationship, the second transformation relationship, and the posture of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when taking pictures with the endoscope, the posture of the virtual camera corresponding to the endoscope in the three-dimensional tomographic image is obtained, specifically including: The position and posture of the virtual camera in the three-dimensional tomography image is calculated according to the following formula: Among them, R i represents the posture of the virtual camera in the three-dimensional tomographic image, and p i Indicates the position of the virtual camera in the three-dimensional tomography image to jointly define the virtual camera The position of the machine in the three-dimensional tomographic image; represents the first transformation relationship, and R wi 、T wi Respectively represent the rotation matrix and translation vector of the three-dimensional tomographic image relative to the electromagnetic space; Represents the second transformation relationship, R tc 、T tc Respectively represent the rotation matrix and translation vector of the camera coordinate system relative to the chessboard in the electromagnetic space, R st 、T st R respectively represent the rotation matrix and translation vector of the posture of the chessboard in the electromagnetic space relative to the coordinate system of the second electromagnetic sensor; s represents the posture of the second electromagnetic sensor in the electromagnetic space, and p s The position of the second electromagnetic sensor in the electromagnetic space is indicated to jointly define the posture of the second electromagnetic sensor in the electromagnetic space.
5. The endoscope registration method according to claim 4, wherein: The real field of view and the virtual field of view are registered to obtain a third transformation relationship of the virtual field of view relative to the real field of view, specifically including: Acquire multiple pairs of matching pixel points of at least one pair of the real field of view and the virtual field of view; Determine a target transformation matrix of the virtual field of view relative to the real field of view based on epipolar geometry constraints and the plurality of pairs of matching pixels; The epipolar geometry constraint condition includes the following formula: Wherein, p1 and p2 represent a pair of matching pixel points of the real field of view and the virtual field of view respectively, K represents the camera intrinsic parameter of the endoscope, and R 12 、T 12 Respectively represent the rotation matrix and translation vector in the target transformation matrix.
6. The endoscope registration method according to claim 5, wherein: The transformation relationship between the position and posture of the virtual camera in the three-dimensional tomography image and the position and posture of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when the endoscope takes pictures is obtained according to the first transformation relationship, the second transformation relationship, and the third transformation relationship specifically includes: Inverting the target transformation matrix to obtain a target inverse transformation matrix; According to the first transformation relationship, the second transformation relationship, and the target inverse transformation matrix, the transformation relationship between the posture of the virtual camera in the three-dimensional tomography image and the posture of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when the endoscope takes pictures is obtained.
7. The endoscope registration method according to any one of claims 1 to 6, wherein: The identification parts are respectively fixedly arranged at multiple corners of the calibration plate.
8. The endoscope registration method according to claim 7, wherein: The first mounting member is a receiving hole or a clamp respectively formed at the multiple corners of the calibration plate.
9. An endoscope registration device, wherein: include: A processor and a memory connected to the processor; wherein the memory stores instructions executed by the processor, and when the instructions are executed by the processor, the endoscope registration method described below is implemented: Acquire a three-dimensional tomographic image including a chessboard calibration tool, wherein the chessboard calibration tool comprises a calibration plate printed with a chessboard of known size and a plurality of identification members identifiable in the three-dimensional tomographic image, wherein the calibration plate is provided with a plurality of first mounting members for placing first electromagnetic sensors, and the relative positions of the chessboard, the identification members and the first mounting members are known; Obtaining the position of the chessboard in the three-dimensional tomographic image according to the coordinates of the identification element in the three-dimensional tomographic image; Obtaining the position of the chessboard in the electromagnetic space and a first transformation relationship of the three-dimensional tomography image relative to the electromagnetic space according to the position of the first electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator, wherein the first electromagnetic sensor is placed on the first mounting member; The endoscope is calibrated based on the results of taking pictures of the chessboard calibration tool at multiple different angles using an endoscope fixed with a second electromagnetic sensor, and the endoscope is obtained. camera intrinsic parameters, and a second transformation relationship between the camera coordinate system of the endoscope and the coordinate system of the second electromagnetic sensor; According to the first transformation relationship, the second transformation relationship, and the posture of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when taking pictures with the endoscope, the posture of the virtual camera corresponding to the endoscope in the three-dimensional tomographic image is obtained, the internal parameters of the virtual camera are set as the camera internal parameters of the endoscope, and the virtual field of view is obtained in combination with the position of the chessboard in the three-dimensional tomographic image; Registering the real field of view with the virtual field of view to obtain a third transformation relationship between the virtual field of view and the real field of view, wherein the real field of view is an image obtained by taking a photo with the endoscope; According to the first transformation relationship, the second transformation relationship, and the third transformation relationship, the transformation relationship of the position of the virtual camera in the three-dimensional tomography image relative to the position of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when the endoscope takes pictures is obtained.
10. The endoscope registration device according to claim 9, wherein: The three-dimensional tomographic image includes the surgical site of the patient.
11. The endoscope registration device according to claim 9, wherein: Obtaining the position of the chessboard in the three-dimensional tomography image according to the coordinates of the multiple identification elements in the three-dimensional tomography image specifically includes: Extracting the coordinates of the identification element in the three-dimensional tomographic image according to the three-dimensional tomographic image combined with threshold segmentation; According to the coordinates of the identification element in the three-dimensional tomographic image and the size of each grid of the chessboard, the coordinates of multiple grid corner points of the chessboard in the three-dimensional tomographic image are obtained.
12. The endoscope registration device according to claim 9, wherein: According to the first transformation relationship, the second transformation relationship, and the posture of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when taking pictures with the endoscope, the posture of the virtual camera corresponding to the endoscope in the three-dimensional tomographic image is obtained, specifically including: The position and posture of the virtual camera in the three-dimensional tomography image is calculated according to the following formula: Among them, R i represents the posture of the virtual camera in the three-dimensional tomographic image, and p i Indicates the position of the virtual camera in the three-dimensional tomographic image, so as to jointly define the position and posture of the virtual camera in the three-dimensional tomographic image; represents the first transformation relationship, and R wi 、T wi Respectively represent the rotation matrix and translation vector of the three-dimensional tomographic image relative to the electromagnetic space; Represents the second transformation relationship, R tc 、T tc Respectively represent the rotation matrix and translation vector of the camera coordinate system relative to the chessboard in the electromagnetic space, R st 、T st R respectively represent the rotation matrix and translation vector of the posture of the chessboard in the electromagnetic space relative to the coordinate system of the second electromagnetic sensor; s represents the posture of the second electromagnetic sensor in the electromagnetic space, and p s The position of the second electromagnetic sensor in the electromagnetic space is indicated to jointly define the posture of the second electromagnetic sensor in the electromagnetic space.
13. The endoscope registration device according to claim 12, wherein: The real field of view and the virtual field of view are registered to obtain a third transformation relationship of the virtual field of view relative to the real field of view, specifically including: Acquire multiple pairs of matching pixel points of at least one pair of the real field of view and the virtual field of view; Determine a target transformation matrix of the virtual field of view relative to the real field of view based on epipolar geometry constraints and the plurality of pairs of matching pixels; The epipolar geometry constraint condition includes the following formula: Wherein, p1 and p2 represent a pair of matching pixel points of the real field of view and the virtual field of view respectively, K represents the camera intrinsic parameter of the endoscope, and R 12 、T 12 Respectively represent the rotation matrix and translation vector in the target transformation matrix.
14. The endoscope registration device according to claim 13, wherein: The transformation relationship between the position and posture of the virtual camera in the three-dimensional tomography image and the position and posture of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when the endoscope takes pictures is obtained according to the first transformation relationship, the second transformation relationship, and the third transformation relationship specifically includes: Inverting the target transformation matrix to obtain a target inverse transformation matrix; According to the first transformation relationship, the second transformation relationship, and the target inverse transformation matrix, the transformation relationship between the posture of the virtual camera in the three-dimensional tomography image and the posture of the second electromagnetic sensor in the electromagnetic space obtained from the electromagnetic locator when the endoscope takes pictures is obtained.
15. The endoscope registration device according to any one of claims 9 to 14, wherein: The identification parts are respectively fixedly arranged at multiple corners of the calibration plate.
16. The endoscope registration method according to claim 15, wherein: The first mounting member is a receiving hole or a clamp respectively formed at the multiple corners of the calibration plate.
17. An endoscope calibration system, wherein: include: The endoscope alignment device and checkerboard calibration tool as described in claim 9, wherein the checkerboard calibration tool comprises a calibration plate printed with a checkerboard of known size and a plurality of identification members identifiable in the three-dimensional tomographic image, wherein the calibration plate is provided with a plurality of first mounting members for placing a first electromagnetic sensor, and the relative positions among the checkerboard, the identification members and the first mounting members are known.
Citation Information
Patent Citations
Marker-free tracking registration and calibration for em-tracked endoscopic system
CN102428496A
Rectification method, surgical navigation system, electronic equipment and storage medium
CN108969099A
Endoscope augmented reality error compensation method and device
CN113470184A
Image fusion system and method for endoscope three-dimensional navigation
CN115245303A
Endoscope registration method and device and calibration system
CN115908121A
Cited By
Image acquisition equipment pose calibration system and method, controller and storage medium
CN121304770A
