Image registration method in hip replacement surgery

By extracting and processing preoperative three-dimensional images and intraoperative two-dimensional images in hip replacement surgery, identifying and removing the circular features of the implant, high-precision image registration is achieved, solving the problem of intraoperative images and preoperative images being unable to register, and improving surgical efficiency.

CN119887865APending Publication Date: 2025-04-25ZUNYI NO 1 PEOPLES HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411934280.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

During hip replacement surgery, intraoperative images and preoperative images cannot be accurately registered or the registration accuracy is low, resulting in reduced surgical efficiency.

Method used

By obtaining preoperative three-dimensional images and intraoperative two-dimensional images, edge information is extracted, and the circular features of the implant are identified using voting methods and watershed algorithms. After the implant is removed, the gradient descent optimization algorithm is used for image registration.

Benefits of technology

It improves the accuracy and efficiency of image registration, ensures accurate alignment of intraoperative images and preoperative images, supports real-time acquisition of virtual fluoroscopic images, and improves surgical efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887865A_ABST
    Figure CN119887865A_ABST
Patent Text Reader

Abstract

The invention discloses an image registration method in hip replacement surgery, which comprises the following steps of: S1, acquiring a preoperative three-dimensional image and an intraoperative two-dimensional image of an implanted implant, and extracting to obtain a three-dimensional image of a preoperative target part; s2, performing edge information extraction on the intraoperative two-dimensional image to obtain an edge image of the intraoperative two-dimensional image; s3, acquiring circles corresponding to an acetabular cup and a femoral head of the implant in the intraoperative two-dimensional image; s4, taking the target circle center corresponding to each circle obtained in S3 as a seed point, and performing segmentation through a watershed algorithm to obtain a segmentation result of the implant in the intraoperative two-dimensional image; and S5, combining S1 and S4 to obtain the implant-removed intra-operative two-dimensional image, and registering the pre-operative target part three-dimensional image obtained in S1 and the implant-removed intra-operative two-dimensional image obtained in S1 through a gradient descent optimization algorithm. According to the invention, the registration is not influenced by the implant, so that the registration is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an image registration method in hip replacement surgery. Background Art

[0002] In orthopedic surgery, implants such as prostheses are often required, such as hip replacement surgery, which is increasingly widely used in clinical practice. Hip replacement surgery is to fix the prosthesis, including the femoral part and the acetabulum part, to the normal bone using bone cement and screws to replace the diseased joint and reconstruct the normal function of the patient's hip joint. CT equipment is usually used to obtain the patient's preoperative images, and in order to facilitate the observation of the position and implantation of the prosthesis, the C-arm machine needs to be adjusted to different target angles to scan it, so as to obtain the frontal view, lateral view and other specific angles of the prosthesis. In actual operation, it takes a long time to correctly adjust the C-arm machine to the target angle during the operation.

[0003] With the development of imaging equipment technology, C-arms with virtual perspective functions can now be used instead of traditional C-arms. Using C-arms to obtain virtual perspective images in real time during surgery can effectively improve perspective efficiency. However, since the implanted prosthesis in hip replacement surgery is usually large in size and does not exist in the preoperative images, there will be a large difference between the preoperative images and the intraoperative images, which will seriously affect the image registration accuracy. Summary of the invention

[0004] Purpose of the invention: Based on the above-mentioned shortcomings, the present invention proposes an image registration method in hip replacement surgery, which solves the problem that intraoperative images and preoperative images cannot be registered or the registration accuracy is low after the implant is placed in hip replacement surgery.

[0005] Technical solution:

[0006] The present invention discloses an image registration method in hip replacement surgery, comprising:

[0007] S1, obtaining a preoperative three-dimensional image and an intraoperative two-dimensional image of the implanted part, and extracting a preoperative three-dimensional image of the target part;

[0008] S2, extracting edge information from the intraoperative two-dimensional image obtained in S1 to obtain an edge image composed of valid edge points;

[0009] S3, obtaining the center of each connected domain in the edge image obtained in S2 as the target center by a voting method, calculating the radius corresponding to each target center, and then obtaining the circle corresponding to the femoral head of the acetabulum of the implant in the intraoperative two-dimensional image;

[0010] S4, using the target circle centers corresponding to the circles obtained in S3 as seed points, and obtaining the segmentation results of the implant in the intraoperative two-dimensional image by using the watershed algorithm;

[0011] S5. Combining S1 and S4 to obtain an intraoperative two-dimensional image after the implant is removed, and registering the preoperative three-dimensional image of the target site obtained by S1 with the intraoperative two-dimensional image after the implant is removed by a gradient descent optimization algorithm.

[0012] Specifically, S3 includes:

[0013] S31, traverse each valid edge point in the edge image obtained in S2, shoot a straight line along its gradient direction, count the number of straight lines passed by each pixel point, obtain a voting accumulation map, and select several pixel points with the largest number of votes as candidate circle centers;

[0014] S32, screening and retaining the center of the candidate circle obtained in S31 that meets the unimodal distribution, that is, obtaining the corresponding target circle center;

[0015] S33, traverse each target circle center, calculate and count the distance from it to the corresponding valid edge point, take the distance value with the largest distribution number as the radius of the circle formed by the target circle center, and then obtain the corresponding circle.

[0016] More specifically, the S32 is specifically: judging whether the vote numbers in the eight directions at the center of the circle are all unimodal distribution, if so, the center of the circle is retained, otherwise it is removed.

[0017] More specifically, in S33, the distance value with the largest distribution number is used as the radius of the circle formed by the center of the target circle, which is specifically: obtaining the distribution of all calculated distances, and finding that a certain distance has the largest distribution number within the set range, then using this distance as the distance value with the largest distribution number.

[0018] Specifically, in S3, after obtaining the circle corresponding to the acetabular femoral head of the implant in the intraoperative two-dimensional image, it also includes a circle screening step: based on all the circles obtained, verify whether the grayscale value distribution of the pixel points in each candidate circle in the intraoperative two-dimensional image obtained in S1 is uniform, and eliminate the circles with uneven distribution to obtain the valid circle corresponding to the acetabular femoral head of the implant in the intraoperative two-dimensional image.

[0019] Specifically, the S2 includes:

[0020] S21, respectively calculating the gradients of the intraoperative two-dimensional image acquired in S1 in the horizontal direction and the vertical direction to obtain a corresponding gradient image;

[0021] S22, according to the gradient image obtained in S21, using a non-maximum suppression algorithm to select pixel points that meet the set conditions as candidate edge points;

[0022] S23, adding the neighboring points that meet the set conditions in the neighborhood of each candidate edge point into new candidate edge points, and repeating this step until all candidate edge points and their corresponding connected domains are obtained;

[0023] S24, extracting candidate edge points in the connected domains obtained in S23 that are not less than the connected domain threshold as valid edge points, and finally obtaining an edge image in the intraoperative two-dimensional image.

[0024] More specifically, before the gradient calculation in S21, a preprocessing process is also included for the intraoperative two-dimensional image acquired in S1, including negative film transformation and median filtering.

[0025] More specifically, the gradient calculation in S21 adopts a Sobel operator, a Scharr operator, a laplacian operator, a Roberts operator or a prewitt operator.

[0026] More specifically, in S22, the pixel points that meet the set conditions are: setting a gradient threshold, for the pixel points in the gradient image whose gradient values ​​are greater than the gradient threshold, according to the gradient image obtained in S21, obtaining the pixel point with the largest gradient value in the gradient direction of the pixel point as a candidate edge point.

[0027] Specifically, the S5 includes:

[0028] S51, using the preoperative 3D image as a fixed image and the intraoperative 2D image of the implant removal as a moving image, setting an initial transformation relationship between a 3D image coordinate system corresponding to the fixed image and a C-arm coordinate system corresponding to the moving image;

[0029] S52, applying an initial transformation relationship to the C-arm coordinate system, thereby obtaining a DRR image of the fixed image, and calculating a similarity measure between the obtained DRR image of the fixed image and the moving image;

[0030] S53, optimizing the current transformation relationship between the DRR image of the fixed image and the moving image by a gradient descent optimization algorithm until the set conditions are met, thereby obtaining a final transformation relationship between the two images, and thereby obtaining a registration result of the two images.

[0031] Beneficial effects: In hip replacement surgery, the present invention only needs to take a two-dimensional image containing the implant through the C-arm during the operation, and according to the characteristics of the arc of the implant itself, by constructing the target center corresponding to it, the implant in the intraoperative image is accurately identified and removed, so as to ensure that the registration of the preoperative image and the intraoperative image is not affected by the implant, and the accuracy of the registration is improved. Then, the virtual perspective images of the patient at different angles can be obtained in real time during the operation through the C-arm machine with virtual perspective function, the implantation status of the implant can be observed in real time, and the position can be adjusted immediately. On the basis of improving the efficiency of obtaining the perspective images of the patient during the operation, the problem of the inability to register the intraoperative image and the preoperative image or the low registration accuracy after the implant is placed in the hip replacement surgery is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are merely embodiments of the present invention, and ordinary technicians in this field can obtain other drawings based on these drawings without creative work.

[0033] Figure 1 A flowchart of the image registration method in hip replacement surgery of the present invention;

[0034] Figure 2 This is an example of obtaining a preoperative 3D original image and an intraoperative 2D image of an implanted prosthesis, where: Figure 2 (a) is an example of the original 3D image before surgery. Figure 2 (b) is an example of a fluoroscopic image of an implanted prosthesis acquired by a C-arm machine;

[0035] Figure 3 For Figure 2 Example diagram for edge extraction, where: Figure 3 (a) for Figure 2 An example of an image obtained after negative and median filtering. Figure 3 (b) Figure 3 (a) is an example of a gradient image and its local magnification. Figure 3 (c) for Figure 3 (b) An example of an edge image extracted based on the gradient value image and its local magnified image;

[0036] Figure 4 For Figure 3 An example of extracting the center of a circle from the edge image obtained. DETAILED DESCRIPTION

[0037] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0038] The image registration method in hip replacement surgery of the present invention is as follows Figure 1 As shown, including:

[0039] S1, obtaining the preoperative 3D original image and the intraoperative 2D image of the implanted part, and extracting the 3D image of the preoperative target part by frame selection;

[0040] Since the preoperative 3D original image contains most of the patient's body and may be very large, and most of the areas are non-interest areas and irrelevant to the registration results, in order to reduce the amount of data processing and improve the registration efficiency, the image of the target part in the preoperative 3D original image can be selected and extracted, that is, the 3D image of the preoperative target part can be used for subsequent registration.

[0041] In the present invention, the preoperative 3D original image is a CT image obtained by scanning the whole body or half body of the patient by a CT device before the operation, such as Figure 2 (a) As shown in the left figure; the intraoperative two-dimensional image is a perspective image of the implanted implant obtained by C-arm scanning during the operation. During the scanning, the person is in a supine or prone position, and the C-arm is in an upright position. In a specific embodiment of the present invention, the intraoperative two-dimensional image is a perspective image obtained when the implant has been placed but not yet in place during the operation, for example Figure 2 (b); The target site is the patient's hip joint, for example Figure 2 (a) In the right figure, the 3D image of the target area before surgery is obtained by selecting and extracting. For example, Figure 2 (a) Left image.

[0042] In a specific embodiment of the present invention, the implant is an implanted prosthesis.

[0043] S2, extracting edge information from the intraoperative two-dimensional image obtained in S1 to obtain an edge image composed of valid edge points;

[0044] Please refer to Figure 3 , extract the edge points in the intraoperative two-dimensional image obtained by S1, specifically:

[0045] S21, respectively calculating the gradients of the intraoperative two-dimensional image acquired in S1 in the horizontal direction and the vertical direction to obtain a corresponding gradient image;

[0046] In the present invention, the Sobel operator is used to calculate the gradient of the intraoperative two-dimensional image obtained by S1 in the horizontal and vertical directions, and the corresponding gradient value image and its local magnification image are obtained as shown in Figure 3 (b)

[0047] Among them, the Sobel operator is as follows:

[0048]

[0049]

[0050] Among them, Gx and Gy are gradient operators in the horizontal direction and vertical direction respectively. The following formula is used to calculate the gradient value d and gradient direction θ of a pixel point in the intraoperative two-dimensional image:

[0051]

[0052] θ=arctan(dy / dx)

[0053] Among them, dx and dy are the gradient values ​​of the corresponding pixel in the horizontal and vertical directions respectively.

[0054] In the present invention, the operator for gradient calculation may also be a Scharr operator, a laplacian operator, a Roberts operator or a prewitt operator.

[0055] In the present invention, in order to make the display effect of edge pixels more prominent and facilitate the subsequent edge detection and feature extraction, before the above-mentioned gradient calculation, it also includes negative film conversion processing of the intraoperative two-dimensional image obtained by S1. Since the preoperative three-dimensional original image needs to generate a two-dimensional negative film form of DRR image through a digital reconstruction radiological algorithm during the subsequent registration operation, in order to keep consistent with the DRR image form, the intraoperative two-dimensional image also needs to be converted into a negative film form. Figure 3 (a). At the same time, negative film transformation may introduce some granular noise, thereby affecting the image quality. In order to solve this problem, the present invention can perform noise reduction processing on the intraoperative two-dimensional image after the negative film transformation by median filtering. The median filtering can well remove the salt and pepper noise in the image, and at the same time better maintain the edge information of the image, and maintain the clarity and accuracy of the image.

[0056] S22, according to the gradient image obtained in S21, using a non-maximum suppression algorithm to select pixel points that meet the set conditions as candidate edge points;

[0057] Specifically, by setting the gradient threshold, the regions with low gradient values ​​in the gradient image obtained by S21 are filtered out, and these regions usually do not contain significant edge information. In a specific embodiment of the present invention, the Sobel operator is used to calculate the gradient, and the gradient threshold is selected based on experience, ranging from 90 to 110, preferably set to 100. Of course, the gradient threshold can also be adjusted accordingly according to the contrast characteristics of the image to meet different image processing requirements.

[0058] The pixel points in the gradient image that meet the set conditions are taken as candidate edge points. Specifically, a gradient threshold is set. For the pixel points whose gradient values ​​in the gradient image obtained in S21 are greater than the gradient threshold, the pixel point with the largest gradient value in the gradient direction of the pixel point is obtained according to the gradient image obtained in S21 as the candidate edge point.

[0059] The above method of extracting candidate edge points based on the non-maximum suppression algorithm can effectively remove non-edge pixels, achieve edge refinement and denoising, and help obtain clearer and more accurate edge information.

[0060] S23, adding the neighboring points that meet the set conditions in the neighborhood of each candidate edge point into new candidate edge points, and repeating this step until all candidate edge points and their corresponding connected domains are obtained;

[0061] In the present invention, four neighborhoods or eight neighborhoods may be used for the neighborhood points of the candidate edge points. In this embodiment, eight neighborhoods are used. Specifically, the eight neighborhood points of each candidate edge point extracted in S22 are first traversed to determine whether each neighborhood point meets the set conditions in S22. If so, it is included in the candidate edge point, otherwise it is removed; for those neighborhood points newly included in the candidate edge point, the above steps are repeated until all candidate edge points are obtained, and these candidate edge points constitute multiple connected domains. Among them, the eight neighborhood points (3*3 neighborhood) of each candidate edge point are the pixel points above, below, left, right, upper left, upper right, lower left, and lower right thereof.

[0062] S24, extracting candidate edge points in the connected domains obtained in S23 that are not less than the connected domain threshold as valid edge points, and finally obtaining an edge image in the intraoperative two-dimensional image;

[0063] Specifically, a connected domain threshold is set, and the number of candidate edge points in each connected domain is traversed and determined to be not less than the set connected domain threshold. If satisfied, all candidate edge points in the connected domain are retained as valid edge points, otherwise the connected domain and all its candidate edge points are removed. After the traversal is completed, all valid edge points are obtained, and finally the edge image in the intraoperative two-dimensional image composed of all valid edge points is obtained. The connected domain threshold is selected according to the actual needs of the user during operation, and the value range is 10-30, preferably set to 20.

[0064] In the present invention, the connected domains containing at least 20 candidate edge points are retained, that is, only when at least 20 consecutive candidate edge points appear, these candidate edge points are considered to be valid edge points and retained, otherwise they are removed. The final edge image and its local enlarged image are shown in FIG. Figure 3 As shown in (c), it can be seen from the figure that the edges in the edge image are all connected lines composed of a single layer of pixels.

[0065] S3, obtaining the centers of each connected domain in the edge image obtained in S2 as candidate centers through a voting method, screening out target centers among them, calculating the radius corresponding to each target center, and then obtaining the circles corresponding to the acetabular cup and femoral head of the implant in the intraoperative two-dimensional image;

[0066] like Figure 4 As shown in the figure, since the acetabular cup and femoral head of the implant are standard arcs in the intraoperative two-dimensional image, their positions can be located by fitting the positions of the circles, as follows:

[0067] S31, traverse each valid edge point in the edge image obtained in S2, shoot a straight line along its gradient direction, accumulate the number of votes at each pixel point passed by the straight line, that is, count the number of straight lines passed by each pixel point, obtain a vote accumulation map, and select several pixel points with the largest number of votes as candidate circle centers;

[0068] The perpendicular line of the tangent on the arc must pass through the center of the circle, and the position of the center of the circle can be obtained by calculating the intersection of multiple perpendicular lines. By shooting a straight line along the gradient direction of each valid edge point to simulate the perpendicular line of the tangent of the arc, the gradient direction of the valid edge point on the arc is approximated as the perpendicular direction of the tangent of the arc, and then the coordinates of the center of the circle can be estimated by voting along the gradient directions of all valid edge points.

[0069] Specifically, a straight line emitted from a valid edge point will pass through countless pixels on the edge image. Every time a pixel is passed, the number of votes for that pixel increases. During the traversal process, the number of votes is continuously accumulated at each pixel position where a straight line passes. After the traversal is completed, a voting accumulation graph is obtained. The voting accumulation graph shows the number of votes for each pixel, that is, the number of straight lines passed by each pixel.

[0070] In the present invention, based on the actual situation of the surgical scene, the four pixel points with the largest number of votes are finally selected as candidate circle centers.

[0071] In this embodiment, the surgery installs at most two prostheses (one for each leg), so there are at most two prosthetic acetabular cups and two prosthetic femoral heads, so there are at most four circular structures, that is, there are at most four candidate centers of the circle.

[0072] S32, screening and retaining the candidate circle centers obtained in S31 that meet the unimodal distribution, and obtaining the target circle center;

[0073] In the present invention, after obtaining the candidate centers, a screening step is also included to eliminate the centers that do not meet the set requirements. Since the acetabular cup and femoral head of the implant are standard arcs in the intraoperative image, the distribution of the corresponding voting accumulation graph near the center should be a unimodal distribution, that is, there is only one extreme value corresponding to the position of the center in the local range. The gradient in eight directions around the center position can be calculated to determine whether it is a unimodal distribution, and the candidate centers that are not unimodal and may be caused by noise or image distortion are excluded to ensure the accuracy of the target center finally selected, that is, the set requirement is that the gradients in eight directions around the center position are all unimodal distributions.

[0074] S33, traverse each target circle center, calculate the distance from it to the corresponding valid edge point, and use the distance value with the largest distribution number as the radius of the circle formed by the target circle center, and then obtain the corresponding circle;

[0075] For any target circle center, all valid edge points corresponding to the target circle center are found in combination with the voting of S31, and the distance from the target circle center to all corresponding valid edge points is calculated, and the corresponding distance distribution is obtained by statistics. If a certain distance has the largest number of distributions within the set range, then this distance is used as the distance value with the largest number of distributions; in the present invention, the set range can be determined according to the actual accuracy requirements. The smaller the set range, the more accurate the distance value with the largest number of distributions is. Of course, in the present invention, the mean of all distances can also be used as the distance value with the largest number of distributions.

[0076] In this embodiment, if a distance is 5 mm, and the number of valid edge points distributed within a setting range such as ±0.1 mm based on the distance is the largest, 5 mm is used as the distance value with the largest number of distributions.

[0077] Furthermore, after obtaining the distance from a target circle center to all corresponding valid edge points, a distance histogram is generated based on this, and the distance interval corresponding to the largest number of distributions (peaks) in the histogram is counted, and the left value, right value of the distance interval (i.e., the minimum or maximum distance of the distance interval) or the average distance corresponding to all valid edge points in the distance interval, or any value in the distance interval is used as the radius of the circle formed by the target circle center.

[0078] In order to further ensure the accuracy, the present invention also includes a circle screening step. Specifically, based on all the circles obtained in S34, it is verified whether the gray value distribution of the pixel points in each candidate circle in the intraoperative two-dimensional image obtained in S1 is uniform, and the circles with uneven distribution are eliminated to obtain the effective circles corresponding to the acetabular cup and the femoral head of the implant in the intraoperative two-dimensional image;

[0079] Since the grayscale values ​​of the pixels in the intraoperative two-dimensional image of the implant are evenly distributed, if the grayscale values ​​of the pixels in the circle are unevenly distributed, it is not an implant. So far, all the valid circles retained correspond to the acetabular cup and femoral head of the implant in the intraoperative two-dimensional image. In the present invention, the uniformity is expressed by calculating the standard deviation of the grayscale values ​​of the pixels in the circle. If the standard deviation of the grayscale values ​​of the pixels in a circle is less than a set threshold, it means that the average error between the grayscale values ​​of the pixels in the circle and the grayscale mean is within the set threshold, and it can be considered to be uniformly distributed; in the present invention, the threshold is selected based on experience, and the value range is 5-20, preferably set to 10.

[0080] S4, for the circles corresponding to the acetabular cup and the femoral head of the implant in the intraoperative two-dimensional image obtained in S3, the corresponding target circle centers are used as seed points, and the segmentation result of the implant in the intraoperative two-dimensional image is obtained by segmentation using a watershed algorithm;

[0081] The grayscale values ​​of the pixels of the implant in the intraoperative two-dimensional image are evenly distributed and have a clear boundary with the background in the intraoperative two-dimensional image. Therefore, it is easy to segment the implant through the watershed algorithm to obtain a segmentation mask of the implant.

[0082] S5. Combining S1 and S4, the intraoperative two-dimensional image after the implant is removed is obtained, and the three-dimensional image of the preoperative target site and the intraoperative two-dimensional image after the implant is removed are registered by a gradient descent optimization algorithm.

[0083] In the present invention, after the three-dimensional image of the preoperative target part and the intraoperative two-dimensional image without the implant are aligned, combined with the projection model of the C-arm machine, the transformation relationship between the intraoperative two-dimensional image and the C-arm machine coordinate system can be obtained, and the two are constant and unchanged. By using them as built-in transformation, the transformation relationship between the three-dimensional image of the preoperative target part and the intraoperative two-dimensional image without the implant can be converted into a transformation relationship between the three-dimensional image coordinate system corresponding to the three-dimensional image of the preoperative target part and the C-arm machine coordinate system corresponding to the intraoperative two-dimensional image without the implant, that is, the alignment of the three-dimensional image of the preoperative target part and the intraoperative two-dimensional image without the implant is completed.

[0084] Specifically, according to the segmentation result of the implant in the intraoperative two-dimensional image obtained by S4, combined with the intraoperative two-dimensional image without the implant obtained by S1, the three-dimensional image of the preoperative target part obtained by S1 and the intraoperative two-dimensional image without the implant are registered by a gradient descent optimization algorithm;

[0085] In the present invention, the three-dimensional image of the preoperative target part and the two-dimensional image during the operation after the implant is removed are registered by a gradient descent optimization algorithm, as follows:

[0086] S51, setting the initial transformation relationship between the three-dimensional image coordinate system and the C-arm coordinate system;

[0087] Specifically, the three-dimensional image coordinate system is set to the world coordinate system (fixed coordinate system), and the transformation of the C-arm coordinate system relative to the three-dimensional image coordinate system is T; taking the three-dimensional rigid body transformation with 6 degrees of freedom as an example, the initial transformation relationship T1 is set to [0,0,0,0,0,0].

[0088] S52, transforming the position of the C-arm coordinate system (i.e., the position of the X-ray source and the detector) according to the set initial transformation relationship, obtaining a DRR image of the three-dimensional image of the target part before surgery, and calculating a similarity measure between the generated DRR image and the two-dimensional image during surgery without the implant. The calculation method of the similarity measure C is as follows:

[0089]

[0090] Where f and m are the vectors composed of the pixels in the intraoperative two-dimensional image without the implant and the generated DRR image, respectively. are the mean values ​​of all pixel values; <,> are inner products, || is the bi-norm of the vector, and the negative sign indicates optimization to the minimum value;

[0091] S53, optimizing the current transformation relationship between the three-dimensional image coordinate system and the C-arm coordinate system by a gradient descent optimization algorithm until the set conditions are met, thereby obtaining a final transformation relationship T2 between the three-dimensional image coordinate system and the C-arm coordinate system, and thereby obtaining a registration result of the two images;

[0092] Specifically, the derivative of the similarity measure C between the two images with respect to the optimization variable p is calculated as follows:

[0093]

[0094] In the formula,

[0095] The optimization variable p in this embodiment is the transformation relationship between the three-dimensional image coordinate system and the C-arm coordinate system.

[0096] The calculated derivative Input to the optimizer to update the optimization variable p. The optimizer uses the following formula to update the value of the optimization variable p:

[0097]

[0098] Among them, p ′ is the updated optimization variable, scale is a constant used to balance the change rate of each component of the optimization variable p; l ris the learning rate, the initial value is 0.1, and it decreases according to the conditions;

[0099] The setting conditions are as follows: if the learning rate is less than the set threshold, or the number of iterations is greater than the set number, the loop is exited and the final optimized variable is output, which is the registration result of the two images. The threshold is set to 0.001.

[0100] The transformation relationship between the three-dimensional image coordinate system and the C-arm coordinate system is set to the updated transformation relationship, and the process jumps to S52 to loop and iterate until the iteration number is reached and then the iterative optimization is exited.

[0101] The present invention can accurately extract implants in intraoperative images during orthopedic surgery, and then partially remove the implants in the intraoperative images during the registration of preoperative images and intraoperative images, thereby ensuring that the registration is not affected by the implant, making the registration more accurate, and solving the problem of inability to register intraoperative images and preoperative images or low registration accuracy after the implant is placed in hip replacement surgery.

[0102] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present invention (including the claims) is limited to these examples. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present invention as described above, which are not provided in detail for the sake of simplicity.

[0103] The embodiments of the present invention are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the present invention.

Claims

1. An image registration method in hip replacement surgery, characterized in that: include: S1, obtaining a preoperative three-dimensional image and an intraoperative two-dimensional image of the implanted part, and extracting a preoperative three-dimensional image of the target part; S2, extracting edge information from the intraoperative two-dimensional image obtained in S1 to obtain an edge image composed of valid edge points; S3, obtaining the center of each connected domain in the edge image obtained in S2 as the target center by a voting method, calculating the radius corresponding to each target center, and then obtaining the circle corresponding to the femoral head of the acetabulum of the implant in the intraoperative two-dimensional image; S4, using the target circle centers corresponding to the circles obtained in S3 as seed points, and obtaining the segmentation results of the implant in the intraoperative two-dimensional image by segmentation using a watershed algorithm; S5. Combining S1 and S4 to obtain an intraoperative two-dimensional image after the implant is removed, and registering the preoperative three-dimensional image of the target site obtained by S1 with the intraoperative two-dimensional image after the implant is removed by a gradient descent optimization algorithm.

2. The image registration method according to claim 1, characterized in that: The S3 includes: S31, traverse each valid edge point in the edge image obtained in S2, shoot a straight line along its gradient direction, count the number of straight lines passed by each pixel point, obtain a voting accumulation map, and select several pixel points with the largest number of votes as candidate circle centers; S32, screening and retaining the center of the candidate circle obtained in S31 that meets the unimodal distribution, that is, obtaining the corresponding target circle center; S33, traverse each target circle center, calculate and count the distance from it to the corresponding valid edge point, take the distance value with the largest distribution number as the radius of the circle formed by the target circle center, and then obtain the corresponding circle.

3. The image registration method according to claim 2, characterized in that: The S32 is specifically: determining whether the vote numbers in the eight directions at the center of the circle are all unimodal distributions, if so, the center of the circle is retained, otherwise it is removed.

4. The image registration method according to claim 2, characterized in that: In S33, the distance value with the largest number of distributions is used as the radius of the circle formed by the center of the target circle, specifically: the distribution of all distances obtained by calculation is obtained, and a certain distance is found to have the largest number of distributions within a set range, and this distance is used as the distance value with the largest number of distributions.

5. The image registration method according to claim 1, characterized in that: In the S3, after obtaining the circle corresponding to the acetabular femoral head of the implant in the intraoperative two-dimensional image, it also includes a circle screening step: based on all the circles obtained, verify whether the grayscale value distribution of the pixel points in each candidate circle in the intraoperative two-dimensional image obtained in S1 is uniform, and eliminate the circles with uneven distribution to obtain the valid circle corresponding to the acetabular femoral head of the implant in the intraoperative two-dimensional image.

6. The image registration method according to claim 1, characterized in that: The S2 includes: S21, respectively calculating the gradients of the intraoperative two-dimensional image acquired in S1 in the horizontal direction and the vertical direction to obtain a corresponding gradient image; S22, according to the gradient image obtained in S21, using a non-maximum suppression algorithm to select pixel points that meet the set conditions as candidate edge points; S23, adding the neighboring points that meet the set conditions in the neighborhood of each candidate edge point into new candidate edge points, and repeating this step until all candidate edge points and their corresponding connected domains are obtained; S24, extracting candidate edge points in the connected domains obtained in S23 that are not less than the connected domain threshold as valid edge points, and finally obtaining an edge image in the intraoperative two-dimensional image.

7. The image registration method according to claim 6, characterized in that: Before the gradient calculation of S21, a preprocessing process is also included for the intraoperative two-dimensional image acquired in S1, including negative film transformation and median filtering.

8. The image registration method according to claim 6, characterized in that: The gradient calculation in S21 adopts the Sobel operator, the Scharr operator, the laplacian operator, the Roberts operator or the prewitt operator.

9. The image registration method according to claim 6, characterized in that: In S22, the pixel points that meet the set conditions are specifically: setting a gradient threshold, for the pixel points in the gradient image whose gradient values ​​are greater than the gradient threshold, obtaining the pixel point with the largest gradient value in the gradient direction of the pixel point as a candidate edge point according to the gradient image obtained in S21.

10. The image registration method according to claim 1, characterized in that: The S5 includes: S51, using the preoperative 3D image as a fixed image and the intraoperative 2D image of the implant removal as a moving image, setting an initial transformation relationship between a 3D image coordinate system corresponding to the fixed image and a C-arm coordinate system corresponding to the moving image; S52, applying an initial transformation relationship to the C-arm coordinate system, thereby obtaining a DRR image of the fixed image, and calculating a similarity measure between the obtained DRR image of the fixed image and the moving image; S53, optimizing the current transformation relationship between the DRR image of the fixed image and the moving image by a gradient descent optimization algorithm until the set conditions are met, thereby obtaining a final transformation relationship between the two images, and thereby obtaining a registration result of the two images.