Marker coordinate determination method and related apparatus
By using Gaussian difference and clustering processing, the coordinates of markers in CT images are automatically determined, solving the problem of low efficiency in determining the coordinates of markers in CT images and improving the precision of minimally invasive surgery and the registration accuracy between optical measurement equipment and CT equipment.
Patent Information
- Application Number
- CN202210336157.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2042-03-31
AI Technical Summary
In existing technologies, the efficiency of determining the coordinates of markers in CT images is low, making it difficult to achieve accurate registration between the coordinate systems of optical measuring equipment and CT equipment, which affects the precision of minimally invasive surgery.
By using Gaussian difference processing to highlight marker regions in CT images and performing clustering, the coordinates of the markers are automatically determined.
It enables efficient and accurate determination of marker coordinates from CT images, improves the registration accuracy between the coordinate systems of optical measurement equipment and CT equipment, and supports precise navigation in minimally invasive surgery.
Smart Images

Figure CN116934656B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a method and related apparatus for determining the coordinates of markers. Background Technology
[0002] With the continuous development of computer science and technology, medical technology has also ushered in major breakthroughs, leading to the increasingly widespread application of minimally invasive surgery. Minimally invasive surgery relies on surgical navigation systems, which need to correlate the patient's position in actual space with the three-dimensional reconstructed anatomical structures to achieve real-time navigation.
[0003] Since the patient's position information in actual space is obtained through optical measurement equipment, while the anatomical structure of the three-dimensional reconstruction is obtained through computed tomography (CT) equipment, and the two use different coordinate systems, multiple markers can be attached to the patient's body surface, and coordinates can be collected using optical measurement equipment and CT equipment respectively to obtain coordinate set A and coordinate set B. Then, coordinate set A and coordinate set B are registered to achieve the registration between the two coordinate systems.
[0004] The surface of the marker includes a reflective coating, and optical measuring equipment can acquire the marker's coordinates using the principle of reflection. However, CT equipment acquires CT images, therefore, it is necessary to determine the marker's coordinates from the CT images. Summary of the Invention
[0005] This application provides a method and related apparatus for determining the coordinates of markers. This application uses Gaussian difference processing to highlight the area where the marker is located in the CT image, and then performs clustering processing on the highlighted area to obtain the coordinates of the marker, which can automatically and effectively determine the coordinates of the marker in the CT image.
[0006] In a first aspect, embodiments of this application provide a device for determining the coordinates of a marker, comprising:
[0007] A first image is obtained, which is a CT image acquired by a computed tomography (CT) scanner. The first image includes N markers pasted on the body surface of the subject, where N is an integer greater than or equal to 1.
[0008] The first image is subjected to at least one Gaussian difference processing to obtain a second image, wherein the pixel value of the pixel point in the region where the N markers are located in the second image is greater than the pixel value of the pixel point in other regions.
[0009] Clustering is performed on the pixels in the second image whose pixel values are greater than or equal to the first threshold to obtain M candidate coordinates. The clustering process includes pixel distance-based clustering. The M candidate coordinates are determined based on the coordinates of the cluster centers obtained by the clustering process. M is an integer greater than or equal to N.
[0010] When M equals N, the M candidate coordinates are used as the coordinates of the N markers.
[0011] In one possible implementation, the above method further includes:
[0012] When M is greater than N, N candidate coordinates are selected from the M candidate coordinates as the coordinates of the N markers.
[0013] In one possible implementation, the markers include spherical markers, and when M is greater than N, selecting N candidate coordinates from the M candidate coordinates as the coordinates of the N markers includes:
[0014] Centered on the candidate coordinates, a third image is extracted from the second image. When the shape of the third image is circular, the area of the third image is larger than the area of the marker in the CT image. When the shape of the third image is non-circular, the third image has an inscribed circle with an area larger than the area of the marker in the CT image.
[0015] The third image above is subjected to circle detection processing. In the case of obtaining multiple circle center coordinates, the multiple circle center coordinates are subjected to a second clustering process to obtain candidate sphere center coordinates. The second clustering process is a clustering process based on the distance between circle center coordinates. The candidate sphere center coordinates are obtained according to the cluster containing the most circle center coordinates in the second clustering process.
[0016] Based on the above candidate sphere center coordinates, the above multiple circle center coordinates and the corresponding circle radii, multiple sphere radii are calculated. The above circle radii are obtained through the above circle detection processing. One of the above candidate sphere center coordinates corresponds to the above multiple sphere radii.
[0017] If the number K of candidate sphere center coordinates obtained based on the above M candidate coordinates is an integer less than or equal to the above M and greater than the above N, then N candidate coordinates that satisfy the first condition are selected from the K candidate sphere center coordinates. The first condition includes: the absolute value of the difference between the mean of the multiple sphere radii corresponding to the candidate sphere center coordinates and the radius of the above marker is less than or equal to the third threshold, and the variance of the multiple sphere radii corresponding to the above candidate sphere center coordinates is less than or equal to the fourth threshold.
[0018] The above N candidate coordinates are used as the coordinates of the above N markers.
[0019] In one possible implementation, the above method further includes:
[0020] When K equals N, the coordinates of the K candidate sphere centers are used as the coordinates of the N markers.
[0021] In one possible implementation, the markers include spherical markers, and the clustering of pixels in the second image whose pixel values are greater than or equal to a first threshold to obtain M candidate coordinates includes:
[0022] A first clustering process is performed on the pixels in the second image whose pixel values are greater than or equal to the first threshold to obtain S first candidate coordinates. The first clustering process is a pixel distance-based clustering process. The S first candidate coordinates are obtained from the coordinates of the cluster centers obtained by the first clustering process. S is an integer greater than or equal to N.
[0023] A third image is extracted from the second image with each of the first candidate coordinates as the center. When the shape of the third image is circular, the area of the third image is larger than the area of the marker in the CT image. When the shape of the third image is non-circular, the third image has an inscribed circle with an area larger than the area of the marker in the CT image.
[0024] The third image above is subjected to circle detection processing. In the case of obtaining multiple circle center coordinates, the multiple circle center coordinates are subjected to a second clustering process to obtain the candidate coordinates. The second clustering process is a clustering process based on the distance between circle center coordinates. The candidate coordinates are obtained according to the cluster containing the most circle center coordinates in the second clustering process.
[0025] Based on the above S first candidate coordinates, the above M candidate coordinates are obtained.
[0026] In one possible implementation, when M is greater than or equal to N, selecting N candidate coordinates from the M candidate coordinates as the coordinates of the N markers includes:
[0027] Based on the above candidate coordinates, the above multiple circle center coordinates and the corresponding circle radii, multiple sphere radii are calculated. The above circle radii are obtained through the above circle detection processing. One of the above candidate coordinates corresponds to the above multiple sphere radii.
[0028] From the above M candidate coordinates, N candidate coordinates that meet the first condition are selected. The first condition includes: the absolute value of the difference between the mean of the multiple sphere radii corresponding to the candidate coordinates and the radius of the above marker is less than or equal to the third threshold, and the variance of the multiple sphere radii corresponding to the above candidate coordinates is less than or equal to the fourth threshold.
[0029] The above N candidate coordinates are used as the coordinates of the above N markers.
[0030] In one possible implementation, the candidate coordinates are located outside the skin contour, and the distance between the candidate coordinates and the skin contour is less than or equal to a fifth threshold, which is determined based on the maximum distance between the center of the marker and the surface, and the skin contour is segmented from the first image.
[0031] In one possible implementation, when M is an integer greater than or equal to 2, the distance between any two candidate coordinates among the M candidate coordinates is greater than a sixth threshold, which is determined based on the distance between the centers of the two markers.
[0032] In one possible implementation, the marker affixed to the body surface of the subject includes a protective cover, the first image includes the protective cover, and obtaining the first image, which is based on a CT image acquired by a computed tomography (CT) scanner, includes:
[0033] Acquire CT images from the aforementioned CT equipment;
[0034] The CT image is binarized to obtain the first image. The binarization threshold in the binarization process is a value located between the pixel value range corresponding to the marker and the pixel value range corresponding to the protective cover in the original CT image. The pixel value range corresponding to the marker and the pixel value range corresponding to the protective cover do not overlap.
[0035] Secondly, embodiments of this application provide a device for determining the coordinates of a marker, comprising:
[0036] The obtaining unit is used to obtain a first image, which is obtained based on a CT image acquired by a computed tomography (CT) scanner. The first image includes N markers pasted on the body surface of the subject, where N is an integer greater than or equal to 1.
[0037] The first processing unit is configured to perform at least one Gaussian difference processing on the first image to obtain a second image, wherein the pixel value of the pixel point in the region where the N markers are located in the second image is greater than the pixel value of the pixel point in other regions.
[0038] The second processing unit is used to perform clustering processing on pixels in the second image whose pixel values are greater than or equal to a first threshold to obtain M candidate coordinates. The clustering processing includes pixel distance-based clustering processing. The M candidate coordinates are determined based on the coordinates of the cluster centers obtained by the clustering processing. M is an integer greater than or equal to N.
[0039] A determining unit is configured to use the M candidate coordinates as the coordinates of the N markers when M equals N.
[0040] In one possible implementation, the device further includes a filtering unit for filtering N candidate coordinates from the M candidate coordinates as the coordinates of the N markers when M is greater than N.
[0041] In one possible implementation, the marker includes a spherical marker, and the device further includes a cropping unit for cropping a third image from the second image with the candidate coordinates as the center. When the shape of the third image is circular, the area of the third image is larger than the area of the marker in the CT image. When the shape of the third image is non-circular, the third image has an inscribed circle with an area larger than the area of the marker in the CT image.
[0042] The above-mentioned device further includes a third processing unit, which is used to perform circle detection processing on the third image. When multiple circle center coordinates are obtained, a second clustering processing is performed on the multiple circle center coordinates to obtain candidate sphere center coordinates. The second clustering processing is a clustering processing based on the distance between circle center coordinates. The candidate sphere center coordinates are obtained according to the cluster containing the most circle center coordinates in the second clustering processing.
[0043] The above-mentioned device further includes a fourth processing unit, which is used to calculate multiple sphere radii based on the above-mentioned candidate sphere center coordinates, the above-mentioned multiple circle center coordinates and the corresponding circle radii, wherein the above-mentioned circle radii are obtained through the above-mentioned circle detection processing, and one above-mentioned candidate sphere center coordinate corresponds to multiple above-mentioned sphere radii;
[0044] The aforementioned filtering unit is specifically used to filter out N candidate coordinates that satisfy a first condition from the K candidate sphere center coordinates when the number K of candidate sphere center coordinates obtained based on the aforementioned M candidate coordinates is less than or equal to the aforementioned M and greater than the aforementioned N. The aforementioned first condition includes: the absolute value of the difference between the mean of the multiple sphere radii corresponding to the candidate sphere center coordinates and the radius of the aforementioned marker is less than or equal to a third threshold, and the variance of the multiple sphere radii corresponding to the aforementioned candidate sphere center coordinates is less than or equal to a fourth threshold.
[0045] The aforementioned determining unit is also used to use the aforementioned N candidate coordinates as the coordinates of the aforementioned N markers.
[0046] In one possible implementation, the determining unit is further configured to use the coordinates of the K candidate sphere centers as the coordinates of the N markers when K equals N.
[0047] In one possible implementation, the first processing unit is further configured to perform a first clustering process on the pixels in the second image whose pixel values are greater than or equal to the first threshold, to obtain S first candidate coordinates. The first clustering process is a pixel distance-based clustering process, and the S first candidate coordinates are obtained by combining the coordinates of the cluster centers obtained by the first clustering process. S is an integer greater than or equal to N.
[0048] The above-mentioned cropping unit is also used to crop a third image from the second image with each of the first candidate coordinates as the center. When the shape of the third image is circular, the area of the third image is larger than the area of the marker in the CT image. When the shape of the third image is non-circular, the third image has an inscribed circle with an area larger than the area of the marker in the CT image.
[0049] The first processing unit is further configured to perform circle detection processing on the third image, and when multiple circle center coordinates are obtained, perform a second clustering process on the multiple circle center coordinates to obtain the candidate coordinates. The second clustering process is a clustering process based on the distance between circle center coordinates, and the candidate coordinates are obtained according to the cluster containing the most circle center coordinates in the second clustering process.
[0050] The aforementioned determining unit is also used to obtain the aforementioned M candidate coordinates based on the aforementioned S first candidate coordinates.
[0051] In one possible implementation, the fourth processing unit is further configured to calculate multiple sphere radii based on the candidate coordinates, the multiple circle center coordinates, and the corresponding circle radii, wherein the circle radii are obtained through the circle detection process, and one candidate coordinate corresponds to one of the multiple sphere radii.
[0052] The aforementioned filtering unit is specifically used to filter out N candidate coordinates that satisfy the first condition from the aforementioned M candidate coordinates. The first condition includes: the absolute value of the difference between the mean of the multiple sphere radii corresponding to the candidate coordinates and the radius of the aforementioned marker is less than or equal to a third threshold, and the variance of the multiple sphere radii corresponding to the aforementioned candidate coordinates is less than or equal to a fourth threshold.
[0053] The aforementioned determining unit is also used to use the aforementioned N candidate coordinates as the coordinates of the aforementioned N markers.
[0054] In one possible implementation, the candidate coordinates are located outside the skin contour, and the distance between the candidate coordinates and the skin contour is less than or equal to a fifth threshold, which is determined based on the maximum distance between the center of the marker and the surface, and the skin contour is segmented from the first image.
[0055] In one possible implementation, when M is an integer greater than or equal to 2, the distance between any two candidate coordinates among the M candidate coordinates is greater than a sixth threshold, which is determined based on the distance between the centers of the two markers.
[0056] In one possible implementation, the aforementioned obtaining unit is specifically used to acquire CT images captured by the aforementioned CT device;
[0057] The aforementioned device further includes a fifth processing unit. This unit is used to perform binarization processing on the aforementioned CT image to obtain the aforementioned first image. The binarization threshold in the binarization processing is a value located between the pixel value range corresponding to the aforementioned marker and the pixel value range corresponding to the aforementioned protective cover in the original CT image, wherein the pixel value range corresponding to the aforementioned marker and the pixel value range corresponding to the aforementioned protective cover do not overlap.
[0058] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory, wherein the memory stores a computer program, and the processor calls the computer program stored in the memory to perform a method as described in the first aspect or any possible implementation of the first aspect.
[0059] Fourthly, this application also provides another electronic device, comprising: a processor, a transmitting device, an input device, an output device, and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein, when the processor executes the computer instructions, the electronic device performs a method as described in the first aspect or any possible implementation thereof.
[0060] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on one or more processors, causes the method as described in the first aspect or any possible implementation thereof to be executed.
[0061] In a sixth aspect, embodiments of this application provide a computer program product including program instructions that, when executed by a processor, cause the processor to perform a method as described in the first aspect or any possible implementation thereof. Attached Figure Description
[0062] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be briefly introduced below.
[0063] Figure 1 This is a flowchart illustrating a method for determining the coordinates of a marker according to an embodiment of this application;
[0064] Figure 2 This is a schematic diagram of a CT image provided in an embodiment of this application;
[0065] Figure 3 This is a schematic diagram of a CT image including markers provided in an embodiment of this application;
[0066] Figure 4 This is a schematic diagram illustrating the result of binarizing an image according to an embodiment of this application;
[0067] Figure 5 This is a schematic diagram of a CT image after the protective cover has been removed, provided in an embodiment of this application;
[0068] Figure 6 This is a schematic diagram illustrating the result of Gaussian difference processing on an image, as provided in an embodiment of this application.
[0069] Figure 7 This is a schematic diagram of another Gaussian difference processing result provided in an embodiment of this application;
[0070] Figure 8 This is a flowchart illustrating another method for determining the coordinates of a marker provided in an embodiment of this application;
[0071] Figure 9 This is a schematic diagram of multiple slice images including markers provided in an embodiment of this application;
[0072] Figure 10 This is a schematic diagram illustrating the calculation of a sphere radius provided in an embodiment of this application;
[0073] Figure 11 This is a schematic diagram illustrating the extraction of skin contours provided in an embodiment of this application;
[0074] Figure 12 This is a schematic diagram illustrating the relationship between a marker and skin contour provided in an embodiment of this application;
[0075] Figure 13 This is a schematic diagram illustrating the segmentation of marker coordinates from a CT image according to an embodiment of this application;
[0076] Figure 14This is a schematic diagram of the structure of a marker coordinate determination device provided in an embodiment of this application;
[0077] Figure 15 This is a schematic diagram of another marker coordinate determination device provided in an embodiment of this application. Detailed Implementation
[0078] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items. The terms “first” and “second,” etc., in the specification, claims, and drawings of this application are used to distinguish different objects and not to describe a particular order.
[0079] To more clearly describe the solution provided in this application, the terminology involved in the embodiments of this application will be introduced below.
[0080] In this embodiment, computed tomography (CT) can be understood as a technique that uses detectors and X-ray beams, gamma rays, and ultrasound to perform cross-sectional scanning around the area to be examined. CT is characterized by its fast scanning time and clear imaging, and is widely used for disease examination.
[0081] In the process of obtaining CT images through CT, the object through which the X-ray beam passes can be divided into multiple unit cells. In this embodiment, each unit cell can be understood as a voxel. Taking the human body as an example, when the X-ray beam penetrates human organs or tissues, since human organs or tissues are composed of various material components and different densities, the absorption coefficient of each voxel to the X-ray beam is different. Exemplarily, the attenuation coefficient value corresponding to each voxel can be determined by multiple scans in different directions using a CT scanner, thereby obtaining a two-dimensional distribution of the attenuation coefficient values (which can also be understood as an attenuation coefficient matrix). Then, each number in the attenuation coefficient matrix is converted into small squares of varying gray levels from black to white, i.e., pixels, by a digital-to-analog converter, and arranged in a matrix to form a CT image.
[0082] It should be understood that because computed tomography (CT) scans the object at slices of a certain thickness, each CT scan yields multiple two-dimensional (2D) CT images, and each 2D CT image corresponds to a specific length of the scanned object. For example, if the object being scanned is the human abdomen, and the CT scanner is perpendicular to the abdomen, each CT image corresponds to 5mm of spatial information about the abdomen. In practice, after a CT scan, each 2D CT image can be viewed individually, or multiple 2D CT images can be reconstructed into a 3D structure before viewing.
[0083] With the continuous development of computer science and technology, medical technology has also achieved significant breakthroughs, leading to the increasingly widespread application of minimally invasive surgery. Compared to open surgery, minimally invasive surgery is characterized by smaller incision areas, lower infection rates, faster patient recovery, and shorter hospital stays. However, because of the smaller incisions, surgeons cannot directly visualize the patient's internal organs and tissue structures, thus losing direct visual feedback from the real-time surgical process. Furthermore, the limited intraoperative field of view necessitates repeated review of preoperative images, making minimally invasive surgery reliant on surgical navigation systems.
[0084] In this embodiment, the surgical navigation system can be understood as using optical measurement equipment to accurately correlate the anatomical structure reconstructed from the patient's preoperative CT image data (i.e., CT images) with the real-time anatomical structure of the patient on the operating table; during the surgeon's operation, a system tracks a surgical probe (also called a surgical needle) and updates and displays the position of the surgical needle on the patient's image in real time as a virtual probe. It is understood that the optical measurement equipment and the CT equipment use different coordinate systems; therefore, the registration between the coordinate system corresponding to the optical measurement equipment and the coordinate system corresponding to the CT image is fundamental to realizing the surgical navigation system.
[0085] Understandably, surgery takes time, therefore, real-time registration of the two coordinate systems is necessary throughout the procedure. Currently, multiple markers can be affixed to the body surface of the subject, and a set of coordinates can be acquired using both optical measurement equipment and CT equipment. Then, a registration matrix between the optical measurement equipment and the CT equipment is obtained based on the registration processing between these two sets of coordinates. Since the CT equipment acquires CT images, the coordinates of the markers need to be determined from the CT images. In this embodiment, the subject can be understood as any object on which markers are affixed to the body surface, and whose coordinates need to be determined from the acquired CT images. For example, the subject could be an experimental subject used to verify the accuracy of marker segmentation, or it could be a patient during surgery.
[0086] It is understandable that CT images have complex grayscale distributions, and CT images with different radiation doses and slice thicknesses exhibit varying degrees of accuracy and noise. Accurately determining the coordinates of markers from CT images is a continuous pursuit for those skilled in the art. In some embodiments, the position of a marker in a CT image can be determined based on its annotation information, thereby determining its coordinates. However, determining the coordinates of a marker through the aforementioned manual annotation method is inefficient.
[0087] To address the aforementioned problems, this application provides a method and related apparatus for determining the coordinates of markers. This application uses Gaussian difference processing to highlight the region containing the marker in a CT image, and then performs clustering processing on the highlighted region to obtain the marker coordinates. This can automatically and effectively determine the coordinates of markers in a CT image. It should be understood that the above-mentioned method for determining the coordinates of markers can be executed by a marker coordinate determination device, which can be any electronic device capable of executing the technical solution provided in the method embodiments of this application. Exemplarily, the marker coordinate determination device can be a computer, tablet computer, desktop computer, etc., and this application does not limit it to this. It should also be understood that the method embodiments in this application can also be implemented by a processor executing computer program code.
[0088] For example, please refer to Figure 1 , Figure 1 This is a flowchart illustrating a method for determining the coordinates of a marker according to an embodiment of this application, as shown below. Figure 1 As shown, the above method includes:
[0089] 101. Obtain a first image, which is obtained based on a CT image acquired by a computed tomography (CT) scanner. The first image includes N markers pasted on the body surface of the subject, where N is an integer greater than or equal to 1.
[0090] It should be understood that, as described in the terminology section above, a computed tomography scan yields a sequence of two-dimensional slice images. In this step, the aforementioned first image can be understood as a collection of two-dimensional slice images, i.e., a single three-dimensional image. For example, Figure 2 This is a schematic diagram of a CT image provided in an embodiment of this application. For ease of understanding, eight images are used as an example. Figure 2 The eight images shown can be understood as eight slice images, each of which is a two-dimensional image. A CT image can be understood as a collection of these eight slice images.
[0091] In this step, N markers are affixed to the surface of the object. It should be understood that the placement of the markers can be determined according to the actual situation, as long as the number of markers is greater than or equal to 2 and the different markers do not overlap in the first image above. It should also be understood that this embodiment does not limit the shape of the markers. For example, the markers can be spheres, ellipsoids, cubes, or cuboids, etc.
[0092] For ease of understanding, please refer to the example provided. Figure 3 , Figure 3 This is a schematic diagram of a CT image including markers provided in an embodiment of this application. Figure 3 Using the example of attaching two spheres to the surface of the object as an example, it should be understood that... Figure 3 The image shown is a two-dimensional slice image, where the areas pointed to by the two white arrows can be understood as the areas where the markers are located.
[0093] Optionally, the first image mentioned above can be understood as a CT image after binarization. It should be understood that the original CT image acquired by the CT device is a grayscale image, where each pixel corresponds to a pixel value. Binarization can convert a grayscale image into a binary image. For example, binarization can be understood as setting pixel values greater than a threshold to 255 and setting pixel values less than the threshold to 0, thereby achieving image binarization. For example, the above binarization can be performed using Otsu's method, Bernsen's algorithm, global mean thresholding, etc.
[0094] For ease of understanding, please refer to the example provided. Figure 4 , Figure 4 This is a schematic diagram illustrating the result of image binarization processing according to an embodiment of this application. It should be understood that... Figure 4 The image shown is a two-dimensional slice image, such as... Figure 4 As shown, Figure 4 Image (a) in the image can be understood as a slice of the first image mentioned above, that is, the original image without binarization processing. Figure 4 Image (b) can be understood as the image obtained after binarizing image (a), such as... Figure 4 As shown in image (b), the white areas represent the foreground, and the other black areas represent the background. Figure 4 The part marked with a white arrow in image (b) is the marker.
[0095] Optionally, before binarizing the first image, the data values outside the circular field of view of the CT device can be corrected to zero, so that only two connected regions, the background region and the object region, exist in the first image, thus avoiding the influence of the data values outside the circular field of view of the CT device on the data processing.
[0096] It should be understood that optical measuring equipment locates markers based on the reflective coating on their surface, which reflects infrared (IR) light. Furthermore, in practical scenarios, markers are not disposable. To ensure a sterile surgical environment, markers applied to different subjects require sterilization, typically using ethylene oxide. Since sterilization can damage the reflective coating, in some embodiments, the marker surface has a protective cover. When using markers on different subjects, the protective cover is simply sterilized. For further understanding, please refer to [link to relevant documentation]. Figure 3 , Figure 3 The marker shown is spherical in the CT image, and the area outside the sphere corresponds to the area of the protective shield. However, the protective shield introduces a certain error in locating the marker's center point. Therefore, in some embodiments, the marker adhered to the body surface includes a protective shield, and this protective shield is included in the first image. Figure 1 In the method shown, step 101 includes:
[0097] 1011. Acquire CT images from CT equipment.
[0098] In this step, the CT images acquired by the CT equipment can be understood as unprocessed raw CT images. It should be understood that raw CT images are grayscale images, and each pixel in a grayscale image corresponds to a pixel value.
[0099] 1012. The CT image is binarized to obtain the first image. The binarization threshold in the binarization process is a value located between the pixel value range corresponding to the marker and the pixel value range corresponding to the protective cover in the original CT image. The pixel value range corresponding to the marker and the pixel value range corresponding to the protective cover do not overlap.
[0100] The requirements for the marker and the outer protective cover are different. The outer protective cover needs to ensure that the infrared light reflected by the reflective coating on the marker surface can penetrate the cover and is not easily corroded by disinfectant. The marker itself needs to consider the adhesion between the reflective coating and the internal marker, as well as the manufacturing and maintenance costs. Therefore, the materials of the marker and the outer protective cover are often different. For example, the marker can typically be made of plastic, while the protective cover can be made of glass. In this case, the pixel value of the area corresponding to the protective cover in the CT image is greater than the pixel value of the area corresponding to the marker. In this embodiment, the marker and the outer protective cover are made of different materials, and the pixel value ranges corresponding to the marker and the protective cover in the CT image do not overlap.
[0101] In this embodiment, when binarizing the first image, the value between the pixel value range corresponding to the marker in the original CT image and the pixel value range corresponding to the protective cover is used as the binarization threshold for binarization processing, so that the first image after binarization does not include the outer protective cover, thereby improving the accuracy of determining the coordinates of the marker.
[0102] For example, the pixel value range corresponding to the marker in the CT image is [a, b], and the pixel value range corresponding to the protective cover is [c, d], where a < b < c < d. Therefore, the coordinates of the marker can be determined by selecting a value from the range (b, c) as the binarization threshold for binarization processing. Optionally, after obtaining the first image, the binarization threshold can be determined by manually selecting the marker region and the protective cover region. Optionally, the pixel value ranges corresponding to the marker and the protective cover in multiple CT images can also be statistically analyzed to obtain an empirical value for the binarization threshold.
[0103] For ease of understanding, please refer to the example provided. Figure 5 , Figure 5 This is a schematic diagram of a CT image after removing the protective cover, as provided in an embodiment of this application. Figure 5 As shown, the area pointed to by the white arrow no longer includes the protective shield.
[0104] 102. Perform at least one Gaussian difference processing on the first image to obtain a second image, wherein the pixel value of the pixel point in the region where the N markers are located in the second image is greater than the pixel value of the pixel point in other regions.
[0105] In this embodiment, Gaussian difference processing can be understood as performing convolution processing on an image using the difference of Gaussian (DOG) function. The difference of Gaussian function can be understood as the difference between two Gaussian functions with different standard deviations. It should be understood that since the function obtained after Fourier transforming the Gaussian function is also a Gaussian function, performing Gaussian difference processing on an image is equivalent to using a bandpass filter to remove all frequency information except for the frequencies retained in the image. That is, by subtracting the pixel values obtained after processing the image with two Gaussian convolution kernels with different parameters, information in the parts of the image with weak edge response is removed, reducing the impact of noise on edge detection.
[0106] For example, the two-dimensional Gaussian function G σ (x,y) satisfies equation (1), where σ is a constant representing the standard deviation. 2 Let f(x,y) represent the variance. For example, let f(x,y) represent the image after Gaussian difference processing. The image is subjected to two Gaussian filters to obtain images g1(x,y) and g2(x,y), respectively. The two Gaussian filters can be represented by the convolution operation in equation (2) and equation (3), respectively. For example, σ1 in equation (2) is less than σ2 in equation (3).
[0107]
[0108]
[0109]
[0110] The image Dog1 is obtained by subtracting the images g1(x,y) and g2(x,y) from each other. Dog1 can be understood as the image obtained by performing Gaussian difference processing on image f(x,y). It should be understood that Gaussian difference involves subtracting a wide Gaussian (i.e., a larger σ) from a narrow Gaussian (i.e., a smaller σ). Increasing the σ value increases the influence of surrounding pixels on the center pixel.
[0111] It should be understood that CT images are obtained by cross-sectional scanning of the subject, and that markers are affixed to the surface of the subject; therefore, as... Figure 3As shown, the markers in the CT image appear abruptly distributed. Gaussian filtering can blur the area around the markers; the larger the σ value, the greater the blurring. After Gaussian difference, that is, subtracting the pixel values of a marker pixel set with a large degree of blur from a marker pixel set with a small degree of blur, the "weight" of edge pixels becomes stronger, highlighting the pixels in the edge area, thus achieving the effect of edge enhancement. Therefore, after difference, the entire marker structure is regarded as the edge area for enhancement. During the enhancement process, the pixel value closer to the blur center is larger, that is, the position closer to the center of the marker sphere is brighter. Therefore, in this embodiment, the pixel values corresponding to the pixels in the area where the N markers are located in the second image are greater than the pixel values corresponding to the pixels in other areas, that is, the area where the markers are located is "highlighted".
[0112] In particular, when the marker is a sphere, it appears as a circle in the slice image with smoother edges. After Gaussian filtering, the surrounding pixels have a more uniform effect on the sphere than other tissues, resulting in a better highlighting effect for the marker.
[0113] It should be understood that Figure 3 In the schematic diagram, the marker is a sphere, therefore appearing as a circle in the CT image. In reality, the marker can also be other shapes, such as an ellipsoid, cube, cuboid, etc. Markers of these shapes, when pasted on the surface of the object, will still appear as an "abrupt" distribution in the CT image. For ease of understanding, please refer to the example provided. Figure 6 , Figure 6 This is a schematic diagram of the result of Gaussian difference processing of an image provided in an embodiment of this application. Figure 6 The image (a) in the image can be understood as having a variance of The image obtained by filtering with a Gaussian function. Figure 6 Image (b) in the image can be understood as having undergone a process with variance of The image is obtained by filtering with a Gaussian function, where σ1 < σ2, as shown below. Figure 6As shown, image (b) is more blurred than image (a). Subtracting images (a) and (b) yields image (c). Subtracting images (a) and (b) means subtracting the pixel values of pixels at the same location in images (a) and (b) to obtain image (c). For example, if a pixel has a value of 50 in image (a) and 40 in image (b), then after subtracting, the pixel value in image (c) is 10. Conversely, if a pixel has a value of 50 in image (a) and 60 in image (b), since the difference is negative (-10), the pixel value in image (c) is 0. Image (c) can be understood as image Dog1 above, with the area closer to the center of the marker sphere in the subtracted image (c) being brighter.
[0114] To more clearly observe the highlighting effect of the above-described Gaussian difference processing on markers, please refer to the following example. Figure 7 , Figure 7 This is a schematic diagram of another Gaussian difference processing result provided in an embodiment of this application. Figure 7 Taking a single marker as an example, Figure 7 The image (a) in the image can be understood as having a variance of The marker image obtained by filtering with a Gaussian function. Figure 7 Image (b) in the image can be understood as having undergone a process with variance of The marker image obtained by filtering with a Gaussian function has a greater degree of blurring than image (a) because σ1 < σ2. Subtracting the two images highlights the marker, meaning the area closer to the center of the marker sphere is brighter. Figure 7 Image (c) is shown in the image.
[0115] In this step, the marker coordinate determination device performs Gaussian difference processing on the first image at least once. It should be understood that one Gaussian difference processing operation yields one Gaussian difference-processed image. Therefore, when the Gaussian difference processing is performed two or more times, the aforementioned Gaussian difference-processed image should be understood as a collective term for multiple images. For example, the image obtained after the first Gaussian difference processing can be denoted as image Dog1, and the image obtained after the second Gaussian difference processing can be denoted as image Dog2. For example, the standard deviations in the first Gaussian difference processing are σ1 and σ2, where σ1 < σ2, and the standard deviations in the second Gaussian difference processing are σ3 and σ4, where σ3 < σ1 < σ4. By using larger σ values, more pixels that are likely markers are highlighted from the image, thereby increasing the probability of accurately identifying all markers.
[0116] 103. Perform clustering processing on the pixels in the second image whose pixel values are greater than or equal to the first threshold to obtain M candidate coordinates. The clustering processing includes pixel distance-based clustering processing. The M candidate coordinates are determined based on the coordinates of the cluster centers obtained by the clustering processing. M is an integer greater than or equal to N.
[0117] It should be understood that in the image after Gaussian difference processing, the pixel value corresponding to the pixel in the region where the marker is located is greater than the pixel value corresponding to the pixel in other regions. In this step, the coordinate determination of the marker performs pixel distance-based clustering processing on the pixels with pixel values greater than or equal to a first threshold. This clustering processing can also be understood as clustering processing based on the distance between pixels. That is, in the above clustering processing, the marker coordinate determination device can group the pixels in the second image that are greater than or equal to the first threshold, so that multiple pixels with a distance less than the distance threshold are grouped together, i.e., one cluster, thus obtaining multiple clusters. Each cluster includes a cluster center. It should be understood that the cluster center is a pixel in the second image. Therefore, in this step, the coordinates of the cluster center can be understood as the coordinates of the pixel where the cluster center is located, and the coordinates of each cluster center are used as candidate coordinates. It should also be understood that the cluster center during the clustering process is constantly changing. In this embodiment, the cluster center should be understood as the cluster center after the clustering is completed.
[0118] In this step, the first threshold can be set according to actual conditions. For example, the first threshold can be determined based on the maximum pixel value in the second image. For instance, the maximum pixel value in the second image is denoted as maxPixel, and the first threshold can be any value within the range of 80%*maxPixel to maxPixel. For example, the first threshold can be 85%*maxPixel, 92%*maxPixel, or 95%*maxPixel, etc., and this application does not limit this. In this step, the clustering process can be the maximum-minimum distance algorithm, or the nearest neighbor clustering method, etc., and this application does not limit this. It should be understood that when the Gaussian difference processing is performed two or more times, the marker coordinate determination device will perform clustering processing on the images obtained after each Gaussian difference processing.
[0119] It should be understood that the distribution of pixels with pixel values greater than or equal to the first threshold in the second image is uncertain, and some objects with shapes similar to the markers may also be highlighted in the image after Gaussian difference processing. This results in the number of cluster centers obtained after performing pixel distance-based clustering on these multiple pixels being greater than the number of markers. In other words, the above M is greater than or equal to the above N.
[0120] 104. When M equals N, the M candidate coordinates are used as the coordinates of the N markers.
[0121] It should be understood that, as described in step 103, the number of candidate coordinates obtained after clustering may be greater than or equal to the above N. If the number of candidate coordinates obtained is equal to the above N, the M candidate coordinates can be considered as the coordinates of the markers. Therefore, in this embodiment, if M is equal to N, the above M candidate coordinates are used as the coordinates of the N markers.
[0122] In this embodiment, after obtaining a first image containing N markers, the first image undergoes at least one Gaussian difference processing. Since the N markers are affixed to the surface of the object, they present an abrupt distribution in the first image. In the second image obtained after at least one difference processing, the pixel values corresponding to the pixels in the marker areas are greater than the pixel values corresponding to the pixels in other areas, meaning the marker areas are highlighted. After the marker areas are highlighted, the pixels in the second image with pixel values greater than or equal to a first threshold are clustered, and M candidate coordinates are obtained based on the cluster centers. When M equals N, these M candidate coordinates are used as the coordinates of the N markers, automatically and effectively determining the marker coordinates in the CT image.
[0123] It should be understood that the number of candidate coordinates obtained after at least one Gaussian processing and the above clustering processing may be greater than or equal to the number of markers N. In some embodiments, Figure 1 The method shown also includes:
[0124] 1. If M is greater than N, select N candidate coordinates from the M candidate coordinates as the coordinates of the N markers.
[0125] In this embodiment, when M equals N, the obtained candidate coordinates can be considered as marker coordinates, and thus the M candidate coordinates can be used as the coordinates of N markers. When M is greater than N, although the number of M candidate coordinates is not equal to the number of N markers, the actual marker coordinates are very likely included in the M candidate coordinates. Based on the structural characteristics of the markers themselves, the positional relationship between the markers and the implementation object, etc., N candidate coordinates can be selected and used as the coordinates of the N markers. In this way, the obtained M candidate coordinates can be fully utilized to determine the marker coordinates.
[0126] It should be understood that Figure 1In the method shown, the M candidate coordinates are obtained through clustering processes using cluster centers. Since the markers are spatial structures in reality, the structural features of the markers themselves can be used to obtain more accurate marker coordinates. For example, please refer to [link to example]. Figure 8 , Figure 8 This is a flowchart illustrating another method for determining the coordinates of a marker provided in an embodiment of this application, as shown below. Figure 8 As shown, the above method includes:
[0127] 801. Obtain a first image, which is obtained based on a CT image acquired by a computed tomography (CT) device. The first image includes N markers pasted on the body surface of the subject, where N is an integer greater than or equal to 1, and the markers include spherical markers.
[0128] In this embodiment, the marker includes a spherical marker, which can be understood as the entity of the marker including a sphere. Therefore, reuse is possible. Figure 3 ,like Figure 3 The sliced image shown depicts the markers as circles. It should be understood that further explanation of this step can be found in step 101 above, and will not be repeated here.
[0129] 802. Perform at least one Gaussian difference processing on the first image to obtain a second image, wherein the pixel value of the pixel point in the region where the N markers are located in the second image is greater than the pixel value of the pixel point in other regions.
[0130] It should be understood that a description of this step can be found in step 102 above, and will not be repeated here.
[0131] 803. Perform a first clustering process on the pixels in the second image whose pixel values are greater than or equal to the first threshold to obtain S first candidate coordinates. The first clustering process is a pixel distance-based clustering process. The S first candidate coordinates are determined based on the coordinates of the cluster centers obtained by the first clustering process. S is an integer greater than or equal to N.
[0132] In this step, after performing the first clustering process on the second image as described above, S first candidate coordinates are obtained. The first clustering process is a pixel distance-based clustering process. For other descriptions of this step, please refer to step 103 above, which will not be repeated here.
[0133] 804. Using the first candidate coordinates as the center, a third image is extracted from the second image. When the shape of the third image is circular, the area of the third image is greater than the area of the marker in the CT image. When the shape of the third image is non-circular, the third image has an inscribed circle with an area greater than the area of the marker in the CT image.
[0134] In this step, a third image is extracted from the second image with the first candidate coordinates as the center. It should be understood that there are M first candidate coordinates, and a third image can be extracted from each first candidate coordinate. Therefore, it is obvious that the marker coordinate determination device can extract M third images.
[0135] In this embodiment, the shape and specific size of the third image are not limited. For example, the third image can be a circle, a triangle, a square, a rectangle, a trapezoid, a pentagon, a hexagon, or other polygons, or an irregular shape. It is understood that the marker is three-dimensional; therefore, different slice images include different cross-sections of the marker. Since the marker includes spherical markers, the cross-section of the marker appears circular in the slice image; for ease of understanding, this circle is referred to as the cross-sectional circle of the marker.
[0136] In this step, when the third image is circular, its area is larger than the area of the marker in the CT image. This can be understood as the area of the third image being larger than the area of the largest cross-sectional circle of the marker. For example, when the third image is circular, its radius is greater than or equal to the radius of the actual marker. In this embodiment, a circle tangent to all sides of a polygon can be understood as the incircle of the polygon. When the third image is non-circular, it has an incircle with an area larger than the area of the marker in the CT image. This can be understood as the third image having an incircle with an area larger than the area of the largest cross-sectional circle of the marker. For example, if the diameter of the marker is d, the third image can be a square with a side length of 2d. In this case, the area of the largest cross-section of the marker is πd. 2 / 4, the area of the third image is 4d 2 The ratio between the two is π / 16.
[0137] In this step, the marker coordinate determining device extracts a third image from the second image using the first candidate coordinates as the center. Therefore, the center of the third image is the aforementioned first candidate coordinates. In this step, when the third image is a regular shape, the center can be understood as the geometric center of the shape; for example, the center of a circle can be understood as its center, and the center of a square or rectangle can be understood as the intersection of its diagonals. When the third image is an irregular shape, the center can be understood as the centroid of the shape. It should also be understood that the second image is a CT image, meaning it comprises multiple slice images, and the aforementioned first candidate coordinates are coordinates within one of those slice images. Since the slice images are along the z-direction, when extracting the third image from the second image, the coordinates in each slice image that have the same x and y values as the first candidate coordinates can be used as the center for extraction, resulting in a third image comprising multiple slice images.
[0138] 805. Perform circle detection processing on the third image. If multiple circle center coordinates are obtained, perform a second clustering process on the multiple circle center coordinates to obtain the candidate coordinates. The second clustering process is a clustering process based on the distance between circle center coordinates. The candidate coordinates are obtained from the cluster that contains the most circle center coordinates in the second clustering process.
[0139] It should be understood that in this embodiment, the marker coordinate determination device can extract S third images from the second image, and the marker coordinate determination device can perform circle detection processing on each third image. Here, circle detection processing can be understood as the processing of detecting circles from the image, including detecting the center and corresponding radius of the circle. Exemplarily, the above-mentioned circle detection processing can be implemented using methods such as Hough circle transform (CHT), randomized Hough transform (RHT), and randomized circle detection (RCD) to detect the center coordinates of circles in the multiple slice images included in the third image.
[0140] In this step, the specific number of circle center coordinates obtained is not limited. It is understood that when the slice thickness of the tomographic scan is selected to different values, the number of slice images obtained after tomographic scanning of the same object will be different, and therefore the number of circle center coordinates will also be different. It is understood that the aforementioned third image includes multiple slice images. On the one hand, when the scanning range of the CT equipment is large, other areas besides the marker may also be scanned to obtain slice images, which may not include circles; therefore, some slice images in these multiple slice images may not include circles. On the other hand, when the shape of the aforementioned third image is not circular, the third image may include other similar circular tissues; therefore, some slice images in these multiple slice images may also include multiple circles.
[0141] It should also be understood that the first candidate coordinates obtained after the above Gaussian difference processing and the first clustering processing may not be coordinates within the actual area where the marker is located. Therefore, the circle detection processing on the third image may fail to detect the circle, i.e., the center coordinates of the circle cannot be obtained. In this step, when multiple center coordinates are obtained, the marker coordinate determination device performs a second clustering processing on these multiple center coordinates. Optionally, if the above circle detection processing fails to detect a circle, the first candidate coordinates can be considered not to be the coordinates of the marker, and the marker coordinate determination device can discard the first candidate coordinates.
[0142] In this embodiment, the second clustering process described above can be understood as clustering the center coordinates of the circles to obtain the coordinates of the centers of the plurality of circle center coordinates. For example, the second clustering process can be density-based clustering, such as the maximum density clustering application (MDCA) method. During the process, the plurality of circle center coordinates can be traversed, and the circle center coordinates can be used as seed circles. The radius of the seed circle is set to a value smaller than the radius of the marker and close to the radius of the marker. Other circle center coordinates whose distance from the seed circle is smaller than the radius of the seed circle are grouped with the seed circle center coordinates. Finally, the group containing the most circle center coordinates can be understood as the cluster with the highest density, and the candidate coordinates can be understood as the center coordinates of the cluster with the highest density. For example, the marker radius is 6 mm, and the radius of the seed circle can be 5 mm, 5.5 mm, etc.
[0143] It should be understood that each slice image is perpendicular to the z-direction; therefore, the x and y values of the center coordinates of the cross-sectional circle of the marker are very close across different slice images. Furthermore, since the ratio between the area occupied by the marker in the third image and the area of the third image is greater than or equal to the second threshold—that is, if the third image includes the marker, then the marker occupies a large portion of the area in the third image—the cluster obtained after the above second clustering process is the cluster closest to the center of the marker. For ease of understanding, please refer to the example provided. Figure 9 , Figure 9 This is a schematic diagram of multiple slice images including markers provided in an embodiment of this application. For example... Figure 9 As shown, the image includes 7 slice images, each containing a cross-sectional circle of the marker. After the circle detection processing described above, the black solid circle can be interpreted as the center of the cross-sectional circle corresponding to the marker, and the white solid circle can be interpreted as the center of the cross-sectional circle corresponding to the non-marker. Figure 9 As shown, the solid black circles are distributed near the dashed arrows, meaning that the z-values of the circle center coordinates are different on different slice images, but the x and y values are very close. The circles on the unmarked cross-sections are more dispersed. When performing the second clustering process described above on the obtained circle center coordinates, for example, using... Figure 9 Taking the first solid black circle from top to bottom as an example, when using this solid black circle as the seed circle, the resulting cluster includes 3 solid black circles, such as... Figure 9 As shown in the dashed circle 901, the density of this cluster is 3. After obtaining clusters by using the coordinates of each circle's center as a seed circle, the cluster with the highest density is the one closest to the center of the marker sphere, as shown below. Figure 9 As shown by the dashed circle 902 in the diagram, the density of this cluster is 5.
[0144] 806. Based on the S first candidate coordinates, obtain the M candidate coordinates.
[0145] It should be understood that in this embodiment, the number of first candidate coordinates obtained in step 803 is S, where S is greater than or equal to N. In the subsequent step 805, only when multiple center coordinates are obtained is a second clustering process performed on those multiple center coordinates to obtain candidate coordinates. Therefore, only a portion of the aforementioned S first candidate coordinates may yield corresponding candidate coordinates. In this step, the third image is obtained based on the first candidate coordinates, and the marker coordinate determining device obtains M candidate coordinates from the third image from which multiple center coordinates can be obtained.
[0146] In this embodiment, after obtaining a first image containing N markers, the first image is subjected to at least one Gaussian difference processing to obtain a second image in which the region where the markers are located is highlighted. After the region where the markers are located is highlighted, the pixels in the second image with pixel values greater than or equal to a first threshold are subjected to the first clustering processing based on pixel distance, as described above. Based on the obtained cluster centers, M first candidate coordinates are determined. The M first candidate coordinates are obtained by clustering based on pixel values and the distance between pixels, which can be considered as roughly locating the marker coordinates. After obtaining the M first candidate coordinates, a third image is extracted from the second image based on the first candidate coordinates. The third image is subjected to circle detection processing to obtain multiple circle center coordinates. Then, the multiple circle center coordinates are subjected to the second clustering processing described above. The candidate coordinates are obtained based on the cluster containing the most circle center coordinates. Since the marker entity is a sphere, it appears as a circle in the multiple slice images included in the third image. This candidate coordinate fully utilizes the circle center coordinates of each cross-section of the marker, which is closer to the true circle center of the marker. That is, the candidate coordinates determined in this embodiment are more accurate.
[0147] It should be understood that the number of candidate coordinates obtained after at least one Gaussian processing, as well as the first and second clustering processes described above, may be greater than or equal to the number of markers N. In some embodiments, Figure 8 The method shown also includes:
[0148] 2. If M is greater than N, select N candidate coordinates from the M candidate coordinates as the coordinates of the N markers.
[0149] In this embodiment, when M equals N, the obtained candidate coordinates can be considered as marker coordinates, and thus the M candidate coordinates can be used as the coordinates of N markers. When M is greater than N, although the number of M candidate coordinates is not equal to the number of N markers, the actual marker coordinates are very likely included in the M candidate coordinates. Based on the structural characteristics of the markers themselves, the positional relationship between the markers and the implementation object, etc., N candidate coordinates can be selected and used as the coordinates of the N markers. In this way, the obtained M candidate coordinates can be fully utilized to determine the marker coordinates.
[0150] In some embodiments, step 2 above includes:
[0151] 201. Based on the candidate coordinates, the multiple circle center coordinates and the corresponding circle radii, multiple sphere radii are calculated. The circle radius is obtained through the circle detection process. One candidate coordinate corresponds to one of the multiple sphere radii.
[0152] It should be understood that, as described in step 806 above, each slice image is perpendicular to the z-direction. Therefore, the x and y values of the center coordinates of the cross-sectional circles of the marker are very close on different slice images; that is, the x-axis and y-axis coordinates of the center of different cross-sectional circles of the same marker are very close. Since the center coordinates of other non-marker cross-sectional circles may be detected in the above circle detection process, in this step, the center coordinates used to calculate the sphere radius are coordinates whose x and y values are very close to those of the candidate coordinates. For example, for the center coordinates and candidate coordinates in each third image, the marker coordinate determination device can sequentially compare each center coordinate with the candidate coordinates and discard coordinates whose x or y values are greater than a certain distance from the candidate coordinates.
[0153] It is understandable that the circle detection process described above can obtain both the center coordinates and the radius of the circle in the sliced image. Therefore, for each detected circle, a center coordinate and a radius are obtained, meaning one center coordinate corresponds to one radius. In this step, the radius of the sphere can be calculated using the Pythagorean theorem; for an example, please refer to [link to relevant documentation]. Figure 10 , Figure 10 This is a schematic diagram illustrating the calculation of a sphere radius provided in an embodiment of this application. Figure 10 The example of the center coordinates and radius of a circle in a slice image illustrates this; it should be understood that the same principle applies to other slice images. Figure 10 As shown, the radius of the circle in the slice image is taken as one right-angled side. The other right-angled side is calculated by the distance between the center coordinates of the circle and the candidate coordinates. The radius of the sphere corresponding to the slice image can be calculated by using the Pythagorean theorem.
[0154] In this step, the center coordinates used to calculate the sphere radius among the multiple center coordinates mentioned above can all be determined based on... Figure 10 The method shown yields a sphere radius. Ultimately, multiple sphere radii can be calculated based on a candidate coordinate. Therefore, a candidate coordinate corresponds to multiple sphere radii.
[0155] 202. Select N candidate coordinates from the M candidate coordinates that satisfy the first condition. The first condition includes: the absolute value of the difference between the mean of the multiple sphere radii corresponding to the candidate coordinates and the radius of the marker is less than or equal to the third threshold, and the variance of the multiple sphere radii corresponding to the candidate coordinates is less than or equal to the fourth threshold.
[0156] It should be understood that the center coordinates of the circles in each third image can be used to obtain a set of sphere radii in the manner described in step 201. Therefore, it is obvious that M sets of sphere radii can be obtained, each set including multiple sphere radii. In this step, the markers are spherical markers. After calculating the M sets of sphere radii, since there is a correspondence between the candidate coordinates and the sphere radii, the candidate coordinates can be filtered based on the sphere radii.
[0157] In this step, if the absolute value of the difference between the mean of the multiple sphere radii corresponding to the candidate coordinates and the radius of the marker is less than or equal to the third threshold, and the variance of the multiple sphere radii corresponding to the candidate coordinates is less than or equal to the fourth threshold, then the candidate coordinate is selected as one of the N candidate coordinates. It should be understood that if the candidate coordinates detected from the third image are the coordinates of the real marker, then the difference between the mean of the multiple sphere radii calculated based on the candidate coordinates and the real radius of the marker should be very small. If the mean of the detected multiple sphere radii is too large or too small, the corresponding candidate coordinates can be considered not to be marker coordinates. Similarly, if the candidate coordinates detected from the third image are the coordinates of the real marker, then the multiple sphere radii calculated based on the candidate coordinates are close; therefore, if the variance of the multiple sphere radii is too large, the corresponding candidate coordinates can be considered not to be marker coordinates.
[0158] It should be understood that in this step, the marker coordinate determining device can set initial values for the third threshold and the fourth threshold, and then add or subtract 1 mm, 2 mm, etc. to correct the initial values, so that the marker determining device can determine N candidate coordinates that satisfy the first condition from M candidate coordinates.
[0159] 203. Use the N candidate coordinates as the coordinates of the N markers.
[0160] In this embodiment, the radius of the sphere is calculated using candidate coordinates, multiple center coordinates, and the corresponding circle radius. Then, based on the true radius of the marker, N candidate coordinates are selected from M candidate coordinates as the coordinates of N markers, which can automatically and effectively determine the coordinates of N markers.
[0161] It should be understood that the structural features of markers, in addition to those mentioned above... Figure 8 The corresponding embodiment is used to improve the accuracy of the determined marker coordinates, and can also be used to filter N candidate coordinates from M candidate coordinates. Therefore, in some embodiments, the marker includes a spherical marker, and step 1 above includes:
[0162] 3. Using the candidate coordinates as the center, extract a third image from the second image. When the shape of the third image is circular, the area of the third image is larger than the area of the marker in the CT image. When the shape of the third image is non-circular, the third image has an inscribed circle with an area larger than the area of the marker in the CT image.
[0163] For an explanation of this step, please refer to step 804 above, which will not be repeated here.
[0164] 4. Perform circle detection processing on the third image. After obtaining multiple circle center coordinates, perform a second clustering process on these multiple circle center coordinates to obtain candidate sphere center coordinates. This second clustering process is a clustering process based on the distance between circle center coordinates. The candidate sphere center coordinates are obtained from the cluster that contains the most circle center coordinates in the second clustering process.
[0165] For an explanation of this step, please refer to step 805 above, which will not be repeated here.
[0166] 5. Based on the candidate sphere center coordinates, the multiple circle center coordinates, and the corresponding circle radii, multiple sphere radii are calculated. The circle radius is obtained through circle detection processing. One candidate sphere center coordinate corresponds to one of the multiple sphere radii.
[0167] For an explanation of this step, please refer to step 201 above, which will not be repeated here.
[0168] 6. If the number K of candidate sphere center coordinates obtained based on the M candidate coordinates is an integer less than or equal to M and greater than N, select N candidate coordinates from the K candidate sphere center coordinates that satisfy the first condition. The first condition includes: the absolute value of the difference between the mean of the multiple sphere radii corresponding to the candidate sphere center coordinates and the radius of the marker is less than or equal to the third threshold, and the variance of the multiple sphere radii corresponding to the candidate sphere center coordinates is less than or equal to the fourth threshold.
[0169] It should be understood that, as described in steps 805 and 807 above, the candidate coordinates obtained after the above Gaussian difference processing and clustering processing may not be coordinates within the region where the real marker is located. Therefore, the circle detection processing performed on the third image above may not detect the circle, i.e., the center coordinates of the circle cannot be obtained. Thus, the number K of candidate sphere center coordinates obtained based on the M candidate coordinates is less than or equal to M, and greater than or equal to N. In this embodiment, when the number K of candidate sphere center coordinates obtained based on the M candidate coordinates is an integer less than or equal to M and greater than N, N candidate coordinates that satisfy the first condition are selected from the K candidate sphere center coordinates. Further explanations of this step can be found in step 202 above, and will not be repeated here.
[0170] In some embodiments, when K equals N, the K candidate sphere center coordinates are used as the coordinates of the N markers. It is immediately apparent that when the number K of candidate sphere center coordinates obtained after the above Gaussian processing, the first clustering processing, and the second clustering processing equals N, the candidate sphere center coordinates can be considered as the coordinates of the actual markers. Therefore, the K candidate sphere center coordinates can be used as the coordinates of the N markers. It should also be understood that the K candidate sphere center coordinates obtained in this embodiment fully utilize the center coordinates of the circles of each cross-section of the marker, making them closer to the actual center of the marker and improving the accuracy of the marker center point positioning. In other words, the candidate coordinates determined in this embodiment are more accurate.
[0171] 7. Use the N candidate coordinates as the coordinates of the N markers.
[0172] For a description of this step, please refer to step 203 above, which will not be repeated here.
[0173] In this embodiment, the markers include spherical markers. After obtaining M candidate coordinates through the above Gaussian processing and pixel distance-based clustering, the structural features of the spherical markers are used, that is, the center coordinates of the circles of each cross section of the markers are subjected to a second clustering process. Then, based on the obtained sphere radius, N candidate coordinates are selected. This can effectively eliminate the coordinates of non-markers from the M candidate coordinates and obtain the coordinates of the real markers.
[0174] In this embodiment, steps 3-5 can be referred to steps 804-806 above; steps 6-8 can be referred to steps 201-203 above, and will not be repeated here.
[0175] It should be understood that the marker entity is three-dimensional, and in addition to utilizing the shape characteristics of the marker, the distance between the center of the marker and the surface can also be used to determine the candidate coordinates. In some embodiments, when M is an integer greater than or equal to 2, the distance between any two of the M candidate coordinates is greater than a sixth threshold, which is determined based on the distance between the centers of the two markers.
[0176] It should be understood that, in order to accurately determine the coordinates of the markers, when two or more markers are pasted on the surface of the object, a certain distance is maintained between each marker to ensure that the markers do not overlap in the CT image. In this embodiment, the distance between any two candidate coordinates in the M candidate coordinates is greater than the center distance between the two markers, so as to eliminate coordinates obtained from non-marker areas and improve the accuracy of determining the marker coordinates. It should be understood that if the distance between two candidate coordinates is less than the center distance between the two markers, the two candidate coordinates can be considered as the same coordinate. For example, one of the coordinates can be eliminated, or the average of the two coordinates can be calculated as the final candidate coordinate.
[0177] In this embodiment, when the marker is a uniform and regular object, the center of the marker can be its geometric center; when the marker is non-uniform or irregular, the center of the marker can be understood as the object's center of mass or center of gravity, etc. In this embodiment, the distance between the centers of two markers can be understood as the distance between their centers after their surfaces are pressed tightly together. The distance between the centers of the markers can be determined according to the shape of the markers. For example, when the marker is a sphere, the distance between the centers of the markers can be equal to the diameter of the marker; when the marker is an ellipsoid, depending on the way the marker is attached, the distance between the centers of the markers can be equal to twice the major or minor radius of the ellipsoid; when the marker is a cube, the distance between the centers of the markers can be equal to the side length of the cube.
[0178] It should also be understood that when the above Gaussian difference processing includes the first Gaussian difference processing and the second Gaussian difference processing, the coordinates of the obtained cluster centers may come from the image after the first Gaussian difference processing or the image after the second Gaussian difference processing. Since the two images after the Gaussian difference processing are the result of processing the same image, i.e., from the same coordinate system, the marker coordinate determination device can still directly perform coordinate calculations on the coordinates of the multiple obtained cluster centers to ensure that the distance between any two coordinates among the M candidate coordinates is greater than the distance between the centers of the markers. It should also be understood that when the distance between the candidate coordinates is greater than the distance between the centers of the markers, the above M may also be greater than or equal to the above, i.e., it may also include the center coordinates of non-markers.
[0179] In this embodiment, the sixth threshold can be equal to the distance between the centers of the markers, or it can be based on the distance between the centers of the markers plus a certain distance value according to the actual situation. For example, the sixth threshold can be equal to the distance between the centers of the markers plus 1 mm, or plus 2 mm, etc.
[0180] It is understood that this embodiment can be related to the above. Figure 1 The methods and related embodiments shown can be coupled with the above-described methods. Figure 8 The method shown is coupled with related embodiments.
[0181] It should be understood that, in addition to using the structural features of the marker itself to filter candidate coordinates, the positional relationship between the marker and the implementation object can also be used to determine candidate coordinates to improve the accuracy of the segmented marker coordinates. In some embodiments, the candidate coordinates are located outside the skin contour, and the distance between the candidate coordinates and the skin contour is less than or equal to a fifth threshold, which is determined based on the maximum distance between the center of the marker and the surface, the skin contour being segmented from the first image.
[0182] It is understood that this embodiment can be related to the above. Figure 1 The methods and related embodiments shown can be coupled with the above-described methods. Figure 8 The method shown and related embodiments can be coupled, and can also be coupled with the previous embodiment, that is, when the number of candidate coordinates is greater than or equal to 2, the distance between any two candidate coordinates among the M candidate coordinates is greater than the sixth threshold, and the candidate coordinate is located outside the skin contour, and the distance between the candidate coordinate and the skin contour is less than or equal to the fifth threshold.
[0183] It should be understood that since the marker is affixed to the surface of the subject, it must be outside the skin contour, and the center of the marker is very close to the skin contour of the subject. Because CT images are obtained from tomographic scans of cross-sections of the human body, the skin contour is closed in the CT image. Optionally, the marker coordinate determination device can acquire the annotation information of the skin contour to segment the skin contour from the first image. Optionally, the marker coordinate determination device can extract the skin contour based on the features of the skin contour in the CT image, based on connected components in the CT image.
[0184] In this embodiment, a connected component can be understood as a set of pixels consisting of adjacent pixels with the same pixel value. Since the pixel values in the binarized image are only 0 (black) and 255 (white), adjacent pixels with a pixel value of 255 in the binarized image can be grouped into a connected region. Each connected component is assigned a unique identifier to distinguish it from other connected components. This allows each individual connected component to form an identified block, and further geometric parameters such as the contour, bounding rectangle, centroid, and invariant moments of these blocks can be obtained.
[0185] For example, please refer to Figure 11 , Figure 11This is a schematic diagram illustrating skin contour extraction according to an embodiment of this application. Both images (a) and (b) include rectangular borders. It should be understood that these borders are for differentiation from the white background of the document and are not actually present in the actual scenario. Figure 11 As shown, Figure 11 Image (a) can be understood as a slice image after binarization, including the white lung and torso regions. Solving for the maximum connected component in image (a) yields image (b), where the white region represents the maximum connected component. Based on this maximum connected component, the skin contour can be obtained.
[0186] For any of the above candidate coordinates, we can first determine the maximum and minimum values of the skin contour in a certain direction (x-direction or y-direction) of the candidate coordinate. Since the skin contour is closed, if the coordinate value of the candidate coordinate in that direction is between the minimum and maximum values, then the candidate coordinate is located within the skin contour and is not a marker coordinate. For example, please refer to [link to example]. Figure 12 , Figure 12 This is a schematic diagram illustrating the relationship between a marker and skin contour provided in an embodiment of this application. In such... Figure 12 In the coordinate system shown, let's take the y-direction coordinates as an example. For instance, the maximum y-direction coordinate of the skin contour in candidate coordinate A is y4, and the minimum y-direction coordinate of candidate coordinate A is y1. Since the y-direction coordinate of candidate coordinate A is greater than y4, candidate coordinate A is outside the skin contour. Similarly, the maximum y-direction coordinate of the skin contour in candidate coordinate B is y3, and the minimum y-direction coordinate of candidate coordinate B is y2. Since the y-direction coordinate of candidate coordinate B is less than y3 and greater than y2, candidate coordinate B is inside the skin contour.
[0187] In this embodiment, the surface of the marker can have different meanings depending on its shape. When the marker is a sphere, its surface can be understood as a spherical surface; when the marker is a cube or cuboid, its surface may include 6 faces and 8 vertices. For example, when the marker is a uniform sphere, the distance between the center of the marker and any point on its surface is equal to the radius of the sphere; when the marker is a uniform ellipsoid, the maximum distance between the center of the marker and its surface is the major radius; when the marker is a cube, the maximum distance between the center of the marker and its surface is the maximum distance between the center and the 8 vertices.
[0188] In this embodiment, the fifth threshold can be set as the maximum distance between the center of the marker and the surface. Optionally, since there may be connecting parts between the marker and the skin contour, the fifth threshold can be set to a value larger than the maximum distance. For example, the fifth threshold can be equal to the maximum distance plus 1 mm, or plus 2 mm, etc.
[0189] It should be noted that in the embodiments of this application, the numbers before the steps, such as numbers 1 to 8 in the previous text, are for ease of understanding and are not used to limit the execution order of the steps.
[0190] To verify the effectiveness of the marker coordinate determination method provided in the embodiments of this application, exemplarily, in the case where the marker includes a spherical marker, please refer to... Figure 13 , Figure 13 This is a schematic diagram illustrating the segmentation of marker coordinates from a CT image, as provided in an embodiment of this application. Figure 13 As shown, 1301 can be understood as a slice image including the marker, and 1302 can be understood as a circle obtained with the coordinates obtained by the marker coordinate determination method provided in this application as the center and the actual radius of the marker as the radius, denoted as circle 1302. Figure 13 As shown, the circle 1302 almost overlaps with the marker area in image 1301. It can be seen that the method for determining the coordinates of the markers provided in this embodiment can accurately and effectively obtain the coordinates of the markers.
[0191] The methods provided in the embodiments of this application have been described in detail above. The apparatus provided in the embodiments of this application is described below.
[0192] Please see Figure 14 , Figure 14 This is a schematic diagram of a marker coordinate determination device provided in an embodiment of this application. The marker coordinate determination device 140 is used to execute the aforementioned marker coordinate determination method. It should be understood that any device capable of implementing the marker coordinate determination method provided in this application falls within the protection scope of this application. Exemplarily, the marker coordinate determination device 140 can be a mobile phone, desktop computer, or laptop, etc., and this embodiment of the application does not limit it. Figure 14 As shown, the marker coordinate determination device 140 includes an acquisition unit 1401, a first processing unit 1402, a second processing unit 1403, and a determination unit 1404. Optionally, the marker coordinate determination device 140 may further include a filtering unit 1405, a cropping unit 1406, a third processing unit 1407, a fourth processing unit 1408, and a fifth processing unit 1409. The descriptions of each unit are as follows:
[0193] The obtaining unit 1401 is used to obtain a first image, which is obtained based on a CT image acquired by a computed tomography (CT) device. The first image includes N markers pasted on the body surface of the subject, where N is an integer greater than or equal to 1.
[0194] The first processing unit 1402 is used to perform at least one Gaussian difference processing on the first image to obtain a second image, wherein the pixel value of the pixel point in the region where the N markers are located in the second image is greater than the pixel value of the pixel point in other regions.
[0195] The second processing unit 1403 is used to perform clustering processing on pixels in the second image whose pixel values are greater than or equal to a first threshold to obtain M candidate coordinates. The clustering processing includes pixel distance-based clustering processing. The M candidate coordinates are determined based on the coordinates of the cluster centers obtained by the clustering processing. M is an integer greater than or equal to N.
[0196] The determining unit 1404 is used to determine the M candidate coordinates as the coordinates of the N markers when M equals N.
[0197] In one possible implementation, the device further includes a filtering unit 1405, used to filter N candidate coordinates from the M candidate coordinates as the coordinates of the N markers when M is greater than N.
[0198] In one possible implementation, the marker includes a spherical marker, and the device further includes a cropping unit 1406 for cropping a third image from the second image with the candidate coordinates as the center. When the shape of the third image is circular, the area of the third image is larger than the area of the marker in the CT image. When the shape of the third image is non-circular, the third image has an inscribed circle with an area larger than the area of the marker in the CT image.
[0199] The above-mentioned device also includes a third processing unit 1407, which is used to perform circle detection processing on the third image. When multiple circle center coordinates are obtained, a second clustering processing is performed on the multiple circle center coordinates to obtain candidate sphere center coordinates. The second clustering processing is a clustering processing based on the distance between circle center coordinates. The candidate sphere center coordinates are obtained according to the cluster containing the most circle center coordinates in the second clustering processing.
[0200] The above-mentioned device also includes a fourth processing unit 1408, which is used to calculate multiple sphere radii based on the above-mentioned candidate sphere center coordinates, the above-mentioned multiple circle center coordinates and the corresponding circle radii, wherein the above-mentioned circle radii are obtained through the above-mentioned circle detection processing, and one above-mentioned candidate sphere center coordinate corresponds to multiple above-mentioned sphere radii;
[0201] The aforementioned filtering unit 1405 is specifically used to filter out N candidate coordinates that satisfy a first condition from the K candidate sphere center coordinates when the number K of candidate sphere center coordinates obtained based on the aforementioned M candidate coordinates is less than or equal to the aforementioned M and greater than the aforementioned N. The aforementioned first condition includes: the absolute value of the difference between the mean of the multiple sphere radii corresponding to the candidate sphere center coordinates and the radius of the aforementioned marker is less than or equal to a third threshold, and the variance of the multiple sphere radii corresponding to the aforementioned candidate sphere center coordinates is less than or equal to a fourth threshold.
[0202] The aforementioned determining unit 1404 is also used to use the aforementioned N candidate coordinates as the coordinates of the aforementioned N markers.
[0203] In one possible implementation, the determining unit 1404 is further configured to use the coordinates of the K candidate sphere centers as the coordinates of the N markers when K equals N.
[0204] In one possible implementation, the first processing unit 1402 is further configured to perform a first clustering process on the pixels in the second image whose pixel values are greater than or equal to the first threshold, to obtain S first candidate coordinates. The first clustering process is a pixel distance-based clustering process, and the S first candidate coordinates are obtained by combining the coordinates of the cluster centers obtained by the first clustering process. S is an integer greater than or equal to N.
[0205] The above-mentioned cropping unit 1406 is also used to crop a third image from the second image with each of the first candidate coordinates as the center. When the shape of the third image is circular, the area of the third image is larger than the area of the marker in the CT image. When the shape of the third image is non-circular, the third image has an inscribed circle with an area larger than the area of the marker in the CT image.
[0206] The first processing unit 1402 is further configured to perform circle detection processing on the third image, and when multiple circle center coordinates are obtained, perform a second clustering process on the multiple circle center coordinates to obtain the candidate coordinates. The second clustering process is a clustering process based on the distance between circle center coordinates, and the candidate coordinates are obtained according to the cluster containing the most circle center coordinates in the second clustering process.
[0207] The aforementioned determining unit 1404 is also used to obtain the aforementioned M candidate coordinates based on the aforementioned S first candidate coordinates.
[0208] In one possible implementation, the fourth processing unit 1408 is further configured to calculate a plurality of sphere radii based on the candidate coordinates, the plurality of circle center coordinates and the corresponding circle radii, wherein the circle radii are obtained through the circle detection process, and one candidate coordinate corresponds to the plurality of sphere radii.
[0209] The aforementioned filtering unit 1405 is specifically used to filter out N candidate coordinates that satisfy the first condition from the aforementioned M candidate coordinates. The aforementioned first condition includes: the absolute value of the difference between the mean of the multiple sphere radii corresponding to the candidate coordinates and the radius of the aforementioned marker is less than or equal to a third threshold, and the variance of the multiple sphere radii corresponding to the aforementioned candidate coordinates is less than or equal to a fourth threshold.
[0210] The aforementioned determining unit 1404 is also used to use the aforementioned N candidate coordinates as the coordinates of the aforementioned N markers.
[0211] In one possible implementation, the candidate coordinates are located outside the skin contour, and the distance between the candidate coordinates and the skin contour is less than or equal to a fifth threshold, which is determined based on the maximum distance between the center of the marker and the surface, and the skin contour is segmented from the first image.
[0212] In one possible implementation, when M is an integer greater than or equal to 2, the distance between any two candidate coordinates among the M candidate coordinates is greater than a sixth threshold, which is determined based on the distance between the centers of the two markers.
[0213] In one possible implementation, the above-mentioned obtaining unit 1401 is specifically used to obtain CT images acquired by the above-mentioned CT device;
[0214] The aforementioned device further includes a fifth processing unit 1409. This unit is used to perform binarization processing on the aforementioned CT image to obtain the aforementioned first image. The binarization threshold in the binarization processing is a value located between the pixel value range corresponding to the aforementioned marker and the pixel value range corresponding to the aforementioned protective cover in the original CT image, wherein the pixel value range corresponding to the aforementioned marker and the pixel value range corresponding to the aforementioned protective cover do not overlap.
[0215] Please see Figure 15 , Figure 15 This is a schematic diagram of another marker coordinate determination device provided in an embodiment of this application. The marker coordinate determination device 150 can be used to implement the above-described marker coordinate determination method. For example, the marker coordinate determination device 150 can be a mobile phone, desktop computer, laptop, or other similar device.
[0216] like Figure 15As shown. The coordinate determination device 150 for the marker includes at least one processor 1502 and a transceiver 1501 for communicating with other devices / appliances via a transmission medium. The processor 1502 can use the transceiver 1501 to send and receive data and / or signaling.
[0217] Optionally, the marker coordinate determination device 150 may further include at least one memory 1503 for storing program instructions and / or data. The memory 1503 is coupled to the processor 1502. The coupling in this embodiment is an indirect coupling or communication connection between devices, units, or modules, and may be electrical, mechanical, or other forms, for information exchange between devices, units, or modules. The processor 1502 may operate in conjunction with the memory 1503. The processor 1502 may execute program instructions stored in the memory 1503. At least one of the at least one memory may be included in the processor.
[0218] This application embodiment does not limit the specific connection medium between the transceiver 1501, processor 1502, and memory 1503. This application embodiment... Figure 15 The memory 1503, processor 1502, and transceiver 1501 are connected via a bus 1504. Figure 15 The connections between other components are shown in thick lines only and are not intended to be limiting. This bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0219] In the embodiments of this application, the processor may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0220] It is understood that when the coordinate determination device 150 of the marker is the coordinate determination device 140 of the marker, the action performed by the acquisition unit 1401 can be performed by the transceiver 1501, or it can be performed by the processor 1502; the actions performed by the first processing unit 1402, the second processing unit 1403, the determination unit 1404, the filtering unit 1405, the interception unit 1406, the third processing unit 1407, the fourth processing unit 1408, and the fifth processing unit 1409 can be performed by the processor 1502.
[0221] This application also provides a computer-readable storage medium storing computer code that, when executed on a computer, causes the computer to perform the methods described in the above embodiments.
[0222] This application also provides a computer program product comprising computer code or a computer program that, when run on a computer, causes the methods described in the above embodiments to be executed. The above descriptions are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the above claims.
Claims
1. A method of coordinate determination of a marker, characterized by, The method comprises: obtaining a first image, the first image being obtained based on a CT image collected by a computer tomography (CT) device, the first image comprising N markers attached to a body surface of a subject, N being an integer greater than or equal to 1; performing at least one Gaussian difference processing on the first image to obtain a second image, in which a pixel value corresponding to a pixel point in a region where the N markers are located is greater than a pixel value corresponding to a pixel point in another region, and the markers comprise spherical markers; performing clustering processing on pixel points in the second image with a pixel value greater than or equal to a first threshold value to obtain M candidate coordinates, the clustering processing comprising clustering processing based on pixel distance, and the M candidate coordinates being determined according to coordinates of clustering centers obtained by the clustering processing, M being an integer greater than or equal to N; the clustering processing on pixel points in the second image with a pixel value greater than or equal to the first threshold value to obtain M candidate coordinates comprises: performing first clustering processing on pixel points in the second image with a pixel value greater than or equal to the first threshold value to obtain S first candidate coordinates, the first clustering processing being clustering processing based on pixel distance, and the S first candidate coordinates being determined according to coordinates of clustering centers obtained by the first clustering processing, S being an integer greater than or equal to N; taking each of the first candidate coordinates as a center to cut a third image from the second image, when the third image has a circular shape, an area of the third image is greater than an area of the markers in the CT image, when the third image has a non-circular shape, the third image has an inscribed circle with an area greater than the area of the markers in the CT image; performing circle detection processing on the third image, in a case where a plurality of center coordinates of circles are obtained, performing second clustering processing on the plurality of center coordinates of circles to obtain the candidate coordinates, the second clustering processing being clustering processing based on distance between center coordinates of circles, and the candidate coordinates being determined according to a cluster containing the most center coordinates of circles in the second clustering processing; and obtaining the M candidate coordinates based on the S first candidate coordinates; in a case where M is equal to N, taking the M candidate coordinates as coordinates of the N markers.
2. The method of claim 1, wherein, The method further comprises: in a case where M is greater than N, selecting N candidate coordinates from the M candidate coordinates as coordinates of the N markers.
3. The method of claim 2, wherein, the markers comprise spherical markers, and the selecting N candidate coordinates from the M candidate coordinates as coordinates of the N markers in a case where M is greater than N comprises: taking each of the candidate coordinates as a center to cut a third image from the second image, when the third image has a circular shape, an area of the third image is greater than an area of the markers in the CT image, when the third image has a non-circular shape, the third image has an inscribed circle with an area greater than the area of the markers in the CT image; performing a circle detection processing on the third image, obtaining a plurality of circle center coordinates, performing a second clustering processing on the plurality of circle center coordinates to obtain candidate sphere center coordinates, the second clustering processing being a clustering processing based on circle center coordinate distance, and the candidate sphere center coordinates being obtained according to a cluster containing the most circle center coordinates in the second clustering processing; calculating a plurality of sphere radii based on the candidate sphere center coordinates, the plurality of circle center coordinates, and corresponding circle radii, the circle radii being obtained through the circle detection processing, one candidate sphere center coordinate corresponding to the plurality of sphere radii; in a case where a number K of candidate sphere center coordinates obtained based on the M candidate coordinates is an integer less than or equal to the M and greater than the N, selecting N candidate coordinates satisfying a first condition from the K candidate sphere center coordinates, the first condition including that an absolute value of a difference between a mean value of the plurality of sphere radii corresponding to the candidate sphere center coordinates and a radius of the marker is less than or equal to a third threshold value, and a variance of the plurality of sphere radii corresponding to the candidate sphere center coordinates is less than or equal to a fourth threshold value; taking the N candidate coordinates as coordinates of the N markers.
4. The method of claim 3, wherein, The method further includes: in a case where the K is equal to the N, taking the K candidate sphere center coordinates as coordinates of the N markers.
5. The method of claim 1, wherein, in a case where the M is greater than the N, selecting N candidate coordinates from the M candidate coordinates as coordinates of the N markers, including: calculating a plurality of sphere radii based on the candidate coordinates, the plurality of circle center coordinates, and corresponding circle radii, the circle radii being obtained through the circle detection processing, one candidate coordinate corresponding to the plurality of sphere radii; selecting N candidate coordinates satisfying a first condition from the M candidate coordinates, the first condition including that an absolute value of a difference between a mean value of the plurality of sphere radii corresponding to the candidate coordinates and a radius of the marker is less than or equal to a third threshold value, and a variance of the plurality of sphere radii corresponding to the candidate coordinates is less than or equal to a fourth threshold value; taking the N candidate coordinates as coordinates of the N markers.
6. The method according to any one of claims 1-5, characterized in that, The candidate coordinates are located outside a skin contour, and a distance between the candidate coordinates and the skin contour is less than or equal to a fifth threshold value, the fifth threshold value being determined according to a maximum distance between the center of the marker and the surface, and the skin contour being segmented from the first image.
7. The method according to any one of claims 1-5, characterized in that, in a case where the M is an integer greater than or equal to 2, a distance between any two candidate coordinates in the M candidate coordinates is greater than a sixth threshold value, the sixth threshold value being determined according to a distance between the centers of the two markers.
8. The method according to any one of claims 1-5, characterized in that, The marker periphery attached to the body surface of the implementation object includes a protective cover, the protective cover is included in the first image, the first image is obtained based on a CT image acquired by a computed tomography (CT) device, and the method includes: acquiring a CT image acquired by the CT device; The CT image is binarized to obtain the first image, and a binarization threshold in the binarization processing is a value between a pixel value interval corresponding to the marker and a pixel value interval corresponding to the protective cover in the original CT image, and the pixel value interval corresponding to the marker and the pixel value interval corresponding to the protective cover have no intersection.
9. A coordinate determining apparatus for markers, characterized by The device comprises: An obtaining unit is configured to obtain a first image, the first image being obtained based on a CT image collected by a computed tomography (CT) device, and the first image comprising N markers attached to a body surface of a subject, N being an integer greater than or equal to 1; A first processing unit is configured to perform at least one Gaussian difference processing on the first image to obtain a second image, and a pixel value corresponding to a pixel point in a region where the N markers are located in the second image being greater than a pixel value corresponding to a pixel point in another region, and the markers comprising spherical markers; A second processing unit is configured to perform clustering processing on pixel points in the second image having a pixel value greater than or equal to a first threshold to obtain M candidate coordinates, the clustering processing comprising clustering processing based on pixel distance, and the M candidate coordinates being determined according to coordinates of cluster centers obtained by the clustering processing, and M being an integer greater than or equal to N; The second processing unit is configured to perform clustering processing on pixel points in the second image having a pixel value greater than or equal to a first threshold to obtain M candidate coordinates, the clustering processing comprising clustering processing based on pixel distance, and the M candidate coordinates being determined according to coordinates of cluster centers obtained by the clustering processing, and M being an integer greater than or equal to N; A determining unit is configured to, in a case where M is equal to N, take the M candidate coordinates as coordinates of the N markers.
10. An electronic device, comprising: The device comprises: A processor and a memory, wherein the memory stores a computer program, and the processor invokes the computer program stored in the memory to execute the method in any one of claims 1-8. A processor and a memory, wherein the memory stores a computer program, and the processor invokes the computer program stored in the memory to execute the method in any one of claims 1-8.
11. A computer readable storage medium, characterized in that, The computer readable storage medium has stored therein a computer program, which, when executed on one or more processors, causes the method of any one of claims 1-8 to be performed.
Citation Information
Patent Citations
Image labeling method, device and system and cell labeling method
CN110570352A
Method and device for identifying marker in calibration object image, equipment and readable medium
CN113449745A