CN114027974A - Multi-focus endoscope path planning method, device and terminal - Google Patents
Multi-focus endoscope path planning method, device and terminal Download PDFInfo
- Publication number
- CN114027974A CN114027974A CN202111080468.2A CN202111080468A CN114027974A CN 114027974 A CN114027974 A CN 114027974A CN 202111080468 A CN202111080468 A CN 202111080468A CN 114027974 A CN114027974 A CN 114027974A
- Authority
- CN
- China
- Prior art keywords
- path
- point
- target
- spatial position
- path point
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B34/00—Computer-aided surgery; Manipulators or robots specially adapted for use in surgery
- A61B34/10—Computer-aided planning, simulation or modelling of surgical operations
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B34/00—Computer-aided surgery; Manipulators or robots specially adapted for use in surgery
- A61B34/20—Surgical navigation systems; Devices for tracking or guiding surgical instruments, e.g. for frameless stereotaxis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0012—Biomedical image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10028—Range image; Depth image; 3D point clouds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10068—Endoscopic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30004—Biomedical image processing
- G06T2207/30096—Tumor; Lesion
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Surgery (AREA)
- General Health & Medical Sciences (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Biomedical Technology (AREA)
- Medical Informatics (AREA)
- Molecular Biology (AREA)
- General Physics & Mathematics (AREA)
- Heart & Thoracic Surgery (AREA)
- Animal Behavior & Ethology (AREA)
- Public Health (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Robotics (AREA)
- Veterinary Medicine (AREA)
- Computational Linguistics (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Biophysics (AREA)
- Radiology & Medical Imaging (AREA)
- Quality & Reliability (AREA)
- Artificial Intelligence (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The application discloses a method, a device and a terminal for planning endoscope paths of multiple focus points, wherein the method comprises the following steps: a plurality of initial paths determined based on the starting point and the plurality of lesion points; determining a plurality of path points corresponding to each initial path; calling a crow search algorithm, and carrying out spatial position processing based on the initial spatial position of each path point in each initial path to obtain a first spatial position of each path point; determining a first target position corresponding to a first spatial position of each path point; if the first spatial position and the first target position of each path point both meet a preset use condition and the first spatial position of each path point meets a preset convergence condition, taking the first spatial position as a target iteration position; planning each first path corresponding to each initial path based on the starting point of the endoscope, a plurality of focus points and the target iteration position of each path point in each initial path; a target path of the endoscope is determined based on each of the first paths.
Description
Technical Field
The application relates to the technical field of intelligent medical treatment, in particular to a multi-focus endoscope path planning method, a multi-focus endoscope path planning device and a multi-focus endoscope path planning terminal.
Background
The endoscope is a detection instrument integrating traditional optics, ergonomics, precision machinery, modern electronics, mathematics and software into a whole. One has an image sensor, optical lens, light source illumination, mechanical device, etc. that can enter the stomach orally or through other natural orifices. Since a lesion which cannot be displayed by X-ray can be seen by an endoscope, it is very useful for a doctor. For example, with the aid of an endoscopist, an ulcer or tumor in the stomach can be observed, on the basis of which an optimal treatment plan is developed;
the endoscope technology does not need to be used for modern minimally invasive surgery technology, so that the traditional operation is replaced more, and the change is happening day by day, wherein the application of the endoscope technology has more important significance; the optical fiber non-invasive device is known as the third eye of human, is an optical fiber non-invasive device for otorhinolaryngology diagnosis and treatment which integrates examination, diagnosis and treatment, is one of the most advanced technologies in the field of international otorhinolaryngology treatment, and is the breakthrough progress of first utilizing the optical fiber in human medical history;
in the process of performing an operation by using an endoscope, preoperative path planning is particularly important, and particularly in a multi-focus scene, a doctor needs to plan a most appropriate operation path according to the position of a focus to perform the operation, so that the doctor can operate the endoscope to reach a focus area by referring to the path; however, in the prior art, the path planning speed is slow, the precision is not enough, and the path planning under the condition of multiple focuses in the actual medical scene is not solved.
Disclosure of Invention
In order to solve the technical problems, aiming at the problems, the application discloses an endoscope path planning method for multiple focus points.
In order to achieve the above object, the present application provides a method for planning a path of a multi-focal-point endoscope, the method comprising:
acquiring a three-dimensional structure diagram of a focus area;
determining a starting point of an endoscope, a plurality of focus points and a plurality of initial paths determined based on the starting point and the focus points from the three-dimensional structure chart of the focus area, wherein the plurality of initial paths comprise a path from the starting point to any focus point and a path between any two focus points;
determining a plurality of path points corresponding to the initial paths;
calling a crow search algorithm, and carrying out spatial position processing based on the initial spatial position of each path point in each initial path to obtain a first spatial position of each path point;
determining a first target position corresponding to the first spatial position of each path point based on the crow search algorithm;
if the first spatial position and the first target position of each path point both meet a preset use condition and the first spatial position of each path point meets a preset convergence condition, taking the first spatial position as a target iteration position;
planning each first path corresponding to each initial path based on the starting point of the endoscope, the plurality of focus points and the target iteration position of each path point in each initial path;
determining a target path for the endoscope based on the first paths, the target path traversing each of the lesion points.
In some embodiments, if the first spatial position and the first target position of each waypoint both satisfy a preset use condition and the first spatial position of each waypoint does not satisfy a preset convergence condition, invoking a crow search algorithm to determine a first target waypoint corresponding to each waypoint, where a following target waypoint is any one of the waypoints;
acquiring a first target position corresponding to the first target path point;
performing spatial position processing based on the first spatial position and a first target position corresponding to the first target path point to obtain a second spatial position of each path point;
determining a second target position corresponding to a second spatial position of each waypoint;
and if the second spatial position of each path point and the second target position both meet preset use conditions and the second spatial position of each path point meets preset convergence conditions, taking the second spatial position as a target iteration position.
In some embodiments, if the current spatial position and/or the current target position of each waypoint do not satisfy the preset use condition, recalculating the current spatial position from the spatial position and the target position obtained by the previous iteration;
and the obtained current space position of each path point and the current target position corresponding to the current space position meet preset use conditions.
The calling of the crow search algorithm, performing spatial position processing based on the initial spatial positions of the path points in the initial paths to obtain the first spatial positions of the path points, includes:
calling a crow search algorithm, and determining second target path points corresponding to the path points, wherein the second target path point is any one of the path points;
respectively acquiring initial target positions and initial perception probabilities of second target path points corresponding to the path points;
and calculating the spatial position based on the initial spatial position of each path point, the preset path point flight distance, the initial target position of the second target path point and the initial perception probability to obtain the first spatial position of each path point.
In some embodiments, the determining a first target location corresponding to a first spatial location of the waypoints based on the crow search algorithm comprises:
determining a direction vector of the first spatial position to a focal point on a path of the first spatial position based on the first spatial position;
and calculating a target position based on the crow search algorithm, the first spatial position and the direction vector to obtain a first target position of each path point.
In some embodiments, if the first spatial position of each path point and the first target position both satisfy a preset use condition, and the first spatial position of each path point satisfies a preset convergence condition, then taking the first spatial position as a target iteration position, before further including:
judging whether the first spatial position and the first target position of each path point both meet a non-collision condition;
if yes, judging that the first spatial position and the first target position of each path point both meet preset use conditions;
under the condition that the first spatial position and the first target position of each path point both meet preset use conditions, judging whether the iteration number corresponding to the first spatial position is less than or equal to a first preset threshold or whether a convergence difference value corresponding to the first spatial position meets a preset threshold condition;
and if so, judging that the first spatial position meets a preset convergence condition.
In some embodiments, the determining whether the first spatial position and the first target position of each waypoint both satisfy a non-collision condition includes:
judging whether the first space position of each path point and the three-dimensional structure chart of the focus area meet a non-collision condition corresponding to a collision function or not based on the collision function; and the number of the first and second groups,
judging whether the first target position of each path point and the three-dimensional structure chart of the focus area meet a non-collision condition corresponding to a collision function or not based on the collision function;
and if the first spatial position of each path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function, and the first target position of each path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function, determining whether the first spatial position and the first target position of each path point both meet the non-collision condition.
In some embodiments, the determining, based on the collision function, whether the first spatial position of each waypoint and the three-dimensional structure map of the focal zone satisfy a non-collision condition corresponding to the collision function includes:
taking the first space position of the first path point as a center, taking the length of a connecting line between the first space position of the first path point and the first space position of the second path point as a length, and making the length of the connecting line into a cuboid structure by taking the length of m times of the diameter of the endoscope as a width and a height to obtain a first cuboid structure to be detected; the first path point and the second path point are adjacent path points, and m is a natural number greater than 1;
judging whether a cross point exists between the first cuboid structure to be detected and the three-dimensional structure chart of the focus area;
and if not, judging that the first spatial position of the first path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function.
In some embodiments, the determining, based on the collision function, whether the first target position of each path point and the three-dimensional structure map of the focal zone satisfy a non-collision condition corresponding to the collision function includes:
taking the first target position of the first path point as a center, taking the length of a connecting line between the first target position of the first path point and the first target position of the second path point as a length, and making a cuboid structure by taking the length of m times of the diameter of the endoscope as a width and a height to obtain a second cuboid structure to be detected; the first path point and the second path point are adjacent path points, and m is a natural number greater than 1;
judging whether a cross point exists between the second cuboid structure to be detected and the three-dimensional structure chart of the focus area;
and if not, judging that the first target position of the first path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function.
In some embodiments, the determining whether the convergence difference corresponding to the first spatial position meets a preset threshold condition includes:
calculating to obtain a first fitness function value of a plurality of path points in each initial path based on a preset fitness function and the first spatial position of each path point;
the first fitness function values of a plurality of path points in each initial path are differentiated from the initial fitness function values to obtain convergence difference values;
judging whether the convergence difference value is smaller than or equal to a second preset threshold value or not;
and if so, judging that the convergence difference value corresponding to the first space position meets a preset threshold condition.
In some embodiments, before acquiring the three-dimensional structure diagram of the focal zone, the method further includes:
acquiring a medical image;
performing three-dimensional reconstruction based on the medical image to obtain a three-dimensional structure diagram corresponding to the medical image;
and segmenting the three-dimensional structure chart of the focus area from the three-dimensional structure chart.
In some embodiments, said determining a target path of said endoscope based on said first paths comprises:
determining a plurality of moving paths of the endoscope based on the respective first paths;
determining the target path from each of the moving paths
The present application further provides a multi-focal point endoscopic path planning device, said device comprising:
the first acquisition module is used for acquiring a three-dimensional structure chart of the focus area;
a first determining module, configured to determine, from the three-dimensional structure map of the focal region, a starting point of an endoscope, a plurality of focal points, and a plurality of initial paths determined based on the starting point and the plurality of focal points, where the plurality of initial paths include a path from the starting point to any focal point and a path between any two focal points;
a second determining module, configured to determine a plurality of path points corresponding to the initial paths;
the first calculation module is used for calling a crow search algorithm and carrying out spatial position processing on the basis of the initial spatial positions of the path points in the initial paths to obtain first spatial positions of the path points;
a third determining module, configured to determine, based on the crow search algorithm, a first target location corresponding to the first spatial location of each waypoint;
a first processing module, configured to take the first spatial position of each waypoint as a target iteration position if the first spatial position and the first target position of each waypoint both satisfy a preset use condition and the first spatial position of each waypoint satisfies a preset convergence condition;
a path planning module, configured to plan each first path corresponding to each initial path based on a starting point of the endoscope, the plurality of lesion points, and a target iteration position of each path point in each initial path;
a path determination module for determining a target path of the endoscope based on the first paths, the target path traversing each of the lesion points.
The application also provides a multi-focal-point endoscope path planning terminal, which comprises a processor and a memory, wherein at least one instruction or at least one section of program is stored in the memory, and the at least one instruction or the at least one section of program is loaded and executed by the processor to realize the multi-focal-point endoscope path planning method.
The present application further provides a computer-readable storage medium having at least one instruction or at least one program stored therein, the at least one instruction or the at least one program being loaded by a processor and executing the endoscopic path planning method for multiple focal points as described above.
The embodiment of the application has the following beneficial effects:
the endoscope path planning method with multiple focus points, disclosed by the application, can be used for rapidly and accurately obtaining the moving path of the endoscope when the multiple focus points are obtained by combining the preset fitness function with the crow search algorithm for calculation, the obtained moving path is high in accuracy, and a doctor is facilitated to judge and arrive at a focus area based on the moving path.
Drawings
In order to more clearly illustrate the method, device and terminal for planning a multi-focal endoscopic path described in the present application, the drawings required for the embodiments will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a multi-focal-point endoscopic path planning method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a method for calculating a first spatial position according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a first spatial position determining method according to an embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a method for determining a convergence difference according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a first path obtained after optimization when three lesion points are provided in the present embodiment of the present application;
fig. 6 is a schematic structural diagram of another multi-focal-point endoscopic path planning apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an endoscopic path planning terminal with multiple focal points according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Before further detailed description of the embodiments of the present application, terms and expressions referred to in the embodiments of the present application will be described, and the terms and expressions referred to in the embodiments of the present application will be used for the following explanation.
The Crow Search Algorithm (CSA) was proposed by 2016 iran scholars as a new swarm intelligence bionic algorithm that solves the optimization problem by simulating the action of crow cannibalism.
The method for planning the endoscopic path of multiple focal points based on the system of the present application is described below with reference to fig. 1, and may be applied to the field of intelligent medical treatment, and in particular, may be applied to planning the endoscopic path of multiple focal points before an operation; the method can be applied to the path planning before the endoscopic surgery when a plurality of focus points exist in a focus area needing treatment.
Referring to fig. 1, which is a schematic flow chart of a multi-focal-point endoscopic path planning method provided in an embodiment of the present application, the present specification provides the method operation steps as described in the embodiment or the flow chart, but is based on the conventional method; or the inventive process may include additional or fewer steps. The step sequence listed in the embodiment is only one of the execution sequences of a plurality of steps, and does not represent the only execution sequence, and the endoscope path planning method of multiple focus points can be executed according to the method sequence shown in the embodiment or the attached drawings. Specifically, as shown in fig. 1, the method includes:
s101, acquiring a three-dimensional structure diagram of a focus area;
it should be noted that, in the embodiment of the present application, the three-dimensional structure diagram of the focal region may be a three-dimensional structure diagram of a focal region including a focal region to be treated during a surgical procedure;
in this embodiment of the present application, the method for obtaining the three-dimensional structure diagram of the focal region may include, but is not limited to:
acquiring a medical image;
in the embodiment of the present application, the medical image may be acquired by using a medical imaging device, for example, a CT image; performing three-dimensional reconstruction based on the medical image to obtain a three-dimensional structure diagram corresponding to the medical image;
in the embodiment of the application, the existing three-dimensional reconstruction method can be adopted to carry out three-dimensional reconstruction on the medical image to obtain a three-dimensional structure chart corresponding to the medical image;
dividing a three-dimensional structure chart of a focus area from the three-dimensional structure chart;
specifically, three-dimensional reconstruction is performed through the acquired CT image data, and a three-dimensional structure diagram of the lower digestive tract region is segmented.
In the embodiment of the application, the three-dimensional structure chart can be subjected to region segmentation, and the three-dimensional structure chart of the focus area is segmented based on treatment requirements.
S103, determining a starting point of the endoscope, a plurality of focus points and a plurality of initial paths determined based on the starting point and the plurality of focus points from the three-dimensional structure chart of the focus area, wherein the plurality of initial paths comprise a path from the starting point to any focus point and a path between any two focus points;
in the embodiment of the application, a starting point of an endoscope and a plurality of focus points can be determined from a three-dimensional structure diagram of a focus area, wherein the starting point can be the starting point of an endoscope moving path, and the focus points can be points which need to be treated and must pass through the endoscope moving path; the starting point can be provided with one, and the focal point can comprise at least two;
in the embodiment of the application, an initial path is planned based on a starting point of an endoscope and a plurality of lesion points, wherein the initial path is a path from the starting point to any one lesion point and a path between any two lesion points; more specifically, the initial path may be a path between the starting point and each of the plurality of lesion points.
Specifically, the initial path may be a planned virtual path; and optimizing the path points on the virtual path to further obtain an optimized first path.
In the embodiment of the application, the number of initial paths is related to the number of lesion points;
specifically, the following mathematical model may be used for the calculation:
wherein w is the number of focus points,represents w lesionsThe number of combinations of two by two in a point.
For example, when the number of lesion points is 3, the number of initial paths may be:and (3) strips.
S105, determining a plurality of path points corresponding to each initial path;
in the embodiment of the application, a group of path points is determined on each initial path, and the group of path points comprises a plurality of path points; the initial spatial position of the path point may be a position on a virtual path between the starting point and the lesion point;
when the initial paths are optimized, optimizing each path point in a plurality of path points on each initial path by adopting a crow algorithm; and then each initial path is optimized.
Specifically, the path points may be crows in a crow search algorithm, and each path point may represent one crow;
multiple waypoints on each initial path may be considered a crow group.
S107, calling a crow search algorithm, and carrying out spatial position processing based on the initial spatial position of each path point in each initial path to obtain a first spatial position of each path point;
in this embodiment, the first spatial position may be a spatial position of the initial spatial position of the path point after the first iteration.
In the embodiment of the application, the initial spatial position of each path point in each initial path is preset and can be the position of a point in the initial path; the initial spatial position of each path point corresponds to the first spatial position of each path point one by one;
in the embodiment of the present application, as shown in fig. 2, a schematic flow chart of a method for calculating a first spatial position provided in the embodiment of the present application is shown, which specifically includes the following steps:
s201, calling a crow search algorithm, and determining second target path points corresponding to the path points, wherein the second target path points are any one of the path points;
in the embodiment of the application, in the crow search algorithm, each path point is the best memory storage position of each crow;
when the spatial position of a certain path point in an initial path needs to be calculated, any path point except the path point in the initial path needs to be selected as a target path point for tracking so as to find a better food source, namely a better food hiding position;
s203, respectively acquiring initial target positions and initial perception probabilities of second target path points corresponding to the path points;
in this embodiment of the present application, the initial target position of the second target waypoint may be an initial feeding position of the crow represented by the second target waypoint;
specifically, in the present embodiment, the initial food intake position may be the position of a focal point in the initial path.
Specifically, the calculation of the target position corresponding to the path point may be performed by using the following mathematical model;
wherein r is3Is a random number between (0, 1);the iteration position x of the path point i corresponding to the current iteration numberiDirection vector to focus point; specifically, the direction vector is a difference value between a space coordinate of the focus point and a current iteration position;
wherein iter represents the number of iterations of the path point i; wherein, i is 1,2,. and n; iter ═ 0, 1.. times, itermaxWherein, itermaxRepresenting the maximum number of iterations;
xi,iterrepresenting the position of the ith path point at the ith iteration;
mi,iterrepresenting the target position (the feeding position of the crow) of the ith path point at the iter iteration;
specifically, when iter is equal to 0, the spatial position and the target position when the iteration number is 0 may be represented, and specifically, the initial spatial position and the initial target position of the path point i may be referred to in this application;
wherein, the model two relates to the fitness (x)i,iter+1)>fitness(xi,iter) The fitness function can be used for calculation;
specifically, in the second model, when fitness (x)i,iter+1)>fitness(xi,iter) When the temperature of the water is higher than the set temperature,otherwise, the food storage position obtained by the previous iteration is used as the current food storage position;
in the embodiment of the application, the fitness function is set based on a preset collision function;
specifically, the collision function is modeled as follows:
wherein j represents the number of path points;
then, in the embodiment of the present application, when N path points are included in the initial path, the fitness function of the path point i (i ∈ 1, 2.. and N) is as follows:
where k denotes the position of the waypoint, dk,k+1(k ∈ 1, 2.., n-1) denotes a distance between two adjacent waypoints;
that is, when the collision function is equal to 0, the spatial position of the path point and the three-dimensional structure diagram of the focus area have collision;
and when the collision function is equal to 0, the spatial position of the path point is not collided with the three-dimensional structure diagram of the focus area.
In the embodiment of the application, the initial perception probability is the initial perception probability of tracking the crow j corresponding to the second target path point;
specifically, the perception probability may be calculated by using the following mathematical model:
wherein, APminRepresenting minimum perceptual probability, APmaxRepresents the maximum perceptual probability;
preferably, APminCan take the value of 0.1, APmaxValues of 0.5 can be taken.
Specifically, the perception probability may include the following two cases:
in the first case: the second target path point is also the path point of the tracked crow j, which is not known to be tracked by the crow i (the path point needing to be subjected to spatial position calculation), and the crow i updates the position of the crow i according to the position of the j;
in the second case: the crow j knows to be tracked by the crow i, the crow j randomly changes the position in the search space, and the same crow i updates the position of the crow j according to the position searched by the crow j;
s205, calculating the spatial position based on the initial spatial position of each path point, the preset flight distance of the path point, the initial target position of the second target path point and the initial perception probability to obtain the first spatial position of each path point.
In the embodiment of the application, the first spatial position may be calculated by using a crow search algorithm, specifically, the spatial position is calculated by using an initial spatial position of each path point, a preset path point flight distance, an initial target position of a second target path point and an initial sensing probability;
specifically, the following mathematical model may be used to calculate the first spatial position:
wherein r is1And r2Is [0,1 ]]A random number in between;
fli,iteris the flight distance of the path point i in the iter iteration, where the flight distance determines the step length for moving to the selected hidden position; AP (Access Point)j,iterAnd representing the perception probability of the second target path point j after the iter iteration, wherein the higher the value of the perception probability is, the stronger the diversity is.
Specifically, when r2≥APj,iterX is the second target path point j is not known to be tracked by the path point ii,iter+1=xi,iter+r1×fli,iter×(mj,iter-xi,iter);
Otherwise, the spatial position is randomly selected.
In the embodiment of the present application, the preset waypoint flight distance may be a value preset according to an actual scene, and preferably, may be an integer. Specifically, if the preset flight distance of the path point is small, the local search capability is strong, otherwise, the global search capability is strong.
S109, determining a first target position corresponding to the first spatial position of each path point based on a crow search algorithm;
in this embodiment of the present application, determining, based on a crow search algorithm, a first target location corresponding to a first spatial location of each path point includes:
determining a direction vector from the first space position to a focus point on a path where the first space position is located based on the first space position;
in an embodiment of the present application, the direction vector is a difference between the spatial coordinate of the focal point and the first spatial position.
Calculating a target position based on a crow search algorithm, a first spatial position and a direction vector to obtain a first target position of each path point;
in the embodiment of the present application, the calculation of the first target position may be performed based on the second calculation model of the target position,
specifically, after obtaining the first spatial position of the path point i after the first iteration, the first target position mi,1The calculation of the value of (c) includes:
wherein r is3Is a random number between (0, 1);first spatial position x for path point ii,1Direction vector to the focal point.
S111, if the first spatial position and the first target position of each path point both meet a preset use condition and the first spatial position of each path point meets a preset convergence condition, taking the first spatial position as a target iteration position;
in this embodiment of the application, if the first spatial position and the first target position of each path point both satisfy the preset use condition, and the first spatial position of each path point satisfies the preset convergence condition, then taking the first spatial position as a target iteration position, which previously further includes: a method of determining a first spatial position,
specifically, as shown in fig. 3, a schematic flow chart of a first spatial position determining method according to an embodiment of the present application is shown; specifically, as follows
S301, judging whether the first spatial position and the first target position of each path point both meet a non-collision condition;
in the embodiment of the application, before the first spatial position of each path point meets the preset convergence condition, whether the first spatial position and the first target position meet the preset use condition is judged;
specifically, the non-collision function may be adopted for judgment;
that is, when the collision function is equal to 1, the first spatial position or the first target position of the path point and the three-dimensional structure diagram of the focus area have collision;
the first spatial position or the first target position representing the waypoint does not collide with the three-dimensional structure map of the focal zone when the collision function is equal to 0.
Specifically, the determining whether the first spatial position and the first target position of each path point both satisfy the non-collision condition includes:
judging whether the first space position of each path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function or not based on the collision function; and the number of the first and second groups,
judging whether the first target position of each path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function or not based on the collision function;
in the embodiment of the present application, specifically, the condition that the first spatial position meets the non-collision condition may be that the first spatial position does not collide with the three-dimensional structure diagram of the focal zone; the first target location satisfying the non-collision condition may be that the first target location does not collide with the three-dimensional structure map of the focal zone.
In this embodiment of the application, if the first spatial position of each path point and the three-dimensional structure diagram of the focal zone satisfy the non-collision condition corresponding to the collision function, and the first target position of each path point and the three-dimensional structure diagram of the focal zone satisfy the non-collision condition corresponding to the collision function, it is determined whether both the first spatial position and the first target position of each path point satisfy the non-collision condition.
If the first spatial position and the first target position of each path point both meet the non-collision condition, then performing iterative computation by using the first spatial position;
and if not, carrying out re-iterative calculation by using the initial spatial position and the initial target position of each path point, wherein in the embodiment of the application, the first spatial position is a spatial position of the path point after the first iteration is carried out on the initial spatial position.
In the embodiment of the application, whether the first space position of each path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function is judged based on the collision function; the following methods may be employed:
specifically, the cuboid structure to be detected can be obtained by taking the first spatial position of the first path point as a center, taking the length of a connecting line between the first spatial position of the first path point and the first spatial position of the second path point as a length, and making the cuboid structure with the length of m times of the diameter of the endoscope as a width and a height; the first path point and the second path point are adjacent path points, and m is a natural number greater than 1;
the iteration times of the first path point and the second path point are the same;
in this embodiment of the present application, the first path point may be any one of a plurality of path points in the initial path;
specifically, the length of 1.5 times of the diameter of the endoscope can be used as the width and the height to form a cuboid structure;
judging whether a cross point exists between the cuboid structure to be detected and the three-dimensional structure chart of the focus area;
in the embodiment of the application, specifically, whether each edge or side of the cuboid structure to be detected is crossed with the edge or side of the three-dimensional structure diagram of the focus area or not can be judged;
and if not, judging that the first spatial position of the first path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function.
At this time, the first spatial position of the first path point does not collide with the three-dimensional structure diagram of the focal zone.
In the embodiment of the application, whether the first target position of each path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function is judged based on the collision function; the following methods may be employed:
taking the first target position of the first path point as a center, taking the length of a connecting line between the first target position of the first path point and the first target position of the second path point as a length, and making a cuboid structure by taking the length m times of the diameter of the endoscope as a width and a height to obtain a second cuboid structure to be detected; the first path point and the second path point are adjacent path points, and m is a natural number greater than 1;
specifically, the length of 1.5 times of the diameter of the endoscope can be used as the width and the height of the endoscope to form a cuboid structure;
judging whether a cross point exists between the second cuboid structure to be detected and the three-dimensional structure chart of the focus area;
if not, determining that the first target position of the first path point and the three-dimensional structure diagram of the focus area meet the non-collision condition corresponding to the collision function.
S303, if yes, judging that the first spatial position and the first target position of each path point both meet preset use conditions;
in the embodiment of the application, under the condition that the first spatial position and the first target position of each path point both meet the preset use condition, performing next position iteration by using the first spatial position and the first target position;
in another embodiment of the present application, if the current spatial position and/or the current target position of each waypoint do not satisfy the preset use condition, recalculating the current spatial position from the spatial position and the target position obtained by the previous iteration;
specifically, if the first spatial position and/or the first target position do not meet the preset use condition, carrying out re-iterative calculation by using the initial spatial position and the initial target position;
and the obtained current spatial position of each path point and the current target position corresponding to the current spatial position meet the preset use condition.
S305, under the condition that the first spatial position and the first target position of each path point both meet preset use conditions, judging whether the iteration times corresponding to the first spatial position are less than or equal to a first preset threshold or whether a convergence difference value corresponding to the first spatial position meets a preset threshold condition;
in the embodiment of the present application, as shown in fig. 4, a flowchart of a method for determining a convergence difference value provided in the embodiment of the present application is shown; specifically, the following is:
s401, calculating to obtain a first fitness function value of a plurality of path points in each initial path based on a preset fitness function and the first space position of each path point;
in the embodiment of the present application, a distance between the first spatial position k of the ith path point and the first spatial position k +1 of the (i + 1) th path point is determined, and may specifically be dk,k+1A value of dk,k+1Substituting into a preset fitness functionThe first fitness function value of the ith path point can be obtained by calculation.
The ith path point and the (i + 1) th path point are adjacent path points in the same iteration cycle;
specifically, taking the path point i as 1 as an example, when the first spatial position k of the path point 1 is a position of the path point 1 at the first iteration, the first fitness function value of the path point 1 is obtained;
wherein k +1 is the spatial position of the waypoint adjacent to the waypoint 1 position;
s403, subtracting the first fitness function value of the multiple path points in each initial path from the initial fitness function value to obtain a convergence difference value;
in this embodiment of the present application, the initial fitness function value may be a fitness function value calculated by using initial spatial positions of two adjacent path points when the iteration number is 0.
In this embodiment of the present application, the initial fitness function value of a certain path point may be subtracted from the first fitness function value of the path point; the convergence difference is obtained.
S405, judging whether the convergence difference value is less than or equal to a second preset threshold value;
and S407, if so, determining that the convergence difference value corresponding to the first spatial position meets a preset threshold condition.
S307, if yes, the first space position is judged to meet the preset convergence condition.
In the embodiment of the present application, if the iteration number corresponding to the first spatial position is less than or equal to a first preset threshold or a convergence difference value corresponding to the first spatial position meets a preset threshold condition, it is determined that the first spatial position meets the preset convergence condition;
specifically, the first preset threshold may be a maximum number of iterations.
In this embodiment of the application, the first spatial position satisfying the preset convergence condition may be that the first spatial position is an optimal position of the path point.
In another embodiment of the present specification, if the first spatial position and the first target position of each path point both satisfy the preset use condition, and the first spatial position of each path point does not satisfy the preset convergence condition, a crow search algorithm is invoked to determine a first target path point corresponding to each path point, where the following target path point is any one of the path points;
acquiring a first target position corresponding to the first target path point;
performing spatial position processing based on the first spatial position and a first target position corresponding to the first target path point to obtain a second spatial position of each path point;
determining a second target position corresponding to a second spatial position of each path point;
and if the second spatial position and the second target position of each path point both meet the preset use condition and the second spatial position of each path point meets the preset convergence condition, taking the second spatial position as the target iteration position.
S113, planning each first path corresponding to each initial path based on the starting point of the endoscope, a plurality of focus points and the target iteration position of each path point in each initial path;
in the embodiment of the application, each path point in each initial path generates a planned path corresponding to each initial path every time iteration is performed, that is, every time the position of each path point is updated;
specifically, each planned path is a connecting line between a starting point, an optimized position of each path point and a focus point in the three-dimensional structure diagram of the focus area, or a connecting line between optimized positions of each path point between the starting point and the end point, wherein one focus point in the three-dimensional structure diagram of the focus area is used as the starting point, any other focus point is used as the end point.
In the embodiment of the application, the planned path is planned according to the shortest overall path and the collision-free three-dimensional structure diagram corresponding to the medical image.
S115, determining a target path of the endoscope based on the first paths, wherein the target path traverses each focus point.
In an embodiment of the present application, determining a target path of an endoscope based on each first path includes:
determining a plurality of moving paths of the endoscope based on the respective first paths;
specifically, in the embodiment of the present application, the number of the movement paths is associated with the number of the lesion points, and each movement path traverses each lesion point;
specifically, the calculation formula of the number of the moving paths is as follows:
and a fifth model: a ═ w!
Wherein! Representing factorial, w is the number of focus points;
and determining a target path from the moving paths.
In the embodiment of the application, the moving path with the shortest path length in all the moving paths is taken as a target path;
specifically, the moving route with the shortest route length is selected from the a moving routes as the target route.
In an embodiment of the present specification, each time the spatial position and the target position of each path point are updated, collision detection is performed on the updated spatial position and the updated target position;
specifically, the description will be given taking an example in which the updated target spatial position of each path point can be obtained every time the spatial position of each path point is updated;
judging whether the target space position of each path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function or not based on the collision function;
similarly, the collision detection is carried out on the target position obtained by calculating the target space position based on the target path point by adopting the same method;
in the embodiment of the application, the non-collision condition can ensure that the target space position does not collide with the three-dimensional structure chart of the focus area;
if the target space position and the target position both meet the non-collision condition, determining the target space position meeting the non-collision condition and a path point corresponding to the target position as a target path point;
subsequently, iterative calculation is carried out according to the target space position and the target position of the target path point;
if not, carrying out re-iterative calculation by using the spatial position corresponding to the iteration number when the iteration number corresponding to the target spatial position of each path point is reduced by 1.
For example, the iteration number of the path point corresponding to the target spatial position is a, and if any one of the target spatial position and the target position and the three-dimensional structure diagram of the lesion area do not meet the non-collision condition corresponding to the collision function, subsequent iterative computation is performed by using the spatial position and the target position corresponding to the iteration number a-1.
In the embodiment of the application, the collision detection can adopt bounding box collision detection; specifically, the collision detection is described by taking the target spatial position of each path point as an example:
taking the target space position of the first path point as a center, taking the length of a connecting line between the first space position of the first path point and the target space position of the second path point as a length, and making a cuboid structure by taking the length m times of the diameter of the endoscope as a width and a height to obtain a cuboid structure to be detected; the first path point and the second path point are adjacent path points, and m is a natural number greater than 1;
in the embodiment of the application, the cuboid structure can be made with the width and the height of the length of 1.5 times of the diameter of the endoscope.
Judging whether a cross point exists between the cuboid structure to be detected and the three-dimensional structure chart of the focus area;
and if not, judging that the target space position of the first path point does not collide with the three-dimensional structure diagram of the focus area.
At this time, the target space position and the three-dimensional structure diagram of the focus area meet the non-collision condition corresponding to the collision function.
In a specific embodiment of the present specification, the three-dimensional structure diagram of the focal region includes a starting point and 3 focal points for explanation;
specifically, as shown in fig. 5, it is a schematic structural diagram of a first path obtained after optimization when three focus points are provided in the embodiment of the present application;
when the number of lesion points is 3, its initial pathNamely, the initial paths are 6, the 6 initial paths are respectively optimized by using a crow search algorithm, and the obtained first paths are L1, L2, L3, L4, L5 and L6;
based on the above 6 first paths, the obtained movement path of the endoscope includes (L1, L5, L6), (L1, L4, L6), (L2, L5, L4), (L2, L6, L4), (L3, L6, L5), (L3, L4, L5)), and from the above six movement paths, a path having the shortest path distance is determined, that is: min (S (L1, L5, L6), S (L1, L4, L6), S (L2, L5, L4), S (L2, L6, L4), S (L3, L6, L5), S (L3, L4, L5)), i.e., the target path is obtained.
As can be seen from the embodiments of the method, the device, the terminal and the storage medium for planning the path of the endoscope with multiple focal points provided by the application, the embodiment of the application acquires a three-dimensional structure diagram of a focal region; determining a starting point of an endoscope, a plurality of focus points and a plurality of initial paths determined based on the starting point and the plurality of focus points from the three-dimensional structure chart of the focus area, wherein the plurality of initial paths comprise a path from the starting point to any focus point and a path between any two focus points; determining a plurality of path points corresponding to each initial path; calling a crow search algorithm, and carrying out spatial position processing based on the initial spatial position of each path point in each initial path to obtain a first spatial position of each path point; determining a first target position corresponding to a first space position of each path point based on a crow search algorithm; if the first spatial position and the first target position of each path point both meet a preset use condition and the first spatial position of each path point meets a preset convergence condition, taking the first spatial position as a target iteration position; planning each first path corresponding to each initial path based on the starting point of the endoscope, a plurality of focus points and the target iteration position of each path point in each initial path; determining a target path of the endoscope based on each first path, wherein the target path traverses each focus point; by using the technical scheme provided by the embodiment of the specification, the preset fitness function and the crow search algorithm are combined for calculation, the moving path of the endoscope at a plurality of focus points can be quickly and accurately obtained, the obtained moving path has high accuracy, and a doctor can conveniently judge and arrive at a focus area based on the moving path.
The embodiment of the present application further provides a multi-focal-point endoscopic path planning device, as shown in fig. 6, which is a schematic structural diagram of the multi-focal-point endoscopic path planning device provided in the embodiment of the present application; specifically, the device comprises:
a first obtaining module 610, configured to obtain a three-dimensional structure diagram of a focal zone;
a first determining module 620, configured to determine a starting point of the endoscope, a plurality of lesion points, and a plurality of initial paths determined based on the starting point and the plurality of lesion points from the three-dimensional structure map of the lesion area, where the plurality of initial paths include a path from the starting point to any one of the lesion points and a path between any two of the lesion points;
a second determining module 630, configured to determine a plurality of path points corresponding to each initial path;
the first calculating module 640 is configured to invoke a crow search algorithm, perform spatial position processing based on an initial spatial position of each path point in each initial path, and obtain a first spatial position of each path point;
a third determining module 650, configured to determine, based on the crow search algorithm, a first target location corresponding to the first spatial location of each path point;
the first processing module 660 is configured to, if the first spatial position and the first target position of each path point both satisfy the preset use condition, and the first spatial position of each path point satisfies the preset convergence condition, take the first spatial position as a target iteration position;
a path planning module 670, configured to plan each first path corresponding to each initial path based on a starting point of the endoscope, a plurality of lesion points, and a target iteration position of each path point in each initial path;
a path determination module 680 for determining a target path of the endoscope based on the first paths, the target path traversing each of the lesion points.
In the embodiment of the present application, the method further includes:
the fourth determining module is used for calling a crow search algorithm to determine a first target path point corresponding to each path point if the first spatial position and the first target position of each path point both meet the preset use condition and the first spatial position of each path point does not meet the preset convergence condition, wherein the following target path point is any one path point in each path point;
the second acquisition module is used for acquiring a first target position corresponding to the first target path point;
the second calculation module is used for carrying out spatial position processing on the basis of the first spatial position and the first target position corresponding to the first target path point to obtain a second spatial position of each path point;
a fifth determining module, configured to determine a second target position corresponding to the second spatial position of each path point;
and if the second spatial position and the second target position of each path point both meet the preset use condition and the second spatial position of each path point meets the preset convergence condition, taking the second spatial position as the target iteration position.
In the embodiment of the present application, the method further includes:
the third calculation module is used for recalculating the current spatial position by the spatial position and the target position obtained by previous iteration if the current spatial position and/or the current target position of each path point do not meet the preset use condition;
until the obtained current space position of each path point and the current target position corresponding to the current space position meet the preset use condition
In the embodiment of the present application, the first calculation module 640 includes:
the first determining unit is used for calling a crow search algorithm and determining second target path points corresponding to the path points, wherein the second target path points are any one of the path points;
the first acquisition unit is used for respectively acquiring the initial target position and the initial perception probability of a second target path point corresponding to each path point;
and the first calculating unit is used for calculating the spatial position based on the initial spatial position of each path point, the preset path point flight distance, the initial target position of the second target path point and the initial perception probability to obtain the first spatial position of each path point.
In an embodiment of the present application, the third determining module 650 includes:
a second determining unit, configured to determine, based on the first spatial position, a direction vector from the first spatial position to a focal point on a path where the first spatial position is located;
and the second calculation unit is used for calculating the target position based on the crow search algorithm, the first spatial position and the direction vector to obtain the first target position of each path point.
In the embodiment of the present application, the method further includes:
the first judgment module is used for judging whether the first spatial position and the first target position of each path point both meet the non-collision condition;
the first judgment module is used for judging that the first spatial position and the first target position of each path point both meet the preset use condition if the first spatial position and the first target position of each path point both meet the non-collision condition;
the second judging module is used for judging whether the iteration times corresponding to the first space position are less than or equal to a first preset threshold or whether a convergence difference value corresponding to the first space position meets a preset threshold condition or not under the condition that the first space position and the first target position of each path point both meet the preset using condition;
and the second judging module is used for judging that the first space position meets the preset convergence condition if the iteration number corresponding to the first space position is less than or equal to a first preset threshold or the convergence difference value corresponding to the first space position meets the preset threshold condition.
In this embodiment of the present application, the first determining module includes:
the first judgment unit is used for judging whether the first space position of each path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function or not based on the collision function; and the number of the first and second groups,
the second judging unit is used for judging whether the first target position of each path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function or not based on the collision function;
and the first judging unit is used for judging whether the first spatial position and the first target position of each path point meet the non-collision condition corresponding to the collision function or not if the first spatial position and the three-dimensional structure chart of the focus area of each path point meet the non-collision condition corresponding to the collision function and the first target position and the three-dimensional structure chart of the focus area of each path point meet the non-collision condition corresponding to the collision function.
In an embodiment of the present application, the first determining unit includes:
the first structure establishing subunit is used for taking the first space position of the first path point as a center, taking the length of a connecting line between the first space position of the first path point and the first space position of the second path point as long, and making a cuboid structure by taking the length m times of the diameter of the endoscope as width and height to obtain a first cuboid structure to be detected; the first path point and the second path point are adjacent path points, and m is a natural number greater than 1;
the first judgment subunit is used for judging whether a cross point exists between the first cuboid structure to be detected and the three-dimensional structure chart of the focus area;
and the first judging subunit is used for judging that the first space position of the first path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function if the first cuboid structure to be detected and the three-dimensional structure chart of the focus area do not have a cross point.
In an embodiment of the present application, the second determination unit includes:
the second structure establishing subunit is used for taking the first target position of the first path point as a center, taking the length of a connecting line between the first target position of the first path point and the first target position of the second path point as long, and making a cuboid structure by taking the length m times of the diameter of the endoscope as width and height to obtain a second cuboid structure to be detected; the first path point and the second path point are adjacent path points, and m is a natural number greater than 1;
the second judgment subunit is used for judging whether a cross point exists between the second cuboid structure to be detected and the three-dimensional structure chart of the focus area;
and the second judging sub-unit is used for judging that the first target position of the first path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function if no intersection point exists between the second cuboid structure to be detected and the three-dimensional structure chart of the focus area.
In an embodiment of the present application, the second determining module includes:
the third calculating unit is used for calculating to obtain a first fitness function value of a plurality of path points in each initial path based on a preset fitness function and the first spatial position of each path point;
the fourth calculating unit is used for subtracting the first fitness function value of the plurality of path points in each initial path from the initial fitness function value to obtain a convergence difference value;
a third judging unit, configured to judge whether the convergence difference value is less than or equal to a second preset threshold;
and the second judging unit is used for judging that the convergence difference value corresponding to the first space position meets the preset threshold value if the convergence difference value is less than or equal to a second preset threshold value.
In the embodiment of the present application, the method further includes:
a third acquisition module for acquiring a medical image;
the three-dimensional reconstruction module is used for performing three-dimensional reconstruction based on the medical image to obtain a three-dimensional structure chart corresponding to the medical image;
and the image segmentation module is used for segmenting the three-dimensional structure chart of the focus area from the three-dimensional structure chart.
In this embodiment, the path determining module 680 includes:
a movement path determination unit for determining movement paths of the plurality of endoscopes based on the respective first paths;
and the target path determining unit is used for determining a target path from the moving paths.
The embodiment of the application provides a multi-focal-point endoscope path planning terminal, which comprises a processor and a memory, wherein at least one instruction or at least one section of program is stored in the memory, and the at least one instruction or the at least one section of program is loaded and executed by the processor to realize the multi-focal-point endoscope path planning method.
The memory may be used to store software programs and modules, and the processor may execute various functional applications and data processing by operating the software programs and modules stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs needed by functions and the like; the storage data area may store data created according to use of the device, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.
Fig. 7 is a schematic structural diagram of a multi-focal-point endoscopic path planning terminal provided in an embodiment of the present application, where the internal configuration of the multi-focal-point endoscopic path planning terminal may include, but is not limited to: the processor, the network interface and the memory in the multi-focus endoscope path planning terminal may be connected by a bus or other means, and fig. 7 shown in the embodiment of the present specification is exemplified by being connected by a bus.
The processor (or CPU) is a computing core and a control core of the endoscope path planning terminal with multiple focus points. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI, mobile communication interface, etc.). The Memory (Memory) is a Memory device in the endoscopic path planning terminal for multiple focal points, and is used for storing programs and data. It is understood that the memory herein may be a high-speed RAM storage device, or may be a non-volatile storage device (non-volatile memory), such as at least one magnetic disk storage device; optionally, at least one memory device located remotely from the processor. The memory provides a storage space that stores the operating system of the endoscopic path planning terminal for multiple focal points, which may include, but is not limited to: windows system (an operating system), Linux (an operating system), etc., which are not limited in this application; also, one or more instructions, which may be one or more computer programs (including program code), are stored in the memory space and are adapted to be loaded and executed by the processor. In the embodiment of the present application, the processor loads and executes one or more instructions stored in the memory to implement the endoscopic path planning method for multiple focal points provided in the above method embodiment.
Embodiments of the present application also provide a computer-readable storage medium, which may be disposed in a multi-focal endoscopic path planning terminal to store at least one instruction, at least one program, a code set, or a set of instructions related to implementing a multi-focal endoscopic path planning method in the method embodiments, where the at least one instruction, the at least one program, the code set, or the set of instructions may be loaded and executed by a processor of an electronic device to implement the multi-focal endoscopic path planning method provided in the above method embodiments.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
It should be noted that: the sequence of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations described above.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device and server embodiments, since they are substantially similar to the method embodiments, the description is simple, and the relevant points can be referred to the partial description of the method embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above disclosure is only one preferred embodiment of the present application, and certainly does not limit the scope of the present application, which is therefore intended to cover all modifications and equivalents of the claims.
Claims (15)
1. A method for planning a path of a multi-focal point endoscope, the method comprising:
acquiring a three-dimensional structure diagram of a focus area;
determining a starting point of an endoscope, a plurality of focus points and a plurality of initial paths determined based on the starting point and the focus points from the three-dimensional structure chart of the focus area, wherein the plurality of initial paths comprise a path from the starting point to any focus point and a path between any two focus points;
determining a plurality of path points corresponding to the initial paths;
calling a crow search algorithm, and carrying out spatial position processing based on the initial spatial position of each path point in each initial path to obtain a first spatial position of each path point;
determining a first target position corresponding to the first spatial position of each path point based on the crow search algorithm;
if the first spatial position and the first target position of each path point both meet a preset use condition and the first spatial position of each path point meets a preset convergence condition, taking the first spatial position as a target iteration position;
planning each first path corresponding to each initial path based on the starting point of the endoscope, the plurality of focus points and the target iteration position of each path point in each initial path;
determining a target path for the endoscope based on the first paths, the target path traversing each of the lesion points.
2. The method of endoscopic path planning for multiple focal points of claim 1, further comprising:
if the first spatial position and the first target position of each path point both meet a preset use condition and the first spatial position of each path point does not meet a preset convergence condition, calling a crow search algorithm to determine a first target path point corresponding to each path point, wherein the following target path point is any one of the path points;
acquiring a first target position corresponding to the first target path point;
performing spatial position processing based on the first spatial position and a first target position corresponding to the first target path point to obtain a second spatial position of each path point;
determining a second target position corresponding to a second spatial position of each waypoint;
and if the second spatial position of each path point and the second target position both meet preset use conditions and the second spatial position of each path point meets preset convergence conditions, taking the second spatial position as a target iteration position.
3. The method of endoscopic path planning for multiple focal points of claim 1, further comprising:
if the current spatial position and/or the current target position of each path point do not meet the preset use condition, recalculating the current spatial position by the spatial position and the target position obtained by the previous iteration;
and the obtained current space position of each path point and the current target position corresponding to the current space position meet preset use conditions.
4. The method for planning the endoscopic path with multiple focal points according to claim 1, wherein said invoking a crow search algorithm, performing spatial location processing based on the initial spatial location of each path point in each initial path, to obtain the first spatial location of each path point comprises:
calling a crow search algorithm, and determining second target path points corresponding to the path points, wherein the second target path point is any one of the path points;
respectively acquiring initial target positions and initial perception probabilities of second target path points corresponding to the path points;
and calculating the spatial position based on the initial spatial position of each path point, the preset path point flight distance, the initial target position of the second target path point and the initial perception probability to obtain the first spatial position of each path point.
5. The method of claim 1, wherein determining a first target location corresponding to a first spatial location of the waypoints based on the crow search algorithm comprises:
determining a direction vector of the first spatial position to a focal point on a path of the first spatial position based on the first spatial position;
and calculating a target position based on the crow search algorithm, the first spatial position and the direction vector to obtain a first target position of each path point.
6. The method for planning a multi-focal-point endoscope path according to claim 1, wherein if the first spatial position of each path point and the first target position both satisfy a preset use condition and the first spatial position of each path point satisfies a preset convergence condition, the first spatial position is taken as a target iteration position, and before the method further comprises:
judging whether the first spatial position and the first target position of each path point both meet a non-collision condition;
if yes, judging that the first spatial position and the first target position of each path point both meet preset use conditions;
under the condition that the first spatial position and the first target position of each path point both meet preset use conditions, judging whether the iteration number corresponding to the first spatial position is less than or equal to a first preset threshold or whether a convergence difference value corresponding to the first spatial position meets a preset threshold condition;
and if so, judging that the first spatial position meets a preset convergence condition.
7. The method of claim 6, wherein the determining whether the first spatial location and the first target location of each waypoint both satisfy a non-collision condition comprises:
judging whether the first space position of each path point and the three-dimensional structure chart of the focus area meet a non-collision condition corresponding to a collision function or not based on the collision function; and the number of the first and second groups,
judging whether the first target position of each path point and the three-dimensional structure chart of the focus area meet a non-collision condition corresponding to a collision function or not based on the collision function;
and if the first spatial position of each path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function, and the first target position of each path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function, determining whether the first spatial position and the first target position of each path point both meet the non-collision condition.
8. The method for planning a multi-focal-point endoscope path according to claim 7, wherein the determining whether the first spatial position of each path point and the three-dimensional structure map of the focal region satisfy a non-collision condition corresponding to a collision function based on the collision function comprises:
taking the first space position of the first path point as a center, taking the length of a connecting line between the first space position of the first path point and the first space position of the second path point as a length, and making the length of the connecting line into a cuboid structure by taking the length of m times of the diameter of the endoscope as a width and a height to obtain a first cuboid structure to be detected; the first path point and the second path point are adjacent path points, and m is a natural number greater than 1;
judging whether a cross point exists between the first cuboid structure to be detected and the three-dimensional structure chart of the focus area;
and if not, judging that the first spatial position of the first path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function.
9. The method for planning a multi-focal-point endoscope path according to claim 7, wherein the determining whether the first target position of each path point and the three-dimensional structure map of the focal region satisfy a non-collision condition corresponding to a collision function based on the collision function comprises:
taking the first target position of the first path point as a center, taking the length of a connecting line between the first target position of the first path point and the first target position of the second path point as a length, and making a cuboid structure by taking the length of m times of the diameter of the endoscope as a width and a height to obtain a second cuboid structure to be detected; the first path point and the second path point are adjacent path points, and m is a natural number greater than 1;
judging whether a cross point exists between the second cuboid structure to be detected and the three-dimensional structure chart of the focus area;
and if not, judging that the first target position of the first path point and the three-dimensional structure chart of the focus area meet the non-collision condition corresponding to the collision function.
10. The method for planning a path of an endoscope with multiple focal points according to claim 6, wherein the determining whether the convergence difference corresponding to the first spatial position meets a preset threshold condition comprises:
calculating to obtain a first fitness function value of a plurality of path points in each initial path based on a preset fitness function and the first spatial position of each path point;
the first fitness function values of a plurality of path points in each initial path are differentiated from the initial fitness function values to obtain convergence difference values;
judging whether the convergence difference value is smaller than or equal to a second preset threshold value or not;
and if so, judging that the convergence difference value corresponding to the first space position meets a preset threshold condition.
11. The method for endoscopic path planning for multiple focal points according to claim 1, wherein before acquiring the three-dimensional structure map of the focal zone, the method further comprises:
acquiring a medical image;
performing three-dimensional reconstruction based on the medical image to obtain a three-dimensional structure diagram corresponding to the medical image;
and segmenting the three-dimensional structure chart of the focus area from the three-dimensional structure chart.
12. The method of multi-focal endoscopic path planning according to claim 1, wherein said determining a target path of said endoscope based on said first paths comprises:
determining a plurality of moving paths of the endoscope based on the respective first paths;
determining the target path from each of the movement paths.
13. A multi-focal point endoscopic path planning apparatus, said apparatus comprising:
the first acquisition module is used for acquiring a three-dimensional structure chart of the focus area;
a first determining module, configured to determine, from the three-dimensional structure map of the focal region, a starting point of an endoscope, a plurality of focal points, and a plurality of initial paths determined based on the starting point and the plurality of focal points, where the plurality of initial paths include a path from the starting point to any focal point and a path between any two focal points;
a second determining module, configured to determine a plurality of path points corresponding to the initial paths;
the first calculation module is used for calling a crow search algorithm and carrying out spatial position processing on the basis of the initial spatial positions of the path points in the initial paths to obtain first spatial positions of the path points;
a third determining module, configured to determine, based on the crow search algorithm, a first target location corresponding to the first spatial location of each waypoint;
a first processing module, configured to take the first spatial position of each waypoint as a target iteration position if the first spatial position and the first target position of each waypoint both satisfy a preset use condition and the first spatial position of each waypoint satisfies a preset convergence condition;
a path planning module, configured to plan each first path corresponding to each initial path based on a starting point of the endoscope, the plurality of lesion points, and a target iteration position of each path point in each initial path;
a path determination module for determining a target path of the endoscope based on the first paths, the target path traversing each of the lesion points.
14. A multi-focal-point endoscopic path planning terminal, characterized in that the terminal comprises 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 multi-focal-point endoscopic path planning method according to any one of claims 1 to 12.
15. A computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, the at least one instruction or the at least one program being loaded by a processor and executing the method for endoscopic path planning for multiple foci according to any of claims 1 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111080468.2A CN114027974B (en) | 2021-09-15 | 2021-09-15 | Endoscope path planning method, device and terminal for multiple lesion sites |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111080468.2A CN114027974B (en) | 2021-09-15 | 2021-09-15 | Endoscope path planning method, device and terminal for multiple lesion sites |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114027974A true CN114027974A (en) | 2022-02-11 |
CN114027974B CN114027974B (en) | 2023-10-13 |
Family
ID=80134353
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111080468.2A Active CN114027974B (en) | 2021-09-15 | 2021-09-15 | Endoscope path planning method, device and terminal for multiple lesion sites |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114027974B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019053052A1 (en) * | 2017-09-12 | 2019-03-21 | Itu Business Development A/S | A method for (re-)training a machine learning component |
CN110471419A (en) * | 2019-08-23 | 2019-11-19 | 北京工业大学 | A kind of multirobot collaboration paths planning method based on differential evolution fireworks algorithm |
CN110598834A (en) * | 2019-09-19 | 2019-12-20 | 吉林大学 | Binocular vision detection system structure optimization method |
CN113221051A (en) * | 2021-05-21 | 2021-08-06 | 天津大学 | Web service combination optimization method based on improved crow search algorithm |
-
2021
- 2021-09-15 CN CN202111080468.2A patent/CN114027974B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019053052A1 (en) * | 2017-09-12 | 2019-03-21 | Itu Business Development A/S | A method for (re-)training a machine learning component |
CN110471419A (en) * | 2019-08-23 | 2019-11-19 | 北京工业大学 | A kind of multirobot collaboration paths planning method based on differential evolution fireworks algorithm |
CN110598834A (en) * | 2019-09-19 | 2019-12-20 | 吉林大学 | Binocular vision detection system structure optimization method |
CN113221051A (en) * | 2021-05-21 | 2021-08-06 | 天津大学 | Web service combination optimization method based on improved crow search algorithm |
Non-Patent Citations (1)
Title |
---|
张璐;王慧;: "基于蚁群算法的多采摘机器人路径规划与导航系统", 农机化研究, no. 11, pages 233 - 237 * |
Also Published As
Publication number | Publication date |
---|---|
CN114027974B (en) | 2023-10-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102016959B1 (en) | Method and apparatus for generating blood vessel model | |
CN104736085B (en) | Determine position of the medicine equipment in branch's anatomical structure | |
CN112053400B (en) | Data processing method and robot navigation system | |
CN101262830A (en) | Method and system for mapping dummy model of object to object | |
KR102450931B1 (en) | Image registration method and associated model training method, apparatus, apparatus | |
CN114022548A (en) | Endoscope collision detection method, device, equipment and storage medium | |
Choi et al. | Video recognition of simple mastoidectomy using convolutional neural networks: Detection and segmentation of surgical tools and anatomical regions | |
KR102442093B1 (en) | Methods for improving surface registration in surgical navigation systems | |
CN113876420B (en) | Path planning method, system, device and medium for planning surgical path | |
CN115553925A (en) | Endoscope control model training method and device, equipment and storage medium | |
JP2016209399A (en) | Image processing device and method, and computer program | |
CN114022538B (en) | Path planning method, device, terminal and storage medium of endoscope | |
CN116778138B (en) | Pulmonary nodule positioning system | |
CN114027974A (en) | Multi-focus endoscope path planning method, device and terminal | |
CN114010310B (en) | Path planning method and device, electronic equipment and storage medium | |
CN111741729A (en) | Surgical optimization method and device | |
JP2024504025A (en) | container shape | |
CN114266831A (en) | Data processing method, device, equipment, medium and system for assisting operation | |
CN114903415A (en) | Application of DICOM image in endoscope capsule robot automatic navigation | |
Bellemare et al. | Depth-map-based scene analysis for active navigation | |
CN117770978B (en) | Surgical incision position point determination method, system, medium and electronic equipment | |
Xu et al. | Study on the Path Planning Based on A* Algorithm for Vascular Intervention Robots | |
CN117765038A (en) | Pulmonary tracheal registration method, pulmonary tracheal registration system, computing device and computer storage medium | |
US11986248B2 (en) | Apparatus and method for matching the real surgical image with the 3D-based virtual simulated surgical image based on POI definition and phase recognition | |
US20230237685A1 (en) | Systems and methods for mesh and tack diagnosis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |