Endoscope collision detection method, device, equipment and storage medium
Through three-dimensional data processing and grid planning technology, rapid and accurate collision detection and early warning in endoscopic surgery are achieved, solving the problem of insufficient collision detection accuracy and speed in the existing technology, and reducing the risk of surgery.
Patent Information
- Application Number
- CN202111080471.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-15
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2041-09-15
AI Technical Summary
In the prior art, the application of collision detection technology in endoscopic surgery is limited, and the accuracy and speed are difficult to meet the surgical requirements, making it difficult for doctors to avoid the inaccessible route in advance, increasing the risk of surgery.
By obtaining the three-dimensional data of the area to be detected, the grid structure is processed based on the preset grid planning rules, the collision warning section of the endoscope lens is obtained, the intersection point with the three-dimensional grid structure is judged, the target position is determined, the target collision distance is calculated, and the collision distance warning is issued.
It realizes rapid and accurate collision detection and collision warning detection during the use of endoscopy, avoiding the non-progress route in advance, and reducing the risk of surgery.
Smart Images

Figure CN114022548B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent medical technology, and in particular to an endoscope collision detection method, device, equipment and storage medium. Background Art
[0002] An endoscope is a detection instrument that integrates traditional optics, ergonomics, precision machinery, modern electronics, mathematics, and software. It has an image sensor, optical lens, light source, mechanical device, etc. It can enter the stomach through the mouth or other natural orifices into the body. Endoscopes can be used to see lesions that X-rays cannot show, so they are very useful to doctors. For example, with the help of an endoscope, doctors can observe ulcers or tumors in the stomach and develop the best treatment plan accordingly;
[0003] Endoscopic technology Modern minimally invasive surgical technology without surgery will increasingly replace traditional surgery and is undergoing rapid changes, among which the application of endoscopic technology is of particular significance; known as the "third eye of mankind", it is an ENT diagnosis and treatment "optical fiber" non-invasive device that integrates "examination-diagnosis-treatment". It is one of the most advanced technologies in the field of ENT treatment in the world and is the first breakthrough in the use of optical fibers in the history of human medicine;
[0004] The endoscope itself is a regular cylindrical structure, and its direction is changed by the snake bone at the front end. The entire endoscope can be divided into a hard endoscope (non-bendable) and a soft endoscope (bendable). Therefore, the detection method in collision detection during endoscopic surgery is different from that in other environments.
[0005] In endoscopic surgery, collision detection and collision warning are very important. In addition to ensuring that there is no collision between the endoscope and human tissue, the doctor also needs to determine in advance how long the endoscope will continue to walk in the current direction before a collision occurs, so as to avoid inaccessible routes in advance and facilitate the doctor's judgment. However, in the existing technology, the application of collision detection technology in endoscopes is more limited, and the accuracy and speed are difficult to meet the surgical requirements. Summary of the invention
[0006] In order to solve the above technical problems, in response to the above problems, the present application discloses an endoscope collision detection method, which can quickly and accurately perform collision detection and collision warning detection during the use of the endoscope, so as to avoid the impossible route in advance, and facilitate doctors to avoid surgical risks in advance according to the collision warning results.
[0007] In order to achieve the above-mentioned object of the invention, the present application provides an endoscope collision detection method, the method comprising:
[0008] Acquire three-dimensional data of the area to be inspected;
[0009] Based on a preset grid planning rule, the three-dimensional data is subjected to grid structure processing to obtain a corresponding three-dimensional grid structure;
[0010] Obtain the collision warning section corresponding to the endoscope lens;
[0011] If the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure do not meet the preset collision condition, obtaining the current orientation of the collision warning section;
[0012] Determining a target position of the collision warning section based on a preset advancing rule corresponding to the endoscope lens and the current orientation;
[0013] If the collision warning section is located at the target position, and the collision warning section and its corresponding target grid structure in the three-dimensional grid structure meet a preset collision condition, a target collision distance is obtained based on the target position, and a collision distance warning is issued.
[0014] In some embodiments, obtaining the collision warning section corresponding to the endoscope lens includes:
[0015] Obtaining the current coordinates of the lens center of the endoscope lens;
[0016] Determine the Euler angle of the lens center according to the current coordinates;
[0017] A corresponding collision warning section is determined based on the current coordinates and the Euler angles.
[0018] In some implementations, determining the corresponding collision warning section based on the current coordinates and the Euler angles includes:
[0019] Taking the current coordinate of the center of the lens as the center, n times the diameter of the endoscope as the side length, and the nutation angle in the Euler angle as the tilt angle, determine the corresponding quadrilateral area, where n>1, and n is a natural number;
[0020] The quadrilateral area is used as the collision warning section.
[0021] In some embodiments, if the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure do not meet the preset collision condition, then obtaining the current orientation of the collision warning section, further comprising:
[0022] Determine whether there is an intersection between the collision warning section and a grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure;
[0023] If not, it is determined that the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure do not meet the preset collision condition.
[0024] In some implementations, obtaining the current orientation of the collision warning slice includes:
[0025] Obtaining the current coordinates of the lens center of the endoscope lens;
[0026] Determine the Euler angle of the lens center according to the current coordinates of the lens center;
[0027] The current orientation of the collision warning section is determined according to the Euler angle of the lens center.
[0028] In some embodiments, determining the target position of the collision warning section based on the preset advancing rule corresponding to the endoscope lens and the current orientation includes:
[0029] Taking the current position of the collision warning section as the forward starting point, the position of the collision warning section is updated along the current direction according to a preset forward step length to obtain the target position of the collision warning section.
[0030] In some embodiments, if the collision warning section is located at the target position, the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure meet a preset collision condition, then a target collision distance is obtained based on the target position, and a collision distance warning is issued, which also includes:
[0031] If the collision warning section is located at the target position, determining whether there is an intersection between the collision warning section and a target grid structure corresponding to the collision warning section in the three-dimensional grid structure;
[0032] If so, it is determined that the collision warning section and its corresponding target grid structure in the three-dimensional grid structure meet the preset collision condition.
[0033] In some implementations, acquiring the target collision distance based on the target position includes:
[0034] Obtaining a distance difference between a target position of the collision warning section and a current position of the collision warning section;
[0035] The distance difference is used as the target collision distance.
[0036] In some embodiments, before obtaining the three-dimensional structure diagram of the area to be diagnosed, the method further includes:
[0037] Acquiring medical images;
[0038] Performing three-dimensional reconstruction based on the medical image to obtain a three-dimensional structure diagram corresponding to the medical image;
[0039] The three-dimensional data of the area to be detected is segmented from the three-dimensional structure image.
[0040] In some implementations, the step of acquiring a target collision distance based on the target position and issuing a collision distance warning further includes:
[0041] Taking the current position of the collision warning section as a starting point, a path planning is performed for the endoscope lens.
[0042] The present application also provides an endoscope collision detection device, the device comprising:
[0043] A first acquisition module is used to acquire three-dimensional data of the area to be detected;
[0044] A grid planning module, used to perform grid structure processing on the three-dimensional data based on preset grid planning rules to obtain a corresponding three-dimensional grid structure;
[0045] A second acquisition module is used to acquire a collision warning section corresponding to the endoscope lens;
[0046] a third acquisition module, configured to acquire a current orientation of the collision warning section if the grid structure corresponding to the collision warning section and the current position of the collision warning section in the three-dimensional grid structure does not satisfy a preset collision condition;
[0047] A determination module, configured to determine a target position of the collision warning section based on a preset advancing rule corresponding to the endoscope lens and the current orientation;
[0048] A collision warning module is used to obtain a target collision distance based on the target position and issue a collision distance warning if the collision warning section is located at the target position and the collision warning section and its corresponding target grid structure in the three-dimensional grid structure meet a preset collision condition.
[0049] The present application also provides an endoscope collision detection device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the endoscope collision detection method as described above.
[0050] The present application also provides a computer-readable storage medium, characterized in that the storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded by a processor and executed by the endoscope collision detection method as described above.
[0051] Implementing the embodiments of the present application has the following beneficial effects:
[0052] The endoscope collision detection method disclosed in the present application can quickly and accurately perform collision detection and collision warning detection during the use of the endoscope, so as to avoid impossible routes in advance, and help doctors avoid surgical risks in advance based on the collision warning results. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the endoscope collision detection method, device, equipment and storage medium described in the present application, the drawings required for the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0054] Figure 1 A schematic diagram of a flow chart of an endoscope collision detection method provided in an embodiment of the present application;
[0055] Figure 2 A schematic diagram of a flow chart of a method for determining a collision warning section provided in an embodiment of the present application;
[0056] Figure 3 An exemplary schematic diagram of the collision warning area of an endoscope lens advancing during a collision detection process provided by an embodiment of the present application;
[0057] Figure 4 A schematic structural diagram of another endoscope collision detection device provided in an embodiment of the present application;
[0058] Figure 5 A schematic structural diagram of an endoscope collision detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0060] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0061] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0062] Euler angles are a group of three independent angular parameters used to determine the position of a fixed rotating rigid body. They are composed of the nutation angle θ, the precession angle ψ and the rotation angle φ. They were named after Euler who first proposed them.
[0063] The following combination Figure 1 The collision detection method of the present application can be applied in the field of intelligent medical care. Specifically, it can be applied to endoscope collision detection during surgery; it can be applied to human tissue areas that need to be diagnosed to determine whether there is a collision between the endoscope and the human tissue area and whether there is a risk of collision.
[0064] Please refer to Figure 1 , which shows a flow chart of an endoscope collision detection method provided in an embodiment of the present application. This specification provides method operation steps as described in the embodiment or flow chart, but based on conventional; or non-creative labor, more or fewer operation steps may be included. The order of steps listed in the embodiment is only one way of executing the steps among many, and does not represent the only execution order. The endoscope collision detection method can be executed in the order of the methods shown in the embodiment or the accompanying drawings. Specifically, Figure 1 As shown, the method includes:
[0065] S101, obtaining three-dimensional data of the area to be inspected;
[0066] It should be noted that, in the embodiment of the present application, the three-dimensional data of the area to be detected may be a three-dimensional structural diagram of the area to be diagnosed that needs to be detected during the operation;
[0067] In the embodiment of the present application, the method for acquiring the three-dimensional data of the area to be detected may include but is not limited to:
[0068] Acquiring medical images;
[0069] In the embodiment of the present application, the medical image may be acquired by a medical imaging device, for example, a CT image;
[0070] Perform three-dimensional reconstruction based on the medical image to obtain a three-dimensional structure diagram corresponding to the medical image;
[0071] In the embodiment of the present application, an existing three-dimensional reconstruction method can be used to perform three-dimensional reconstruction on a medical image to obtain a three-dimensional structure diagram corresponding to the medical image;
[0072] Segment the three-dimensional data of the area to be detected from the three-dimensional structure image;
[0073] Specifically, three-dimensional reconstruction is performed through the collected CT image data, and a three-dimensional structure diagram of the bronchial region is segmented.
[0074] In the embodiment of the present application, the three-dimensional structure diagram can be segmented into regions, and the three-dimensional data of the area to be detected can be segmented based on the treatment needs, that is, the three-dimensional structure diagram of the area to be detected.
[0075] S103, based on a preset grid planning rule, performing grid structure processing on the three-dimensional data to obtain a corresponding three-dimensional grid structure;
[0076] In the embodiment of the present application, the surface of the three-dimensional structure diagram represented by the three-dimensional data may be gridded based on the existing grid planning rules;
[0077] The three-dimensional surface of the three-dimensional structure diagram is represented by a grid structure; this design can avoid the high complexity and large amount of calculation when directly using the three-dimensional surface for collision calculation, thereby reducing the amount of calculation for collision calculation and improving the efficiency of collision detection.
[0078] In the embodiment of the present application, the size of the grid in the three-dimensional grid structure can be dynamically planned according to the size of the three-dimensional data;
[0079] Specifically, planning can be performed according to the number of triangles in the three-dimensional data.
[0080] S105, obtaining a collision warning section corresponding to the endoscope lens;
[0081] In the embodiment of the present application, the collision warning section may be a section area of an endoscope lens;
[0082] Specifically, in the embodiment of the present application, the lens section area is larger than the lens section of the endoscope.
[0083] In the embodiments of the present application, Figure 2, which is a flow chart of a method for determining a collision warning section provided in an embodiment of the present application, specifically, as follows:
[0084] S201, obtaining the current coordinates of the lens center of the endoscope lens;
[0085] In an embodiment of the present application, a posture sensor provided on the endoscope lens is used to obtain the current coordinates of the center of the lens; wherein the posture sensor can be used to detect its position and three-dimensional posture.
[0086] Specifically, if the posture sensor is set at the center of the endoscope lens, the coordinates of the posture sensor collected by the posture sensor are the current coordinates of the lens center;
[0087] If the posture sensor is set on the endoscope lens and the distance between it and the lens center is m, the current coordinates of the lens center can be calculated based on the coordinates of the posture sensor collected by the posture sensor and the distance m.
[0088] S203, determining the Euler angle of the lens center according to the current coordinates;
[0089] In an embodiment of the present application, the posture sensor may determine the Euler angle of the lens center based on the acquired coordinates of the lens center;
[0090] S205: Determine a corresponding collision warning section based on the current coordinates and Euler angles.
[0091] In the embodiment of the present application, the current coordinates of the lens center are taken as the center, n times the diameter of the endoscope is taken as the side length, and the nutation angle in the Euler angle is taken as the tilt angle, and the corresponding quadrilateral area is determined, where n>1, and n is a natural number;
[0092] Use the quadrilateral area as the collision warning section.
[0093] In the embodiment of the present application, the angle between the plane where the quadrilateral region is located and the horizontal plane is the inclination angle;
[0094] Preferably, n may be 1.2, that is, a quadrilateral area is planned with a side length of 1.2 times the diameter of the endoscope;
[0095] Preferably, the quadrilateral area may be a square plane; that is, the collision warning section in the present application is a square plane.
[0096] S107, if the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure do not meet the preset collision condition, then obtain the current orientation of the collision warning section;
[0097] In the embodiment of the present application, the collision warning section and the three-dimensional grid structure are located in the same coordinate system; the preset collision condition may be that there is an intersection between the collision warning section and the three-dimensional grid structure.
[0098] In the embodiment of the present application, if the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure do not meet the preset collision condition, before obtaining the current orientation of the collision warning section, the method further includes:
[0099] Determine whether the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure meet the preset collision condition;
[0100] Specifically, it may be to determine whether there is an intersection between the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure;
[0101] That is, it is possible to determine whether there is an intersection between the section area of the collision warning section at the current position and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure;
[0102] If there is no intersection, it can be determined that the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure do not meet the preset collision condition.
[0103] In an embodiment of the present application, when the grid structure corresponding to the collision warning section and the current position of the collision warning section in the three-dimensional grid structure does not meet the preset collision condition, the current orientation of the collision warning section is obtained;
[0104] In the embodiment of the present application, the current orientation of the collision warning section may be the current orientation of the endoscope lens;
[0105] Specifically, the current orientation of the endoscope lens may be determined using the Euler angle of the endoscope lens.
[0106] In the embodiment of the present application, obtaining the current orientation of the collision warning slice may include:
[0107] Get the current coordinates of the lens center of the endoscope lens;
[0108] Determine the Euler angle of the lens center according to the current coordinates of the lens center;
[0109] The current orientation of the collision warning slice is determined based on the Euler angle of the lens center.
[0110] Specifically, in the embodiment of the present application, the orientation of the endoscope lens at the current position may be calculated using the nutation angle in the Euler angle, thereby determining the current orientation of the collision warning section.
[0111] In another implementation of the present application, if there is an intersection between the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure, that is, the grid structure corresponding to the collision warning section and the current position of the collision warning section in the three-dimensional grid structure meets the preset collision condition, the endoscope stops moving forward; specifically, the endoscope can exit the three-dimensional grid structure or change the forward route.
[0112] S109, determining a target position of the collision warning section based on a preset advancing rule corresponding to the endoscope lens and a current orientation;
[0113] In the embodiment of the present application, the preset advancing rule may be advancing according to a preset step length;
[0114] The target position may be a virtual position, that is, the collision warning section is updated at a virtual position according to the preset forward rule and current orientation corresponding to the endoscope lens; subsequently, a collision warning detection is performed on the endoscope lens based on the virtual position.
[0115] In an embodiment of the present application, a method for determining a target position of a collision warning section may include:
[0116] Taking the current position of the collision warning section as the starting point, the position of the collision warning section is updated along the current direction according to the preset forward step length to obtain the target position of the collision warning section.
[0117] Specifically, the collision warning section is advanced along the current direction according to a preset step length, and the position of the collision warning section is updated after advancing once, so that an updated position of the collision warning section, that is, a target position, can be obtained;
[0118] When the collision warning section is located at the target position, a collision judgment is performed on the collision warning section and the corresponding grid structure in the three-dimensional grid structure where the collision warning section is located until the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure meet the preset collision condition, and the position update can be ended. In which, when obtaining the target position of the collision warning section, the total step length of the collision warning section moving forward in the current direction is less than or equal to the preset step length threshold, that is, when the step length of the collision warning section moving forward in the current direction is the preset step length threshold, the section stops moving forward.
[0119] Based on the obtained target position of the collision warning section, when the collision warning section is located at the target position, it is judged whether the collision warning section and its corresponding target grid structure in the three-dimensional grid structure meet the preset collision condition.
[0120] S111, if the collision warning section is located at the target position, and the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure meet the preset collision condition, then the target collision distance is obtained based on the target position, and a collision distance warning is issued;
[0121] In the embodiment of the present application, if the collision warning section is located at the target position, and the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure meet the preset collision condition, the target collision distance is obtained based on the target position, and a collision distance warning is issued, which also includes:
[0122] If the collision warning section is located at the target position, determine whether there is an intersection between the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure;
[0123] Specifically, it is possible to determine whether there is an intersection between the section area of the collision warning section at the target position and the grid structure corresponding to the target position of the collision warning section in the three-dimensional grid structure;
[0124] If so, it is determined that the collision warning section and its corresponding target grid structure in the three-dimensional grid structure meet the preset collision condition.
[0125] In the embodiment of the present application, when the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure meet the preset collision condition, the target collision distance is obtained;
[0126] Specifically, the target collision distance is determined based on the current position of the collision warning section and the target position;
[0127] In an embodiment of the present application, obtaining the target collision distance based on the target position includes:
[0128] Obtain the distance difference between the target position of the collision warning section and the current position of the collision warning section;
[0129] Use the distance difference as the target collision distance.
[0130] In an embodiment of the present application, the target collision distance is less than or equal to the above-mentioned preset step threshold.
[0131] In an embodiment of the present application, after a collision distance warning is issued, a path planning may be performed on the endoscope lens with the current position of the collision warning section as a starting point.
[0132] In another embodiment of the present application, if the collision warning section is located at the target position, the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure do not meet the preset collision condition, and the target collision distance is less than the preset step threshold, then the step of determining the target position and the step of determining whether the collision warning section is located at the target position and the target grid structure corresponding to it in the three-dimensional grid structure meets the preset collision condition are repeated.
[0133] Until the collision warning section and its corresponding target grid structure in the three-dimensional grid structure meet the preset collision condition, and obtain the target collision distance; wherein, in the embodiment, the target collision distance is always less than or equal to the above-mentioned preset step threshold.
[0134] In another embodiment of the present application, if the collision warning section is located at the target position, the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure do not meet the preset collision conditions, and the target collision distance is equal to the preset step threshold, then it is considered that there is no collision risk for the endoscope lens, and there is no need to issue a collision warning, and the endoscope lens is controlled to move forward in the current direction by a distance of the preset step threshold.
[0135] In a preferred embodiment of the present application, Figure 3 , which is an exemplary schematic diagram showing the advancement of a collision warning area of an endoscope lens during a collision detection process;
[0136] In this schematic diagram, 1 represents the collision warning section, 2 represents the posture sensor, 3 represents the three-dimensional grid structure, 4 represents the endoscope, and the white arrow represents the direction of movement of the collision warning section along the current orientation;
[0137] The collision warning section is a quadrilateral structure at position A and position B.
[0138] Specifically, Figure 3 As shown, when the collision warning section moves from the current position A to the target position B, the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure meet the preset collision condition.
[0139] It can be seen from the embodiments of the endoscope collision detection method, device, equipment and storage medium provided by the present application that the embodiments of the present application obtain three-dimensional data of the area to be detected; based on the preset grid planning rules, the three-dimensional data is processed into a grid structure to obtain the corresponding three-dimensional grid structure; the collision warning section corresponding to the endoscope lens is obtained; if the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure do not meet the preset collision condition, the current orientation of the collision warning section is obtained; the target position of the collision warning section is determined based on the preset forward rule and current orientation corresponding to the endoscope lens; if the collision warning section is located at the target position, and the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure meet the preset collision condition, the target collision distance is obtained based on the target position, and a collision distance warning is issued; using the technical solution provided in the embodiments of this specification, collision detection and collision warning detection can be performed quickly and accurately during the use of the endoscope, so as to avoid the non-advanceable route in advance, so as to facilitate doctors to avoid surgical risks in advance according to the collision warning results.
[0140] The present application also provides an endoscope collision detection device, such as Figure 4 As shown, it is a structural schematic diagram of an endoscope collision detection device provided in an embodiment of the present application; specifically, the device includes:
[0141] A first acquisition module 410 is used to acquire three-dimensional data of the area to be detected;
[0142] A grid planning module 420 is used to perform grid structure processing on the three-dimensional data based on a preset grid planning rule to obtain a corresponding three-dimensional grid structure;
[0143] A second acquisition module 430 is used to acquire a collision warning section corresponding to the endoscope lens;
[0144] A third acquisition module 440 is used to acquire the current orientation of the collision warning section if the grid structure corresponding to the collision warning section and the current position of the collision warning section in the three-dimensional grid structure does not meet the preset collision condition;
[0145] A determination module 450, for determining a target position of a collision warning section based on a preset advancing rule corresponding to the endoscope lens and a current orientation;
[0146] The collision warning module 460 is used to obtain the target collision distance based on the target position and issue a collision distance warning if the collision warning section is located at the target position and the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure meet the preset collision condition.
[0147] In the embodiment of the present application, the second acquisition module 430 includes:
[0148] A first acquisition unit, used to acquire the current coordinates of the lens center of the endoscope lens;
[0149] A first determining unit, used to determine the Euler angle of the lens center according to the current coordinates;
[0150] The second determining unit is used to determine the corresponding collision warning section based on the current coordinates and the Euler angle.
[0151] In the embodiment of the present application, the second determining unit includes:
[0152] The first determination subunit is used to determine the corresponding quadrilateral area with the current coordinate of the lens center as the center, n times the diameter of the endoscope as the side length, and the nutation angle in the Euler angle as the tilt angle, wherein n>1, and n is a natural number;
[0153] The processing subunit is used to use the quadrilateral area as a collision warning section.
[0154] In the embodiment of the present application, it also includes:
[0155] A first judgment module is used to judge whether there is an intersection between the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure;
[0156] The first determination module is used to determine that the grid structure corresponding to the collision warning section and the current position of the collision warning section in the three-dimensional grid structure does not meet the preset collision condition if there is no intersection between the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure.
[0157] In the embodiment of the present application, the third acquisition module 440 includes:
[0158] A second acquisition unit, which acquires the current coordinates of the lens center of the endoscope lens;
[0159] A third determining unit, configured to determine the Euler angle of the lens center according to the current coordinates of the lens center;
[0160] The fourth determining unit is used to determine the current orientation of the collision warning section according to the Euler angle of the lens center.
[0161] In the embodiment of the present application, the determination module 450 includes:
[0162] The fifth determining unit is used to update the position of the collision warning section according to a preset forward step length along the current direction with the current position of the collision warning section as the forward starting point, so as to obtain the target position of the collision warning section.
[0163] In the embodiment of the present application, it also includes:
[0164] A second judgment module is used to judge whether there is an intersection between the collision warning section and the target grid structure corresponding to the collision warning section in the three-dimensional grid structure if the collision warning section is located at the target position;
[0165] The second determination module is used to determine that the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure meet a preset collision condition if there is an intersection between the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure.
[0166] In the embodiment of the present application, the collision warning module 460 includes:
[0167] A third acquisition unit is used to acquire a distance difference between a target position of the collision warning section and a current position of the collision warning section;
[0168] A processing unit is used to use the distance difference as the target collision distance.
[0169] In the embodiment of the present application, it also includes:
[0170] A fourth acquisition module, used for acquiring medical images;
[0171] A three-dimensional reconstruction module, used to perform three-dimensional reconstruction based on the medical image to obtain a three-dimensional structure image corresponding to the medical image;
[0172] The image segmentation module is used to segment the three-dimensional data of the area to be detected from the three-dimensional structure image.
[0173] In the embodiment of the present application, it also includes:
[0174] The path planning module is used to plan the path of the endoscope lens with the current position of the collision warning section as the starting point.
[0175] An embodiment of the present application provides an endoscope collision detection device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the endoscope collision detection method as described in the above method embodiment.
[0176] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0177] Figure 5 The schematic diagram of the structure of an endoscope collision detection device provided in an embodiment of the present application, the internal structure of the endoscope collision detection device may include but is not limited to: a processor, a network interface and a memory, wherein the processor, the network interface and the memory in the endoscope collision detection device can be connected by a bus or other means, as shown in the embodiment of the present specification Figure 5 The example of connecting through bus is taken in the following.
[0178] Among them, the processor (or CPU (Central Processing Unit)) is the computing core and control core of the endoscope collision detection device. The network interface may optionally include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.). The memory is a memory device in the endoscope collision detection device, which is used to store programs and data. It can be understood that the memory here can be a high-speed RAM storage device, or a non-volatile storage device (non-volatile memory), such as at least one disk storage device; optionally, it can also be at least one storage device located away from the aforementioned processor. The memory provides a storage space, which stores the operating system of the endoscope collision detection device, which may include but is not limited to: Windows system (an operating system), Linux (an operating system), etc., and this application does not limit this; and, in the storage space, one or more instructions suitable for being loaded and executed by the processor are also stored, and these instructions can be one or more computer programs (including program codes). In the embodiment of the present application, the processor loads and executes one or more instructions stored in the memory to implement the endoscope collision detection method provided by the above method embodiment.
[0179] An embodiment of the present application also provides a computer-readable storage medium, which can be set in an endoscope collision detection device to store at least one instruction, at least one program, code set or instruction set related to an endoscope collision detection method in an embodiment of the method. The at least one instruction, the at least one program, the code set or instruction set can be loaded and executed by a processor of an electronic device to implement the endoscope collision detection method provided by the above-mentioned method embodiment.
[0180] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0181] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0182] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0183] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0184] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0185] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A method for detecting endoscope collision, It is characterized in that The method includes: Acquire three-dimensional data of the area to be inspected; Based on a preset grid planning rule, the three-dimensional data is subjected to grid structure processing to obtain a corresponding three-dimensional grid structure; Get the current coordinates of the lens center of the endoscope lens; Determine the Euler angle of the lens center according to the current coordinates; Determine a corresponding collision warning section based on the current coordinates and the Euler angles; If the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure do not meet a first preset collision condition, then obtaining the current orientation of the collision warning section, wherein the first preset collision condition is that the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure have an intersection; Determining a target position of the collision warning section based on a preset advancing rule corresponding to the endoscope lens and the current orientation; If the collision warning section is located at the target position, and the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure meet a second preset collision condition, the target collision distance is obtained based on the target position, and a collision distance warning is issued, wherein the second preset collision condition is that there is an intersection between the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure.
2. The endoscope collision detection method according to claim 1, It is characterized in that The determining the corresponding collision warning section based on the current coordinates and the Euler angles includes: Taking the current coordinate of the center of the lens as the center, n times the diameter of the endoscope as the side length, and the nutation angle in the Euler angle as the tilt angle, determine the corresponding quadrilateral area, where n>1, and n is a natural number; The quadrilateral area is used as the collision warning section.
3. The endoscope collision detection method according to claim 1, It is characterized in that If the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure do not meet the first preset collision condition, then obtaining the current orientation of the collision warning section, the method also includes: Determine whether there is an intersection between the collision warning section and a grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure; If not, it is determined that the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure do not meet the first preset collision condition.
4. The endoscope collision detection method according to claim 1, It is characterized in that The obtaining the current orientation of the collision warning slice includes: Obtaining the current coordinates of the lens center of the endoscope lens; Determine the Euler angle of the lens center according to the current coordinates of the lens center; The current orientation of the collision warning section is determined according to the Euler angle of the lens center.
5. The endoscope collision detection method according to claim 1, It is characterized in that The determining the target position of the collision warning section based on the preset advancing rule corresponding to the endoscope lens and the current orientation includes: Taking the current position of the collision warning section as the forward starting point, the position of the collision warning section is updated along the current direction according to a preset forward step length to obtain the target position of the collision warning section.
6. The endoscope collision detection method according to claim 1, It is characterized in that If the collision warning section is located at the target position, and the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure meet a second preset collision condition, a target collision distance is obtained based on the target position, and a collision distance warning is issued, which also includes: If the collision warning section is located at the target position, determining whether there is an intersection between the collision warning section and a target grid structure corresponding to the collision warning section in the three-dimensional grid structure; If so, it is determined that the collision warning section and its corresponding target grid structure in the three-dimensional grid structure meet a second preset collision condition.
7. The endoscope collision detection method according to claim 1, It is characterized in that The acquiring the target collision distance based on the target position comprises: Obtaining a distance difference between a target position of the collision warning section and a current position of the collision warning section; The distance difference is used as the target collision distance.
8. The endoscope collision detection method according to claim 1, It is characterized in that Before acquiring the three-dimensional data of the area to be detected, the method further includes: Acquiring medical images; Performing three-dimensional reconstruction based on the medical image to obtain a three-dimensional structure diagram corresponding to the medical image; The three-dimensional data of the area to be detected is segmented from the three-dimensional structure image.
9. The endoscope collision detection method according to claim 1, It is characterized in that The step of obtaining a target collision distance based on the target position and issuing a collision distance warning further includes: Taking the current position of the collision warning section as a starting point, a path planning is performed for the endoscope lens.
10. An endoscope collision detection device, It is characterized in that The device comprises: a first acquisition module, used to acquire three-dimensional data of the area to be detected; A grid planning module, used to perform grid structure processing on the three-dimensional data based on preset grid planning rules to obtain a corresponding three-dimensional grid structure; A second acquisition module is used to acquire the current coordinates of the lens center of the endoscope lens; An Euler angle determination module, used to determine the Euler angle of the lens center according to the current coordinates; A collision warning section determination module, used to determine a corresponding collision warning section based on the current coordinates and the Euler angle; a third acquisition module, configured to acquire the current orientation of the collision warning section if the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure do not satisfy a first preset collision condition, wherein the first preset collision condition is that the collision warning section and the grid structure corresponding to the current position of the collision warning section in the three-dimensional grid structure have an intersection; A determination module, configured to determine a target position of the collision warning section based on a preset advancing rule corresponding to the endoscope lens and the current orientation; A collision warning module is used to obtain a target collision distance based on the target position and issue a collision distance warning if the collision warning section is located at the target position and the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure meet a second preset collision condition, wherein the second preset collision condition is that there is an intersection between the collision warning section and the target grid structure corresponding to it in the three-dimensional grid structure.
11. An endoscope collision detection device, It is characterized in that The device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the endoscope collision detection method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, It is characterized in that The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor. The endoscope collision detection method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Virtual endoscopy automatic and interactive path planning and navigation method suitable for complex cavity
CN107248191A
Anti-collision method for endoscope detection
CN112331327A