Disclosure of Invention
The invention mainly aims to provide a robot positioning method, electronic equipment and a storage medium for orthopedics puncture, which at least solve the problems that the positioning of an orthopedics puncture robot depends on complex positioning equipment and has high cost.
According to one aspect of the present invention, there is provided a robotic positioning method for orthopedic penetration, comprising:
step S1, arranging a mechanical arm at the body surface position of bone tissue to be punctured and arranging a plurality of marking points on the mechanical arm to obtain reference coordinates corresponding to the marking points;
S2, identifying all the coordinates of the marking points in the mechanical arm images under different angles, and constructing a three-dimensional coordinate space according to the identified coordinates of the marking points;
s3, performing puncture path planning on the mechanical arm image according to the three-dimensional coordinate space to obtain a puncture planning path;
s4, moving the mechanical arm provided with the puncture instrument based on the puncture planning path and aligning the mechanical arm with the puncture planning path;
And S5, re-acquiring the mechanical arm images under different angles to judge whether the puncture planning path meets the puncture requirement, and if not, executing the steps S2 to S4 until the puncture planning path meets the puncture requirement.
Further, the step S1 includes:
s11, performing image scanning through an X-ray machine to determine the body surface position of bone tissue to be punctured;
Step S12, the mechanical arm is arranged at the body surface position of the bone tissue to be punctured;
And S13, setting a plurality of marking points at the front end of the mechanical arm, and acquiring coordinates of the marking points as reference coordinates.
Further, the step S2 includes:
s21, acquiring mechanical arm images corresponding to the mechanical arms under different angles through an X-ray machine;
s22, preprocessing the mechanical arm image through a filtering algorithm;
step S23, identifying all marking points in the preprocessed mechanical arm image through a graphic processing algorithm to obtain marking point coordinates under different angles;
And S24, constructing a three-dimensional coordinate space based on the reference coordinates and the marked point coordinates.
Further, the step S24 includes:
s241, calculating a projection matrix between a reference coordinate and a mark point coordinate by a linear transformation method;
step S242, selecting a projection matrix with the minimum reprojection error as an optimal projection matrix under different angles;
Step S243, constructing a three-dimensional coordinate space based on the optimal projection matrix under different angles.
Further, the step S241 includes:
step S2411, determining all corresponding relations between mark point coordinates and reference coordinates of the mechanical arm images with different angles through an exhaustion method;
s2412, constructing a projection equation based on the corresponding relation to obtain a projection equation set;
and S2413, decomposing the projection equation set through a singular value decomposition method to obtain projection matrix parameters, and constructing a projection matrix by combining the projection matrix parameters.
Further, the step S3 includes:
s31, selecting planning points corresponding to the mechanical arm images with different angles;
Step S32, mapping the selected planning points into the constructed three-dimensional coordinate space to obtain a planning starting point and a planning end point;
Step S33, determining a puncture planning path by combining the planning starting point and the planning ending point;
step S34, calculating the moving distance of the plane of the mechanical arm to the planned path and judging the size relation between the moving distance and the reachable range of the mechanical arm;
And step S35, if the moving distance is larger than the reachable range of the mechanical arm, returning to the step S1, otherwise, executing the step S4.
Further, the step S5 includes:
s51, re-acquiring the images of the mechanical arm at different angles after the mechanical arm moves through an X-ray machine;
S52, performing image segmentation on the puncture needle in the re-acquired mechanical arm image to determine a current puncture path;
And step S53, judging whether the current puncture path meets the requirements of the anatomical structure, if so, completing path planning, and if not, executing the steps S2 to S4.
Further, the mechanical arm comprises a brake arm, a reference mark base and a puncture needle sleeve, wherein the puncture needle sleeve is connected to the brake arm, the reference mark base is arranged on the puncture needle sleeve, the brake arm is used for controlling the movement of the mechanical arm, the puncture needle sleeve is used for installing a puncture instrument, the reference mark base is used for setting a mark point, and the puncture instrument comprises a puncture needle or a puncture guide wire.
According to another aspect of an embodiment of the present invention, there is also provided an electronic device comprising a processor, a memory for storing processor-executable instructions, wherein the processor is configured to perform the method steps of any of the above.
According to another aspect of the embodiments of the present invention, there is also provided a computer readable storage medium, including a stored program, wherein the program when run controls a device in which the computer readable storage medium is located to perform any of the above method steps.
According to the invention, the three-dimensional coordinate space is constructed by arranging the plurality of marking points on the mechanical arm and combining the mechanical arm images with different angles, so that the accurate puncture path planning of the bone tissue is realized. In the planning process, the feasibility of planning the bone tissue puncture path is ensured by calculating the matching of the moving distance of the mechanical arm and the reachable range. In addition, the verification and optimization of the puncture planning path are realized by re-acquiring the current puncture path of the puncture needle of the mechanical arm image after the mechanical arm moves and judging whether the requirements of the anatomical structure are met, and the accuracy and safety of the orthopedics puncture operation are improved.
Detailed Description
It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other. The invention will be described in detail below with reference to the drawings in connection with embodiments.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the present invention. As used herein, the singular is also intended to include the plural unless the context clearly indicates otherwise, and furthermore, it is to be understood that the terms "comprises" and/or "comprising" when used in this specification are taken to specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof.
The relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise. Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description. Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but should be considered part of the authorization specification where appropriate. In all examples shown and discussed herein, any specific values should be construed as merely illustrative, and not a limitation. Thus, other examples of the exemplary embodiments may have different values. It should be noted that like reference numerals and letters refer to like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
According to one aspect of embodiments of the present invention, there is provided a method of positioning and aligning a micro-robot arm, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and although a logical sequence is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in a different order than that illustrated herein.
Referring to fig. 1, a robot positioning method for orthopaedics puncture according to an embodiment of the present application includes:
step S1, arranging a mechanical arm at the body surface position of bone tissue to be punctured and arranging a plurality of marking points on the mechanical arm to obtain reference coordinates corresponding to the marking points;
in an alternative embodiment, step S1 includes:
s11, performing image scanning through an X-ray machine to determine the body surface position of bone tissue to be punctured;
Step S12, the mechanical arm is arranged at the body surface position of the bone tissue to be punctured;
and S13, setting a plurality of marking points at the front end of the mechanical arm, and acquiring coordinates of the marking points as reference coordinates.
The mechanical arm is a main component of a robot, and is shown in fig. 2, the mechanical arm comprises a brake arm 1, a puncture needle sleeve 2 and a reference mark base 3, the puncture needle sleeve 2 is connected to the brake arm 1, the reference mark base 3 is arranged on the puncture needle sleeve 2, the brake arm 1 is provided with two, the brake arm 1 is used for controlling the movement of the mechanical arm, the puncture needle sleeve 2 is used for installing a puncture instrument, the reference mark base 3 is used for setting a mark point, and the puncture instrument comprises a puncture needle or a puncture guide wire.
It can be understood that the mechanical arm of the embodiment is mainly used for bone tissue puncture of various parts such as the spine, the spine is taken as an example in the embodiment, the mobile C-shaped arm X-ray machine is adopted by the X-ray machine, and the X-ray machine is used for scanning the image of the spine, so that the body surface position of the vertebral body to be punctured can be intuitively determined. In actual operation, a target spine region of a patient is scanned through a mobile C-shaped arm X-ray machine, an X-ray image of the target spine region is obtained, and the body surface position of the vertebral body to be punctured is determined according to the X-ray image of the target spine region. Then, the mechanical arm is installed at the body surface position of the vertebral body to be punctured, the mechanical arm is reset to an initial state and calibrated through a control system of the mechanical arm, and a plurality of positioning steel balls 31 for positioning are arranged on a reference mark base 3 of the mechanical arm, so that the overlapping of the positioning steel balls influences the shooting effect because of follow-up shooting, and the number of the positioning steel balls also influences the accuracy of calculation of a follow-up puncture planning path, therefore, the number of the positioning steel balls is set to be at least 8, each positioning steel ball is used as a mark point, a coordinate system of a scale is established by means of the arrangement of the front end of the mechanical arm and the positioning steel balls, and the reference coordinates of each mark point are obtained as C0= { x01, x02, x03, x04, x05, x06, x07, x08}.
S2, identifying all the coordinates of the marking points in the mechanical arm images under different angles, and constructing a three-dimensional coordinate space according to the identified coordinates of the marking points;
in an alternative embodiment, step S2 includes:
s21, acquiring mechanical arm images corresponding to the mechanical arms under different angles through an X-ray machine;
S22, preprocessing the mechanical arm image through a filtering algorithm;
step S23, identifying all marking points in the preprocessed mechanical arm image through a graphic processing algorithm to obtain marking point coordinates under different angles;
And S24, constructing a three-dimensional coordinate space based on the reference coordinates and the marked point coordinates.
Specifically, the mechanical arm installed at the body surface position of the vertebral body to be punctured is scanned by the mobile C-shaped arm X-ray machine, at least two scanning angles are provided, and the embodiment scans the mechanical arm images at the right position and the side position. And after the normal position image and the side position image of the mechanical arm are obtained, filtering the images through a filtering algorithm. And then, respectively dividing the marking points in the normal image and the side image by adopting a graphic processing algorithm to obtain the image coordinates of the center of each positioning steel ball in the normal image and the side image as marking point coordinates, wherein the marking point coordinates in the normal image are C1= { x11, x12, x13, x14, x15, x16, x17, x18}, and the marking point coordinates in the side image are C2= { x21, x22, x23, x24, x25, x26, x27, x28}. The image processing algorithm can adopt any one of spot detection, edge detection, gravity center and cross characteristic points.
According to the embodiment, through at least two X-ray image shooting at different angles (such as the right position and the side position), the spatial position information of the mechanical arm and the marking point can be more comprehensively captured. The image coordinates of each marking point can be accurately extracted by performing marking point identification on the preprocessed image by adopting a graphic processing algorithm such as spot detection or edge detection. Compared with the traditional three-dimensional positioning method, the method does not need extra optical positioning or electromagnetic positioning equipment, reduces the operation cost and simplifies the preoperative preparation flow. Through automatic image processing and three-dimensional coordinate space construction, a doctor can determine a puncture path more quickly, so that the operation time is shortened, and the operation efficiency is improved. In an alternative embodiment, step S24 includes:
s241, calculating a projection matrix between a reference coordinate and a mark point coordinate by a linear transformation method;
step S2411, determining all corresponding relations between mark point coordinates and reference coordinates of the mechanical arm images with different angles through an exhaustion method;
S2412, constructing a projection equation based on the corresponding relation to obtain a projection equation set;
and S2413, decomposing the projection equation set through a singular value decomposition method to obtain projection matrix parameters, and constructing a projection matrix by combining the projection matrix parameters.
Step S242, selecting a projection matrix with the minimum reprojection error as an optimal projection matrix under different angles;
Step S243, constructing a three-dimensional coordinate space based on the optimal projection matrix under different angles.
Because of the shooting angle and the randomness of the arrangement of the mark points, the mark points in the normal image and the side image need to establish a corresponding relationship. In this embodiment, all the corresponding relations between the coordinates of the marking points of the normal image and the side image and the reference coordinate are established by an exhaustion method, and the corresponding relation between the coordinates of the marking points under the normal image and the reference coordinate and the corresponding relation between the coordinates of the marking points under the side image and the reference coordinate are determined by exhausting 8 |=40320 corresponding relations between C0 and C1 and C2. For each corresponding relation, solving a projection matrix by using a Direct Linear Transformation (DLT) method, calculating the reprojection errors of all corresponding relations, and selecting the projection matrix with the minimum reprojection error as an orthographic projection matrix. Similarly, for each corresponding relationship, a direct linear transformation method is used to solve the side projection matrix, and the side projection matrix with the smallest reprojection error is selected as the side projection matrix. And constructing a three-dimensional coordinate space based on the obtained orthographic projection matrix and the lateral projection matrix.
The corresponding relation between all possible mark point coordinates and reference coordinates is determined through an exhaustion method, and the projection matrix is solved by using a Direct Linear Transformation (DLT) method based on the corresponding relation, so that the accuracy of the projection matrix can be greatly improved. The exhaustive approach ensures that all possible correspondences are considered so that an optimal (i.e. least re-projection error) projection matrix can be found. Because all possible corresponding relations are considered, and the projection matrix with the minimum reprojection error is selected, the embodiment has stronger robustness to noise, mark point errors and other interference factors, and even if some uncertainty or error is encountered in practical application, more accurate results can be obtained. And constructing a three-dimensional coordinate space based on the obtained orthographic projection matrix and the lateral projection matrix, so that the constructed space can be ensured to be consistent with the actual situation.
S3, performing puncture path planning on the mechanical arm image according to the three-dimensional coordinate space to obtain a puncture planning path;
in an alternative embodiment, step S3 includes:
s31, selecting planning points corresponding to the mechanical arm images with different angles;
Step S32, mapping the selected planning points into the constructed three-dimensional coordinate space to obtain a planning starting point and a planning end point;
step S33, determining a puncture planning path by combining the planning starting point and the planning ending point;
Step S34, calculating the moving distance of the plane of the mechanical arm to the planned path and judging the size relation between the moving distance and the reachable range of the mechanical arm;
And step S35, if the moving distance is larger than the reachable range of the mechanical arm, returning to the step S1, otherwise, executing the step S4.
Specifically, two planning points are respectively selected according to the target positions to be punctured on the normal image and the side image, straight lines passing through the respective planning points on the normal image and the side image are respectively drawn, and the two obtained straight lines intersect at one point in a three-dimensional coordinate space, namely, a puncture target point. And determining a planning starting point and a planning end point in a three-dimensional coordinate space according to the puncture target point, and obtaining a puncture planning path according to the planning starting point and the planning end point. According to the space coordinates of the puncture planning path in the three-dimensional coordinate space, calculating the moving distance from the two braking arm planes of the mechanical arm to the connecting line of the two coordinate points. The calculated movement distance is compared with the reach of the current configuration of the robotic arm. If the moving distance exceeds the reachable range of the mechanical arm, the step S1 is executed again, and the mechanical arm is replaced to adjust the puncture path. And if the moving distance is not beyond the reach range of the current configuration of the mechanical arm, executing the next step.
By selecting planning points on the normal position image and the side position image respectively and mapping the planning points to the constructed three-dimensional coordinate space, the position of the puncture target point can be determined more accurately, more accurate puncture operation can be realized in the operation process, and the risks of errors and complications are reduced. By calculating the moving distance from the plane of the mechanical arm to the planned path and judging the size relation between the distance and the reachable range of the mechanical arm, the mechanical arm can be ensured to move according to the planned path, the movement path of the mechanical arm is facilitated to be optimized, unnecessary movement and adjustment are reduced, and the efficiency and accuracy of the operation are improved.
S4, moving the mechanical arm provided with the puncture instrument based on the puncture planning path and aligning the mechanical arm with the puncture planning path;
Further, after the puncture planning path is determined, a puncture instrument is installed on the puncture needle sleeve of the mechanical arm, wherein the puncture instrument comprises a puncture needle or a puncture guide wire, and the puncture instrument is selected according to actual requirements. The robotic arm with the lancing device mounted thereon is moved along a planned path by a control system. The position and state of the mechanical arm are monitored to ensure that the mechanical arm moves according to a planned path and avoid the situations of deviation, collision and the like.
And S5, re-acquiring the mechanical arm images under different angles to judge whether the puncture planning path meets the puncture requirement, and if not, executing the steps S2 to S4 until the puncture planning path meets the puncture requirement.
In an alternative embodiment, step S5 includes:
s51, re-acquiring the images of the mechanical arm at different angles after the mechanical arm moves through an X-ray machine;
s52, performing image segmentation on the puncture needle in the re-acquired mechanical arm image to determine a current puncture path;
and step S53, judging whether the current puncture path meets the requirements of the anatomical structure, if so, completing path planning, and if not, executing the steps S2 to S4.
Specifically, the right-position image and the side-position image of the mechanical arm after moving are re-acquired through the C-shaped arm X-ray machine, the puncture needle in the right-position image and the side-position image of the re-acquired mechanical arm is segmented by utilizing an image processing algorithm, and the current puncture path of the mechanical arm after moving is determined. Comparing the obtained current puncture path with a preset anatomical structure, determining the relative relation between the current puncture path and the preset anatomical structure, judging whether the current puncture path can meet the requirement of the preset anatomical structure, and if the current puncture path can meet the requirement of the preset anatomical structure, completing puncture path planning and entering the operation of the next puncture operation. If the current puncture path cannot meet the requirement of the preset anatomical structure, the steps S2 to S4 are needed to be re-executed, and the puncture planning path is adjusted and optimized until the requirement of the anatomical structure is met.
And acquiring the normal position and the lateral position images after the mechanical arm moves again, extracting the current puncture path and comparing with a preset anatomical structure. The accuracy of the puncture path can be evaluated, and the accuracy of the operation is further improved. If the current puncture path does not meet the requirement of the preset anatomical structure, the puncture planning path is adjusted and optimized, so that timely and effective adjustment can be made according to actual conditions, the operation is performed on the premise that the puncture planning path meets the requirement of the anatomical structure, the reduction of operation risk is facilitated, and the safety and reliability of the operation are improved.
According to another aspect of an embodiment of the invention there is also provided an electronic device comprising a processor, a memory for storing processor executable instructions, wherein the processor is configured to perform the method steps of any of the above.
According to another aspect of the embodiments of the present invention, there is also provided a computer readable storage medium, the computer readable storage medium including a stored program, wherein the program when run controls a device in which the computer readable storage medium is located to perform the method steps of any one of the above.
The computer readable storage medium may be located in any one of the group of computer terminals in the computer network and/or in any one of the group of mobile terminals, and the computer readable storage medium includes a stored program.
Spatially relative terms, such as "above," "upper" and "upper surface," "above" and the like, may be used herein for ease of description to describe one device or feature's spatial relationship to another device or feature as illustrated in the figures. It will be understood that the spatially relative terms are intended to encompass different orientations in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is turned over, elements described as "above" or "over" other devices or structures would then be oriented "below" or "beneath" the other devices or structures. Thus, the process is carried out, the exemplary term "above" may be included. Upper and lower. Two orientations below. The device may also be positioned in other different ways (rotated 90 degrees or at other orientations) and the spatially relative descriptors used herein interpreted accordingly.
In addition, the terms "first", "second", etc. are used to define the components, and are only for convenience of distinguishing the corresponding components, and the terms have no special meaning unless otherwise stated, and therefore should not be construed as limiting the scope of the present invention.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.