Operation area extraction method for unmarked operation registration, electronic equipment and readable storage medium

Through the combined gray depth of area growth criteria and polygonal contour judgment method, the extraction of surgical areas in label-free surgical navigation is optimized, and the problem of strong dependence of traditional methods on fixed thresholds is solved, high-precision segmentation and stability extraction under different conditions is achieved, and the accuracy and safety of surgical registration are improved.

CN120495331APending Publication Date: 2025-08-15SHANGHAI SHANGZHI YOUZHUO ROBOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510554722.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing regional growth methods are highly dependent on fixed thresholds in label-free surgical navigation, making them difficult to adapt to different patients and imaging conditions, resulting in low segmentation accuracy and susceptible to noise and interference point clouds, affecting the accuracy of surgical registration.

Method used

Adaptive threshold adjustment and polygonal contour judgment based on gray depth joint are adopted, neighborhood points are screened through gray depth joint area growth criteria, and thresholds are dynamically adjusted based on grayscale and depth statistics of local windows to generate polygonal contours for inclusion judgment of three-dimensional point clouds, and surgical area extraction is optimized.

Benefits of technology

It improves the stability and accuracy of surgical area extraction, reduces positioning errors, enhances the success rate and safety of label-free surgical navigation, and adapts to accurate segmentation in different patients and imaging conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495331A_ABST
    Figure CN120495331A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of medical image processing and point cloud segmentation, and particularly relates to an operation area extraction method for unmarked operation registration, electronic equipment and a readable storage medium, and the method comprises the following steps: S1, collecting operation area data of a patient, and obtaining a two-dimensional image and a point cloud; s2, the collected two-dimensional image is preprocessed; s3, automatically generating one or more points on the two-dimensional image as seed points; (S4); screening pixel points in a neighborhood according to a gray depth joint requirement to obtain a pixel mask; s5, extracting the edge of the growth mask; and S6, carrying out inclusion judgment on the three-dimensional point cloud based on the edge extracted by the two-dimensional image. According to the method, the speed of data processing in the operation can be increased, the limitation of a traditional region growing method is greatly improved, and the stability and robustness of operation region extraction are enhanced, so that the accuracy of operation registration is improved, the positioning error is reduced, and the success rate and safety of unmarked operation navigation in clinical application are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of medical image processing and point cloud segmentation, and particularly relates to a surgical area extraction method for markerless surgical registration, an electronic device and a readable storage medium. Background Art

[0002] Markerless surgical navigation is a key technology in surgical navigation. Preoperative medical data (such as CT and MRI) is used to perform three-dimensional reconstruction to obtain a three-dimensional model of the patient. During surgery, the patient's surface data is collected, and the two are aligned through point cloud registration to achieve patient surgical registration. The accuracy of surgical registration determines the accuracy of patient positioning during surgery.

[0003] In actual surgical scenarios, there are often various interference sources that will generate interference point clouds, thus affecting the registration effect. In abdominal percutaneous puncture surgery, a surgical positioning pad is usually required to fix the patient's posture. However, the presence of the positioning pad may cause the patient's body surface point cloud scanned during the operation to contain some interference point clouds of the positioning pad. In addition, the patient's clothing may also become an interference source, further increasing the number of interference point clouds. The presence of these interference point clouds greatly affects the accuracy of point cloud registration, and thus affects the overall accuracy of the operation. Therefore, how to effectively identify and remove these interference point clouds to improve the accuracy of surgical registration has become an important problem that needs to be solved in markerless surgical navigation systems.

[0004] Region growing is a widely used technique in medical image processing and point cloud segmentation. Its basic principle is to start from a selected seed point and expand the neighborhood based on a preset similarity criterion, incorporating pixels or points that meet the criteria into the growing region, ultimately completing the segmentation of the target region. Traditional region growing methods typically rely on fixed grayscale and depth thresholds for neighborhood screening. Specifically, when the grayscale or depth difference between a neighboring pixel or point and the current seed point is less than the set threshold, the point is included in the growing region. This fixed threshold strategy has certain limitations. This method is highly dependent on parameters. Due to the significant differences in anatomy, imaging conditions, and lighting environments between patients, the same fixed threshold may not guarantee good segmentation results in different situations. Furthermore, fixed threshold methods are sensitive to noise and interfering points, and can easily include non-target areas such as positioning pads and clothing into the growing region, thus affecting the accuracy of point cloud registration. In complex anatomical regions, fixed threshold growing strategies can also lead to under-segmentation or over-segmentation. When the boundary gradient is large, growing may terminate prematurely, resulting in incomplete extraction of the target region. In areas with smoother boundaries, excessive growing may occur, leading to missegmentation. Therefore, how to optimize the region growing method so that it can dynamically adjust the growth conditions according to the characteristics of the local area to adapt to different tissue structures and imaging environments, improve the segmentation accuracy of the target area, and effectively remove the interfering point cloud is an important problem that needs to be solved at present. Summary of the Invention

[0005] In order to improve the accuracy of point cloud registration during surgical registration and take into account the real-time performance of intraoperative data processing, the present invention aims to provide a surgical area extraction method for markerless surgical registration.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A first aspect of the present invention provides a method for extracting a surgical area for markerless surgical registration, comprising the following steps:

[0008] S1: Collecting data of the patient's surgical area to obtain a two-dimensional image and a point cloud; the two-dimensional image includes a grayscale image and a grayscale depth image;

[0009] S2: preprocessing the collected two-dimensional images;

[0010] S3: Automatically generate one or more points as seed points on the two-dimensional image;

[0011] S4; filtering the pixels in the neighborhood according to the grayscale depth joint requirement to obtain a pixel mask;

[0012] S5: extract the edge of the growth mask;

[0013] S6: Containment judgment of 3D point cloud based on edges extracted from 2D image.

[0014] Furthermore, in step S3, the process of automatically generating one or more points as seed points on the two-dimensional image is as follows: based on the global grayscale histogram of the grayscale depth map, analyzing the distribution characteristics of the pixel grayscale value, and combining the local mean square error and depth gradient calculation to construct an automatic seed point selection strategy, and automatically selecting pixels located on a smooth tissue surface and with a stable anatomical structure as seed points;

[0015] The steps for constructing the automatic seed point selection strategy are as follows:

[0016] Calculate the global grayscale histogram of the grayscale depth map, analyze the grayscale distribution characteristics of the image, and use H(g) to describe the distribution of the number of pixels at different grayscale levels g in the image:

[0017]

[0018] Where I(x,y) represents the grayscale value of the pixel (x,y), δ(·) is the Kronecker delta function, and W and H are the width and height of the image, respectively.

[0019] In order to ensure that the seed point is located in an area with smooth surface and stable anatomical structure, the local mean square error σ of the grayscale variation is defined 2 (x,y):

[0020]

[0021] Where Ω is the local window centered at (x, y), μ(x, y) is the average grayscale value in the local window, and N is the number of pixels in the local window;

[0022] To measure the degree of change in the depth value in the area, for the depth map D(x,y), calculate the local depth gradient G D (x,y):

[0023]

[0024] Among them, D(x,y) is the depth value of the depth image, and Represent the depth gradient components in the horizontal and vertical directions respectively.

[0025] Furthermore, in step S4, the process of screening the pixels in the neighborhood according to the grayscale-depth joint requirement to obtain the pixel mask is as follows: constructing a region growing criterion for the joint grayscale-depth based on the eight-neighborhood connectivity principle; the region growing criterion includes fixed threshold determination and adaptive threshold adjustment;

[0026] The adaptive threshold is dynamically adjusted based on the grayscale and depth statistics of the local window:

[0027]

[0028] Among them, m G and m Z is the global grayscale depth mean, σ G and σ Z They represent the standard deviation of local grayscale depth change, the subscript window is the calculated value within the window, k is the influence coefficient of mean difference, the value range of k is 0.5~2, λ is the influence coefficient of depth change, the value range of λ is 0.5~2, ΔG adaptive To adapt to the dynamic threshold of local grayscale changes, ΔZ adaptive Dynamic threshold adapted to local depth changes; for any neighborhood pixel Q(x',y'), we can determine it by the following formula:

[0029]

[0030] like

[0031]

[0032] It is considered that the neighboring point Q should be added to the current growth region and continue to grow towards this point. Among them, P is the seed point of the current growth region, ΔD(P,Q) is the comprehensive difference measure of grayscale depth between point P and point Q, G is the grayscale value, and Z is the depth value.

[0033] Furthermore, in step S5, an edge detection algorithm is used to extract the edge of the pixel mask generated in step S4, and polygon fitting is further performed on the edge contour to reduce the number of data points, improve calculation efficiency, and maintain the main contour features of the target area.

[0034] Furthermore, in step S6, it is determined whether a point in the three-dimensional point cloud is located inside the polygonal contour generated in step S5 based on the ray method, thereby completing the extraction of the surgical area point cloud;

[0035] The ray method is as follows: select any point in the point cloud, shoot a ray horizontally to the right, and calculate the intersection points between the ray and the polygon outline. If there is an intersection, the number of intersections is recorded. If the number of times the ray intersects the polygon edge is an odd number, the point is inside the polygon. If the number of times the ray intersects the polygon edge is an even number, the point is outside the polygon. The formula is as follows:

[0036]

[0037] Where: I(P) indicates whether the point P(x,y) is inside the polygon; 1 represents inside, 0 represents outside, E i represents the sides of the polygon, Is a Boolean function that determines whether the ray of point P intersects with the polygon edge E i intersect.

[0038] Furthermore, in step S2, morphological preprocessing is performed on the grayscale depth map, including: first performing an erosion operation on the grayscale depth map, and then performing a dilation operation.

[0039] Furthermore, the erosion operation is to replace each pixel of the grayscale depth map with the minimum value within its neighborhood through a circular kernel, thereby shrinking the target area and removing noise in the background; the dilation operation is to replace each pixel of the grayscale depth map with the maximum value within its neighborhood through a circular kernel, thereby restoring the shape of the target area and filling the gaps or breaks generated during the erosion process.

[0040] Furthermore, in step S1, the patient's surgical area data is acquired by collecting data using a structured light camera.

[0041] A second aspect of the present invention provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements any step of the surgical area extraction method for markerless surgical registration as described in the first aspect.

[0042] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer processor, implements any step of the surgical area extraction method for markerless surgical registration as described in the first aspect.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] 1. This invention optimizes image processing technology to reduce the influence of interfering point clouds in non-surgical areas, thereby improving registration accuracy and reducing positioning errors during surgical registration. This invention makes surgical region extraction more stable and reliable, ensuring accurate segmentation under different patients and imaging conditions. While maintaining high accuracy, it also improves computational efficiency, significantly enhancing the success rate and safety of markerless surgical registration in clinical applications. It overcomes the problems of traditional region growing methods, such as strong dependence on fixed thresholds, sensitivity to noise and interfering point clouds, and the potential for under-segmentation or over-segmentation in complex anatomical regions.

[0045] 2. The present invention provides a method for extracting a patient's surgical area for markerless surgical registration. The method processes the patient's abdominal data collected by structured light to reduce the impact of interference point clouds on the accuracy of surgical registration.

[0046] 3. The present invention is used in the preprocessing of markerless surgical navigation, which can reduce the alignment error of surgical registration and improve the success rate and safety of markerless surgical registration in clinical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 Schematic diagram of the process of the present invention;

[0048] Figure 2 Schematic diagram of the image processing process of the present invention;

[0049] Figure 3 Schematic diagram of the point cloud processing effect of the present invention. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below through embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0051] Example 1

[0052] This embodiment provides a surgical area extraction method for markerless surgical registration. The method flow chart is as follows: Figure 1 As shown, the following steps are included:

[0053] S1: Collecting data of the patient's surgical area to obtain a two-dimensional image and a point cloud; the two-dimensional image includes a grayscale image and a grayscale depth image;

[0054] Use a structured light camera to collect data about the patient's surgical area: Adjust the structured light camera to the appropriate position to ensure that it covers the entire surgical area and avoids obstruction or reflection interference; adjust parameters such as exposure time, gain, and structured light projection intensity according to the ambient light to obtain optimal imaging quality, and collect the corresponding two-dimensional image and point cloud data.

[0055] A structured light camera is used to capture data from the patient's surgical area, including grayscale images, grayscale depth maps, and point cloud data. These data are then strictly aligned spatially. Due to the need for rapid intraoperative system feedback, 2D images are processed and aligned to 3D data.

[0056] The grayscale image provides texture information for the surgical area, while the grayscale depth image contains both grayscale and depth information, helping to distinguish anatomical structures at different depths. The point cloud data is used for subsequent 3D spatial processing. Because the grayscale depth image has clear boundaries at depth changes, it facilitates accurate segmentation of the surgical area during region growing, so it is chosen as the primary processing target.

[0057] S2: preprocessing the collected two-dimensional images;

[0058] Morphological preprocessing is performed on the grayscale depth map, including corrosion and dilation operations, to remove background noise, maintain the morphological characteristics of the target area, and improve the clarity of the region boundary, providing stable input data for subsequent region growing.

[0059] Among them, the grayscale depth map is first eroded, and each pixel of the grayscale depth map is replaced by the minimum value in its neighborhood through a circular kernel, thereby shrinking the target area and removing noise in the background; then the dilation operation is performed, and each pixel of the grayscale depth map is replaced by the maximum value in its neighborhood through a circular kernel, thereby restoring the shape of the target area and filling the gaps or breaks generated during the erosion process.

[0060] S3: Automatically generate one or more points as seed points on the two-dimensional image. The specific process is as follows:

[0061] Based on the global grayscale histogram of the grayscale depth map, the pixel grayscale value distribution characteristics are analyzed. Combined with the local mean square error and depth gradient calculation, an automatic seed point selection strategy is constructed to automatically select pixels located on a smooth tissue surface and with a stable anatomical structure as seed points. This automatic selection strategy comprehensively considers grayscale uniformity, anatomical structure stability, and depth gradient smoothness to improve the stability and accuracy of regional growth.

[0062] Calculate the global grayscale histogram of the grayscale depth map, analyze the grayscale distribution characteristics of the image, and use H(g) to describe the distribution of the number of pixels at different grayscale levels g in the image:

[0063]

[0064] Where I(x,y) represents the grayscale value of the pixel (x,y), δ(·) is the Kronecker delta function, and W and H are the width and height of the image, respectively.

[0065] In order to ensure that the seed point is located in an area with smooth surface and stable anatomical structure, the local mean square error σ of the grayscale variation is defined 2 (x,y):

[0066]

[0067] Where Ω is the local window centered at (x, y), μ(x, y) is the average grayscale value in the local window, and N is the number of pixels in the local window.

[0068] To measure the degree of change in the depth value in the area, for the depth map D(x,y), calculate the local depth gradient G D (x,y):

[0069]

[0070] Among them, D(x,y) is the depth value of the depth image, and Represent the depth gradient components in the horizontal and vertical directions respectively.

[0071] Based on the computational analysis of the above three types of image features, a multi-constrained optimization strategy for automatic seed point selection is constructed. First, the grayscale range that matches the surface characteristics of the human abdominal skin is screened in the global grayscale histogram to limit the initial distribution area of the candidate seed points. Subsequently, the local grayscale variation within this area is constrained so that its variance is controlled within the preset threshold T. σ In order to suppress local noise interference and enhance regional uniformity. At the same time, the local depth gradient constraint is introduced to screen the depth gradient change less than the set threshold T D The region is selected to ensure that the seed points are located in areas with smooth surfaces and stable anatomical structures. Taking into account the above constraints, pixel points that meet the requirements of grayscale uniformity, anatomical structure stability, and depth gradient smoothness are automatically selected as seed points. This improves the stability and accuracy of the region growing process and provides a robust and high-precision initial region for point cloud processing and matching in subsequent surgical navigation. The selected seed points must meet the grayscale depth continuity requirements of the subsequent region growing to ensure the stability of the region expansion.

[0072] S4: Filter the pixels in the neighborhood according to the grayscale-depth joint requirement to obtain a pixel mask. The specific process is as follows:

[0073] Starting from the initial seed point screened out in step S3, traverse the neighboring pixel points in eight directions. For each neighboring pixel point, the grayscale and depth changes between the point and the current seed point are calculated based on the preset grayscale threshold and depth threshold. When the grayscale depth difference of the neighboring pixel point meets the set threshold condition, the pixel point is considered to meet the growth condition and is marked as part of the new growth area. Next, the pixel point that meets the conditions will serve as a new seed point and continue to grow the region, thereby expanding the growth area and gradually expanding to the boundary of the target area, and finally completing the accurate segmentation of the target area.

[0074] Furthermore, for each initial seed point P(x,y), we traverse the pixel points Q(x',y') in its eight neighboring directions and calculate their grayscale and depth changes. Set the initial grayscale threshold ΔG threshold and the initial depth threshold ΔZ threshold To determine whether to join the growth area.

[0075] In addition, since the region growing method with a fixed threshold may cause mis-segmentation under different tissues or lighting conditions, a sliding window dynamic adaptive threshold strategy is added to dynamically adjust the threshold according to the local histogram characteristics in the region:

[0076]

[0077] Among them, m G and m Z is the global grayscale depth mean, σ G and σ Z They represent the standard deviation of local grayscale depth change, the subscript window is the calculated value within the window, k is the influence coefficient of mean difference, the value range of k is 0.5~2, λ is the influence coefficient of depth change, the value range of λ is 0.5~2, ΔG adaptive To adapt to the dynamic threshold of local grayscale changes, ΔZ adaptive Dynamic threshold that adapts to local depth changes. For any neighborhood pixel Q(x',y'), we can determine it by the following formula:

[0078]

[0079] like

[0080]

[0081] It is considered that the neighboring point Q should be added to the current growth region and continue to grow towards this point. Among them, P is the seed point of the current growth region, ΔD(P,Q) is the comprehensive difference measure of grayscale depth between point P and point Q, G is the grayscale value, and Z is the depth value.

[0082] S5: extract the edge of the growth mask;

[0083] An edge detection algorithm is used to detect the edge contour of the patient's abdomen, generate a maximum contour point set and simplify it into a polygonal contour to simplify the calculation.

[0084] The Canny edge detection algorithm is used to extract the edge contour of the mask area obtained in step S4 above, and the Douglas-Peucker algorithm is further used to generate an approximate polygon contour, such as Figure 2As shown in the figure, the green line is the irregular edge detected, and the red line is the simplified edge. The simplified edge can effectively remove the influence of slight jitter of the edge on the inclusion judgment of the 3D point, while maintaining the main features of the overall contour shape.

[0085] Specifically, Canny edge detection is first performed on the mask area, and the significant edges of the target area are extracted through steps such as Gaussian filtering denoising, calculating gradient information, non-maximum suppression, and double threshold processing to obtain a complete and coherent abdominal contour. Since the edges extracted by the Canny algorithm are usually composed of a large number of pixels, the amount of data is large, which is not conducive to subsequent calculations, so the Douglas-Peucker algorithm is further used for contour approximation. The Douglas-Peucker algorithm simplifies the contour in a recursive manner, calculates the maximum deviation from the contour point to the fitting line, and retains the key points when the error exceeds the set threshold, and finally generates an approximate polygonal contour composed of a small number of key points. While retaining the main morphological features of the abdominal contour, this method effectively reduces the number of data points, improves calculation efficiency, and ensures the stability of the contour data.

[0086] S6: Containment judgment of 3D point cloud based on edges extracted from 2D images;

[0087] For each point in the point cloud, determine whether it is inside the polygon outline to complete the abdominal point cloud screening. Use the ray method to determine whether the point in the point cloud is inside the polygon outline.

[0088] To go further, randomly select any point in the point cloud V, shoot a ray horizontally to the right, and calculate the intersection points between the ray and the polygon outline. If there is an intersection, record the number of intersections. If the number of times the ray intersects the polygon edge is odd, the point is inside the polygon. If the number of times the ray intersects the polygon edge is even, the point is outside the polygon. The formula is as follows:

[0089]

[0090] Where: I(P) indicates whether the point P(x,y) is inside the polygon (1 represents inside, 0 represents outside), E i represents the sides of the polygon, Is a Boolean function that determines whether the ray of point P intersects with the polygon edge E i intersect.

[0091] According to this method, the abdominal point cloud screening can be completed to obtain the target surgical area point cloud V', as shown in Figure 3 As shown, the obtained point cloud of the complete patient surface with interference points removed is convenient for subsequent surgical registration and can improve registration accuracy.

[0092] Example 2

[0093] This embodiment provides an electronic device including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, any step of the surgical area extraction method for markerless surgical registration as described in Example 1 is implemented.

[0094] The hardware of the electronic device in this embodiment also includes a GPU, a display buffer memory, a RAMD / A converter, and a heat sink that cooperate with the processor; the GPU is responsible for processing the graphic display of the electronic device, providing image rendering and acceleration functions, and using its parallel computing advantages to accelerate the processing of large-scale data-intensive tasks.

[0095] Furthermore, the surgical region extraction method for markerless surgical registration described in Example 1 can be implemented as a computer software program. For example, this embodiment includes a computer program product comprising a computer program embodied on a computer-readable medium, the computer program containing program code for executing the method. In such an embodiment, the computer program can be downloaded and installed from a network and / or installed from removable media. When executed by a processor, the computer program performs the aforementioned functions defined in the method of this application.

[0096] Example 3

[0097] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, any step of a surgical area extraction method for markerless surgical registration as described in Example 1 is implemented.

[0098] The computer-readable medium described in this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.

[0099] The computer program code for performing the operations of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as python, C++, and also conventional procedural programming languages or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet).

[0100] The computer-readable storage medium of this embodiment can be accelerated by hardware such as a GPU, and the parallel computing advantage of the GPU can be used to accelerate the processing of any step in the surgical area extraction method for markerless surgical registration as described in Example 1.

[0101] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the scope of protection of the present invention. Those skilled in the art can modify or replace the technical solutions of the present invention according to the concept of the present invention without departing from the essence and scope of the technical solutions of the present invention.

Claims

1. A surgical area extraction method for markerless surgical registration, characterized in that: The following steps are involved: S1: Collecting data of the patient's surgical area to obtain a two-dimensional image and a point cloud; the two-dimensional image includes a grayscale image and a grayscale depth image; S2: preprocessing the collected two-dimensional images; S3: Automatically generate one or more points as seed points on the two-dimensional image; S4; filtering the pixels in the neighborhood according to the grayscale depth joint requirement to obtain a pixel mask; S5: extract the edge of the growth mask; S6: Containment judgment of 3D point cloud based on edges extracted from 2D image.

2. The surgical area extraction method for markerless surgical registration according to claim 1, characterized in that: In step S3, the process of automatically generating one or more points as seed points on the two-dimensional image is as follows: based on the global grayscale histogram of the grayscale depth map, analyzing the distribution characteristics of the pixel grayscale value, and combining the local mean square error and depth gradient calculation to construct an automatic seed point selection strategy, and automatically selecting pixels located on a smooth tissue surface and with a stable anatomical structure as seed points; The steps for constructing the automatic seed point selection strategy are as follows: Calculate the global grayscale histogram of the grayscale depth map, analyze the grayscale distribution characteristics of the image, and use H(g) to describe the distribution of the number of pixels at different grayscale levels g in the image: Where I(x,y) represents the grayscale value of the pixel (x,y), δ(·) is the Kronecker delta function, and W and H are the width and height of the image, respectively. In order to ensure that the seed point is located in an area with smooth surface and stable anatomical structure, the local mean square error σ of the grayscale variation is defined 2 (x,y): Where Ω is the local window centered at (x, y), μ(x, y) is the average grayscale value in the local window, and N is the number of pixels contained in the local window; To measure the degree of change in the depth value in the area, for the depth map D(x,y), calculate the local depth gradient G D (x,y): Among them, D(x,y) is the depth value of the depth image, and Represent the depth gradient components in the horizontal and vertical directions respectively.

3. The surgical area extraction method for markerless surgical registration according to claim 1, characterized in that: In step S4, the process of screening the pixels in the neighborhood according to the grayscale-depth joint requirement to obtain the pixel mask is as follows: constructing a region growing criterion for the joint grayscale-depth based on the eight-neighborhood connectivity principle; the region growing criterion includes fixed threshold determination and adaptive threshold adjustment; The adaptive threshold is dynamically adjusted based on the grayscale and depth statistics of the local window: Among them, m G and m z is the global grayscale depth mean, σ G and σ Z They represent the standard deviation of local grayscale depth change, the subscript window is the calculated value within the window, k is the influence coefficient of mean difference, the value range of k is 0.5~2, λ is the influence coefficient of depth change, the value range of λ is 0.5~2, ΔG adaptive To adapt to the dynamic threshold of local grayscale changes, ΔZ adaptive Dynamic threshold that adapts to local depth changes; for any neighborhood pixel point Q(x',y'), the following formula is used to determine: like It is considered that the neighboring point Q should be added to the current growth area and continue to grow towards this point; where P is the seed point of the current growth area, ΔD(P,Q) is the comprehensive difference measure of grayscale depth between point P and point Q, G is the grayscale value, and Z is the depth value.

4. The surgical area extraction method for markerless surgical registration according to claim 1, characterized in that: In step S5, an edge detection algorithm is used to extract the edge of the pixel mask generated in step S4, and polygon fitting is further performed on the edge contour to reduce the number of data points, improve calculation efficiency, and maintain the main contour features of the target area.

5. The surgical area extraction method for markerless surgical registration according to claim 1, characterized in that: In step S6, the point in the three-dimensional point cloud is determined based on the ray method to determine whether it is located inside the polygonal contour generated in step S5, thereby completing the extraction of the surgical area point cloud; The ray method is as follows: select any point in the point cloud, emit a ray horizontally to the right, calculate the intersection points between the ray and the polygon outline, and record the number of intersections if they intersect. If the number of times the ray intersects the polygon edge is an odd number, the point is inside the polygon; if the number of times the ray intersects the polygon edge is an even number, the point is outside the polygon. The formula is as follows: Where: I(P) indicates whether the point P(x,y) is inside the polygon; 1 represents inside, 0 represents outside, E i represents the sides of the polygon, Is a Boolean function that determines whether the ray of point P intersects with the polygon edge E i intersect.

6. The surgical area extraction method for markerless surgical registration according to claim 1, characterized in that: In the step S2, morphological preprocessing is performed on the grayscale depth map, including: first performing an erosion operation on the grayscale depth map, and then performing a dilation operation.

7. The surgical area extraction method for markerless surgical registration according to claim 6, characterized in that: The erosion operation is to replace each pixel of the grayscale depth map with the minimum value within its neighborhood using a circular kernel, thereby shrinking the target area and removing background noise. The dilation operation is to replace each pixel of the grayscale depth map with the maximum value within its neighborhood using a circular kernel, thereby restoring the shape of the target area and filling the gaps or breaks generated during the erosion process.

8. The surgical area extraction method for markerless surgical registration according to claim 1, characterized in that: In step S1, the patient's surgical area data is acquired by collecting data using a structured light camera.

9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, any step of the surgical area extraction method for markerless surgical registration according to any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a computer processor, it implements any step of the surgical area extraction method for markerless surgical registration according to any one of claims 1 to 8.