C-arm machine calibration method and device
By using multi-calibration ball calibration plates and positioning balls, the problems of small application range and inaccurate calibration of C-arm Calibration Method are solved, and wider applications and higher calibration accuracy are achieved.
Patent Information
- Application Number
- CN202011627673.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2040-12-31
AI Technical Summary
The existing C-arm calibration method is limited by the visual field of the image intensifier, has a small application range, and the checkerboard model is susceptible to surrounding objects and the environment, resulting in inaccurate calibration.
A calibration plate including multiple calibration balls is used, and the calibration plate includes a positioning ball for coordinate positioning. By obtaining shadow-increasing images in various postures, the pixel coordinates and world coordinates are determined based on the positioning ball, and the external parameter matrix, internal parameter matrix and distortion parameters of the C-arm machine are determined.
The application range of C-arm Calibration is increased, the calibration accuracy is improved, and calibration failure is avoided due to small field of view and environmental impact.
Smart Images

Figure CN114693769B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of calibration technology, and in particular to a calibration method and device for a C-arm machine. Background Art
[0002] In order to achieve accurate and stable radiation output and efficiently achieve the purpose of treatment, the C-arm needs to be calibrated. At present, the calibration of the C-arm is based on the checkerboard model, which specifically includes: adjusting the posture of the checkerboard model, recording the external parameter matrix of the C-arm and the spatial coordinates of each corner point in the checkerboard model; collecting images of the checkerboard model in different postures, performing corner point detection on the images, and obtaining the two-dimensional coordinates of each corner point in the checkerboard model; using the spatial coordinates and two-dimensional coordinates of each corner point in the checkerboard model in different postures and the external parameter matrix of the C-arm, the internal parameter matrix and distortion parameters of the C-arm are obtained, thereby achieving the calibration of the C-arm.
[0003] In the calibration method of the above-mentioned C-arm machine, it is necessary to detect the two-dimensional coordinates of each corner point in the checkerboard model, which requires that the checkerboard model be completely placed within the field of view of the image intensifier of the C-arm machine. However, the field of view of the image intensifier of some C-arm machines is relatively small and cannot accommodate the entire checkerboard model, which results in a smaller application range of the calibration of the C-arm machine based on the checkerboard model. In addition, the corner points in the checkerboard model are easily affected by the edge angles of surrounding objects and the surrounding environment, resulting in the inability to detect the corner points in the checkerboard model in the image, resulting in the inability to accurately calibrate the C-arm machine. Summary of the invention
[0004] The embodiment of the present application provides a C-arm calibration method and device to expand the application scope of C-arm calibration and improve the accuracy of C-arm calibration. The specific technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides a C-arm machine calibration method, the method comprising:
[0006] Acquire an image of a calibration plate in multiple postures, wherein the calibration plate includes a plurality of calibration balls, and the plurality of calibration balls include a positioning ball for coordinate positioning;
[0007] Based on the positioning ball among the multiple calibration balls, determining the pixel coordinates and the world coordinates of the target calibration ball in each of the image augmentation images;
[0008] Based on the pixel coordinates and world coordinates of the target calibration sphere in each of the image augmentation images, the external parameter matrix, the internal parameter matrix and the distortion parameters of the C-arm are determined.
[0009] Optionally, the step of determining the pixel coordinates and world coordinates of the target calibration sphere in each of the image-augmented images based on the positioning sphere among the multiple calibration spheres comprises:
[0010] Using a preset circle center detection algorithm, image recognition is performed on each of the image-added images to obtain pixel coordinates of the target calibration sphere in each of the image-added images;
[0011] For each of the image-additive images, the relative coordinate matrix of the target calibration ball in the image-additive image on the calibration plate is obtained, and the target posture matrix of the calibration plate under the target posture is obtained, wherein the target posture is the posture of the calibration plate when the image-additive image is acquired; based on the relative coordinate matrix and the target posture matrix, the world coordinates of the target calibration ball in the image-additive image are determined.
[0012] Optionally, the step of acquiring a target posture matrix of the calibration plate under the acquisition target posture includes:
[0013] Obtaining an initial posture matrix of the calibration plate in an initial posture;
[0014] Acquire a transformation matrix of the calibration plate when the posture of the calibration plate is transformed from the initial posture to the target posture;
[0015] Based on the initial posture matrix and the transformation matrix, a target posture matrix of the calibration plate under the target posture is determined.
[0016] Optionally, the step of determining a target posture matrix of the calibration plate under the target posture based on the initial posture matrix and the transformation matrix includes:
[0017] The target posture matrix of the calibration plate under the target posture is determined using the following formula:
[0018] A1=B1*A0;
[0019] Among them, A1 represents the target posture matrix, A0 represents the initial posture matrix, and B represents the transformation matrix.
[0020] Optionally, the step of determining the world coordinates of the target calibration sphere in the image augmentation image based on the relative coordinate matrix and the target posture matrix includes:
[0021] The world coordinates of the target calibration sphere in the image are determined using the following formula:
[0022] M = A1*P;
[0023] Wherein, M represents the world coordinates of the target calibration sphere in the augmented image, A1 represents the target posture matrix, and P represents the relative coordinate matrix.
[0024] Optionally, the calibration plate is fixed on a multi-axis robotic arm.
[0025] In a second aspect, an embodiment of the present application provides a C-arm machine calibration device, the device comprising:
[0026] An acquisition unit, used for acquiring an image of a calibration plate in various postures, wherein the calibration plate includes a plurality of calibration balls, and the plurality of calibration balls include a positioning ball for coordinate positioning;
[0027] A first determining unit, configured to determine the pixel coordinates and the world coordinates of the target calibration sphere in each of the image-augmented images based on the positioning sphere among the plurality of calibration spheres;
[0028] The second determination unit is used to determine the external parameter matrix, the internal parameter matrix and the distortion parameters of the C-arm machine based on the pixel coordinates and the world coordinates of the target calibration sphere in each of the image augmentation images.
[0029] Optionally, the first determining unit is specifically configured to:
[0030] Using a preset circle center detection algorithm, image recognition is performed on each of the image-added images to obtain pixel coordinates of the target calibration sphere in each of the image-added images;
[0031] For each of the image-additive images, the relative coordinate matrix of the target calibration ball in the image-additive image on the calibration plate is obtained, and the target posture matrix of the calibration plate under the target posture is obtained, wherein the target posture is the posture of the calibration plate when the image-additive image is acquired; based on the relative coordinate matrix and the target posture matrix, the world coordinates of the target calibration ball in the image-additive image are determined.
[0032] Optionally, the first determining unit is specifically configured to:
[0033] Obtaining an initial posture matrix of the calibration plate in an initial posture;
[0034] Acquire a transformation matrix of the calibration plate when the posture of the calibration plate is transformed from the initial posture to the target posture;
[0035] Based on the initial posture matrix and the transformation matrix, a target posture matrix of the calibration plate under the target posture is determined.
[0036] Optionally, the first determining unit is specifically configured to:
[0037] The target posture matrix of the calibration plate under the target posture is determined using the following formula:
[0038] A1=B1*A0;
[0039] Among them, A1 represents the target posture matrix, A0 represents the initial posture matrix, and B represents the transformation matrix.
[0040] Optionally, the first determining unit is specifically configured to:
[0041] The world coordinates of the target calibration sphere in the image are determined using the following formula:
[0042] M = A1*P;
[0043] Wherein, M represents the world coordinates of the target calibration sphere in the augmented image, A1 represents the target posture matrix, and P represents the relative coordinate matrix.
[0044] Optionally, the calibration plate is fixed on a multi-axis robotic arm.
[0045] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0046] Memory, used to store computer programs;
[0047] The processor is used to implement any of the steps of the C-arm machine calibration method when executing the program stored in the memory.
[0048] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned C-arm machine calibration methods are implemented.
[0049] In a fifth aspect, an embodiment of the present application further provides a computer program, which, when executed on a computer, enables the computer to execute any of the above-mentioned C-arm machine calibration method steps.
[0050] Beneficial effects of the embodiments of the present application:
[0051] In the technical solution provided in the embodiment of the present application, a calibration plate including a plurality of calibration balls is used to calibrate the C-arm machine. The multiple calibration balls of the calibration plate include a positioning ball, which can be used to locate the coordinates of other calibration balls. In this case, only the part of the positioning ball on the calibration plate needs to be within the field of view of the image intensifier to achieve the coordinate positioning of the calibration ball, and then achieve the calibration of the C-arm machine, without placing the entire calibration plate within the field of view of the image intensifier. Therefore, the technical solution provided in the embodiment of the present application can use a C-arm machine that is relatively small in field of view of the image intensifier, thereby increasing the application scope of the C-arm machine calibration.
[0052] In addition, in the technical solution provided in the embodiment of the present application, the calibration sphere is circular in the augmented image. When calibrating the C-arm machine, it is only necessary to detect the circular area in the augmented image. Compared with the checkerboard model in which rectangular blocks of two colors are alternately distributed, it is not easily affected by the edge angles of surrounding objects and the surrounding environment, thereby improving the accuracy of the C-arm machine calibration.
[0053] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying any creative work.
[0055] Figure 1 A schematic diagram of the structure of a calibration plate provided in an embodiment of the present application;
[0056] Figure 2 A first flow chart of a C-arm calibration method provided in an embodiment of the present application;
[0057] Figure 3 A second flow chart of the C-arm calibration method provided in the embodiment of the present application;
[0058] Figure 4 A schematic flow chart of a method for determining a target posture matrix of a calibration plate provided in an embodiment of the present application;
[0059] Figure 5 A schematic diagram of a structure of a calibration device for a C-arm machine provided in an embodiment of the present application;
[0060] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0062] To facilitate understanding, the terms appearing in the embodiments of the present application are explained below.
[0063] The image-intensified image is an image collected by the image intensifier on the C-arm machine.
[0064] Calibration parameters, including extrinsic matrix, intrinsic matrix and distortion parameters.
[0065] Currently, the calibration method of C-arm machines based on the checkerboard model cannot be applied to C-arm machines with a relatively small field of view of the image intensifier.
[0066] In addition, the corners of the checkerboard model are prone to conflict with the edge corners of surrounding objects, and because of lighting issues, the colors of the two colors of rectangular blocks in the checkerboard model in the augmented image may be similar, which in turn causes the contrast between the two colors of rectangular blocks in the augmented image to be unclear, and the corners of the checkerboard model are not easy to detect; furthermore, the rectangular blocks of one color in the checkerboard model may be similar in color to the background plate of the checkerboard model, resulting in unclear contrast between the rectangular blocks and the background plate in the augmented image, which also causes the corners of the checkerboard model to be difficult to detect. In summary, when calibrating the C-arm based on the checkerboard model, it is easy to fail to detect the corners of the checkerboard model in the image due to the influence of the edge corners of surrounding objects and the surrounding environment, resulting in the inability to accurately calibrate the C-arm.
[0067] To solve the above problems, the present application provides a calibration plate, such as Figure 1 As shown. The calibration plate can also be called a mark plate. The calibration plate includes a plurality of calibration balls, which are divided into ordinary calibration balls (such as Figure 1 The smaller circle in the middle) and the special calibration sphere (such as Figure 1 The special calibration sphere can be used to locate the coordinates of the ordinary calibration sphere, and the special calibration sphere can also be called a positioning sphere.
[0068] In the embodiment of the present application, the number of positioning balls on the calibration plate can be set according to actual needs, as long as the coordinates of each calibration ball can be accurately located based on the positioning balls. Figure 1 Only 3 set pieces are taken as an example, which does not serve as a limitation.
[0069] When calibrating based on the calibration plate, it is sufficient to place the positioning ball of the calibration plate within the field of view of the image intensifier, so as to realize the coordinate positioning of the common calibration ball on the calibration plate, and then realize the calibration of the C-arm machine, without placing the entire calibration plate within the field of view of the image intensifier. Therefore, based on the calibration plate provided in the embodiment of the present application, even if the field of view of the image intensifier is relatively small, the positioning of the C-arm machine can be realized, thereby increasing the application scope of the C-arm machine calibration.
[0070] In addition, the calibration plate provided in the embodiment of the present application uses the calibration ball as a feature point. The contrast between the calibration ball and the background plate is relatively obvious, and the contrast between the calibration ball and the background plate in the image enhancement image is also relatively obvious. It is not easily affected by the edge angles of surrounding objects and the surrounding environment, and can effectively improve the accuracy of C-arm machine calibration.
[0071] Based on the above calibration board, the present application embodiment provides a C-arm machine calibration method. Figure 2 As shown, the calibration method of the C-arm machine can be applied to an image intensifier or an electronic device connected to the image intensifier. For ease of understanding, the following description is made by taking the electronic device as the execution subject, which is not limiting. The calibration method of the C-arm machine includes the following steps.
[0072] Step S21, acquiring the image of the calibration plate in various postures, wherein the calibration plate includes a plurality of calibration balls, and the plurality of calibration balls include a positioning ball for coordinate positioning.
[0073] When calibrating the C-arm, the posture of the C-arm is fixed, for example, the posture of the C-arm is a first posture. The electronic device can adjust the calibration plate to different postures while keeping the posture of the C-arm in the first posture. The image intensifier of the C-arm collects the image intensification images of the calibration plate in each posture, and transmits the collected multiple image intensification images to the electronic device. In this case, the electronic device obtains multiple image intensification images.
[0074] In one embodiment of the present application, the calibration plate can be fixed on a multi-axis robotic arm, which is mounted on a trolley. When calibrating the C-arm machine, the trolley is placed next to the C-arm machine, and the multi-axis robotic arm is adjusted so that the calibration plate is within the field of view of the image intensifier of the C-arm machine. When it is necessary to adjust the posture of the calibration plate, the electronic device can adjust the posture of the calibration plate by adjusting the posture of the multi-axis robotic arm. Compared with other structures that fix the calibration plate, the multi-axis robotic arm is more flexible, which enables the calibration plate to show more diverse postures, thereby obtaining more accurate calibration parameters.
[0075] Step S22, based on the positioning ball among the multiple calibration balls, determine the pixel coordinates and world coordinates of the target calibration ball in each augmented image.
[0076] In the embodiment of the present application, the image augmentation image acquired by the electronic device includes a positioning ball. The electronic device determines the target calibration ball on the calibration plate, and determines the pixel coordinates and world coordinates of the target calibration ball in each image augmentation image based on the positioning ball on the calibration plate.
[0077] The target calibration sphere can be any calibration sphere on the calibration plate, and the target calibration spheres in different augmented images can be the same or different. The pixel coordinates are the coordinates in the coordinate system on the augmented image. The world coordinates are the coordinates in the world coordinate system. The world coordinates can also be called physical space coordinates.
[0078] Step S23, based on the pixel coordinates and world coordinates of the target calibration sphere in each augmented image, determine the external parameter matrix, the internal parameter matrix and the distortion parameters of the C-arm machine.
[0079] After obtaining the pixel coordinates and world coordinates of the target calibration sphere in the multiple augmented images, the electronic device can determine the external parameter matrix and the internal parameter matrix of the C-arm machine. Based on the external parameter matrix and the internal parameter matrix of the C-arm machine, the electronic device can determine the distortion parameters of the C-arm machine.
[0080] For example, the relationship between the pixel coordinates and world coordinates of the target calibration sphere is as follows:
[0081] A2*T*M=m (1)
[0082] Among them, m represents the pixel coordinates of the target calibration sphere, M represents the world coordinates of the target calibration sphere, A2 represents the intrinsic parameter matrix of the C-arm machine, and T represents the extrinsic parameter matrix of the C-arm machine.
[0083] Assume that A2*T=H=[h1 h2 h3 h4], where h1, h2, h3 and h4 are all 3*1 matrices. Based on formula (1), the matrix can be determined:
[0084] H=A2*T=m*M -1 (2)
[0085] For the internal parameter matrix of the C-arm machine The external parameter matrix of the C-arm machine is T = [r1 r2 r3 t], where r1, r2, r3 and t all represent 3*1 matrices. In the external parameter matrix of the C-arm machine, r1 and r2 are orthogonal, so r1 T *r2=0, |r1|=|r2|.
[0086] Combined with the above known H, we can determine T = A2 -1 *H, that is, A2 -1 *h1=r1,A2 -1 *h2=r2, then:
[0087] (A2 -1 *h1) T *(A2 -1 *h2)=0 (3)
[0088] (A2 -1 *h1) T *(A2-1 *h1)=(A2 -1 *h2) T *(A2 -1 *h2) (4)
[0089] At this time, based on the above formulas (3) and (4), the internal parameter matrix A2 of the C-arm machine includes 5 unknown parameters. The electronic device obtains 3 image-added images, and substitutes the coordinate value of 1 point in each of the 3 image-added images into the above formula to obtain 6 equations. The electronic device combines these 6 equations to determine the internal parameter matrix A2 of the C-arm machine. After determining the internal parameter matrix A2 of the C-arm machine, combined with the above formula (2), the external parameter matrix T of the C-arm machine can be determined.
[0090] Distortion parameters include k1, k2, k3, p1 and p2. k1, k2 and k3 are radial distortion parameters, and p1 and p2 are tangential distortion parameters. The electronic device can determine the distortion parameters of the C-arm machine using the following formula:
[0091] X corrected =X*(1+k1*r 2 +k2*r 4 +k3*r 6 )+2*p1*Y+p2*(r 2 +2X 2 ); (5)
[0092] Y corrected =Y*(1+k1*r 2 +k2*r 4 +k3*r 6 )+2*p1*X+p2*(r2+2Y 2 ); (6)
[0093] In the above formula, X and Y are the actual coordinate values of the distorted image. corrected and Y corrected is the coordinate value after X and Y are corrected based on the external parameter matrix and internal parameter matrix of the C-arm machine, and r is the distance from (X, Y) to the imaging center.
[0094] Based on the above formula, the electronic device obtains three image-additive images, and substitutes the coordinate value of one point in each of the three image-additive images into the above formula to obtain six equations. The electronic device combines these six equations to determine the distortion parameters k1, k2, k3, p1 and p2 of the C-arm machine.
[0095] In the technical solution provided in the embodiment of the present application, a calibration plate including a plurality of calibration balls is used to calibrate the C-arm machine. The multiple calibration balls of the calibration plate include a positioning ball, which can be used to locate the coordinates of other calibration balls. In this case, only the part of the positioning ball on the calibration plate needs to be within the field of view of the image intensifier to achieve the coordinate positioning of the calibration ball, and then achieve the calibration of the C-arm machine, without placing the entire calibration plate within the field of view of the image intensifier. Therefore, the technical solution provided in the embodiment of the present application can use a C-arm machine that is relatively small in field of view of the image intensifier, thereby increasing the application scope of the C-arm machine calibration.
[0096] In addition, in the technical solution provided in the embodiment of the present application, the calibration sphere is circular in the augmented image. When calibrating the C-arm machine, it is only necessary to detect the circular area in the augmented image. Compared with the checkerboard model in which rectangular blocks of two colors are alternately distributed, it is not easily affected by the edge angles of surrounding objects and the surrounding environment, thereby improving the accuracy of the C-arm machine calibration.
[0097] In one embodiment of the present application, the present application embodiment also provides a C-arm machine calibration method, such as Figure 3 As shown, in the calibration method of the C-arm machine, the above step S22 can be refined into step S221 and step S222.
[0098] Step S221, using a preset circle center detection algorithm, performs image recognition on each image augmentation image to obtain the pixel coordinates of the target calibration sphere in each image augmentation image.
[0099] The calibration ball on the calibration plate appears as a circle in the image-additive image. For each image-additive image, the electronic device can use a preset circle center detection algorithm to perform image recognition on each image-additive image to obtain the pixel coordinates of the target calibration ball in each image-additive image. The preset circle center detection algorithm can adopt a circle center detection algorithm in the related art, which is not limited thereto.
[0100] Step S222, for each augmented image, obtain the relative coordinate matrix of the target calibration ball in the augmented image on the calibration plate, and obtain the target posture matrix of the calibration plate under the target posture, where the target posture is the posture of the calibration plate when the augmented image is collected; based on the relative coordinate matrix and the target posture matrix, determine the world coordinates of the target calibration ball in the augmented image.
[0101] In the embodiment of the present application, a coordinate system is established on the calibration board, and the relative coordinate matrix of each calibration ball can be obtained according to the coordinate system. Among them, the relative coordinate matrix of the calibration ball on the calibration board can be a 4*1 coordinate matrix, such as [x, y, z, 1] T .
[0102] For each augmented image, the electronic device can determine the relative coordinate matrix of the target calibration ball based on the relative coordinate matrix of the positioning ball in the augmented image and the relative position relationship between the positioning ball and the target calibration ball. For each augmented image, the posture of the calibration plate when the electronic device collects the augmented image is fixed, that is, the target posture. The electronic device can obtain the target posture matrix of the calibration plate under the target posture. The electronic device determines the world coordinates of the target calibration ball in the augmented image based on the relative coordinate matrix and the target posture matrix.
[0103] For example, for each image augmentation image, the electronic device may use the following formula to determine the world coordinates of the target calibration sphere in the image augmentation image:
[0104] M=A1*P; (7)
[0105] Wherein, M represents the world coordinates of the target calibration ball in the image augmentation image, A1 represents the target posture matrix of the calibration plate when the image augmentation image is acquired, and P represents the relative coordinate matrix of the target calibration ball when the image augmentation image is acquired.
[0106] The embodiment of the present application does not limit the execution order of the above-mentioned step S221 and step S222.
[0107] In the embodiment of the present application, the target posture matrix of the calibration plate can be determined by manual measurement by the user, or by other methods. In one example, the electronic device can use the initial posture matrix and the transformation matrix of the calibration plate to determine the target posture matrix of the calibration plate. Figure 4 As shown, the target posture matrix of the calibration plate can be determined by the following steps:
[0108] Step S41, obtaining the initial posture matrix of the calibration plate in the initial posture.
[0109] In the embodiment of the present application, the user can pre-measure the posture matrix of the calibration plate in a certain posture, and use the posture as the initial posture of the calibration plate, and the posture matrix of the calibration plate in the posture as the initial posture matrix of the calibration plate. When calibrating the C-arm machine, the electronic device obtains the initial posture matrix of the calibration plate.
[0110] In the embodiment of the present application, the number of rows of the attitude matrix of the calibration plate is the same as the number of rows of the relative coordinate matrix of the calibration sphere. For example, if the relative coordinate matrix of the calibration sphere is a 4*1 coordinate matrix, then the attitude matrix of the calibration plate is a 4*4 matrix, as follows:
[0111]
[0112] Step S42, obtaining the transformation matrix of the calibration plate when the posture of the calibration plate is transformed from the initial posture to the target posture.
[0113] In the embodiment of the present application, when calibrating the C-arm machine, the electronic device continuously adjusts the posture of the calibration plate. During the adjustment process, the electronic device can obtain the transformation matrix of the calibration plate when the posture of the calibration plate is transformed from the initial posture to the target posture.
[0114] In the embodiment of the present application, the dimension of the transformation matrix of the calibration plate is the same as the dimension of the posture matrix of the calibration plate.
[0115] For example, if the posture matrix of the calibration plate is a 4*4 matrix, then the transformation matrix of the calibration plate is a 4*4 matrix, as follows:
[0116]
[0117] Among them, [R 00 , R 10 , R 20 ] T , [R 01 , R 11 , R 21 ] T and [R 02 , R 12 , R 22 ] T Respectively represent the rotation matrix, [T1, T2, T3] T Represents the translation matrix.
[0118] In one embodiment, the calibration plate is fixed on the multi-axis robot. The electronic device adjusts the posture of the calibration plate by adjusting the posture of the multi-axis robot. In this case, the electronic device can directly obtain the transformation matrix of the multi-axis robot. Since the calibration plate is fixed on the multi-axis robot, the transformation matrix of the multi-axis robot is the transformation matrix of the calibration plate.
[0119] Step S43, determining the target posture matrix of the calibration plate under the target posture based on the initial posture matrix and the transformation matrix.
[0120] For example, the electronic device can use the following formula to determine the target posture matrix of the calibration board under the target posture:
[0121] A1=B1*A0; (8)
[0122] Among them, A1 represents the target posture matrix, A0 represents the initial posture matrix, and B represents the transformation matrix.
[0123] For another example, the electronic device uses the following formula to determine the target attitude matrix of the calibration board under the target attitude:
[0124] A1=A0*B1; (9)
[0125] Among them, A1 represents the target posture matrix, A0 represents the initial posture matrix, and B represents the transformation matrix.
[0126] In the embodiment of the present application, it is only necessary to measure the initial posture matrix of the calibration plate in the initial posture. Subsequently, the electronic device can determine the target posture matrix of the calibration plate by combining the initial posture matrix of the calibration plate and the transformation matrix of the calibration plate. This does not require the user to manually measure the posture matrix of the calibration plate in each posture, saving labor costs and the time for determining the target posture matrix of the calibration plate.
[0127] Based on the above formula (8) or (9), the target posture matrix of the calibration plate is determined, and then the world coordinates of the target calibration sphere in the image are determined by combining formula (7). This eliminates the need for the user to manually measure the world coordinates of each calibration sphere of the calibration plate in each posture, saving labor costs and improving the calibration efficiency of the C-arm machine.
[0128] Corresponding to the above-mentioned C-arm machine calibration method, the embodiment of the present application also provides a C-arm machine calibration device. Figure 5 , Figure 5 A schematic diagram of a structure of a calibration device for a C-arm machine provided in an embodiment of the present application, the device comprising:
[0129] An acquisition unit 51 is used to acquire an image of a calibration plate in various postures, wherein the calibration plate includes a plurality of calibration balls, and the plurality of calibration balls include a positioning ball for coordinate positioning;
[0130] A first determining unit 52 is used to determine the pixel coordinates and world coordinates of the target calibration sphere in each image augmentation image based on the positioning sphere in the plurality of calibration spheres;
[0131] The second determination unit 53 is used to determine the external parameter matrix, the internal parameter matrix and the distortion parameters of the C-arm machine based on the pixel coordinates and the world coordinates of the target calibration sphere in each augmented image.
[0132] In one embodiment of the present application, the first determining unit 52 may be specifically configured to:
[0133] Using a preset circle center detection algorithm, image recognition is performed on each image augmentation image to obtain the pixel coordinates of the target calibration ball in each image augmentation image;
[0134] For each augmented image, the relative coordinate matrix of the target calibration ball in the augmented image on the calibration plate is obtained, and the target posture matrix of the calibration plate under the target posture is obtained, where the target posture is the posture of the calibration plate when the augmented image is collected; based on the relative coordinate matrix and the target posture matrix, the world coordinates of the target calibration ball in the augmented image are determined.
[0135] In one embodiment of the present application, the first determining unit 52 may be specifically configured to:
[0136] Get the initial posture matrix of the calibration plate under the initial posture;
[0137] Obtain the transformation matrix of the calibration plate when the posture of the calibration plate is transformed from the initial posture to the target posture;
[0138] Based on the initial pose matrix and the transformation matrix, the target pose matrix of the calibration board under the target pose is determined.
[0139] In one embodiment of the present application, the first determining unit 52 may be specifically configured to:
[0140] Use the following formula to determine the target posture matrix of the calibration board under the target posture:
[0141] A1=B1*A0;
[0142] Among them, A1 represents the target posture matrix, A0 represents the initial posture matrix, and B represents the transformation matrix.
[0143] In one embodiment of the present application, the first determining unit 52 may be specifically configured to:
[0144] Use the following formula to determine the world coordinates of the target calibration sphere in the augmented image:
[0145] M = A1*P;
[0146] Among them, M represents the world coordinates of the target calibration sphere in the augmented image, A1 represents the target posture matrix, and P represents the relative coordinate matrix.
[0147] In one embodiment of the present application, the calibration plate is fixed on a multi-axis robotic arm.
[0148] In the technical solution provided in the embodiment of the present application, a calibration plate including a plurality of calibration balls is used to calibrate the C-arm machine. The multiple calibration balls of the calibration plate include a positioning ball, which can be used to locate the coordinates of other calibration balls. In this case, only the part of the positioning ball on the calibration plate needs to be within the field of view of the image intensifier to achieve the coordinate positioning of the calibration ball, and then achieve the calibration of the C-arm machine, without placing the entire calibration plate within the field of view of the image intensifier. Therefore, the technical solution provided in the embodiment of the present application can use a C-arm machine that is relatively small in field of view of the image intensifier, thereby increasing the application scope of the C-arm machine calibration.
[0149] In addition, in the technical solution provided in the embodiment of the present application, the calibration sphere is circular in the augmented image. When calibrating the C-arm machine, it is only necessary to detect the circular area in the augmented image. Compared with the checkerboard model in which rectangular blocks of two colors are alternately distributed, it is not easily affected by the edge angles of surrounding objects and the surrounding environment, thereby improving the accuracy of the C-arm machine calibration.
[0150] Corresponding to the calibration method of the C-arm machine described above, the embodiment of the present application further provides an electronic device, such as Figure 6 As shown, it includes a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64;
[0151] Memory 63, used for storing computer programs;
[0152] The processor 61 is used to implement any of the above C-arm calibration method steps when executing the program stored in the memory 63.
[0153] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0154] The communication interface is used for communication between the above electronic device and other devices.
[0155] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0156] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0157] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the calibration method steps of any of the above-mentioned C-arm machines are implemented.
[0158] In another embodiment provided in the present application, a computer program is also provided, which, when executed on a computer, enables the computer to execute the calibration method steps of any C-arm machine in the above-mentioned embodiments.
[0159] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0160] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0161] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, computer-readable storage medium, and computer program embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0162] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A C-arm machine calibration method, characterized in that: The method comprises: Acquire an image intensification image of a calibration plate in multiple postures, wherein the calibration plate includes a plurality of calibration balls, wherein the plurality of calibration balls include a positioning ball for coordinate positioning, and a portion of the positioning ball on the calibration plate is located within a field of view of an image intensifier; Using a preset circle center detection algorithm, image recognition is performed on each of the image-added images to obtain pixel coordinates of the target calibration sphere in each of the image-added images; For each of the image-added images, based on the relative coordinate matrix of the positioning ball in the image-added image and the relative position relationship between the positioning ball and the target calibration ball in the image-added image, determine the relative coordinate matrix of the target calibration ball in the image-added image, and obtain the target posture matrix of the calibration plate under the target posture, wherein the target posture is the posture of the calibration plate when the image-added image is collected; based on the relative coordinate matrix and the target posture matrix, determine the world coordinates of the target calibration ball in the image-added image; Based on the pixel coordinates and world coordinates of the target calibration sphere in each of the image augmentation images, the external parameter matrix, the internal parameter matrix and the distortion parameters of the C-arm are determined.
2. The method according to claim 1, characterized in that The step of obtaining the target posture matrix of the calibration plate under the target posture comprises: Obtaining an initial posture matrix of the calibration plate in an initial posture; Acquire a transformation matrix of the calibration plate when the posture of the calibration plate is transformed from the initial posture to the target posture; Based on the initial posture matrix and the transformation matrix, a target posture matrix of the calibration plate under the target posture is determined.
3. The method according to claim 2, characterized in that The step of determining the target posture matrix of the calibration plate under the target posture based on the initial posture matrix and the transformation matrix comprises: The target posture matrix of the calibration plate under the target posture is determined using the following formula: ; Among them, A1 represents the target posture matrix, A0 represents the initial posture matrix, and B1 represents the transformation matrix.
4. The method according to claim 1, characterized in that: The step of determining the world coordinates of the target calibration sphere in the image augmentation image based on the relative coordinate matrix and the target posture matrix comprises: The world coordinates of the target calibration sphere in the image are determined using the following formula: ; Wherein, M represents the world coordinates of the target calibration sphere in the augmented image, A1 represents the target posture matrix, and P represents the relative coordinate matrix.
5. The method according to any one of claims 1 to 4, characterized in that: The calibration plate is fixed on the multi-axis robotic arm.
6. A C-arm machine calibration device, characterized in that: The device comprises: An acquisition unit, used for acquiring an image intensification image of a calibration plate in various postures, wherein the calibration plate comprises a plurality of calibration balls, wherein the plurality of calibration balls comprises a positioning ball for coordinate positioning, and a portion of the positioning ball on the calibration plate is located within the field of view of the image intensifier; The first determination unit is used to perform image recognition on each of the image-additive images using a preset center detection algorithm to obtain pixel coordinates of a target calibration ball in each of the image-additive images; for each of the image-additive images, based on a relative coordinate matrix of the positioning ball in the image-additive image and a relative position relationship between the positioning ball and the target calibration ball in the image-additive image, determine a relative coordinate matrix of the target calibration ball in the image-additive image, and obtain a target posture matrix of the calibration plate under a target posture, wherein the target posture is a posture of the calibration plate when the image-additive image is acquired; based on the relative coordinate matrix and the target posture matrix, determine the world coordinates of the target calibration ball in the image-additive image; The second determination unit is used to determine the external parameter matrix, the internal parameter matrix and the distortion parameters of the C-arm machine based on the pixel coordinates and the world coordinates of the target calibration sphere in each of the image augmentation images.
7. The device according to claim 6, characterized in that The first determining unit is specifically configured to: Obtaining an initial posture matrix of the calibration plate in an initial posture; Acquire a transformation matrix of the calibration plate when the posture of the calibration plate is transformed from the initial posture to the target posture; Based on the initial posture matrix and the transformation matrix, a target posture matrix of the calibration plate under the target posture is determined.
8. The device according to claim 7, characterized in that The first determining unit is specifically configured to: The target posture matrix of the calibration plate under the target posture is determined using the following formula: ; Among them, A1 represents the target posture matrix, A0 represents the initial posture matrix, and B1 represents the transformation matrix.
9. The device according to claim 6, characterized in that The first determining unit is specifically configured to: The world coordinates of the target calibration sphere in the image are determined using the following formula: ; Wherein, M represents the world coordinates of the target calibration sphere in the augmented image, A1 represents the target posture matrix, and P represents the relative coordinate matrix.
10. The device according to any one of claims 6 to 9, characterized in that: The calibration plate is fixed on the multi-axis robotic arm.
11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 5 when executing a program stored in a memory.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
C-type arm image correction method based on perspective imaging model calibration
CN101582161A
Novel calibration plate and calibration method for performing length measurement by using calibration plate
CN105043304A