Target positioning method and device based on image parameter optimization
By using the medical perspective image and the target coordinate transformation matrix at a two-view angle in the target positioning, the problem of not taking the target-to-light source depth information in the prior art is solved, and a higher precision target positioning is achieved.
Patent Information
- Application Number
- CN202411946495.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-27
AI Technical Summary
The prior art fails to fully consider the depth information from the target to the light source in the target positioning task, resulting in the calculated target point position being inaccurate enough, especially when there is no intersection point between two straight lines, the error may be more obvious.
By selecting a two-dimensional medical perspective image at any two-view angle, obtaining the two-dimensional pixel coordinates and image parameters of the target point, calculating the target coordinate transformation matrix, updating the image parameters to optimize the target positioning, and thus obtaining more accurate three-dimensional world coordinates.
It significantly improves the accuracy of target positioning, reduces positioning errors caused by factors such as DICOM tag value errors, and ensures the accuracy of the three-dimensional world coordinate height of the actual target point.
Smart Images

Figure CN119379776B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical image processing, and in particular to a target positioning method and device based on image parameter optimization. Background Art
[0002] Surgical robots have shown great potential in minimally invasive surgery, puncture and ablation. With their advantages of precision and safety, fewer needle insertions and fewer complications, they have effectively solved many clinical problems. Their operation does not rely on the doctor's personal experience and techniques. Perspective images, as black-and-white images formed by X-ray perspective technology, generate image data of varying brightness based on the differences in the degree of X-ray absorption by human tissues. CBCT images and DSA images are typical applications. In the field of surgical robots, CBCT images can be further converted into perspective images and converted into high-resolution three-dimensional slice data through specific algorithms, so as to accurately lock onto the center of the target lesion or other target points. Once these target image coordinates are obtained, the optical navigation module will guide the robot arm to operate, which not only improves the success rate of the first needle insertion, but also shortens the operation time. The entire process is highly dependent on precise image guidance.
[0003] However, perspective images have limitations in target positioning tasks, and their limitations are that the depth information from the target to the light source is not considered. Although the prior art approximates the position of the target point by finding the nearest point of two straight lines in space to eliminate the error caused by directly referring to the DICOM tag value. However, in the actual solution process, due to the errors in the two-dimensional coordinate picking on the perspective image, the accuracy limitations of the DICOM tag value, and the simplified processing of the spatial straight line model itself, the calculated nearest points of the two straight lines often cannot completely and accurately represent the true target position. Especially when the two straight lines basically have no intersection in space, it is necessary to rely on complex geometric calculations and iterative optimization to approximate the nearest point, which may make the error of the final result more obvious. Therefore, due to the limitations of the above factors, it is still difficult to achieve completely accurate results. Summary of the invention
[0004] In view of this, the present invention provides a target positioning method based on image parameter optimization, comprising:
[0005] Selecting a two-dimensional medical perspective image under any dual viewing angles, and obtaining the two-dimensional pixel coordinates and image parameters of a target point on the perspective image, wherein the image parameters are basic properties of the medical perspective image and geometric parameters of an imaging system;
[0006] Obtain the three-dimensional world coordinates of the target point according to the two-dimensional medical perspective image under any two-viewing angles;
[0007] updating image parameters of the medical perspective image according to the three-dimensional world coordinates;
[0008] Calculate a target coordinate conversion matrix according to the updated image parameters, wherein the target coordinate conversion matrix is used to convert the two-dimensional pixel coordinates of the target point into three-dimensional world coordinates, wherein the target coordinate conversion matrix is composed of conversion parameters of a two-dimensional pixel coordinate system, a two-dimensional image coordinate system, a three-dimensional camera coordinate system, and a three-dimensional world coordinate system;
[0009] The two-dimensional pixel coordinates of the target point of the dual-viewing angle are brought into the target coordinate transformation matrix to calculate the three-dimensional world coordinates of the target point after updating the dual-viewing angle;
[0010] Processing and calculation are performed based on the updated target point and three-dimensional world coordinates of the dual perspectives to obtain the three-dimensional world coordinates of the actual target point.
[0011] Optionally, obtaining the three-dimensional world coordinates of the target point according to the two-dimensional medical perspective image under any dual-viewing angles includes:
[0012] Calculate the initial target coordinate transformation matrix according to the image parameters;
[0013] Substituting the two-dimensional pixel coordinates of the target point of the dual-viewing angle into the initial target coordinate conversion matrix, and calculating the three-dimensional world coordinates of the initial target point of the dual-viewing angle;
[0014] Processing and calculation are performed based on the initial target point and the three-dimensional world coordinates of the dual-viewing angles to obtain the three-dimensional world coordinates of the target point.
[0015] Optionally, the image parameters include image resolution of the medical fluoroscopic image, pixel spacing, the distance from the light source point to the patient in the imaging system, the distance from the light source point to the detection plate in the imaging system, the first angle, the second angle, the first angle increment, and the second angle increment.
[0016] Optionally, the updated image parameters are the distance from the light source point to the patient and the pixel spacing in the imaging system.
[0017] Optionally, updating the image parameters of the medical perspective image according to the three-dimensional world coordinates includes:
[0018] The distance from the light source point in the imaging system to the plane where the target point is located is calculated according to the three-dimensional world coordinates of the target point, and the distance from the light source point in the imaging system to the patient target plane is obtained;
[0019] The updated pixel pitch is obtained by performing calculation based on the distance from the light source point to the detection plate in the imaging system and the pixel pitch.
[0020] Optionally, the target coordinate transformation matrix is calculated using the following formula:
[0021] ;
[0022] in, represents the updated 3D world coordinates of the target point, represents the two-dimensional pixel coordinates, Indicates the number of pixels of the perspective image in the vertical direction, Indicates the number of pixels of the perspective image in the horizontal direction, represents the updated pixel spacing, represents the distance from the light source point to the patient target plane, Indicates the distance from the light source to the detection board. is the rotation matrix, and T is the offset vector.
[0023] Optionally, the target coordinate transformation matrix is calculated using the following formula:
[0024] ;
[0025] in, represents the two-dimensional pixel coordinates, represents the updated 3D world coordinates of the target point, Indicates the number of pixels of the perspective image in the vertical direction, Indicates the number of pixels of the perspective image in the horizontal direction, represents the updated pixel spacing, represents the distance from the light source point to the patient target plane, Indicates the distance from the light source to the detection board. is the rotation matrix, and T is the offset vector.
[0026] Optionally, processing and calculating are performed according to the updated target point and the three-dimensional world coordinates of the dual perspectives to obtain the three-dimensional world coordinates of the actual target point, including:
[0027] Using the target coordinate transformation matrix, the three-dimensional world coordinates of the light source point of the dual-viewing angle are calculated;
[0028] Connecting the light source point of the first viewing angle with the corresponding updated target point to obtain a first connecting line, and connecting the light source point of the second viewing angle with the corresponding updated target point to obtain a second connecting line;
[0029] Selecting a point on the first connecting line and the second connecting line respectively, so that the midpoint of the connecting line between the two selected points is closest to the first connecting line and the second connecting line;
[0030] The midpoint is taken as the actual target point, and the three-dimensional world coordinates of the actual target point are obtained.
[0031] Optionally, an included angle between the first viewing angle and the second viewing angle is between 30° and 150°.
[0032] The second aspect of the present invention provides a target positioning device based on image parameter optimization, which includes: a processor and a memory connected to the processor; wherein the memory stores instructions that can be executed by the processor, and the instructions are executed by the processor so that the processor executes the above-mentioned target positioning method based on image parameter optimization.
[0033] The present invention selects two frames of two-dimensional medical perspective images under any dual-viewing angles, and then preliminarily determines the three-dimensional world coordinates of the target point, and uses the coordinates to optimize the image parameters, thereby laying a solid foundation for constructing a high-precision target coordinate transformation matrix. The two-dimensional medical perspective images obtained by this method not only greatly reduce the shooting time and the computational burden of the reconstruction algorithm, but also significantly reduce the threshold for obtaining perspective data, abandon the in vitro markers and cumbersome pre-calibration steps required for traditional multi-viewing angle shooting, and are suitable for medical perspective image processing in various environments. No additional in vitro markers or pre-calibration are required, which reduces the complexity of operation and preparation. Through dual-viewing angle image acquisition, the limitation of incomplete single-viewing angle information is effectively avoided, and the data processing amount and computing cost are reduced. The image parameters are updated according to the three-dimensional world coordinates of the target point obtained preliminarily, so that the parameters of the perspective view are more accurate than using the DICOM self-contained tag values. The target transformation matrix is calculated according to the updated image parameters, which improves the accuracy of the target transformation matrix. The target coordinate conversion matrix is used to convert the two-dimensional pixel coordinates into three-dimensional world coordinates, and the error of the three-dimensional world coordinates of the target point obtained initially is further corrected, effectively reducing the positioning error caused by factors such as DICOM tag value errors, so as to ensure the high accuracy of the three-dimensional world coordinates of the actual target point finally obtained. This method can quickly and accurately locate key positions such as the center of the tumor lesion, surface markers, and the needle tip of the puncture needle or ablation needle in the body, and is widely used in various clinical scenarios such as registration navigation, lesion confirmation, and ablation treatment. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 is a flow chart of a target positioning method based on image parameter optimization in an embodiment of the present invention;
[0036] Figure 2 It is a projection schematic diagram in an embodiment of the present invention;
[0037] Figure 3 Schematic diagram of calculating target points in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0040] like Figure 1 As shown, an embodiment of the present invention provides a target positioning method based on image parameter optimization, which is executed by an electronic device such as a computer or a server, and specifically includes:
[0041] S1, select a two-dimensional medical perspective image under any dual viewing angles, and obtain the two-dimensional pixel coordinates and image parameters of the target point on the perspective image, wherein the image parameters are basic properties of the medical perspective image and geometric parameters of the imaging system.
[0042] The imaging system is a C-arm X-ray machine, including a light source system, which includes a transmitter and a receiver, which are respectively located on both sides of the medical bed. X-rays are mainly emitted through the transmitter, and these rays are attenuated after penetrating the human body. The attenuated signals are then received by the receiver to obtain a perspective image. Among them, X-rays are not "light" in the traditional sense. The present invention can be broadly understood as the rays required for imaging. Then the transmitter (i.e., X-ray source) can be regarded as a part of the light source system, and the light source point mentioned below refers to the transmitter. At the same time, the C-arm can rotate around the patient to obtain a more comprehensive perspective image from different angles. The C-arm X-ray machine is used to rotate at a predetermined angle to obtain a number of perspective images, and perspective images of any multiple perspectives (the number is much less than the total number of perspective images) are selected from them, preferably dual perspectives, such as the C-arm X-ray machine rotates half a circle 180° to obtain 180 frames of perspective images, and perspective images of two frames of two perspectives are selected. Selecting perspective images from multiple perspectives can avoid the loss of information from a single perspective and reduce the time for acquiring images and algorithm calculations. Perspective images from too many perspectives will increase the computing cost. Therefore, two or more perspectives can provide complementary information, reduce the amount of processing, and quickly obtain accurate information.
[0043] Perspective images are two-dimensional pixel images, black-and-white images obtained through X-ray perspective technology, which use the different absorption of X-rays by different tissues of the human body to form data of different brightness. Common ones include CBCT images and DSA images. The target point can be the center of a tumor lesion, a body surface positioning marker, or the tip of a puncture needle or ablation needle in the body. The acquisition method is not limited to manual selection or extraction by traditional methods or machine learning methods, and the two-dimensional pixel coordinates (u, v) of the target point with the pixel image as the coordinate system are obtained. The image parameters are built-in default values, which can be read from the standard format image of the DICOM image, or can be obtained by technicians or doctors based on the actual environment.
[0044] S2, obtaining the three-dimensional world coordinates of the target point according to the two-dimensional medical perspective image under any dual-viewing angles.
[0045] S3, updating image parameters of the medical perspective image according to the three-dimensional world coordinates.
[0046] S4, calculating a target coordinate transformation matrix according to the updated image parameters, the target coordinate transformation matrix is used to transform the two-dimensional pixel coordinates of the target point into three-dimensional world coordinates, wherein the target coordinate transformation matrix is composed of transformation parameters of a two-dimensional pixel coordinate system, a two-dimensional image coordinate system, a three-dimensional camera coordinate system and a three-dimensional world coordinate system.
[0047] The transformation matrix among the 2D pixel coordinate system, 2D image coordinate system, 3D camera coordinate system and 3D world coordinate system is calculated according to the image parameters to transform the 2D pixel coordinates of the target point into 3D world coordinates. All coordinate systems satisfy the right-hand coordinate system.
[0048] S5, bringing the two-dimensional pixel coordinates of the target point of the dual perspectives into the target coordinate transformation matrix, and calculating the updated three-dimensional world coordinates of the target point of the dual perspectives.
[0049] S6, processing and calculating the updated target point and the three-dimensional world coordinates of the dual-view to obtain the three-dimensional world coordinates of the actual target point. The actual target point is the center of the tumor lesion in the patient's body, or it can be a body surface positioning marker or the tip of a puncture needle or ablation needle in the body.
[0050] This embodiment selects two frames of two-dimensional medical perspective images under any dual-viewing angles to preliminarily determine the three-dimensional world coordinates of the target point, and uses this coordinate to optimize the image parameters, laying a solid foundation for constructing a high-precision target coordinate transformation matrix. The two-dimensional medical perspective images obtained by this method not only greatly reduce the shooting time and the computational burden of the reconstruction algorithm, but also significantly reduce the threshold for obtaining perspective data, abandon the in vitro markers and cumbersome pre-calibration steps required for traditional multi-viewing shooting, and are suitable for medical perspective image processing in various environments. No additional in vitro markers or pre-calibration are required, which reduces the complexity of operation and preparation. Through dual-viewing image acquisition, the limitation of incomplete single-viewing angle information is effectively avoided, and the data processing amount and computing cost are reduced. The image parameters are updated according to the three-dimensional world coordinates of the target point obtained preliminarily, so that the parameters of the perspective view are more accurate than using the DICOM self-contained tag values. The target transformation matrix is calculated according to the updated image parameters, which improves the accuracy of the target transformation matrix. The target coordinate conversion matrix is used to convert the two-dimensional pixel coordinates into three-dimensional world coordinates, and the error of the three-dimensional world coordinates of the target point obtained initially is further corrected, effectively reducing the positioning error caused by factors such as DICOM tag value errors, so as to ensure the high accuracy of the three-dimensional world coordinates of the actual target point finally obtained. This method can quickly and accurately locate key positions such as the center of the tumor lesion, surface markers, and the needle tip of the puncture needle or ablation needle in the body, and is widely used in various clinical scenarios such as registration navigation, lesion confirmation, and ablation treatment.
[0051] In one embodiment, there are multiple ways to obtain the three-dimensional world coordinates of the target point in step S2, which can be obtained using the methods of steps S4-S6. Then step S2 is specifically as follows:
[0052] S21, calculating the initial target coordinate transformation matrix according to the image parameters.
[0053] S22, bringing the two-dimensional pixel coordinates of the dual-view target point into the initial target coordinate conversion matrix, and calculating the three-dimensional world coordinates of the dual-view initial target point.
[0054] S23, processing and calculating according to the initial target point and the three-dimensional world coordinates of the dual-viewing angles to obtain the three-dimensional world coordinates of the target point.
[0055] Specifically, an initial target coordinate transformation matrix is first calculated according to the image parameters, and then the two-dimensional pixel coordinates of the target point of the dual perspective are converted into three-dimensional world coordinates using the initial target coordinate transformation matrix, and finally post-processing is performed to obtain the three-dimensional world coordinates of the target point.
[0056] The three-dimensional world coordinates obtained by accurate calculation in this embodiment provide more accurate initial conditions for the calculation of the target coordinate transformation matrix in the subsequent steps. Step S2 uses a method similar to steps S4-S6 to accurately obtain the three-dimensional world target of the target point, and the image parameters updated thereby not only provide more accurate initial conditions for the subsequent steps, but also help to optimize the coordinate transformation matrix. Therefore, the processing and calculation in step S6 will be able to be performed on a more accurate and reliable basis, thereby ensuring the accuracy of the final result.
[0057] In one embodiment, in step S6, processing and calculation are performed based on the updated target point and the three-dimensional world coordinates of the dual perspectives to obtain the three-dimensional world coordinates of the actual target point, including:
[0058] S61, using the target coordinate conversion matrix, calculate and obtain the three-dimensional world coordinates of the light source point of the dual perspective.
[0059] S62, connecting the light source point of the first viewing angle with the corresponding updated target point to obtain a first connecting line, and connecting the light source point of the second viewing angle with the corresponding updated target point to obtain a second connecting line.
[0060] S63, selecting a point on the first connecting line and the second connecting line respectively, so that the midpoint of the connecting line of the two selected points is closest to the first connecting line and the second connecting line.
[0061] S64, taking the midpoint as the actual target point, and obtaining the three-dimensional world coordinates of the actual target point.
[0062] This embodiment can also be used in step S23 to obtain the three-dimensional world coordinates of the target point. The three-dimensional world coordinates of the initial target point are obtained by step S23, and the image parameters are updated according to the initial target point to replace the DICOM self-contained tag value. The three-dimensional world coordinates of the actual target point are solved again according to the updated image parameters, thereby avoiding the error caused by the DICOM self-contained tag value. The specific projection schematic diagram is shown in FIG. Figure 2As shown in the figure, the light source point of the first viewing angle (0°) is A, the light source point of the second viewing angle (90°) is C, the cube represents the patient, point B is the two-dimensional pixel target point obtained from the first viewing angle (corresponding to a point on the detection plate of the receiving end of the C-arm X-ray machine), and point D is the two-dimensional pixel target point obtained from the second viewing angle. Since the distance from the light source point to the patient in the image parameters is only the distance from the light source point to the patient's skin surface, not the distance to the tumor in the body, after the light source (such as X-ray) penetrates the human body, the image formed on the receiving end (such as the detection plate of the C-arm X-ray machine) can often only reflect the projection position on the skin surface, rather than the real position of the lesion in the body. Therefore, the two-dimensional pixel target points (such as point B and point D) directly obtained from the image are often only the projection of the lesion on the skin surface, rather than the lesion itself. The initial target point obtained from the first viewing angle is E, and the initial target point obtained from the second viewing angle is F, that is, the initial target points E and F are also just points on the skin surface, and the real target is located on the line segment or extension line between the light source and the initial target point. Therefore, the initial target point E and point F need to be processed again. Point A and point E need to be connected to obtain the first connection line, and point C and point F need to be connected to obtain the second connection line.
[0063] Furthermore, since point B and point D are the target points of the pixel image obtained by projecting X-rays emitted by the light source point through the human body to the detection board at the receiving end, point B is on the extension line of the first connecting line, and point D is on the extension line of the second connecting line. Then, the equations of the first connecting line and the second connecting line are as follows:
[0064] ;
[0065] ;
[0066] in, represents the line equation of the first line, represents the line equation of the second line, A represents the 3D world coordinates of the light source point on the first line, B represents the 3D world coordinates of the initial target point on the first line, C represents the 3D world coordinates of the light source point on the second line, and D represents the 3D world coordinates of the initial target point on the second line. represents the parameters on the first line, Indicates the parameters on the second wire.
[0067] in,
[0068] ;
[0069] ;
[0070] The equation construction matrix is as follows:
[0071] ;
[0072] Solve the basic form of PX=Q by the least square method and get:
[0073] ;
[0074] in,
[0075] ;
[0076] ;
[0077] in, is the 3D world coordinate of the light source point on the first line, ( is the 3D world coordinate of the initial target point on the first line, ( is the 3D world coordinate of the light source point on the second line, ( ) is the 3D world coordinate of the initial target point on the second line.
[0078] After solving i and j according to the above formula, substitute , Two equations, we can get the points on the two connecting lines, which is Figure 3 The midpoint of the two points is the closest point to the two lines. Figure 2 In the above figure, point G is the target point, and its coordinates will be used as the three-dimensional world coordinates of the target point.
[0079] Since the lesion is located in the body, it must be located at a certain position of the two lines or their extension lines. In order to find an estimated position closer to the lesion, the present embodiment adopts a method of taking the point closest to the two lines at the same time as the target point. This method is based on the assumption that the distance between the lesion and the two lines is equal (or at least very close). By constructing the line equation and solving the least square method, a pair of points (located on the two lines respectively) can be found, and their distances to the midpoint are equal (or closest to being equal). This midpoint is the target point we are looking for, and it is closer to the true position of the lesion. This method not only takes into account the distance from the light source point to the patient, but also solves the intersection of the lines, further improving the accuracy of the target point positioning.
[0080] Steps S61-S65 calculate the three-dimensional world coordinates of the actual target point, specifically:
[0081] The light source points of the dual-view are obtained as point A' and point C', and then point A' and point C' are connected with the updated target points (point E' and point F') respectively, and the following is obtained: Figure 3Connect the two solid lines in , and the midpoint of the two points is the spatial point closest to the two lines, and its coordinates will be used as the three-dimensional world coordinates of the actual target point.
[0082] Preferably, when selecting the perspective image, the included angle between the first viewing angle and the second viewing angle is controlled to be between 30° and 150°.
[0083] The angle between the perspective images of the two perspectives is controlled within the preset angle range, which can ensure that there is a certain parallax (depth and distance of the object) between the two perspective images, which is helpful for subsequent 3D reconstruction or target point positioning. If the angle is too small, it may lead to insufficient parallax, thus affecting the accuracy of 3D reconstruction. On the contrary, if the angle is too large, although the parallax will increase, it may also lead to a reduction in the overlap between the images, increasing the difficulty of subsequent processing.
[0084] The image parameters obtained in step S1 are the basic attributes of the medical fluoroscopic image and the geometric parameters of the imaging system, wherein the image parameters include the image resolution row, cols, pixel spacing of the medical fluoroscopic image, the distance SOD from the light source point to the patient in the imaging system, the distance SID from the light source point to the detection board in the imaging system, the first angle , Second Angle , first angle increment , Second angle increment .
[0085] Among them, the distance from the light source point to the detection plate in the imaging system is the distance from the transmitting end to the receiving end of the C-arm X-ray machine; the first angle and the second angle are the initial angles of the two selected frames of perspective images, and the first angle increment and the second angle increment correspond to the angle of the frame image rotation. For example, the angle of the 90th frame is the corresponding initial angle plus the angle increment, that is, the angle of the corresponding viewing angle. The following description takes the dual viewing angles of 0° and 90° as an example. In one embodiment, the target coordinate conversion matrix is calculated according to the image parameters, and the target coordinate conversion matrix is obtained by the conversion matrix between the two-dimensional pixel coordinate system and the two-dimensional image coordinate system, the conversion matrix between the two-dimensional image coordinate system and the three-dimensional camera coordinate system, and the conversion matrix between the three-dimensional camera coordinate system and the three-dimensional world coordinate system. Among them, the conversion matrix between the two-dimensional pixel coordinate system and the two-dimensional image coordinate system is calculated by the image resolution and the pixel spacing, the conversion matrix between the two-dimensional image coordinate system and the three-dimensional camera coordinate system is obtained by the distance from the light source point to the patient, and the conversion matrix between the three-dimensional camera coordinate system and the three-dimensional world coordinate system is calculated by the first angle, the second angle, the first angle increment, and the second angle increment.
[0086] Further, according to step S23, Figure 3The two lines in the middle and the closest point of the two lines in space are found. This point is the closest position to both lines, but it is still a certain distance from the two lines. If the distance can be reduced, the closest point of the two lines in space can be found again. The error will be smaller and the coordinates will be more accurate. The positioning accuracy of the current solution is within 5mm compared with the gold standard. This method is suitable for situations where the two lines in space have intersections or no intersections. However, in actual solutions, the two lines basically have no intersections in space. The reasons for this phenomenon include errors in picking up two-dimensional coordinates on perspective views and errors in DICOM's own tag values.
[0087] Therefore, after obtaining the three-dimensional world coordinates of the target point in step S2, the image parameters need to be updated. The image parameters updated in step S3 are the distance SOD from the light source point to the patient and the pixel spacing spacing in the imaging system. The distance from the light source point to the plane where the world coordinate point G obtained in step S2 is located is calculated to obtain SOD', which should be accurately called the distance from the light source point to the target plane. Then, based on SID and spacing, the similar triangle formula is used to obtain the corresponding spacing' under the new SOD'. Therefore, step S3 specifically includes:
[0088] S31, calculating the distance from the light source point to the plane where the target point is located in the imaging system according to the three-dimensional world coordinates of the target point, and obtaining the distance SOD' from the light source point to the patient target point plane in the imaging system.
[0089] S32, calculating according to the distance from the light source point to the detection plate and the pixel spacing in the imaging system to obtain an updated pixel spacing'.
[0090] This embodiment first determines the position of the tumor target in the patient's body based on the three-dimensional world coordinates of the target point initially obtained. Since the original distance SOD from the light source to the patient is measured to the patient, there is a certain deviation from the tumor target in the patient's body. Therefore, this embodiment calculates the distance SOD' from the light source to the plane where the target is located based on the three-dimensional world coordinates of the target, thereby replacing the original distance SOD from the light source to the patient. At the same time, in order to maintain the consistency of the image parameters, it is also necessary to update the corresponding pixel spacing spacing' based on the new SOD' value and the SID (the distance from the light source to the image receiver) of the imaging system and the original pixel spacing using the principle of similar triangles. This optimization step significantly improves the accuracy of positioning from two-dimensional perspective images to three-dimensional space, ensures the accuracy of positioning key structures such as target points, and provides more reliable information support for subsequent medical diagnosis and treatment.
[0091] In one embodiment, calculating the target coordinate transformation matrix according to the updated image parameters in step S4 includes:
[0092] According to the two-dimensional pixel coordinates (u, v), the canvas center pixel coordinates (row / 2, col / 2), and the two-dimensional image coordinates (x, y), the transformation matrix between the two-dimensional pixel coordinate system and the two-dimensional image coordinate system is as follows:
[0093] ;
[0094] According to the coordinates (Xc, Yc, Zc) in the 3D camera coordinate system, the transformation matrix between the 2D image coordinate system and the 3D camera coordinate system is as follows:
[0095] ;
[0096] The current perspective image is rotated around the Z axis by: , the rotation angle around the X axis is , the coordinates in the three-dimensional world coordinate system (Xw', Yw', Zw'), the transformation matrix between the three-dimensional camera coordinate system and the three-dimensional world coordinate system is as follows:
[0097] ;
[0098] ;
[0099] ;
[0100] Finally, the target coordinate transformation matrix is calculated:
[0101] ;
[0102] in, represents the updated 3D world coordinates of the target point, represents the two-dimensional pixel coordinates, Indicates the number of pixels of the perspective image in the vertical direction, Indicates the number of pixels of the perspective image in the horizontal direction, represents the updated pixel spacing, represents the distance from the light source point to the patient target plane, Indicates the distance from the light source to the detection board. is the rotation matrix, and T is the offset vector.
[0103] In another embodiment, there is another way to calculate the target coordinate transformation matrix as follows:
[0104] According to the two-dimensional pixel coordinates (u, v), the canvas center pixel coordinates (row / 2, col / 2), and the two-dimensional image coordinates (x, y), the transformation matrix between the two-dimensional pixel coordinate system and the two-dimensional image coordinate system is as follows:
[0105] ;
[0106] According to the coordinates (Xc, Yc, Zc) in the 3D camera coordinate system, the transformation matrix between the 2D image coordinate system and the 3D camera coordinate system is as follows:
[0107] ;
[0108] The current perspective image is rotated around the Z axis by , the rotation angle around the X axis is , the coordinates in the three-dimensional world coordinate system (Xw', Yw', Zw'), the transformation matrix between the three-dimensional camera coordinate system and the three-dimensional world coordinate system is as follows:
[0109] ;
[0110] ;
[0111] ;
[0112] ;
[0113] in, represents the two-dimensional pixel coordinates, represents the updated 3D world coordinates of the target point, Indicates the number of pixels of the perspective image in the vertical direction, Indicates the number of pixels of the perspective image in the horizontal direction, represents the updated pixel spacing, represents the distance from the light source point to the patient target plane, Indicates the distance from the light source to the detection board. is the rotation matrix, and T is the offset vector.
[0114] The above two methods for calculating the target coordinate transformation matrix are also applicable to the calculation of the initial target coordinate transformation matrix according to the image parameters in step S21. It is only necessary to use the initial image parameters for calculation, that is, replace the distance SOD' and the pixel spacing' from the light source point to the patient's target plane in the imaging system with the distance SOD and the pixel spacing in the imaging system.
[0115] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0116] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0117] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0118] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0119] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.
Claims
1. A target positioning method based on image parameter optimization, characterized in that: include: Select a two-dimensional medical perspective image under any dual viewing angles, and obtain the two-dimensional pixel coordinates and image parameters of the target point on the perspective image, wherein the image parameters are basic attributes of the medical perspective image and geometric parameters of the imaging system, and the image parameters include image resolution of the medical perspective image, pixel spacing, the distance from the light source point to the patient in the imaging system, the distance from the light source point to the detection plate in the imaging system, the first angle, the second angle, the first angle increment, and the second angle increment; Calculate the initial target coordinate transformation matrix according to the image parameters; Substituting the two-dimensional pixel coordinates of the target point of the dual-viewing angle into the initial target coordinate conversion matrix, and calculating the three-dimensional world coordinates of the initial target point of the dual-viewing angle; Processing and calculating the initial target point and the three-dimensional world coordinates of the dual-viewing angles to obtain the three-dimensional world coordinates of the target point; The distance from the light source point in the imaging system to the plane where the target point is located is calculated according to the three-dimensional world coordinates of the target point, and the distance from the light source point in the imaging system to the patient target plane is obtained; Calculate according to the distance from the light source point to the detection plate in the imaging system and the pixel pitch to obtain an updated pixel pitch; Calculate a target coordinate conversion matrix according to the updated image parameters, wherein the target coordinate conversion matrix is used to convert the two-dimensional pixel coordinates of the target point into three-dimensional world coordinates, wherein the target coordinate conversion matrix is composed of conversion parameters of a two-dimensional pixel coordinate system, a two-dimensional image coordinate system, a three-dimensional camera coordinate system, and a three-dimensional world coordinate system; The two-dimensional pixel coordinates of the target point of the dual-viewing angle are brought into the target coordinate transformation matrix to calculate the three-dimensional world coordinates of the target point after updating the dual-viewing angle; Using the target coordinate transformation matrix, the three-dimensional world coordinates of the light source point of dual viewing angles are calculated; Connecting the light source point of the first viewing angle with the corresponding updated target point to obtain a first connecting line, and connecting the light source point of the second viewing angle with the corresponding updated target point to obtain a second connecting line; Selecting a point on the first connecting line and the second connecting line respectively, so that the midpoint of the connecting line between the two selected points is closest to the first connecting line and the second connecting line; The midpoint is taken as the actual target point, and the three-dimensional world coordinates of the actual target point are obtained.
2. The method according to claim 1, characterized in that The target coordinate transformation matrix is calculated using the following formula: ; in, represents the updated 3D world coordinates of the target point, represents the two-dimensional pixel coordinates, Indicates the number of pixels of the perspective image in the vertical direction, Indicates the number of pixels of the perspective image in the horizontal direction, represents the updated pixel spacing, represents the distance from the light source point to the patient target plane, Indicates the distance from the light source to the detection board. is the rotation matrix, and T is the offset vector.
3. The method according to claim 1, characterized in that The target coordinate transformation matrix is calculated using the following formula: ; in, represents the two-dimensional pixel coordinates, represents the updated 3D world coordinates of the target point, Indicates the number of pixels of the perspective image in the vertical direction, Indicates the number of pixels of the perspective image in the horizontal direction, represents the updated pixel spacing, represents the distance from the light source point to the patient target plane, Indicates the distance from the light source to the detection board. is the rotation matrix, and T is the offset vector.
4. The method according to claim 1, characterized in that: The included angle between the first viewing angle and the second viewing angle is between 30° and 150°.
5. A target positioning device based on image parameter optimization, characterized in that: include: A processor and a memory connected to the processor; wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor so that the processor executes the target positioning method based on image parameter optimization as described in any one of claims 1-4.
Citation Information
Patent Citations
Systems and methods for registering elongate devices to three dimensional images in image-guided procedures
CN110087576A
Monocular vision real-time distance measurement method and system based on embedded platform
CN115705621A