A spatial positioning method, device and system based on grid encoding

By using a spatial positioning method based on grid coding, combined with the registration and comparison of visual positioning and 3D scanning data, high-precision and adaptive correction of surgical instruments is achieved, solving the problem of poor positioning stability in existing technologies and improving the robustness and applicability of the navigation system.

CN121647817BActive Publication Date: 2026-05-01SHANGHAI YIYING INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI YIYING INFORMATION TECH CO LTD
Filing Date
2026-02-06
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing surgical navigation technologies are insufficient to meet the requirements of high precision, high robustness, and strong coordination in precision surgery, especially in complex scenarios where positioning stability is poor and cannot meet the needs of minimally invasive surgery.

Method used

A spatial localization method based on grid coding is adopted. By acquiring individualized grid-coded images in real time, and combining them with visual localization algorithms and 3D scanning data for registration and comparison, the localization results are dynamically adjusted to achieve adaptive correction, utilizing the dual protection of grid coding and anatomical structure.

Benefits of technology

It significantly improves the positioning accuracy and reliability of the navigation system, enhances its robustness and clinical applicability in real surgical environments, and ensures high-precision navigation in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121647817B_ABST
    Figure CN121647817B_ABST
Patent Text Reader

Abstract

The application discloses a space positioning method, device and system based on grid coding, which comprises the following steps: based on a two-dimensional positioning grid attached to a target region of a target object, a first grid code image collected is acquired; a grid code unit is extracted from the first grid code image, a first estimated pose of a surgical instrument is calculated through a visual positioning algorithm based on a grid code generated based on an anatomical structure; based on the first grid code image, a pre-stored reference three-dimensional scanning data is compared and matched to obtain a first space registration deviation; when the first space registration deviation exceeds a preset deviation threshold, a navigation pose of the instrument device is obtained after the first estimated pose is corrected according to the first space registration deviation; when the first space registration deviation is within the preset deviation threshold, the first estimated pose is taken as the navigation pose of the instrument device. The application effectively improves the positioning accuracy and reliability of the navigation system and realizes adaptive correction of the intraoperative dynamic error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of positioning technology, and in particular to a spatial positioning method, apparatus and system based on grid coding. Background Technology

[0002] In the field of precision surgical navigation, such as in dental implantology, neurosurgery, and orthopedic surgery, accurately determining the position and orientation of surgical instruments relative to the patient's anatomical structures (collectively referred to as "position") is crucial. Traditional surgical navigation techniques include mechanical navigation and electromagnetic navigation. While mechanical navigation can achieve a certain level of accuracy, the equipment is bulky and the operating space is limited, making it difficult to meet the needs of minimally invasive surgery. Although electromagnetic navigation eliminates the constraints of line of sight, its signals are highly susceptible to electromagnetic interference from metal instruments in the operating room, resulting in poor positioning stability.

[0003] While emerging visual navigation solutions have improved positioning stability by employing technologies such as color coding and laser marking, most focus only on improvements to a single technical aspect (such as marker recognition or tool classification). Therefore, in the complex scenarios encountered in clinical practice, existing systems are insufficiently adaptable and struggle to meet the core requirements of precision surgery for navigation systems, which demand high precision, robustness, and strong synergy.

[0004] Therefore, it is difficult to meet the core requirements of modern precision surgery for navigation systems that require high precision, high robustness, and strong synergy. Summary of the Invention

[0005] To address the aforementioned issues, this application provides a spatial positioning method, apparatus, and system based on grid coding.

[0006] In a first aspect, this application provides a spatial positioning method based on grid coding, comprising the following steps:

[0007] Based on the two-dimensional positioning grid attached to the target area of ​​the target object, the first grid-coded image is acquired.

[0008] Based on the grid coding generated from the anatomical structure, grid coding units are extracted from the first grid coding image, and the first estimated pose of the instrument is calculated by the visual positioning algorithm.

[0009] Based on the first grid-encoded image, a registration comparison is performed with the pre-stored reference 3D scanning data to obtain the first spatial registration deviation;

[0010] When the first spatial registration deviation exceeds a preset deviation threshold, the first estimated pose is corrected based on the first spatial registration deviation to obtain the navigation pose of the instrument.

[0011] When the first spatial registration deviation is within the preset deviation threshold, the first estimated pose is used as the navigation pose of the instrument.

[0012] In one implementation, the spatial positioning method based on grid coding further includes:

[0013] When partial occlusion of the grid code is identified from the first grid code image, the first three-dimensional scan data is acquired, and the first anatomical structure image extracted from the first three-dimensional scan data is registered with the pre-stored reference three-dimensional scan data to estimate the second estimated pose of the instrument.

[0014] Based on the remaining uncluttered grid-encoded image, a registration comparison is performed with the pre-stored reference 3D scan data to obtain a second spatial registration deviation. After auxiliary calibration of the second estimated pose based on the second spatial registration deviation, the navigation pose is obtained.

[0015] In one implementation, before the step of calculating the first estimated pose of the device based on extracting grid coding units from the first grid coding image and using a visual positioning algorithm, the method further includes:

[0016] Based on a two-dimensional positioning grid attached to the target area, second three-dimensional scanning data is acquired, including grid images and anatomical structure images;

[0017] The second anatomical structure data from the second three-dimensional scan data is segmented and features are extracted to obtain a structured anatomical feature set; wherein, the anatomical features include: bone tissue edge contours, blood vessels, and bony landmarks; the anatomical feature set includes the following anatomical feature parameters: anatomical feature type, coordinates of each anatomical feature in the three-dimensional scan coordinate system, and morphological parameters of each anatomical feature;

[0018] The anatomical feature parameters are input into a multi-dimensional mapping model, and the anatomical feature parameters are transformed into layout constraints on the two-dimensional positioning grid through the multi-dimensional mapping model.

[0019] Based on the layout constraints, a grid code that maps to the spatial distribution of the anatomical structure is generated using a binary encoding algorithm.

[0020] In one implementation, after generating the grid code related to the anatomical structure using a binary encoding algorithm, the method further includes:

[0021] The spatial consistency of the spatial layout mapped by the grid code with the anatomical structure extracted from the second three-dimensional scan data is verified.

[0022] When the verification finds that the spatial layout of the grid code conflicts with the anatomical structure, the grid code units in the conflict area are locally adjusted to generate a corrected grid code.

[0023] In one implementation, the layout constraints include:

[0024] Spatial location constraints are used to mark the grid codes corresponding to the bony landmarks as high-priority sequences;

[0025] Morphological adaptation constraints are used to design the corresponding grid code encoding sequence as segmented according to the curvature of the bone tissue edge contour;

[0026] A safety distance constraint is used to increase the weight of the corresponding grid code based on the safety distance of the blood vessel.

[0027] In one implementation, the binary encoding algorithm performs the following operations:

[0028] In the high-priority region determined by the spatial location constraints, a predefined baseline code is implanted;

[0029] Based on the path determined by the morphological adaptation constraints, a continuous trunk coding sequence is generated, the direction of which is consistent with the direction of the curved shape.

[0030] Within the area defined by the safety distance constraint, encoding units with high contrast or embedded parity bits are used;

[0031] Fill the remaining region with a pseudo-random encoded sequence that is locally unique.

[0032] In one implementation, the step of extracting grid coding units from the first grid coding image, generating grid codes based on the anatomical structure, and calculating the first estimated pose of the instrument / device using a visual positioning algorithm includes:

[0033] By using subpixel-level corner detection technology, the corner points of the grid coding units in the two-dimensional positioning grid are identified, and the two-dimensional coordinates of the instrument in the first grid coding image are obtained.

[0034] By combining the grid code of the two-dimensional positioning grid with the camera parameters, the three-dimensional coordinates of the instrument are calculated using the PnP pose calculation algorithm, which serves as the first estimated pose.

[0035] Secondly, this application provides a spatial positioning device based on grid coding, including a memory, one or more processors, and a computer program stored in the memory, wherein the processor executes the computer program to implement the above-described steps of spatial positioning based on grid coding.

[0036] Thirdly, this application provides a spatial positioning system based on grid coding, comprising:

[0037] Such as the spatial positioning device based on grid coding mentioned above;

[0038] It also includes a two-dimensional positioning grid, which is attached to the target area of ​​the target object;

[0039] The equipment is equipped with an image acquisition device to acquire the first grid-coded image of the target area in real time.

[0040] In one implementation, the grid-based spatial positioning system further includes a cone-beam computed tomography (CBCT) device for acquiring first or second three-dimensional scan data of the target area.

[0041] Compared with the prior art, this application has at least one of the following advantages:

[0042] This application utilizes real-time intraoperative image acquisition, incorporating personalized grids and anatomical structures. First, grid coding enables rapid visual localization. Simultaneously, the real-time grid-coded images are registered and compared with preoperative baseline 3D scan data. Based on a preset deviation threshold, the system dynamically switches between directly using high-precision coded localization results and deviation-corrected results. This effectively improves the positioning accuracy and reliability of the navigation system, achieves adaptive correction of intraoperative dynamic errors, and significantly enhances its robustness and clinical applicability in real surgical environments. Attached Figure Description

[0043] The accompanying drawings used in the description of the embodiments of this application are briefly introduced below:

[0044] Figure 1 This is a flowchart of a spatial positioning method based on grid coding provided in an embodiment of this application;

[0045] Figure 2 This is another flowchart of the spatial positioning method based on grid coding provided in the embodiments of this application;

[0046] Figure 3 This is another flowchart of the spatial positioning method based on grid coding provided in the embodiments of this application;

[0047] Figure 4 This is a block diagram of a spatial positioning device based on grid coding provided in an embodiment of this application;

[0048] Figure 5 This is a schematic diagram of another block structure of the spatial positioning system based on grid coding provided in the embodiments of this application;

[0049] Figure 6The reference three-dimensional scan data obtained by a cone-beam computed tomography (CBCT) device is provided in the embodiments of this application. Detailed Implementation

[0050] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the specific implementation methods of this application will be described below with reference to the accompanying drawings. The drawings and implementation methods described below are merely some embodiments of this application. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings and implementation methods without creative effort. Any adjustments and improvements made without departing from the concept of this application are within the protection scope of this application.

[0051] To keep the drawings concise, only the parts relevant to this application are shown schematically in each drawing, and they do not represent the actual structure of the product. In addition, to make the drawings concise and easy to understand, some parts with the same structure or function are only shown schematically in some drawings, and there may actually be more or fewer parts with the same structure or function.

[0052] In the field of precision surgical navigation, such as in dental implantology, neurosurgery, and orthopedic surgery, accurately determining the position and orientation of surgical instruments relative to the patient's anatomical structures (collectively referred to as "position") is crucial. Traditional surgical navigation techniques include mechanical navigation and electromagnetic navigation. While mechanical navigation can achieve a certain level of accuracy, the equipment is bulky and the operating space is limited, making it difficult to meet the needs of minimally invasive surgery. Although electromagnetic navigation eliminates the constraints of line of sight, its signals are highly susceptible to electromagnetic interference from metal instruments in the operating room, resulting in poor positioning stability.

[0053] While emerging visual navigation solutions have improved positioning stability by employing technologies such as color coding and laser marking, most focus only on improvements to a single technical aspect (such as marker recognition or tool classification). Therefore, in complex clinical scenarios (such as intraoperative tissue deformation, visual field obstruction, and the need for real-time image updates), existing systems are insufficiently adaptable and struggle to meet the core requirements of precision surgery for navigation systems, which demand high precision, robustness, and strong synergy.

[0054] Therefore, it is difficult to meet the core requirements of modern precision surgery for navigation systems that require high precision, high robustness, and strong synergy.

[0055] This application acquires individualized grid-coded images intraoperatively, first using grid coding for rapid visual localization; then, it obtains registration deviations through grid-coded image registration and comparison, forming a dual guarantee of "coded localization - image verification". Finally, by comparing the registration deviation with a preset deviation threshold, it decides whether to directly use coded localization or correct the localization result, achieving adaptive correction and fault tolerance for intraoperative dynamic errors, significantly improving the overall reliability, robustness, and clinical applicability of the navigation system.

[0056] Please refer to Figure 1 This application provides a spatial positioning method based on grid coding, comprising the following steps:

[0057] S210. Based on the two-dimensional positioning grid attached to the target area of ​​the target object, the first grid-coded image is acquired.

[0058] S220. Based on the anatomical structure generated grid coding, grid coding units are extracted from the first grid coding image, and the first estimated pose of the instrument is calculated by the visual positioning algorithm.

[0059] S230. Based on the first grid-coded image, perform registration and comparison with the pre-stored reference three-dimensional scanning data to obtain the first spatial registration deviation;

[0060] S240. When the first spatial registration deviation exceeds the preset deviation threshold, the first estimated pose is corrected according to the first spatial registration deviation to obtain the navigation pose of the instrument.

[0061] S250. When the first spatial registration deviation is within the preset deviation threshold, the first estimated pose is used as the navigation pose of the instrument.

[0062] In this embodiment, a two-dimensional positioning grid is attached to the patient's target surgical area (such as the mandibular region or spinal segment). Based on the individualized anatomical characteristics of the patient's target surgical area, a corresponding grid code is pre-generated. The two-dimensional positioning grid and the human features of the target surgical area form the carrier of the grid code. A miniature image acquisition device (such as a color camera / RGB camera) mounted on the surgical instrument is activated to capture the surgical field of view in real time, acquiring a first grid-coded image. This first grid-coded image includes the two-dimensional positioning grid and the human surface features within the grid. Using an RGB camera to acquire grid-coded images during surgery reduces reliance on cone-beam computed tomography (CBCT) equipment, thereby reducing the radiation dose received by the patient.

[0063] Using image segmentation and feature extraction algorithms, grid-coded units in the first grid-coded image are identified, namely, the squares or specific geometric shapes that make up the grid, and the human body surface image within the grid. Based on the known grid-coded information bound to the patient's anatomical structure (i.e., the three-dimensional coordinates of each grid-coded unit in the grid physical coordinate system), combined with the pre-calibrated intrinsic parameters (focal length, principal point, distortion coefficient) and extrinsic parameters (such as the relative positional relationship with the instrument tip) of the image acquisition device, the first estimated pose of the surgical instruments is calculated using a visual positioning algorithm.

[0064] After obtaining the initial positioning (i.e., the first estimated pose) based on grid coding, the first grid-coded image is registered and compared with pre-stored reference 3D scan data to complete the verification. The pre-stored reference 3D scan data refers to the reference data acquired and processed from the patient preoperatively using a cone-beam computed tomography (CBCT) device, including a 3D anatomical digital model or its 2D feature projection set, and grid-coded image data, such as... Figure 6 As shown.

[0065] Feature point clouds extracted from the first grid-coded image are matched with corresponding feature point clouds extracted from pre-stored baseline 3D scan data. During registration, an optimal spatial transformation (rigid or non-rigid) is calculated that minimizes the overall distance error between the two sets of feature point clouds. The calculated average registration error or the maximum deviation of keypoints is used as the first spatial registration deviation. This first spatial registration deviation reflects the offset between the actual position of the anatomical structure and the expected position in the preoperative model / code due to slight patient movement during surgery, soft tissue deformation, or systematic cumulative errors.

[0066] The preset deviation threshold can be set according to the type of surgery and accuracy requirements, for example, 0.3 mm. When the calculated first spatial registration deviation exceeds the preset deviation threshold (e.g., >0.3 mm), it is determined that there is a non-negligible difference between the first estimated pose and the current actual anatomical position. Based on the calculated first spatial registration deviation, the first estimated pose needs to be inversely compensated or the correction transformation matrix output by the registration algorithm needs to be directly applied to generate a corrected spatial pose that better fits the actual anatomical position. This corrected pose is then used as the navigation pose for the instruments to guide the doctor's operation in real time.

[0067] When the first spatial registration deviation is less than or equal to a preset deviation threshold (e.g., ≤0.3mm), it is determined that the first estimated pose is basically consistent with the current actual anatomical position; the obtained first estimated pose can be directly used as the navigation pose of the instruments. This constitutes a positioning method that prioritizes coded positioning and supplements it with image verification. This embodiment achieves rapid initial positioning during surgery using individualized grid coding, and verifies and corrects it using real-time grid-coded images, thereby significantly improving the positioning accuracy, reliability, and overall robustness of the surgical navigation system in real, complex environments.

[0068] Please refer to Figure 2 In one embodiment, a spatial positioning method based on grid coding further includes:

[0069] S221. When it is identified that the grid code is partially occluded from the first grid code image, the first three-dimensional scan data is acquired, and the first anatomical structure image extracted from the first three-dimensional scan data is registered with the pre-stored reference three-dimensional scan data to estimate the second estimated pose of the instrument.

[0070] S231. Based on the remaining coded image of the grid that is not obscured, the image is registered and compared with the pre-stored reference 3D scanning data to obtain the second spatial registration deviation. Based on the second spatial registration deviation, the second estimated pose is calibrated to obtain the navigation pose.

[0071] In this embodiment, an image recognition algorithm (such as template matching or coding unit integrity detection) is used to determine whether the grid coding is partially occluded. Occlusion may be caused by surgical instruments, surgeon's fingers, blood, or tissue fluid. If the number of effectively decoded grid coding units does not reach a set threshold (e.g., less than 70% of the total number of units), or if there are large, discontinuous missing areas in the coding pattern, it is determined to be in a partially occluded state. At this time, the system switches from a coding-based localization mode to an anatomy-based, coding-assisted localization mode.

[0072] The first three-dimensional scan data acquired by cone-beam computed tomography (CBCT) is used to extract anatomical information of unobstructed areas, such as exposed bone edges and bony landmarks, to form a first anatomical image for registration. This first anatomical image is then registered with pre-stored reference three-dimensional scan data, which can reconstruct three-dimensional anatomical models of target anatomical structures such as bones and organs. During registration, first anatomical features for registration are extracted from the first anatomical image and matched with reference anatomical features in the reference three-dimensional scan data. Matching can be done in two ways: (i) 2D-3D registration, where intraoperative two-dimensional features are back-projected into spatial rays, and the model pose is adjusted using optimization algorithms to achieve the best match; (ii) 2D-2D registration, where features of two two-dimensional images are directly compared. When adjusting the virtual pose of the camera on the representative instrument using optimization algorithms (such as a variant of iterative nearest point ICP), the anatomical features projected onto the image plane by the three-dimensional anatomical model in this virtual pose must best match the features of the first anatomical image. After registration convergence, the resulting virtual camera pose is the second estimated pose estimated based on the currently available anatomical information. This second estimated pose provides a rough estimate of the spatial position and orientation when the encoded information is incomplete.

[0073] Although the lattice coding is partially occluded, the remaining uncluttered coded region (remaining lattice-coded image) still contains absolute spatial information. This information is used to calibrate the second estimated pose. The effective uncluttered lattice codes in the first lattice-coded image are segmented. The remaining lattice-coded image is registered with pre-stored reference 3D scan data. Through feature matching, the local deformation or offset of the remaining coded region relative to its theoretical complete position can be calculated; this offset is quantized as the second spatial registration bias. Using the remaining lattice coding, the second estimated pose obtained based on anatomical matching is anchored and fine-tuned to output the navigation pose.

[0074] This embodiment effectively solves the problem of navigation interruption caused by marker occlusion in traditional schemes by switching to an anatomically-led, coding-assisted mode when the coded portion is occluded, and using the remaining coding information to calibrate the anatomical localization results. This not only greatly enhances the system's continuous working capability and robustness in real and complex surgical environments, but also ensures that it can still provide navigation accuracy that meets clinical needs in extreme cases, which is a key technical guarantee for achieving reliable surgical navigation.

[0075] Please refer to Figure 3 In one embodiment, before calculating the first estimated pose of the device based on extracting grid-coded units from the first grid-coded image and using a visual positioning algorithm, the method further includes:

[0076] S110. Based on the two-dimensional positioning grid attached to the target area, the collected second three-dimensional scanning data is obtained. The second three-dimensional scanning data includes grid images and anatomical structure images.

[0077] S120. The second anatomical structure data from the second three-dimensional scan data is segmented and features are extracted to obtain a structured anatomical feature set. The anatomical features include: bone tissue edge contours, blood vessels, and bony landmarks. The anatomical feature set includes the following anatomical feature parameters: anatomical feature type, coordinates of each anatomical feature in the three-dimensional scan coordinate system, and morphological parameters of each anatomical feature.

[0078] S130. Input the anatomical feature parameters into the multi-dimensional mapping model, and transform the anatomical feature parameters into layout constraints on the two-dimensional positioning grid through the multi-dimensional mapping model.

[0079] S140. Based on layout constraints, a grid code mapping to the spatial distribution of anatomical structures is generated using a binary encoding algorithm. In one embodiment, the layout constraints include: spatial position constraints, used to mark the grid codes corresponding to bony landmarks as high-priority sequences; morphological adaptation constraints, used to design the encoding sequence of the corresponding grid code as segmented according to the curvature of the bone tissue edge contour, with the boundaries of the segmented sequence aligned with the curvature change points of the curvature; and safety distance constraints, used to increase the weight of grid code units in the grid code for grid codes of adjacent high-risk anatomical structures.

[0080] In this embodiment, before surgical planning, a two-dimensional positioning grid without coding is attached to the patient's target surgical area. Using a three-dimensional medical imaging device such as CBCT (cone-beam computed tomography), the target area with the attached two-dimensional positioning grid is scanned, acquiring second three-dimensional scan data containing grid images and images of the patient's anatomical structures. A fixed spatial correspondence is established between the physical spatial location of the grid and the patient's anatomical structures in the three-dimensional image data.

[0081] Using medical image segmentation algorithms (such as U-Net networks based on region growing, level sets, or deep learning), target bone tissue, adjacent important blood vessels, and nerves are segmented from CBCT data. Key anatomical features are extracted from the segmented 3D structures, such as: bone contours: extracting the surface contours of bones like the mandible and maxilla, and calculating their curvature, key inflection points, and other morphological parameters; blood vessels: identifying and tracing the central paths of important blood vessels (such as the inferior alveolar nerve canal and maxillary sinus wall vessels), recording their 3D spatial orientation vectors and local diameters; bony landmarks: recording their 3D coordinates (X, Y, Z) in the CBCT coordinate system for bony landmarks with clear anatomical significance, such as condylar apex, mental foramen center, and implant target points. A feature set is constructed: all extracted anatomical features are structured to form an anatomical feature set. This anatomical feature set records each anatomical feature and includes at least the following anatomical feature parameters: feature type: mandibular contour, inferior alveolar nerve canal, condylar landmark. Three-dimensional coordinates: Key spatial location information of structural features, such as the coordinates of bony landmarks, or the discrete point cloud coordinates of contour lines and blood vessels. Morphological parameters: Geometric properties describing anatomical features, such as the curvature of bony contours (e.g., 120°) and the average diameter of blood vessels (e.g., 2.1 mm).

[0082] The anatomical feature set is input into a multi-dimensional mapping model. The core function of this model is to translate the semantic and geometric information of the anatomy into constraints on the physical layout of the generated grid code. An example of the mapping process is as follows: Spatial position constraints: Bone landmarks are identified and their three-dimensional coordinates are projected onto the plane where the grid is located; grid areas near the projection points are marked as high-priority areas. Morphological adaptation constraints: For the mandibular contour, which has a 120° curvature, the coding is designed as segmented within the strip-shaped area on the grid that overlaps with the contour projection. The direction of each segment of coding is synchronized with the local bone curvature change, ensuring that the geometric deformation characteristics of the coding pattern are compatible with the natural morphology of the anatomical structure. Safe distance constraints: For vessels only 3mm away from the implantation target, a safe buffer zone is defined around their projection position; grid coding units within the buffer zone are assigned higher weights and use highly contrasted (e.g., high-frequency black-and-white alternation) or redundant coding patterns embedded with error-correcting bits. This makes the system extremely sensitive to even minor positioning deviations in this area during surgery, thus proactively avoiding risks.

[0083] In one embodiment, a spatial positioning method based on grid coding further includes:

[0084] The spatial consistency between the spatial layout mapped by the grid code and the anatomical structure extracted from the second three-dimensional scan data is verified.

[0085] When the verification process finds a conflict between the spatial layout of the grid code and the anatomical structure, the grid code units in the conflicting area are locally adjusted to generate a corrected grid code.

[0086] In this embodiment, after initially generating the grid code, the spatial layout of the anatomical structure mapped by the grid code is compared with the anatomical structure extracted from the second 3D scan data. For example, a safety buffer zone with an outward expansion of 1.0 mm is set for important blood vessels / nerves, and any coding unit is prohibited from falling into it. Through spatial overlay and collision detection, it is determined whether the coding layout conflicts. If a conflict is found (such as a coding sequence falling into the blood vessel buffer zone), it is determined to be a spatial layout conflict.

[0087] Upon detecting a conflict, local adjustments are made to eliminate it without affecting the overall validity of the coding. Adjustment strategies include: Local shift: shifting the entire conflict sequence out of the protected area; Mode swapping / flipping: swapping or flipping the binary values ​​of local coding units in the conflict area to change their risk attributes; Local re-optimization: regenerating a coding sequence that meets safety constraints for the conflict area while keeping the surrounding coding constant. After adjustments, a corrected grid coding is generated and re-verified to ensure complete conflict resolution.

[0088] In one implementation, the binary encoding algorithm performs the following operations:

[0089] In high-priority regions where spatial location constraints are defined, predefined baseline codes are implanted;

[0090] Based on the path determined by the morphological adaptation constraint, a continuous trunk coding sequence is generated, and the direction of the trunk coding sequence is consistent with the direction of the bending morphology.

[0091] Within the area defined by the safety distance constraint, coding units with high contrast or embedded parity bits are used;

[0092] Fill the remaining region with a pseudo-random encoded sequence that is locally unique.

[0093] In this embodiment, based on spatial constraints, the binary encoding algorithm writes a preset high-recognition baseline code into the region on the grid corresponding to key anatomical landmarks (such as the mental foramen) to determine the seed region; it has symmetry and high contrast, is insensitive to rotation and partial occlusion, and establishes a stable and reliable positioning anchor point for global encoding.

[0094] Based on morphological adaptation constraints, the binary encoding algorithm generates a backbone encoding sequence along a specified curved morphological path (such as BCD). The curved morphological path is mapped onto a grid to determine the backbone region. For the straight segment BC, a coding sequence with consistent direction is generated (e.g., using a cyclic shift register sequence); for the curved segment CD, it is subdivided into short straight segments, and a subsequence with matching direction is generated for each segment, ensuring that the subsequence boundaries are aligned with the curvature change points. Finally, the segments are connected to form a backbone skeleton conforming to the skeletal contour.

[0095] Based on the safety distance constraint, the binary encoding algorithm employs an enhanced redundancy coding pattern within the buffer zone corresponding to high-risk anatomical structures (such as blood vessels and nerves). For example, a higher spatial frequency black-and-white alternation pattern is used to improve contrast and edge sharpness; or error correction bits are embedded to improve fault tolerance. If the buffer zone overlaps with the seed region or the main region, the safety distance constraint is prioritized.

[0096] For all remaining regions, the binary encoding algorithm uses a cryptographically secure pseudo-random number generator to fill in the gaps, ensuring the overall randomness and unpredictability of the encoding. The binary encoding algorithm outputs a complete and unique binary encoding matrix. This matrix implants high-recognition seeds at key points, constructs a segmented backbone along curved morphology, strengthens fault-tolerant design in high-risk areas, and guarantees local uniqueness globally. Mapping this binary encoding matrix to a two-dimensional positioning grid creates a binding between the grid encoding, the two-dimensional positioning grid, and the patient's individualized anatomical structure, generating a navigation reference that combines high-precision spatial mapping with high environmental robustness.

[0097] In one implementation, grid coding units are extracted from a first grid coding image, and grid coding generated based on anatomical structures is used to calculate a first estimated pose of the instrument / device using a visual positioning algorithm, including:

[0098] By using subpixel-level corner detection technology, corner points of grid coding units in a two-dimensional positioning grid are identified, and the two-dimensional coordinates of the equipment in the first grid coding image are obtained.

[0099] By combining the grid code of the two-dimensional positioning grid with the camera parameters, the three-dimensional coordinates of the equipment are calculated using a visual positioning algorithm, which serves as the first estimated pose.

[0100] First, the intraoperative grid-coded image is preprocessed to extract the grid region and initially locate each coding unit. A corner detection algorithm is used to obtain the pixel-level coordinates of each unit's corner points, and then sub-pixel refinement technology is applied to improve its accuracy to the sub-pixel level. The grid-coded model bound to the patient is retrieved, which records the world 3D coordinates of each coding unit's corner points. The extracted sub-pixel corner points are matched with their corresponding world coordinates to establish a set of high-precision 2D-3D point pairs. These point pairs, the camera intrinsic matrix, and distortion coefficients are then input into the PnP algorithm. This algorithm solves for the rotation matrix R and translation vector T that best match the 3D point projection with the 2D image points, thus obtaining the camera pose relative to the grid coordinate system. Finally, combined with the known calibration offset of the surgical instruments in the camera coordinate system, the 3D coordinates and spatial orientation of the instrument tip in the world coordinate system are calculated through coordinate transformation. These two factors together constitute the first estimated pose of the instrument.

[0101] Please refer to Figure 4 This embodiment also provides a spatial positioning device 200 based on grid coding, including a memory 220, one or more processors 210 and a computer program stored on the memory 220. The processor 210 executes the steps of a spatial positioning based on grid coding as described in any of the embodiments above.

[0102] The above division of units is only a distinction based on logical function. In actual implementation, they can be fully or partially integrated into the same physical entity, or they can be physically separated. These units can be implemented in software, such as by a processor executing instructions from memory; or they can be implemented in hardware circuits, such as using application-specific integrated circuits (ASICs) or programmable logic devices (PLDs) to implement all or part of the functions. In addition, a hybrid implementation method combining software and hardware can also be used.

[0103] Please refer to Figure 5 This embodiment also provides a spatial positioning system based on grid coding, the system comprising:

[0104] A grid-based spatial positioning device 200 includes at least one processor 210 and a memory 220. The memory 220 stores a computer program that, when executed by the processor 210, implements all the method steps described above. This device can be integrated into the main unit of a navigation system.

[0105] A two-dimensional positioning grid is attached to the target area of ​​the target object (patient), and its surface carries a unique grid code generated based on the patient's anatomical characteristics.

[0106] Instrument 100, such as a surgical handpiece or probe, is equipped with an image acquisition device (such as a miniature camera) for real-time acquisition of a first grid-coded image containing grids and surgical field anatomical structures.

[0107] In one embodiment, the spatial positioning system based on grid coding further includes: a cone-beam computed tomography (CBCT) device for acquiring first three-dimensional scan data or second three-dimensional scan data of the target area. The CBCT device is a cone-beam computed tomography (CBCT) device.

[0108] When the system is working, the image data collected by the instruments or the three-dimensional scan data collected by the cone-beam computed tomography (CBCT) device are transmitted to the positioning device for processing. The navigation pose calculated by the positioning device is sent to the display unit to guide the doctor's operation.

[0109] It should be noted that the above embodiments can be freely combined as needed. The above are only some embodiments of this application. It should be pointed out that for those skilled in the art, several improvements and modifications can be made without departing from the principles of this application, and these improvements and modifications should also be considered within the protection scope of this application.

Claims

1. A spatial positioning method based on grid coding, characterized in that, Includes the following steps: Based on the two-dimensional positioning grid attached to the target area of ​​the target object, the first grid-coded image is acquired. Based on the grid coding generated from the anatomical structure, grid coding units are extracted from the first grid coding image, and the first estimated pose of the instrument is calculated by the visual positioning algorithm. Based on the first grid-encoded image, a registration comparison is performed with the pre-stored reference 3D scanning data to obtain the first spatial registration deviation; When the first spatial registration deviation exceeds a preset deviation threshold, the first estimated pose is corrected based on the first spatial registration deviation to obtain the navigation pose of the instrument. When the first spatial registration deviation is within the preset deviation threshold, the first estimated pose is used as the navigation pose of the instrument. Before calculating the first estimated pose of the device based on the extraction of grid-coded units from the first grid-coded image and the visual positioning algorithm, the method further includes: Based on a two-dimensional positioning grid attached to the target area, second three-dimensional scanning data is acquired, including grid images and anatomical structure images; The second anatomical structure data from the second three-dimensional scan data is segmented and features are extracted to obtain a structured anatomical feature set; wherein, the anatomical features include: bone tissue edge contours, blood vessels, and bony landmarks; the anatomical feature set includes the following anatomical feature parameters: anatomical feature type, coordinates of each anatomical feature in the three-dimensional scan coordinate system, and morphological parameters of each anatomical feature; The anatomical feature parameters are input into a multi-dimensional mapping model, and the anatomical feature parameters are transformed into layout constraints on the two-dimensional positioning grid through the multi-dimensional mapping model. Based on the layout constraints, a grid code that maps to the spatial distribution of the anatomical structure is generated using a binary encoding algorithm.

2. The spatial positioning method based on grid coding according to claim 1, characterized in that, Also includes: When partial occlusion of the grid code is identified from the first grid code image, the first three-dimensional scan data is acquired, and the first anatomical structure image extracted from the first three-dimensional scan data is registered with the pre-stored reference three-dimensional scan data to estimate the second estimated pose of the instrument. Based on the remaining uncluttered grid-encoded image, a registration comparison is performed with the pre-stored reference 3D scan data to obtain a second spatial registration deviation. After auxiliary calibration of the second estimated pose based on the second spatial registration deviation, the navigation pose is obtained.

3. The spatial positioning method based on grid coding according to claim 1, characterized in that, After generating the grid code related to the anatomical structure using a binary encoding algorithm, the method further includes: The spatial consistency of the spatial layout mapped by the grid code with the anatomical structure extracted from the second three-dimensional scan data is verified. When the verification finds that the spatial layout of the grid code conflicts with the anatomical structure, the grid code units in the conflict area are locally adjusted to generate a corrected grid code.

4. The spatial positioning method based on grid coding according to claim 1, characterized in that, The layout constraints include: Spatial location constraints are used to mark the grid codes corresponding to the bony landmarks as high-priority sequences; Morphological adaptation constraints are used to design the corresponding grid code encoding sequence as segmented according to the curvature of the bone tissue edge contour; A safety distance constraint is used to increase the weight of the corresponding grid code based on the safety distance of the blood vessel.

5. The spatial positioning method based on grid coding according to claim 4, characterized in that, The binary encoding algorithm performs the following operations: In the high-priority region determined by the spatial location constraints, a predefined baseline code is implanted; Based on the path determined by the morphological adaptation constraints, a continuous trunk coding sequence is generated, the direction of which is consistent with the direction of the curved shape. Within the area defined by the safety distance constraint, encoding units with high contrast or embedded parity bits are used; Fill the remaining region with a pseudo-random encoded sequence that is locally unique.

6. A spatial positioning method based on grid coding according to claim 1 or 2, characterized in that, The step of extracting grid coding units from the first grid coding image, generating grid codes based on the anatomical structure, and calculating the first estimated pose of the instrument / device using a visual positioning algorithm includes: By using subpixel-level corner detection technology, the corner points of the grid coding units in the two-dimensional positioning grid are identified, and the two-dimensional coordinates of the instrument in the first grid coding image are obtained. By combining the grid code of the two-dimensional positioning grid with the camera parameters, the three-dimensional coordinates of the instrument are calculated using the PnP pose calculation algorithm, which serves as the first estimated pose.

7. A spatial positioning device based on grid coding, comprising a memory, one or more processors, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the spatial positioning method based on grid coding as described in any one of claims 1-6.

8. A spatial positioning system based on grid coding, characterized in that, include: The spatial positioning device based on grid coding as described in claim 7; It also includes a two-dimensional positioning grid, which is attached to the target area of ​​the target object; The equipment is equipped with an image acquisition device to acquire the first grid-coded image of the target area in real time.

9. A spatial positioning system based on grid coding according to claim 8, characterized in that, Also includes: A cone-beam computed tomography (CBCT) device acquires first or second three-dimensional scan data of the target region.

Citation Information

Patent Citations

  • Positioning device and method of AR surgical navigation system

    CN116077184A

  • Spatial registration method, device and system for surgical navigation and medium

    CN116172703A