A method for extracting marker points from three-dimensional images
Patent Information
- Application Number
- CN202011581894.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-12-28
Smart Images

Figure CN112651943B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a method for extracting three-dimensional image marker points. Background Art
[0002] In recent years, as surgical operations have higher speed and higher precision requirements for clinical operations, medical surgical robots have developed rapidly. Currently, surgical robots have been widely used in surgical medical fields such as orthopedics and neurosurgery. At present, surgical robots all use independent systems, and their main functional modules include system software, hardware auxiliary facilities, human-computer interaction and display units, etc., and image-based navigation and positioning is one of its core technologies. In the navigation and positioning process of the surgical robot, it is generally necessary to place positioning markers in the scene, use a three-dimensional C-arm to perform three-dimensional reconstruction of the positioning markers, and then automatically identify the markers in the three-dimensional image through image processing. The relationship between the markers and the physical reference system in the surgical space is used to establish a mapping relationship between the image coordinate system and the surgical space coordinate system, thereby achieving the purpose of planning on the three-dimensional image. Therefore, the extraction accuracy of the marker position in the three-dimensional image space will directly affect the final surgical accuracy of the surgical robot. Summary of the invention
[0003] Purpose of the invention: In view of the above-mentioned problems, the present invention provides a robust and high-precision three-dimensional image marker point extraction method, which can be applied to more complex surgical scenes and has high marker point extraction accuracy. It has important application value in improving the positioning accuracy of surgical robots, facilitating operation and application in actual surgical environments, and improving surgical efficiency.
[0004] Technical solution:
[0005] A method for extracting marker points from a three-dimensional image comprises the following steps:
[0006] (1) Perform grayscale histogram analysis on the 3D image point cloud data to obtain a candidate point set of marker points, and perform 3D connected domain segmentation to obtain several point set connected domains;
[0007] (2) Screening the point set connected domain in step (1) to obtain a candidate point set connected domain, and extracting the centroid to obtain the centroid point set of the candidate point set connected domain;
[0008] (3) searching for a point set with a corresponding positional relationship in the centroid point set in step (2) based on the positional relationship between the marking points during design, and obtaining a connected domain of the marking point set;
[0009] (4) Search for valid points nearby the connected domain of the marker point set to obtain the precise position of the marker point in the three-dimensional image.
[0010] The grayscale histogram analysis of the three-dimensional image point cloud data in step (1) is specifically as follows: the grayscale range of the three-dimensional image point cloud data is equally divided into a certain number of grayscale intervals, and the number of points in each grayscale interval is counted respectively, and a histogram is drawn based on this.
[0011] The candidate point set of marking points screened in step (1) is specifically:
[0012] (11) Based on the volume sum of all the marking points during design and the physical scale of a single voxel of the 3D image point cloud data, the theoretical number of points N occupied by all the marking points in the 3D image point cloud data is calculated. s ;
[0013] (12) According to the number of points in each grayscale interval in the grayscale histogram, the number of points in the screening point set is accumulated from the grayscale interval with high grayscale value to the grayscale interval with low grayscale value. When the accumulated number of points in the screening point set is closest to the reference number of marking points, the current accumulated screening point set is determined to be the candidate point set of all marking points; wherein the reference number is 5 to 10 times the theoretical number.
[0014] The reference number is greater than the sum of the numbers of all points with grayscale values above 10,000.
[0015] The connected domain of the candidate point set is screened in step (2) using the volume principle and the bounding box criterion;
[0016] Filter out the connected domains of point sets with too many points through the volume principle;
[0017] The bounding box criterion refers to a single point set connected domain and calculates the coordinate range of all points in this point set connected domain.
[0018] This coordinate range corresponds to a bounding box cube, with length, width, and height respectively; where length represents the maximum difference in coordinates of all points in the connected domain of this point set on the x-axis, width represents the maximum difference in coordinates of all points in the connected domain of this point set on the y-axis, and height represents the maximum difference in coordinates of all points in the connected domain of this point set on the z-axis;
[0019] Filter out the connected domains of point sets with η>5.
[0020] In the step (3), the point set with the corresponding positional relationship is searched in the centroid point set of step (2) by the positional relationship between the marking points during design, specifically as follows:
[0021] (31) The centroid point set of the connected domain of the candidate point set obtained according to step (2) is P m , m represents the number of connected domains of the candidate point set, m>l, l is the number of marked points;
[0022] (32) From the centroid point set P m Take out l points from the set to form a matching point set, and judge the position relationship between the points in the matching point set and the design point set P l Check whether the positional relationship between the marking points matches; if so, the point set connected domain composed of the to-be-matched point set is used as the marking point set connected domain; if not, repeat this step.
[0023] After determining the connected domain of the marked point set, the point set to be matched is transferred to the design coordinate system, and the converted point set to be matched is compared with the design point set P. l The average distance between all corresponding points is taken as the shape error, that is
[0024]
[0025] In the formula To convert the set of points to be matched into the coordinates of the tth point in the design coordinate system, p t The design point set P l The coordinates of the tth point in the figure; when the shape error ε is less than the set threshold δ, it is considered that the point set connected domain composed of the point set to be matched is the point set connected domain corresponding to all the marked points.
[0026] The shape threshold δ is set according to accuracy requirements.
[0027] In the step (4), the precise position of the marker point in the three-dimensional image is obtained by searching for nearby valid points on the connected domain of the marker point set as follows:
[0028] (41) For each point set connected domain, the minimum gray value of all points in the current point set connected domain is taken as the dynamic screening threshold;
[0029] (42) increasing the set step size of the dynamic screening threshold to obtain a new dynamic screening threshold, and filtering the connected domain of the current point set;
[0030] (43) Perform spherical fitting on the point set filtered by step (42), and calculate the fitting error and the diameter of the fitting sphere; the fitting error is defined as the average value of the distance from the point on the surface of the fitting sphere to the center of the fitting sphere, that is:
[0031]
[0032] Among them, w is the number of points on the surface of the fitted sphere in the current point set connected domain, c h represents the hth point on the surface of the fitting sphere, c0 represents the center of the fitting sphere, and r represents the radius of the fitting sphere;
[0033] (44) Repeat steps (42) and (43) until a point set connected domain is obtained that satisfies the fitting error less than the set threshold and the fitting diameter is closest to the size of the marking point during design, which is the optimal point set connected domain.
[0034] The setting step size is 10, and the setting threshold is 0.2 mm.
[0035] Beneficial effects: The present invention is not limited to the actual surgical scene, and the precise positioning of the marker point position in the image depends on the local grayscale features near the marker point area because of its high stability and extraction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flow chart of the present invention.
[0037] Figure 2 Schematic diagram of the three-dimensional image data obtained by scanning.
[0038] Figure 3 for Figure 2 Schematic diagram of grayscale histogram analysis.
[0039] Figure 4 Schematic diagram of the selected candidate point set.
[0040] Figure 5 Schematic diagram of connected domain segmentation.
[0041] Figure 6 Schematic diagram of the connected domain of the point set corresponding to each marked point.
[0042] Figure 7 For Figure 6 Schematic diagram of the connected domain after refined search. DETAILED DESCRIPTION
[0043] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments.
[0044] Figure 1 It is a flow chart of the present invention, as Figure 1 As shown, the method for extracting marker points from a three-dimensional image of a surgical robot in a specific embodiment of the present invention refers to a solid spherical steel ball having a high gray value in the three-dimensional image, and includes the following steps:
[0045] (1) Perform grayscale histogram analysis on the 3D image point cloud data to obtain the number of points in each grayscale interval;
[0046] The 3D image point cloud data reconstructed by C-arm scanning is 16-bit data with a grayscale range of [0,65536]. Here, the grayscale range is divided into a certain number of grayscale intervals. In the present invention, 1000 equal divisions are taken, and the range of each grayscale interval is k. i= 66 * [i, i + 1], i = [0, 999]; The 3D image point cloud data for one scan is as follows Figure 2 shown (window level 550, window width 350, and the marked points are 5 steel balls with a diameter of 4 mm), and the analyzed gray level histogram is as follows Figure 3 shown, where the abscissa represents the gray level value and the ordinate represents the quantity; The gray level of the steel balls in the 3D image point cloud data shows a relatively high value, and the corresponding gray level range > 10,000;
[0047] (2) According to the gray level histogram, initially screen out the candidate point set of the marked points from the 3D image point cloud data;
[0048] The gray level of the marked points is at a high value in the 3D image point cloud data, and based on the sum of the volumes of all marked points available during design and combined with the physical scale of a single voxel in the 3D image point cloud data, the theoretical number N of the point set occupied by all marked points in the 3D image point cloud data can be obtained s , and in step (1), the number of points in each gray level interval has been counted. Then, the number of points in the screening point set is accumulated from the gray level interval with a high gray level value to the gray level interval with a low gray level value. When the accumulated number of points in the screening point set is closest to the reference number of the marked points, it can be considered that the currently accumulated screening point set is the candidate point set of all marked points. Here, the reference number can be several times the theoretical number, generally taking 5 - 10 times; Refer to the gray level histogram Figure 3 , theoretically, the reference number being greater than the sum of the number of all points with a gray level value above 10,000 is sufficient, which can ensure that the candidate point set is a point set in a limited area;
[0049] The formula is expressed as follows:
[0050]
[0051] Among them, N t is the number of points in the screened candidate point set; N i is the number of points in the gray level interval i; λ is the magnification factor of the theoretical point set, and in this example, λ takes 5; n is the number of equally divided intervals, and in the current example, n takes 1000; k represents that when accumulating to the gray level interval k, the number of points in the screening point set is closest to the reference number. Here, the closest means that when the reference number is Q, when accumulating to the gray level interval q, the number of points in the screening point set is Q1, and when accumulating to the gray level interval q + 1, the number of points in the screening point set is Q2. If Q - Q1 < Q2 - Q, then it is considered that Q1 is closer to Q, that is, the closest. Then, at this time, only accumulate to the gray level interval q; The candidate point set screened according to the above parameters in the current example is shown in Figure 4 shown. It can be seen from the figure that the candidate point set also contains other point sets that do not belong to the marked points, and there are relatively large artifact points in the marked point set area;
[0052] (3) Segment the candidate point set into three-dimensional connected domains, dividing the candidate point set into connected domains of point sets;
[0053] The connected domain here is defined as the point set area composed of mutually adjacent points. Here, two points in space are adjacent if the difference in their coordinate values on any of the coordinate axes x, y, and z is less than 1. Then a point in space is adjacent to 27 points in space. All point sets are screened for connected domains, and adjacent points are classified as a point set connected domain. Then Figure 4 It is divided into 7 point set connected domains, including two point set connected domains 6 and 7 that do not belong to the marked point area. Figure 5 As shown;
[0054] (4) Screening the point set connected domain obtained in step (3), omitting the point set connected domain that is obviously not the marked point area, and obtaining the candidate point set connected domain;
[0055] The volume principle and bounding box principle are mainly used here: the volume principle is to filter out the connected domains of point sets with too many points, that is, the number of points N in the current connected domain of point set j (j = 1, 2, ..., 7) j Must be less than the volume quantity threshold, i.e. N j <φN s Here, the volume threshold is φ times the theoretical number of marker points. In this example, φ is 100. The bounding box criterion is to calculate the coordinate range of all points in the connected domain of a single point set [x min ,x max ]、[y min ,y max ]、[z min ,z max ], where x min Represents the minimum value of the coordinates of all points in the connected domain of this point set on the x-axis, x max Represents the maximum value of the coordinate values of all points in the connected domain of this point set on the x-axis, y min Represents the minimum value y among the coordinate values of all points on the y-axis in the connected domain of this point set max Represents the maximum value of the coordinate values of all points in the connected domain of this point set on the y-axis, z min Represents the minimum value of the coordinates of all points in the connected domain of this point set on the z-axis, z max Represents the maximum value of the coordinate values of all points in the connected domain of this point set on the z-axis; this coordinate range corresponds to a bounding box cube, with a length, width and height of:
[0056] length = x max -x min
[0057] width=y max -y min
[0058] height=z max -z min
[0059] In this example, the long point set connected domain with η>5 is filtered out. In the current example, the point set connected domain 6 can be filtered out according to the bounding box criterion;
[0060] (5) Extracting the centroid of the selected point set connected domain as the initial position of the center of the point set connected domain, and obtaining the centroid point set of the candidate point set connected domain;
[0061] (6) According to the positional relationship between the marking points during design, a point set with a corresponding positional relationship is searched in the centroid point set of the connected domain of the candidate point set to determine the corresponding point set connected domain positions of all the marking points in the three-dimensional image point cloud data;
[0062] Because the positions of all marking points are pre-designed, the positional relationship between them is determined. The positional relationship here is represented by the central coordinate set of each marking point in the pre-designed design coordinate system. In this example, the design point set P l = {p1, p2, p3, p4, p5}, l is the number of marking points in the design, here l is 5; according to step (4), the centroid point set of the connected domain of the candidate point set in the three-dimensional image point cloud data is obtained as P m , m represents the number of connected domains of the candidate point set, m>l; from the centroid point set P m Take out l points in order, and we have possible point sets to be matched, and compare each point set to be matched with the design point set P l Matching is performed to determine the shape error between the two. The matching method here adopts the rigid body registration method (common solutions include SVD decomposition, QR decomposition, etc.), and the point set to be matched is transferred to the design coordinate system. The average distance between all corresponding points between the two point sets after the conversion is taken as the shape error, that is,
[0063]
[0064] In the formula To transform the point set to be matched to the coordinates of the tth point in the design coordinate system. When the shape error ε is less than the set threshold δ, the connected domain of the point set corresponding to all the marked points in the three-dimensional image can be preliminarily identified. The set threshold δ here is set according to the accuracy requirements. In the current example, δ is 0.1mm;
[0065] (7) Searching for nearby valid points in the connected domain of the identified marker point, accurately determining the best connected domain of the point set corresponding to the marker point based on the shape characteristics, ball size and other characteristics, and using the center of the connected domain of the point set as the precise position coordinate of the marker point in the three-dimensional image;
[0066] In step (6), the point set connected domain φ corresponding to each marked point has been determined from the candidate point set connected domain i ,See Figure 6 However, due to the presence of artifacts in the image, the connected domain of the current point set is not completely the same as the shape of the steel ball. In the current example, the marked point is a steel ball with a diameter of 4 mm. Figure 6 It can be seen that the single point set connected domain selected is not spherical. Here, for each point set connected domain, the minimum gray value of all points in the current point set connected domain is taken as the dynamic screening threshold Increase this threshold by a certain step length step, filter the connected domain of the current point set, in the current example, the step is 10, perform sphere fitting on the filtered point set each time, calculate the fitting error and the diameter of the fitting sphere, the fitting error is defined as the average distance from the point on the surface of the fitting sphere to the center of the fitting sphere, that is: w is the number of points on the surface of the fitted sphere in the connected domain of the current point set, c h represents the hth point on the surface of the fitting ball, c0 represents the center of the fitting ball, and r represents the radius of the fitting ball. When the fitting error is less than the set threshold (the threshold in the current example is 0.2mm), and the point set connected domain with the fitting diameter closest to the designed steel ball size is the optimal point set connected domain. In the example, the connected domain after a fine search of the point set connected domain after the previous step is shown in Figure 7 shown.
[0067] The present invention is not limited to the actual surgical scene, and the precise positioning of the position of the marker point in the image depends on the local grayscale features near the marker point area because of its high stability and extraction accuracy.
[0068] The preferred embodiments of the present invention are described in detail above, but the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations (such as quantity, shape, position, etc.) can be made to the technical scheme of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.
Claims
1. A method for extracting marker points from a three-dimensional image, characterized in that: Includes steps: (1) grayscale histogram analysis is performed on the three-dimensional image point cloud data. According to the number of points in each grayscale interval in the grayscale histogram, the points are accumulated from the grayscale interval with high grayscale value to the grayscale interval with low grayscale value as the screening point set. When the number of accumulated points is closest to the set reference number of marking points, the current accumulated screening point set is identified as the candidate marking point set, and the three-dimensional connected domain segmentation is performed to obtain a number of point set connected domains; (2) The point set connected domain in step (1) is screened by using the volume principle and the bounding box criterion to obtain a candidate point set connected domain, and the centroid is extracted to obtain the centroid point set of the candidate point set connected domain; (3) A number of points are taken from the centroid point set of the connected domain of the candidate point set obtained in step (2) to form a point set to be matched, and it is determined whether the positional relationship between the points in the point set to be matched matches the positional relationship between the marking points in the design point set during design. If they match, the connected domain of the point set formed by the point set to be matched is used as the connected domain of the marking point set; if they do not match, this step is repeated; (4) Searching for nearby valid points in the connected domain of the marker point set to obtain the precise position of the marker point in the three-dimensional image; The search for nearby valid points is: For each point set connected domain, a dynamic screening threshold is found and filtered, and spherical fitting is performed on each filtered point set connected domain. The obtained fitting error is less than the set threshold and the fitting diameter is closest to the design mark point size. The filtered point set connected domain is taken as the optimal point set connected domain, which is the precise position of the mark point in the three-dimensional image.
2. The three-dimensional image marker extraction method according to claim 1, characterized in that: The grayscale histogram analysis of the three-dimensional image point cloud data in step (1) is specifically as follows: the grayscale range of the three-dimensional image point cloud data is equally divided into a set number of grayscale intervals, and the number of points in each grayscale interval is counted respectively, and a histogram is drawn based on this.
3. The three-dimensional image marker extraction method according to claim 1, characterized in that: In the step (1), the reference number is set to be 5 to 10 times the theoretical number, wherein the theoretical number of points occupied by all the marking points in the three-dimensional image point cloud data is calculated based on the volume sum of all the marking points during design and the physical scale of a single voxel of the three-dimensional image point cloud data.
4. The method for extracting three-dimensional image marker points according to claim 3, characterized in that: The reference number is greater than the sum of the numbers of all points with grayscale values above 10,000.
5. The method for extracting three-dimensional image marker points according to claim 1, characterized in that: The connected domain of the candidate point set is screened in step (2) using the volume principle and the bounding box criterion; Filter out the connected domains of point sets with too many points through the volume principle; The bounding box criterion refers to a single point set connected domain, and calculates the coordinate range of all points in this point set connected domain. This coordinate range corresponds to a bounding box cube, with length, width, and height respectively; among which, length represents the maximum difference of the coordinates of all points in this point set connected domain on the x-axis, width represents the maximum difference of the coordinates of all points in this point set connected domain on the y-axis, and height represents the maximum difference of the coordinates of all points in this point set connected domain on the z-axis; Then define the scale characteristics of the bounding box Filter out the connected domains of point sets with η>
5.
6. The method for extracting marker points from a three-dimensional image according to claim 1, wherein: After determining the connected domain of the marked point set, the point set to be matched is transferred to the design coordinate system, and the average distance between all corresponding points between the point set to be matched and the design point set after the conversion is taken as the shape error, that is, In the formula To convert the set of points to be matched into the coordinates of the tth point in the design coordinate system, p t is the coordinate of the tth point in the design point set, l is the number of marked points in the design; when the shape error ε is less than the set shape threshold δ, it is considered that the point set connected domain composed of the point set to be matched is the point set connected domain corresponding to all marked points.
7. The method for extracting three-dimensional image marker points according to claim 6, characterized in that: The shape threshold δ is set according to accuracy requirements.
8. The method for extracting three-dimensional image marker points according to claim 1, characterized in that: In the step (4), the optimal point set connected domain is obtained as follows: (41) For each point set connected domain, the minimum gray value of all points in the current point set connected domain is taken as the dynamic screening threshold; (42) increasing the set step size of the dynamic screening threshold to obtain a new dynamic screening threshold, and filtering the connected domain of the current point set; (43) Perform spherical fitting on the point set filtered in step (42), and calculate the fitting error and the diameter of the fitting sphere; the fitting error is defined as the average value of the distance from the point on the surface of the fitting sphere to the center of the fitting sphere, that is: Among them, w is the number of points on the surface of the fitted sphere in the current point set connected domain, c h represents the hth point on the surface of the fitting sphere, c0 represents the center of the fitting sphere, and r represents the radius of the fitting sphere; (44) Repeat steps (42) and (43) until a point set connected domain is obtained that satisfies the fitting error less than the set threshold and the fitting diameter is closest to the size of the marking point during design, which is the optimal point set connected domain.
9. The method for extracting marker points from a three-dimensional image according to claim 8, characterized in that: The setting step size is 10, and the setting threshold is 0.2 mm.
