Disclosure of Invention
In order to solve the above problems in the prior art, the present invention provides a method and an apparatus for aligning a stent based on a cardiovascular OCT image. The technical problem to be solved by the invention is realized by the following technical scheme:
one aspect of the present invention provides a stent alignment method based on cardiovascular OCT images, comprising:
s1: loading a plurality of instant OCT images and a plurality of follow-up OCT images which are collected at the same blood vessel section;
s2: detecting a location of a stent in a blood vessel based on the instantaneous OCT image and the follow-up OCT image, respectively;
s3: aligning a stent derived based on the immediate OCT image with a stent derived based on the follow-up OCT image;
s4: output the aligned images of the two stents.
In an embodiment of the present invention, the S2 includes:
s21: respectively carrying out polar coordinate transformation on the instant OCT image and the follow-up OCT image so as to respectively obtain a polar coordinate instant OCT image and a polar coordinate follow-up OCT image;
s22: respectively detecting probability values of stent contained in points on all A lines in the polar coordinate immediate OCT image and the polar coordinate follow-up OCT image by using a Bayesian network;
s23: extracting points with the probability value larger than 0.5, and connecting the points with the probability value larger than 0.5 according to the weight by using a minimum spanning tree to form a connecting path;
s24: obtaining final A line data containing the bracket according to the connection path;
s25: and respectively determining the threshold values of the foreground and the background on the polar coordinate immediate OCT image and the polar coordinate follow-up OCT image through a three-dimensional graph search algorithm, and respectively obtaining the positions of the stent in the polar coordinate immediate OCT image and the polar coordinate follow-up OCT image.
In an embodiment of the present invention, the S24 specifically includes:
judging whether a point with a probability value larger than 0.1 obtained through the bayesian network in the step S22 is included in the connection path, if so, judging that the point is a stent point, and keeping an a line where the point is located; if the point is not included in the connection path, judging that the point is not a support point, and removing the line A where the point is located to obtain final line A data containing the support;
in an embodiment of the present invention, the S22 further includes:
and respectively detecting the probability values of the stent contained in all points on the A line in the polar coordinate immediate OCT image and the polar coordinate follow-up OCT image by utilizing a Bayesian network according to the distance between the blood vessel profile and the catheter, the image gray average value within a set range away from the blood vessel profile and the distance between the stent and the blood vessel profile.
In an embodiment of the present invention, the S3 includes:
s31: respectively constructing a 3D model for the detected stent in the follow-up OCT image and the stent in the instant OCT image;
s32: matching corresponding stent points in the stent 3D model of the follow-up OCT image and the stent 3D model of the immediate OCT image and calculating the offset ER of the corresponding stent points;
s33: comparing the offset ER with a preset offset threshold, if the offset ER is smaller than the offset threshold, ending the matching process, and outputting a final rotation angle and a final translation parameter; if the offset ER is larger than the offset threshold, entering S34;
s34: calculating a rotation angle R and a translation parameter required by the instant support point to move to a follow-up support point matched with the instant support point by utilizing an SVD algorithm
And calculating the offset ER after the rotation;
s35: rotation angle R and translation parameter obtained for S34
Calculating to judge whether the ICP acceleration algorithm condition is met, and if so, executing S36; if not, execute 37;
s36: performing accelerated iteration and updating the rotation angle R and the translation parameters
Subsequently, S37 is executed;
s37: according to the rotation angle R and the translation parameter
Transforming stent center point data in the immediate stent 3D model;
s38: matching corresponding stent points in the stent 3D model of the follow-up OCT image and the stent 3D model of the immediate OCT image again, calculating the offset ER, returning to execute S33 until the offset ER is smaller than an offset threshold, ending the matching process, and outputting a final rotation angle and a final translation parameter.
In an embodiment of the present invention, the S32 includes:
using formulas
Performing a closest point search to match stent points of the follow-up data with stent points of the corresponding immediate data, wherein A (x)
a,y
a,z
a) The coordinates of the follow-up stent points, B (x), are shown
b,y
b,z
b) Coordinates representing the instantaneous stent point;
using formulas
Calculating an offset ER, wherein d (A, B) is the distance between the stent points of the follow-up data and the stent points of the matched instant data, and N is the number of the stent points.
In one embodiment of the invention, a formula is utilized
Performing a closest point search, comprising:
using formulas
And accelerating search is carried out on corresponding stent points in the stent 3D model of the follow-up OCT image and the stent 3D model of the instant OCT image by using a Kd tree acceleration algorithm so as to reduce the time required for matching the stent points in the two groups of data.
In an embodiment of the present invention, the S4 includes:
s41: integrally transforming the immediate OCT image according to the final rotation angle and the final translation parameter, so that the stent of the follow-up OCT image is integrally aligned with the stent of the immediate OCT image;
s42: output the aligned images of the two stents.
Another aspect of the present invention provides a stent alignment device based on cardiovascular OCT images, comprising a digital signal processing unit and a storage unit, wherein the storage unit is used for storing processing instructions, and the processing instructions, when executed by the digital signal processing unit, implement the steps of any one of the methods in the above embodiments.
Compared with the prior art, the invention has the beneficial effects that:
1. according to the stent alignment method based on the cardiovascular OCT image, in the process of stent matching, Kd tree acceleration algorithm is used for accelerating search, so that the time used in the step of stent matching is reduced.
2. According to the method for aligning the stent based on the cardiovascular OCT image, the rotation angle and the translation parameter required by the immediate stent point are calculated by using the SVD algorithm in the step of aligning the stent, iteration is not required in the solving process, the completion time of the whole step is reduced, and the time for matching the stent is reduced.
Detailed Description
The present invention will be described in further detail with reference to specific examples, but the embodiments of the present invention are not limited thereto.
The first embodiment is as follows:
referring to fig. 1, fig. 1 is a general flowchart of a stent alignment method based on cardiovascular OCT images according to an embodiment of the present invention, where the stent alignment method includes:
s1: loading a plurality of instant OCT images and a plurality of follow-up OCT images which are collected at the same blood vessel section;
s2: detecting a location of a stent in a blood vessel based on the instantaneous OCT image and the follow-up OCT image, respectively;
s3: aligning a stent derived based on the immediate OCT image with a stent derived based on the follow-up OCT image;
s4: output the aligned images of the two stents.
Referring to fig. 2, fig. 2 is a flowchart of stent detection according to an embodiment of the present invention. In this embodiment, the whole rack detecting step S2 is performed under polar coordinates, and specifically includes:
s21: respectively carrying out polar coordinate transformation on the instant OCT image and the follow-up OCT image so as to respectively obtain a polar coordinate instant OCT image and a polar coordinate follow-up OCT image;
s22: the probability values of the stent contained in the points on all the a lines in the polar instantaneous OCT image and the polar follow-up OCT image are respectively detected by using a bayesian network, and in this embodiment, the probability values are mainly determined according to three properties: the distance from the blood vessel contour to the catheter, the gray average value within 1.5mm below the blood vessel contour and the distance from the stent to the blood vessel contour;
s23: extracting points with the probability value larger than 0.5, and connecting the points with the probability value larger than 0.5 according to the weight by using a minimum spanning tree to form a connecting path;
s24: obtaining final A-line data containing the stent according to the connection path, specifically, determining whether a point with a probability value greater than 0.1 obtained through the Bayesian network in step S22 is included in the connection path, if the point is included in the connection path, determining that the point is a stent point, and reserving an A-line where the point is located; if the detected position is not included in the connection path, judging that the point is not a bracket point, removing the line A where the point is located to obtain final data of the line A containing the bracket, and removing some bracket points which are detected in error in the step and combining the result obtained in the step S22 to obtain a more accurate detection result;
s25: and respectively determining the threshold values of the foreground and the background on the polar coordinate immediate OCT image and the polar coordinate follow-up OCT image through a three-dimensional graph search algorithm, and respectively obtaining the positions of the stent in the polar coordinate immediate OCT image and the polar coordinate follow-up OCT image, wherein the foreground part refers to a blood vessel section in the OCT image, and the background part refers to other background areas in the image. In this embodiment, the threshold is determined by a max-flow min-cut algorithm, and according to a three-dimensional image search algorithm, we can construct a weight-based scaffold point 3D model, and determine the threshold by the max-flow min-cut algorithm according to the weight, so as to segment the target and the background.
Referring to fig. 3a and 3b together, fig. 3a is an OCT image of the cardiovascular system in cartesian coordinate space, showing the contour of the inner wall of the blood vessel, a guide wire at the center of the contour of the inner wall of the blood vessel, and a plurality of stent struts forming a stent against the inner wall of the blood vessel; fig. 3b is an image in polar coordinate space of the cardiovascular OCT image of fig. 3a, the position of the stent struts in the cardiovascular OCT image is detected by step S2 and marked by a bright cross (+) and the marking result is shown in fig. 3 b.
In the embodiment, in the process of stent detection, the probability that the OCT image contains a stent is detected through a bayesian network in a polar coordinate space, and some falsely detected stent points are removed through the step of minimum spanning tree algorithm, so that the accuracy of stent detection is improved through the combination of the bayesian network and the minimum spanning tree algorithm.
Example two:
referring to fig. 4, fig. 4 is a flowchart illustrating an algorithm of a step of aligning a stent according to an embodiment of the present invention. As shown, in this embodiment, the S3 includes:
s31: respectively constructing a 3D model for the detected stent in the follow-up OCT image and the stent in the instant OCT image;
in the present embodiment, the process of constructing the 3D stent model in step S31 mainly depends on (in a polar coordinate system):
wherein z isstrutIs the z-axis value, z, of the scaffold in the 3D modelplaneIs the position of the longitudinal axis, thetastrutIs the angle of line A containing the stent in polar coordinates, DfThe a lines refer to all axial lines radiating outward from the center point of the blood vessel contour in the OCT image in cartesian coordinate space, corresponding to all vertical lines in the OCT image in polar coordinate, for the acquisition interval of two adjacent frames. And transforming the data of the stent points detected from each OCT image by the formula to finally obtain the 3D model of the whole stent of the blood vessel section.
Referring to fig. 5, fig. 5 is a 3D stent model diagram formed by an instant stent and a follow-up stent according to an embodiment of the present invention, wherein solid dots represent the instant stent, hollow dots represent the follow-up stent, and the units of the three axes are all pixels. As can be seen, at this time, the 3D model of the instant stent and the 3D model of the follow-up stent are separately arranged in the 3D model space, and in order to be able to conveniently compare the structural difference between the instant stent and the follow-up stent, it is necessary to align the 3D models of the two stents, followed by step S32.
S32: matching corresponding stent points in the stent 3D model of the follow-up OCT image and the stent 3D model of the immediate OCT image and calculating the offset ER of the corresponding stent points;
in the present embodiment, step S32 includes:
using formulas
Performing a 3D model of both stentsA near stent point search matching stent points of the follow-up stent with stent points of the corresponding immediate stent, wherein A (x)
a,y
a,z
a) The coordinates of the follow-up stent points, B (x), are shown
b,y
b,z
b) Coordinates representing the instantaneous stent point;
using formulas
And calculating the offset ER between the support points of the follow-up support and the support points of the corresponding instant support, wherein d (A, B) is the distance between the support points of the follow-up data and the support points of the matched instant data, and N is the number of the support points.
In the present embodiment, the formula is used
Performing a closest point search, comprising:
using formulas
And accelerating search is carried out on corresponding stent points in the stent 3D model of the follow-up OCT image and the stent 3D model of the instant OCT image by using a Kd tree acceleration algorithm so as to reduce the time required for matching the stent points in the two groups of data.
S33: comparing the offset ER with a preset offset threshold, if the offset ER is smaller than the offset threshold, ending the matching process, and outputting a final rotation angle and a final translation parameter; if the offset ER is larger than the offset threshold, entering S34;
in one embodiment of step S33, the offset threshold is set to 10, and if the offset threshold is set too large, it means that the difference between the two 3D model stent points is allowed to increase, whereas if the offset threshold is set too small, it means that the difference between the two 3D model stent points is small. Because the follow-up stent is deformed relative to the immediate stent, the complete matching possibility of the immediate stent and the follow-up stent is low, and therefore the immediate stent and the follow-up stent are allowed to have a certain difference, so that the offset threshold value can be flexibly set according to actual needs, and is generally set to be 8-20 according to an empirical value.
S34: calculating the rotation angle R and the translation parameter required by moving the immediate stent point to the follow-up stent point by utilizing the SVD algorithm
And calculating the offset ER after the rotation;
in the present embodiment, let p be assumed
iAnd q is
iA pair of matched stent points in the two sets of data sets, namely the immediate stent and the follow-up stent, respectively, do not need iteration during the solution because the square sum of the distances of the matched stent points has a closed solution. Here, we use SVD algorithm to directly find the rotation angle R and offset
The SVD algorithm is an objective function
Minimized to obtain the optimal rotation angle R and translation parameters
The specific method of the SVD algorithm comprises the following steps: calculating the center coordinates of the matched support points:
wherein m is the number of immediate stent points, and n is the number of follow-up stent points.
The point-to-center deviation for each stent is:
definition of
And singular value decomposition G is carried out on G, G is U sigma V
TThen, it can be found that:
s35: rotation angle R and translation parameter obtained for S34
Calculating to judge whether the ICP acceleration algorithm condition is met, and if so, executing S36; if not, execute 37;
s36: performing accelerated iteration and updating the rotation angle R and the translation parameters
Subsequently, S37 is executed;
s37: according to the rotation angle R and the translation parameter
Updating stent center point data in the immediate stent 3D model;
s38: matching corresponding stent points in the stent 3D model of the follow-up OCT image and the stent 3D model of the immediate OCT image again, calculating the offset ER, returning to execute S33 until the offset ER is smaller than a threshold value, ending the matching process, and outputting a final rotation angle and a final translation parameter.
Referring to fig. 6 and 7, fig. 6 is a diagram illustrating a model of a stent alignment result obtained after a first cycle by a stent alignment method according to an embodiment of the present invention; fig. 7 is a model diagram of a final stent alignment result obtained by the stent alignment method according to the embodiment of the present invention, wherein a black box represents a stent mismatch. As shown, the alignment of the follow-up stent and the immediate stent is finally achieved through multiple calculations and updates of the rotation angle and translation parameters.
Referring to fig. 8, fig. 8 is a graph showing the variation of the offset ER with the number of iterations in the stent alignment process. As shown, the offset ER decreases with increasing number of iterations and eventually approaches zero, at which point the alignment process is completed for the follow-up stent and the immediate stent.
Next, in this embodiment, the S4 specifically includes:
s41: performing integral transformation on the instant OCT image according to the final rotation angle and the final translation parameter, so that the stent of the follow-up OCT image is integrally aligned with the stent of the instant OCT image;
s42: output the aligned images of the two stents.
In addition, please refer to fig. 9, fig. 9 is a schematic diagram of an image display interface according to an embodiment of the present invention. In this embodiment, the image display interface of the stent alignment image includes A, B, C, D, E five regions as shown in the figure, wherein region a shows the instantaneous OCT image, region B shows the follow-up OCT image at the same position of the blood vessel as the instantaneous OCT image in region a, region C shows a longitudinal cross-sectional view of all the instantaneous OCT images acquired at a certain blood vessel segment, region D shows a longitudinal cross-sectional view of all the follow-up OCT images acquired at the same blood vessel segment, and region E shows the alignment image of the follow-up stent and the instantaneous stent.
The black straight lines in the areas C and D represent the positions of the instantaneous OCT image of the area a and the follow-up OCT image of the area B in all OCT image sets, the black straight lines in the area E represent the positions of the instantaneous OCT image of the area a and the follow-up OCT image of the area B in the alignment support, that is, the displayed images in the five areas have a mutual correspondence, and when the black straight line in any one area of the dragging C, D, E moves, the black straight line positions of the other two areas also move, and at the same time, the OCT images in the A, B area also change accordingly, so that the interface arrangement is favorable for clearer contrast support alignment results.
In the embodiment, the stent alignment method based on the cardiovascular OCT image uses Kd tree acceleration algorithm to perform accelerated search in the stent matching process, so that the time used in the stent matching step is reduced. In addition, the support alignment method based on the cardiovascular OCT images calculates the rotation angle and translation parameters required by the immediate support point by using the SVD algorithm in the support alignment step, the solution process does not need iteration, and the completion time of the whole step is reduced, so that the support matching time is reduced.
Example three:
referring to fig. 10, fig. 10 is a schematic structural diagram of a stent alignment device based on a cardiovascular OCT image according to an embodiment of the present invention. As shown in the figure, the stent alignment device based on the cardiovascular OCT image of the present embodiment includes:
the system comprises a detection unit, an imaging unit, a data processing unit and a display unit which are connected in sequence, wherein the data processing unit comprises the following modules which are connected in sequence:
the image input module is used for inputting an instant OCT image and a follow-up OCT image which are acquired at the same position of the blood vessel section;
the stent detection module is used for respectively detecting the positions of the stent in the immediate OCT image and the follow-up OCT image;
the bracket alignment module is used for aligning the bracket in the follow-up image 3D model and the immediate image 3D model;
the image output module is used for inputting an alignment image of the bracket; wherein the content of the first and second substances,
the image input module is connected to the imaging unit, and the image output module is connected to the display unit.
In this embodiment, the data processing unit further includes:
the coordinate transformation module is used for converting the instant OCT image and the follow-up OCT image into OCT images in a polar coordinate space;
and the 3D simulation module is connected between the stent detection module and the stent alignment module and is used for respectively constructing a 3D model for the detected stent of the follow-up OCT image and the stent of the instant OCT image.
An embodiment of the present invention further provides another stent alignment device based on cardiovascular OCT images, which includes a digital signal processing unit and a storage unit, where the storage unit is used to store processing instructions, and the processing instructions, when executed by the digital signal processing unit, implement the steps in the method of any of the above embodiments.
By the stent alignment device based on the cardiovascular OCT images, automatic registration can be performed on cardiovascular OCT images acquired at different times, so that automatic alignment of the same stent at different times can be realized, and a user can directly compare the difference between instant data and follow-up data, thereby judging various vascular reactions after the stent is implanted.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.