WO2024008042A1 - Method for quantitatively controlling first viewing angle of capsule endoscope, system and storage medium - Google Patents
Method for quantitatively controlling first viewing angle of capsule endoscope, system and storage medium Download PDFInfo
- Publication number
- WO2024008042A1 WO2024008042A1 PCT/CN2023/105552 CN2023105552W WO2024008042A1 WO 2024008042 A1 WO2024008042 A1 WO 2024008042A1 CN 2023105552 W CN2023105552 W CN 2023105552W WO 2024008042 A1 WO2024008042 A1 WO 2024008042A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- capsule endoscope
- offset
- data
- angle
- yaw
- Prior art date
Links
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B1/00—Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
- A61B1/04—Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor combined with photographic or television appliances
- A61B1/041—Capsule endoscopes for imaging
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B1/00—Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
- A61B1/04—Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor combined with photographic or television appliances
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B1/00—Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
- A61B1/04—Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor combined with photographic or television appliances
- A61B1/045—Control thereof
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B1/00—Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
- A61B1/273—Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor for the upper alimentary canal, e.g. oesophagoscopes, gastroscopes
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B1/00—Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
- A61B1/273—Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor for the upper alimentary canal, e.g. oesophagoscopes, gastroscopes
- A61B1/2736—Gastroscopes
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/07—Endoradiosondes
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/07—Endoradiosondes
- A61B5/073—Intestinal transmitters
Definitions
- the present invention relates to the technical field of medical equipment, and in particular to a capsule endoscope first perspective quantitative control method, system and storage medium.
- the magnetically controlled capsule endoscope system uses external control magnets (such as permanent magnets or electromagnets) to compare capsule endoscopes that are swallowed into the body or placed in cavities such as simulated stomachs, intestines, etc. Remote contactless control. From this, certain parameters in the human body or cavity can be collected as intermediate results, thereby assisting in the examination of the digestive tract, assisting medical staff in the diagnosis and treatment of diseases, or assisting in the conduct of simulation experiments.
- external control magnets such as permanent magnets or electromagnets
- An axially magnetized approximately cylindrical magnet is installed inside the capsule endoscope, and the magnetic field distribution has the characteristics of approximately axial symmetry. Therefore, the 5-DOF (Degree of Freedom, degree of freedom) external control magnet usually cannot be controlled effectively and quantitatively.
- the spin angle of the 6-DOF capsule endoscope keeps it stable.
- the random spin of the capsule endoscope causes the orientation of the field of view of the captured image to change synchronously. It is difficult for the human brain and eyes to establish a mapping relationship between the image and the actual direction control action of the capsule endoscope in real time, making real-time control There are difficulties.
- the capsule endoscope is usually controlled from a third-angle perspective by watching from the sidelines.
- the doctor or operator who operates the capsule endoscope cannot intuitively perform the capsule endoscopy based on the image feedback of the capsule endoscope and visual habits.
- the up and down, left and right field of view angles of the endoscope cannot be adjusted, and the forward and backward position control cannot be performed. It is impossible to conveniently control the distance between the capsule endoscope and the target position, aim at the center area of the target, and scan and photograph the wall of the digestive tract at fixed points. Purpose.
- One of the purposes of the present invention is to provide a quantitative control method for the first viewing angle of a capsule endoscope to solve the difficulty in the prior art of appropriately adjusting the field of view angle of the capsule endoscope through external equipment and the process of collecting target position data.
- Technical problems that are cumbersome, time-consuming, and have poor user experience.
- One of the objects of the present invention is to provide a first viewing angle quantitative control system for a capsule endoscope.
- One object of the present invention is to provide a storage medium.
- one embodiment of the present invention provides a method for quantitatively controlling the first viewing angle of a capsule endoscope, which includes: obtaining the field of view offset of the capsule endoscope at the first viewing angle; The field offset is used to calculate the attitude calibration data in the inertial frame; and the capsule endoscope is adjusted to a calibration pose state based on the attitude calibration data.
- the field of view offset includes a yaw angle offset and a pitch angle offset.
- the "adjusting the capsule endoscope to the calibration posture state according to the posture calibration data” specifically includes: according to the posture calibration data, according to the preset angle step Adjust the posture of the capsule endoscope until the capsule endoscope reaches the calibration posture state.
- the "calculating the attitude calibration data in the inertial system according to the field of view offset" specifically includes: determining the external deflection in the inertial system according to the field of view offset. displacement; according to the external offset, fit an external rotation matrix under the inertial system; according to the external rotation matrix, calculate the attitude calibration data under the inertial system.
- the attitude calibration data includes yaw offset data; the "calculating the attitude calibration data in the inertial system according to the external rotation matrix" specifically includes: converting the external The rotation matrix is projected to the yaw adjustment plane under the inertial frame to obtain the first direction parameter and the second direction parameter. The arc tangent transformation process is performed on the first direction parameter and the second direction parameter to obtain the target yaw. Data; use the target yaw data as the yaw offset data.
- the "projecting the external rotation matrix to the yaw adjustment plane under the inertial system to obtain the first direction parameter and the second direction parameter" specifically includes: extracting the external rotation matrix
- the data at the first position and the data at the second position in the rotation matrix correspond to the first direction parameter and the second direction parameter; wherein, the data at the first position represents the yaw performed by the capsule endoscope.
- the position change in the first direction during adjustment, and the data of the second position represent the position change in the second direction when the capsule endoscope performs yaw adjustment.
- the attitude calibration data includes pitch calibration data;
- the "calculating the attitude calibration data in the inertial system according to the external rotation matrix” specifically includes: converting the external rotation matrix Project to the pitch adjustment axis under the inertial system to obtain the third direction parameter, perform inverse cosine transformation on the third direction parameter, and obtain the target pitch data; calculate the pitch according to the target pitch data and the current tilt data calibration data.
- the "projecting the external rotation matrix to the pitch adjustment axis under the inertial system to obtain the third direction parameter" specifically includes: extracting the third position in the external rotation matrix The data corresponding to the third direction parameter are obtained; wherein the data of the third position represents the position change of the capsule endoscope when it performs pitch adjustment.
- the "fitting an external rotation matrix in the inertial system according to the external offset” specifically includes: determining the roll angle corresponding to the field of view offset. The value of , the inertial system is constructed based on the roll angle; under the inertial system, the external rotation matrix is fitted according to the external offset; wherein the external rotation matrix represents the After the capsule endoscope is rotated in a preset spin axis sequence, the rotational changes of the position relative to the original position are described.
- the "fitting the external rotation matrix according to the external offset in the inertial frame” specifically includes: calculating the yaw corresponding to the external offset. Euler angle and pitch Euler angle; fit the external rotation matrix according to the trigonometric function values of the roll angle, the yaw Euler angle and the pitch Euler angle.
- the field of view offset includes a yaw angle offset and a pitch angle offset
- the external offset includes an offset corresponding to the yaw angle offset.
- the yaw offset, and the pitch offset corresponding to the pitch angle offset; the "calculating the yaw Euler angle and pitch Euler angle corresponding to the external offset" specifically includes: according to the The yaw offset and the current tilt data are used to calculate the yaw Euler angle; based on the pitch offset, the pitch Euler angle is calculated.
- the "fitting of the external rotation matrix based on the trigonometric function values of the roll angle, the yaw Euler angle and the pitch Euler angle” specifically includes: According to the trigonometric function values of the roll angle, the yaw Euler angle and the pitch Euler angle, the roll rotation matrix, the yaw rotation matrix and the pitch rotation matrix are correspondingly calculated; for the yaw rotation The external rotation matrix is calculated by dot-multiplying the matrix, the pitch rotation matrix and the roll rotation matrix in sequence.
- the "determining the external offset in the inertial system based on the field of view offset" specifically includes: constructing a coordinate transformation matrix based on the preset deviation phase angle; The coordinate transformation matrix and the field of view offset determine the external offset in the inertial system.
- the method further includes: adjusting the distance between the capsule endoscope and the site to be detected according to the calibration posture state.
- the "adjusting the distance between the capsule endoscope and the part to be detected according to the calibration posture state” specifically includes: fixing and adjusting the distance between the capsule endoscope and the part to be detected according to the posture calibration data.
- the yaw offset data is used to calculate the current orientation data, and the distance adjustment direction is determined based on the current orientation data, and the distance adjustment signal is continuously output until the proportion of the object to be measured in the detection image meets the preset requirements.
- the "adjusting the distance between the capsule endoscope and the site to be detected according to the calibration posture state" specifically includes: obtaining the real-time position of the capsule endoscope. pose information and target pose information; calculate the current orientation data based on the yaw offset data in the attitude calibration data, and calculate the target based on the real-time pose information, the target pose information, and the current orientation data Position range and current motion trajectory; control the capsule endoscope to follow the current motion trajectory.
- the "calculate the current orientation data based on the yaw offset data in the attitude calibration data, and calculate the current orientation data based on the real-time pose information, the target pose information and the current Orientation data, calculating target pose range and current motion trajectory" specifically includes: re-determining the current orientation data of the capsule endoscope based on the yaw offset data, and determining the capsule endoscope using the current orientation data.
- the forward and backward distance adjustment direction of the capsule endoscope according to the preset distance step and the current orientation data, determine the forward and backward distance adjustment variables of the capsule endoscope, and adjust the variables and the distance according to the distance
- the real-time pose information and the target pose information are used to calculate the target pose range and the current motion trajectory.
- the method before “obtaining the field of view offset of the capsule endoscope at the first viewing angle", the method further includes: fusing and calibrating mutually cooperative control devices in an inertial frame and the pose data of the capsule endoscope, moving the control device to the initialization position corresponding to the capsule endoscope; receiving and based on the initial pose data of the capsule endoscope, rotating and correcting the output detection image of the capsule endoscope display status.
- one embodiment of the present invention provides a first-angle quantitative control system for a capsule endoscope, which includes a capsule endoscope and a quantitative control device that cooperate with each other.
- the quantitative control device is configured to execute the above-mentioned The first visual angle quantitative control method of capsule endoscope according to any technical solution.
- one embodiment of the present invention provides a storage medium on which an application program is stored.
- the application program is executed, the first viewing angle of the capsule endoscope according to any of the above technical solutions is realized. Steps in quantitative control methods.
- the present invention obtains the field of view offset, quantifies the field of view offset into data on the side of the external device through inertial frame conversion, and calibrates the field of view of the capsule endoscope based on the obtained attitude calibration data.
- Field posture angle, and finally adjust the capsule endoscope to the calibration posture state can easily assist medical workers to obtain more accurate parameters in the expected field of view posture, and improve the accuracy of capsule endoscope posture control , streamlines the control process of collecting target position data, and optimizes the subject's experience, making it suitable for large-scale promotion and application.
- the beneficial effects of the present invention are: providing a first-view quantitative control method and system for a capsule endoscope that conforms to the operator's intuitive visual experience, and achieves an approximate "seen” view based on the feedback of the captured image. That is, "what you get” quantitative position and posture control of capsule endoscopy; strengthen the purpose of capsule endoscopy, reduce the blindness of control actions, reduce the technical difficulty of magnetic control operation, and improve the convenience of capsule control; it can control key targets Conduct targeted scans and inspections in various areas to reduce meaningless repeated area shots and improve the efficiency of digestive tract inspections; further optimize the angle and distance of capsule endoscope shots to maximize the performance of the capsule endoscope imaging hardware system and improve Image quality of gastrointestinal examinations.
- Figure 1 is a schematic structural diagram of a first-angle quantitative control system for a capsule endoscope in an embodiment of the present invention.
- FIG. 2 is a schematic diagram of the steps of a method for quantitatively controlling the first viewing angle of a capsule endoscope in an embodiment of the present invention.
- FIG. 3 is a schematic diagram of different detection images generated during the implementation of the first angle of view quantitative control method of a capsule endoscope in an embodiment of the present invention.
- FIG. 4 is a schematic diagram of the state of the capsule endoscope in the inertial system when implementing the first visual angle quantitative control method of the capsule endoscope in an embodiment of the present invention.
- FIG. 5 is a schematic diagram of a state of a detection image generated when implementing the first angle of view quantitative control method of a capsule endoscope in an embodiment of the present invention.
- Figure 6 is a schematic diagram of the steps of a method for quantitatively controlling the first viewing angle of a capsule endoscope in another embodiment of the present invention.
- FIG. 7 is a schematic diagram of some steps of the first embodiment of the quantitative control method for the first viewing angle of a capsule endoscope in another embodiment of the present invention.
- FIG. 8 is a schematic diagram of some steps of a second embodiment of a quantitative control method for the first viewing angle of a capsule endoscope in another embodiment of the present invention.
- FIG. 9 is a schematic diagram of the state of the capsule endoscope in the inertial system when the first viewing angle quantitative control method of the capsule endoscope is implemented in yet another embodiment of the present invention.
- Figure 10 is a schematic diagram of the steps of a method for quantitatively controlling the first viewing angle of a capsule endoscope in yet another embodiment of the present invention.
- FIG. 11 is a schematic diagram of a state of a detection image generated during the implementation of the first viewing angle quantitative control method of a capsule endoscope in yet another embodiment of the present invention.
- Figure 12 is a schematic diagram of the steps of a quantitative control method for the first viewing angle of a capsule endoscope in yet another embodiment of the present invention.
- FIG. 13 is a partial step diagram of a specific example of a quantitative control method for the first viewing angle of a capsule endoscope in yet another embodiment of the present invention.
- One embodiment of the present invention provides a storage medium on which an application program is stored.
- a method for quantitatively controlling the first viewing angle of a capsule endoscope is implemented by determining the offset of the field of view and using special coordinates.
- the attitude calibration data is obtained through system conversion, so that the angle of view of the capsule endoscope can be controlled based on the attitude calibration data.
- the storage medium or the executed first-view quantitative control method of the capsule endoscope can also control the distance of the capsule endoscope from the target area by driving the capsule endoscope forward and backward, which can improve the control accuracy. , reducing the amount of data required for calculations, optimizing subject experience, and suitable for large-scale promotion and application.
- the storage medium may be any available medium capable of accessing data, or may be a storage device such as a server or data center integrated with one or more available media.
- Available media may be magnetic media such as floppy disks, hard disks, magnetic tapes, etc., or optical media such as DVD (Digital Video Disc, High Density Digital Video Disc), or semiconductor media such as SSD (Solid State Disk, Solid State Drive).
- one embodiment of the present invention provides a capsule endoscope first perspective quantitative control system 100, which includes a capsule endoscope 11 and a quantitative control device 12 that cooperate with each other.
- the quantitative control device 12 is configured to execute A quantitative control method for the first viewing angle of a capsule endoscope can control the viewing angle orientation of the capsule endoscope 11 so that it can be accurately aligned with the site to be detected; and the quantitative control method for the first viewing angle of a capsule endoscope can It simplifies the control process, optimizes the experience, and is suitable for large-scale promotion and application.
- the quantitative control device 12 can be provided with the above-mentioned storage medium to achieve the above technical effects.
- multiple modules can also be provided inside the quantitative control device 12, and the above technical effects can be jointly achieved through mutual cooperation between the modules.
- the capsule endoscope 11 may be preferably configured to have a capsule-like appearance.
- One embodiment of the present invention provides a method for quantitatively controlling the first viewing angle of a capsule endoscope as shown in FIG. 2 .
- the program or instructions corresponding to the method can be installed in the above-mentioned storage medium, and the method can also be installed in the above-mentioned capsule endoscope first-view quantitative control system in the form of programs, instructions or other forms.
- the method for quantitatively controlling the first viewing angle of a capsule endoscope may specifically include the following steps.
- Step 21 Obtain the field of view offset of the capsule endoscope at the first viewing angle.
- Step 22 Calculate attitude calibration data in the inertial system based on the field of view offset.
- Step 23 Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
- the field of view offset represents: "On one side of the capsule endoscope, at the first viewing angle of the capsule endoscope itself, the relative positional relationship deviation between the capsule endoscope and the part to be detected"
- Inertial frame conversion converts the field of view offset into attitude calibration data that can be adjusted by the external system, thereby adjusting the posture of the capsule endoscope and correcting the offset of the field of view angle so that the center of the field of view is aligned with the target area.
- it may also include: controlling the distance of the capsule endoscope from the target area through forward and backward movements when necessary. In this way, it is finally possible to adjust the up and down, left and right field of view angles of the capsule endoscope according to the feedback from the captured images, as well as control the forward and backward positions, so as to achieve more accurate and effective collection of data such as images of the target location area. , and can improve the user experience.
- the calibration posture state represents: a capsule endoscope posture state that is sufficient to enable the capsule endoscope to be aligned with the site to be detected.
- the field of view offset represents the degree to which the posture (especially its orientation) of the capsule endoscope deviates from the site to be detected.
- the degree of deviation can be measured by judging the vertical distance difference between the center point of the part to be detected and the orientation of the capsule endoscope, or by judging whether the distribution of the part to be detected is uniform in the detection image, or by judging whether the part to be detected is evenly distributed in the detection image, or by judging whether Check whether the detection part is displayed completely in the detection image.
- the content of the field of view offset may include the direction of the viewing angle offset (for example, offset in the pitch direction, or offset in the swing or yaw direction), and may also include the amount of the viewing angle offset (for example, length index ).
- the distance between the capsule endoscope and the site to be detected can be quantitatively measured; the angle of view deviation can also be an angle indicator.
- the field of view offset can be obtained through human judgment and input, or it can be automatically calculated by the quantitative control device.
- the inertial system refers to the world coordinate system established with the earth as a reference. Since the quantitative control device provided outside the capsule endoscope usually remains relatively stationary with the earth, the inertial system can also be defined as: the external coordinates established with the quantitative control device as a reference. Tie. Therefore, the field of view offset of the capsule endoscope is converted into attitude calibration data under the inertial system level, which can assist medical workers to easily adjust the viewing angle of the capsule endoscope to obtain more accurate calibration detection. image.
- the field of view offset includes a yaw angle offset and a pitch angle offset.
- the yaw angle offset represents the current offset of the capsule endoscope at the yaw angle level as shown in the detection image; specifically, the yaw angle offset represents the length of the capsule endoscope.
- the angle difference between the projection of the extension direction on the horizontal plane and the projection of the preset target direction on the horizontal plane also represents the degree of left and right swing of the capsule endoscope.
- the pitch angle offset represents the angle difference between the projection of the length extension direction of the capsule endoscope on the vertical plane and the projection of the preset target direction on the vertical plane, that is, it represents the angle difference of the capsule endoscope. The degree of lifting and falling.
- the field of view offset can be used as an intermediate amount to establish the relationship between the capsule endoscope object coordinate system (or model coordinate system, which can be interpreted as an independent coordinate system of the capsule endoscope itself) and the inertial system. relationship, achieving the effect of adjusting the action on one side of the object coordinate system from one side of the inertial system.
- the five images in Figure 3 show the detection images 30 in different states. Any one of the five images can be a detection image captured by the capsule endoscope in the initial posture state, and another one of the five images can be a detection image captured by the capsule endoscope in the initial posture state. It may be a detection image captured by the capsule endoscope in a calibrated posture state.
- the middle picture in Figure 3 can be used as a detection image captured by the capsule endoscope in the calibration posture. At this time, the capsule endoscope can be aligned with the center of the part to be detected. , thereby capturing a more complete, clear and accurate picture.
- the capsule endoscope has a pitch angle offset such as ⁇ dv in the initial posture state
- two detection images 30 shown in the upper or lower image in FIG. 3 will be generated as corresponding detection images.
- the capsule endoscope has a yaw angle offset such as ⁇ dh in the initial posture state
- two detection images 30 shown on the right or left in Figure 3 will be generated as corresponding detection images. Therefore, by executing the quantitative control method for the first viewing angle of a capsule endoscope provided by the present invention, the pitch angle offset and the yaw angle offset targeting the capsule endoscope can be effectively and targetedly eliminated.
- the capsule endoscope 11 adjusts its posture in the inertial system 300 , the corresponding detection image 30 formed by it will be in the longitudinal direction.
- V and horizontal H are adjusted correspondingly (the relative upward movement of the current detection image 30 is defined as the positive vertical V+ movement as shown in the figure, and the relative rightward movement of the current detection image 30 is defined as the vertical movement as shown in the figure).
- the coverage area of the corresponding detection image 30 can form a spherical shell as shown in Figure 4.
- the detection image 30 is in the object coordinate system
- the position movement on the spherical shell does not strictly follow the proportional change of the pitch angle offset or the proportional change of the yaw angle offset. Instead, the detection image 30 moves along the spherical shell and the movement amount will be distorted relative to the offset amount. .
- the technical solution provided by the present invention can effectively solve the problem of mismatch of movement conditions between coordinate systems, and achieve the adjustment of the position movement data in the object coordinate system by adjusting the position movement data in the inertial system.
- the generated detection image has the advantage of a larger field of view such as 140°, as shown in Figure 5.
- the spherical scene is compressed and mapped to a plane, which will cause the detection image not to be distributed in a straight linear manner, but will produce a certain distortion as the angle away from the central axis of the field of view increases.
- the control of the above step 23 can be further improved, thereby forming a new step 23'.
- Step 23' includes: according to the attitude calibration data, according to the preset Adjust the posture of the capsule endoscope by the set angle step until the capsule endoscope reaches the calibration posture state.
- the angular step size may be a step size on any level of attitude calibration data; for example, it may be an angular step size adjusted in the yaw angle offset direction (transverse direction H), or it may be an angular step size adjusted in the yaw angle offset direction (lateral H).
- the angle step for adjustment in the pitch angle offset direction (longitudinal V).
- the angle step size may be configured so that 50% of the central area of the detection image is retained as the image area at the preceding and following moments, and/or configured to cause the field of view image to be translated by approximately 1/4 scale. In this way, the coherence of images at adjacent moments during the adjustment process can be effectively enhanced and the "jelly effect" can be reduced as much as possible.
- the angle step can be set to at least one of 20° and 30°.
- a method for quantitatively controlling the first viewing angle of a capsule endoscope is provided. As shown in FIG. 6 , the method specifically includes the following steps.
- Step 21 Obtain the field of view offset of the capsule endoscope at the first viewing angle.
- Step 22 Calculate attitude calibration data in the inertial system based on the field of view offset. Among them, step 22 specifically includes the following steps:
- Step 221 Determine the external offset in the inertial frame according to the field of view offset
- Step 222 Fit the external rotation matrix in the inertial frame according to the external offset
- Step 223 Calculate attitude calibration data in the inertial system according to the external rotation matrix.
- Step 23 Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
- the field of view offset can first be converted from the object coordinate system to the inertial system, and then through the operation of the external rotation matrix, the field of view offset in the inertial system can be further converted into attitude calibration data, which is convenient for medical workers or control
- the system directly uses the attitude calibration data to calibrate the viewing angle direction of the capsule endoscope.
- the external offset is the offset degree of the corresponding field of view offset in the inertial system; the external rotation matrix is generated according to the external offset and includes a representation of the offset. A matrix of degree angle data.
- step 223 specifically includes step 2231 and step 2232.
- the first embodiment specifically includes the following steps.
- Step 21 Obtain the field of view offset of the capsule endoscope at the first viewing angle.
- Step 221 Determine the external offset in the inertial frame based on the field of view offset.
- Step 222 Fit the external rotation matrix in the inertial frame according to the external offset.
- Step 2231 Project the external rotation matrix to the yaw adjustment plane under the inertial frame to obtain the first direction parameter and the second direction parameter. Perform arctangent transformation processing on the first direction parameter and the second direction parameter to obtain the target yaw data. .
- Step 2232 Use target yaw data as yaw offset data.
- Step 23 Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
- the attitude calibration data includes yaw offset data.
- the trigonometric function relationship under the inertial system can be used to concentrate the external rotation matrix with multi-dimensional external offsets and complex data content on the yaw adjustment level, thereby dividing the control of the capsule endoscope into at least
- the hierarchical control logic including the yaw adjustment branch can more accurately and quickly adjust the offset of the capsule endoscope at least at the yaw adjustment level.
- the capsule endoscope has a first rotation axis, a second rotation axis, and a third rotation axis.
- first rotation axis when the capsule endoscope rotates according to the first rotation axis, the attitude adjustment at the spin angle or roll angle level occurs, and the first rotation axis extends along the length direction of the capsule endoscope, or is at the position of the capsule endoscope.
- a symmetry plane extends in a direction pointing toward the top parallel to the design axis of the capsule endoscope.
- the second rotation axis is perpendicular to the first rotation axis.
- the axis of rotation extends parallel to the direction of gravity.
- the capsule endoscope When the capsule endoscope has an offset at the yaw angle level, it can be considered that in the object coordinate system, the capsule endoscope has rotated according to the second rotation axis, which is equivalent to the rotation between the first rotation axis and Two motion components are generated on the plane where the third rotation axis is located. After the offset is converted into angle data in the external rotation matrix in the inertial frame, the first direction parameter and the second direction parameter are generated correspondingly. Therefore, by fusing the above two directional parameters, the target yaw data can be calculated and used as yaw offset data to control the viewing angle direction of the capsule endoscope at the yaw level.
- the external rotation matrix can be inverted to obtain an external yaw matrix R x that only contains yaw conditions.
- the external yaw matrix R x can at least satisfy:
- c 2 ⁇ cos ( ⁇ 2 ), s 2 ⁇ sin ( ⁇ 2 ), ⁇ 2 is the Euler angle corresponding to the degree of yaw offset (ie, the yaw angle ⁇ ).
- the projection method may also be to directly extract the data at the corresponding positions according to the connotations of the data at different positions in the external rotation matrix to obtain the first direction parameter and the second direction parameter.
- the external rotation matrix is defined as R, then it can at least satisfy:
- c 0 ⁇ cos( ⁇ 0 ), s 0 ⁇ sin( ⁇ 0 ), ⁇ 0 is the Euler angle (that is, the roll angle ⁇ ) corresponding to the degree of roll or spin offset
- ⁇ 1 is the Euler angle corresponding to the degree of pitch offset (that is, the pitch angle ⁇ ).
- the step 2231 may specifically include: extracting the data of the first position and the data of the second position in the external rotation matrix, and correspondingly obtaining the first direction parameter and the second direction parameter.
- the data at the first position represents the position change in the first direction when the capsule endoscope performs yaw adjustment;
- the data at the second position represents the position change of the capsule endoscope during yaw adjustment.
- the first direction may be the direction in which one of the first rotation axis or the third rotation axis points
- the second direction may be the direction in which the other of the first rotation axis or the third rotation axis points. .
- the first position may be at R 20 in the outer rotation matrix R
- the second position may be at R 21 in the outer rotation matrix R.
- the first direction parameter is (c 0 s 1 c 2 +s 0 s 2 )
- the second direction parameter is (s 0 s 1 c 2 -c 0 s 2 ).
- the arctangent transformation is preferably a four-quadrant arctangent transformation, and specifically, the coordinates are formed using the first direction parameter and the second direction parameter as basic parameters, and the four-quadrant arctangent transformation is The data is converted into radians and angles, and finally processed to obtain the target yaw data.
- the target yaw data is defined as A h and the yaw offset data is defined as rh, then it can at least satisfy:
- Figures 6 and 7 also provide other steps. These other steps can be used as another part of the first embodiment to supplement the above steps, or can be used as an independent step.
- the formed embodiment forms a new embodiment.
- the present invention provides an embodiment based on another embodiment described above. Specifically, step 223 specifically includes step 2233 and step 2234. This embodiment specifically includes the following steps.
- Step 21 Obtain the field of view offset of the capsule endoscope at the first viewing angle.
- Step 221 Determine the external offset in the inertial frame based on the field of view offset.
- Step 222 Fit the external rotation matrix in the inertial frame according to the external offset.
- Step 2233 Project the external rotation matrix to the pitch adjustment axis under the inertial system to obtain the third direction parameter, and perform inverse cosine transformation on the third direction parameter to obtain the target pitch data.
- Step 2234 Calculate pitch calibration data based on the target pitch data and current tilt data.
- Step 23 Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
- the attitude calibration data includes pitch calibration data.
- the trigonometric function relationship under the inertial system can be used to concentrate the external rotation matrix that contains multi-dimensional external offsets and complex data content on the pitch adjustment level, thereby dividing the control of the capsule endoscope into at least
- the hierarchical control logic of the pitch adjustment branch can more accurately and quickly adjust the offset of the capsule endoscope at least at the pitch adjustment level.
- the capsule endoscope when the capsule endoscope has an offset in the pitch plane, it can be considered that the capsule endoscope has rotated according to the third rotation axis in the object coordinate system, which is equivalent to Since two motion components are generated on the plane where the first rotation axis and the second rotation axis are located, the two motion components can jointly form the third direction parameter.
- the target pitch data can be calculated to further calculate the pitch calibration data, thereby completing the control of the viewing angle orientation of the capsule endoscope at the pitch level.
- the external rotation matrix can be inverted to obtain an external pitch matrix that only contains pitch conditions.
- Ry in one implementation, the external pitch matrix Ry can at least satisfy:
- the projection method may also be to directly extract the data at the corresponding positions according to the connotations of the data at different positions in the external rotation matrix to obtain the third direction parameter.
- the step 2233 may specifically include: extracting the data of the third position in the external rotation matrix, and correspondingly obtaining the third direction parameter.
- the data of the third position represents the position change of the capsule endoscope when it performs pitch adjustment.
- the third position may be at R 22 in the external rotation matrix R.
- the third direction parameter is (c 1 c 2 ).
- the obtained data can also be converted into radian angle, and finally processed to obtain the target pitch data.
- the target pitch data is defined as Av
- the current tilt data is defined as C v
- the pitch calibration data is defined as rv, then it can at least satisfy:
- the current tilt data C v represents the number of tilt angles of the capsule endoscope's current attitude relative to the direction of gravity in the inertial coordinate system.
- the current tilt data C v 0.
- the current tilt data C v can be obtained by implementing a capsule endoscope control system pose calibration method using a control system that cooperates with the capsule endoscope.
- the current tilt data C v can only be used as one degree of freedom of the capsule endoscope pose state; the pose state can include a total of six degrees of freedom, and specifically can form a pose state data sequence [C x , C y , C z C h , C v , C s ].
- [C x , C y , C z ] represents the coordinates of the capsule endoscope relative to the X direction, Y direction and Z direction in the inertial system
- [C h , C v , C s ] represents the coordinates of the capsule endoscope in the inertial system.
- Ch h may be correspondingly defined as the current orientation data
- C s may be correspondingly defined as the current rotation data.
- the position state sequence [C x , C y , C z ] can have an accuracy of 5 mm
- the pose state [C h , C v , C s ] can have an accuracy of 5°.
- step 223 specifically includes step 2231, step 2232, step 2233 and step 2234.
- This first embodiment may have the following steps as shown in FIGS. 6 and 7 .
- Step 21 Obtain the field of view offset of the capsule endoscope at the first viewing angle.
- Step 221 Determine the external offset in the inertial frame based on the field of view offset.
- Step 222 Fit the external rotation matrix in the inertial frame according to the external offset.
- Step 2231 Project the external rotation matrix to the yaw adjustment plane under the inertial frame to obtain the first direction parameter and the second direction parameter. Perform arctangent transformation processing on the first direction parameter and the second direction parameter to obtain the target yaw data. .
- Step 2232 Use target yaw data as yaw offset data.
- Step 2233 Project the external rotation matrix to the pitch adjustment axis under the inertial system to obtain the third direction parameter, and perform inverse cosine transformation on the third direction parameter to obtain the target pitch data.
- Step 2234 Calculate pitch calibration data based on the target pitch data and current tilt data.
- Step 23 Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
- step 222 specifically includes step 2221 and step 2222.
- the second embodiment can be combined with the above-mentioned first embodiment to form a better new embodiment, or can be implemented independently. As shown in Figures 6 and 8, the second embodiment may specifically include the following steps.
- Step 21 Obtain the field of view offset of the capsule endoscope at the first viewing angle.
- Step 221 Determine the external offset in the inertial frame based on the field of view offset.
- Step 2221 Determine the value of the roll angle corresponding to the offset of the field of view, and construct the inertial system based on the roll angle.
- Step 2222 In the inertial frame, fit the external rotation matrix according to the external offset.
- Step 223 Calculate attitude calibration data in the inertial system according to the external rotation matrix.
- Step 23 Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
- the external rotation matrix represents the rotational change of the position of the capsule endoscope relative to the original position after the capsule endoscope is rotated in a preset spin axis sequence.
- the establishment of the inertial system needs to be based on a certain parameter of the capsule endoscope.
- the certain parameter can be selected as a parameter that is difficult to adjust through the control system, thereby making up for the defects in the control of this parameter.
- the control system or specifically the quantitative control device therein may be provided with an external control magnet to achieve three degrees of freedom corresponding to [C x , Cy , C z ] of the capsule endoscope.
- Position control accordingly, the position control may be performed based on the position control sequence [M x , My , M z ].
- the external control magnet is also used to implement attitude control corresponding to the current orientation data Ch and the current tilt data C v ; accordingly, the attitude control may be performed according to the attitude control sequence [M h , M v ].
- the external control magnet can adjust and control the posture of the capsule endoscope based on a posture control data sequence [M x , My y , M z M h , M v ].
- the external control magnet has a position control accuracy of 1 mm and an attitude control accuracy of 1°.
- the adjustment and control method may be to implement a device and method such as controlling the movement of a capsule endoscope in the human digestive tract and/or a method of position and orientation calibration such as controlling a magnetically controlled capsule endoscope system.
- ⁇ 0 is the Euler angle corresponding to the degree of roll or spin offset, that is, the roll angle (or roll Euler angle) ⁇ 0 can be set as a constant value, and The roll angle ⁇ 0 is used as a reference to construct an inertial system, thereby simplifying the calculation and achieving the same technical effect.
- the roll angle is defined by the above definition of the yaw offset data rh and the pitch calibration data rv can be simplified to, at least satisfy:
- step 2222 specifically includes step 22221 and step 22222.
- This specific example includes the following steps.
- Step 21 Obtain the field of view offset of the capsule endoscope at the first viewing angle.
- Step 221 Determine the external offset in the inertial frame based on the field of view offset.
- Step 2221 Determine the value of the roll angle corresponding to the offset of the field of view, and construct the inertial system based on the roll angle.
- Step 22221 Calculate the yaw Euler angle and pitch Euler angle corresponding to the external offset.
- Step 22222 Fit the external rotation matrix according to the trigonometric function values of the roll angle, yaw Euler angle and pitch Euler angle.
- Step 223 Calculate attitude calibration data in the inertial system according to the external rotation matrix.
- Step 23 Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
- the external rotation matrix can be comprehensively generated from the three levels of yaw Euler angle, pitch Euler angle and roll angle, so that when step 223 and its derivative steps are subsequently performed, it can be achieved by extracting the data of the corresponding position or performing an inverse operation. Corresponding technical effects.
- the external rotation matrix R can be generated by filling in the above trigonometric function values based on the preset model, or it can be generated by respectively generating matrices corresponding to the yaw Euler angle, pitch Euler angle and roll angle. , obtained by operating according to the definition of the external rotation matrix itself.
- the matrix corresponding to the yaw Euler angle can be the external yaw matrix R x defined previously
- the matrix corresponding to the pitch Euler angle can be the external pitch matrix R y defined previously
- the matrix of rolling Euler angles can be an external rolling matrix R z , which can at least satisfy:
- step 22222 can be refined to include the steps of: calculating the roll rotation matrix, yaw, and yaw according to the trigonometric function values of the roll angle, the yaw Euler angle, and the pitch Euler angle respectively.
- Rotation matrix and pitch rotation matrix dot multiply the yaw rotation matrix, the pitch rotation matrix and the roll rotation matrix in sequence to calculate the external rotation matrix.
- the fitting and simplification process of the external rotation matrix R can be specifically as follows:
- the calculation of the yaw Euler angle ⁇ 2 and the pitch Euler angle ⁇ 1 may be calculated based on the field of view offset, or specifically, based on the external offset.
- the field of view offset includes a yaw angle offset dh and a pitch angle offset dv
- the external offset includes an offset corresponding to the yaw angle offset dh yaw offset dh 1 , and pitch offset dv 1 corresponding to the pitch angle offset dv.
- the step 22221 may further include the following steps: calculating the yaw Euler angle according to the yaw offset and the current tilt data C v ; calculating the pitch according to the pitch offset.
- Euler angles Combined with the limitations on roll angle ⁇ 0 mentioned above, the above three Euler angles can at least satisfy:
- the external rotation matrix can be combined with the external offset, especially the field of view offset, to facilitate subsequent targeted operations. Viewing angle adjustment and control.
- step 221 may also specifically include the following steps.
- Step 2211 Construct a coordinate transformation matrix based on the preset deviation phase angle.
- Step 2212 Determine the external offset in the inertial system based on the coordinate transformation matrix and the field of view offset.
- the deviation phase angle is defined as The field of view offset is [dh, dv], and the external offset is [dh 1 , dv 1 ], then at least the three conditions must be met:
- the field of view offset does not only include the yaw angle offset and the pitch angle offset
- the elements in the field of view offset and the external offset It is not necessarily 2.
- the order of the coordinate transformation matrix is not necessarily 2*2.
- the actual number of elements and matrix order are adaptively adapted according to the number of specific offsets in the field of view offset. produce.
- the coordinate transformation matrix is formed according to the trigonometric function value of the deviation phase angle.
- the technical solution provided above is based on the premise that the degrees of freedom of the external control magnet and the capsule endoscope cannot match.
- the correction of the capsule endoscope at the level of spin angle or roll angle is abandoned and assigned to a preset value. down, thus achieving good control efficiency.
- the capsule endoscope at position C is not corrected at the roll angle ⁇ level, there will be a certain offset relative to the coordinate system.
- the medical worker performs the yaw angle direction hc at position C
- the adjustment of the plane, or the position adjustment of the C position, pitch angle direction, vc plane will be different from the control logic of the own first perspective, making it difficult to read the film, and it is difficult to input accurate instructions to the system.
- a pre-step can also be set before step 21 to display the detection image output by the capsule endoscope through correction at the image processing level. Status is adjusted. In this way, it can not only adapt to the steps provided above, but also maintain the unity of the display direction (or viewing angle direction) when detecting image output, prevent medical workers from dizziness when reading pictures, and assist medical workers in outputting accurate images. Control instruction.
- another embodiment provided by the present invention specifically includes the following steps as shown in FIG. 10 .
- Step 201 fuse and calibrate the pose data of the cooperating control device and the capsule endoscope in an inertial system, and move the control device to an initialization position corresponding to the capsule endoscope.
- Step 202 Receive and based on the initial attitude data of the capsule endoscope, rotate and correct the display state of the output detection image of the capsule endoscope.
- Step 21 Obtain the field of view offset of the capsule endoscope at the first viewing angle.
- Step 22 Calculate attitude calibration data in the inertial system based on the field of view offset.
- Step 23 Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
- the pitch angle direction va of position A at position A in Figure 9 is aligned with the pitch angle direction of the inertial system spherical shell, and the yaw angle direction ha of position A is aligned with the yaw angle direction of the inertial system spherical shell.
- the pitch angle direction vb of position B at position B in Figure 9 is aligned with the pitch angle direction of the inertial system spherical shell, and the yaw direction hb of position B is aligned with the yaw angle direction of the inertial system spherical shell. Similar status.
- a technical solution may be designed to control the centrifugal direction ra at position A, the centrifugal direction rb at position B, or the centrifugal direction rc at position C, so as to adjust the posture of the capsule endoscope. Add a new degree of freedom.
- the "centrifugal direction” refers to the direction away from or close to the spherical center O of the spherical shell of the inertial system.
- the control device may be the external control magnet.
- the "fusion calibration" part in step 201 can further perform a posture calibration representation method of the magnetically controlled capsule endoscope system, and perform the following steps: obtain the first coordinate information of the external control magnet in the first object coordinate system ; Acquire the second coordinate information of the capsule endoscope in the second object coordinate system; establish an inertial system; correct the first coordinate information to the position information and/or attitude information of the external control magnet in the inertial system, and And the five degrees of freedom (5-DOF) state information is clearly expressed as the pose control data sequence [M x , My y , M z M h , M v ]; the second coordinate information is corrected into the inertial system
- the position information and/or attitude information of the capsule endoscope, and the six degrees of freedom (6-DOF) state information is clearly expressed as the pose state data sequence [C x ,C y ,C z Ch ,C v ,C s ].
- the "move the control device to the initial position" part in step 201 can be specifically: controlling the movement of the external control magnet until the plane position is controlled in the pose control data sequence [M x , My y , M z M h , M v ]
- the data [M x , M y ] is equal to the plane position state data [C x , C y ] in the pose state data sequence [C x , C y , C z C h , C v , C s ]; control external control The magnet moves until the vertical position control data M z in the pose control data sequence [M x , My y , M z M h , M v ] is consistent with the pose state data sequence [C x , C y , C z C h , C v , C s ], the difference dz between the vertical position status data C z satisfies the preset height difference value.
- a capsule endoscope image correction method may be further executed to complete the correction of the detection image.
- it may specifically include the steps of: obtaining the current detection image and the acceleration information sequence corresponding to the current detection image; calculating the image correction factor corresponding to the current detection image according to the acceleration information sequence, obtaining the current correction factor, and determining Whether the current posture information of the capsule endoscope is included in the acceleration detection dead zone range; if not, correct the current detection image according to the current correction factor; if yes, correct the current detection image according to the current correction factor of the capsule endoscope.
- the first correction factor of the forward posture of the posture corrects the current detection image.
- the viewing angle direction of the detection image can be corrected, so that the detection image is always output in the same appropriate observation direction.
- the above provides the posture control of the capsule endoscope at the yaw angle, pitch angle, roll angle, etc., and in another embodiment provided by the present invention, a new step 24 is provided.
- the quantitative control method of the first viewing angle of the capsule endoscope enables the capsule endoscope to adjust the distance between it and the actual position represented by the corresponding detection image in a certain direction, achieving position adjustment with more degrees of freedom.
- this further embodiment may include the following steps.
- Step 21 Obtain the field of view offset of the capsule endoscope at the first viewing angle.
- Step 22 Calculate attitude calibration data in the inertial system based on the field of view offset.
- Step 23 Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
- Step 24 Adjust the distance between the capsule endoscope and the part to be detected according to the calibration posture state.
- the adjustment of the distance can be achieved by adjusting the plane position control data [M x , My ] to affect the plane position status data [C x , Cy ].
- the direction of the distance adjustment can be based on the direction determined by the yaw offset data mentioned above, so as to comply with the control logic of the first perspective, intuitively based on the detection image, and selectively Control the capsule endoscope to approach or move away from the site to be detected, and adjust the distance between the capsule endoscope and the site to be detected.
- the "leaving out of loop" condition of the distance adjustment process may be that the screen ratio of the object to be measured in the detection image has met the preset requirements.
- the area of the object to be measured accounts for 50% of the area of the detection image.
- the step 24 may also specifically include: fixing and calculating the current orientation data (that is, the above-mentioned Ch ) based on the yaw offset data in the attitude calibration data, and determining the distance adjustment direction based on the current orientation data. , continue to output the distance adjustment signal until the proportion of the object to be measured in the detection image meets the preset requirements.
- the technical solution for distance adjustment in a specific example of this further embodiment, may include the following steps as shown in FIGS. 12 and 13 .
- Step 21 Obtain the field of view offset of the capsule endoscope at the first viewing angle.
- Step 22 Calculate attitude calibration data in the inertial system based on the field of view offset.
- Step 23 Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
- Step 24 Adjust the distance between the capsule endoscope and the part to be detected according to the calibration posture state.
- Step 24 may further include:
- Step 241 obtain the real-time pose information and target pose information of the capsule endoscope
- Step 242 Calculate current orientation data based on the yaw offset data in the attitude calibration data, and calculate the target pose range and current motion trajectory based on the real-time pose information, target pose information, and current orientation data;
- Step 243 Control the capsule endoscope to follow the current movement trajectory.
- the real-time pose information represents the process of the capsule endoscope continuing to move under the control of a quantitative control device, an external control magnet or other external equipment after undergoing the pose calibration in steps 21 to 23.
- the real-time pose information may include calibration pose information corresponding to the calibration pose state.
- the current orientation data and the above Ch can be interpreted equivalently.
- the motion control route can be automatically planned according to the yaw offset data and the set target pose information, and the movement of the capsule endoscope after the first perspective correction is controlled until it is in the pose pointed by the target pose information. state.
- attitude control under at least two degrees of freedom (for example, pitch angle and yaw angle, preferably also including roll angle), and at least two degrees of freedom (for example, plane position control data [M x , M y ], preferably also includes position control under the vertical position control data M z ), to facilitate medical workers to control the capsule endoscope easily and efficiently.
- control device may control the movement of the capsule endoscope by dragging, rolling, or jumping.
- drag translation is applied to the flatter bottom or top area of the digestive tract; tumbling movement is applied to smaller folds and gentle slope areas; jumping movement is applied to larger obstacles, steeper slope areas, and valley bottom areas (such as the fundus of the stomach, stomach sinus) crossing.
- the difference dz can be adjusted to keep the capsule endoscope at a suitable height, thereby enhancing the stability and efficiency of the control.
- the translation distance dL T of the capsule endoscope (dL T >0 forward, dL T ⁇ 0 backward) is generally set to a fixed typical value (such as 30mm), or to a value that can reflect the input force feedback. Variable value.
- the field of view of the capsule endoscope remains approximately unchanged, and the distance between the capsule endoscope and the object to be measured changes by dL T.
- the real-time pose information corresponds to real-time position information
- the target pose information corresponds to target position information
- the current movement trajectory corresponds to the current movement trajectory.
- the dragging process may be implemented by specifically executing a quantitative closed-loop control method of the magnetically controlled capsule endoscope system, which may include the steps of: continuously obtaining real-time position information of the capsule endoscope; obtaining the capsule endoscope target position information; determine the target position range according to the target position information; calculate the current movement trajectory of the external control magnet according to the real-time position information and the target position information; control the external control magnet to move along the current Trajectory movement; if the real-time position information is outside the target position range until the control magnet stops moving, repeat the step "calculate the current movement trajectory of the external control magnet based on the real-time position information and the target position information.”;Control the external control magnet to move along the current movement trajectory" until the real-time position information is within the target position range.
- a quantitative closed-loop control method of the magnetically controlled capsule endoscope system may include the steps of: continuously obtaining real-time position information of the capsule endoscope; obtaining the capsule endoscope target position information; determine the target position range according
- the generation process of the current movement trajectory can also be refined into: calculating the target pose range and capsule endoscope according to the real-time position information, the target position information and the yaw offset data. Movement trajectory; calculate the current movement trajectory according to the movement trajectory of the capsule endoscope.
- the conversion of the control scheme from the capsule endoscope side to the control device side is completed.
- the above calculation process can also be refined to include the following steps.
- Step 2421 re-determine the current orientation data of the capsule endoscope based on the yaw offset data, and use the current orientation data to determine the forward and backward distance adjustment directions of the capsule endoscope;
- Step 2422 Determine the forward and backward distance adjustment variables of the capsule endoscope based on the preset distance step and the current orientation data, and use the distance adjustment variables, the real-time pose information and the target pose information, calculate the target pose range and the current motion trajectory.
- the distance step size may be specifically defined as the above-mentioned translation distance dL T , and the current movement trajectory may include the current movement trajectory.
- the capsule endoscope can be dragged to the target position [C x1 , C y1 ].
- the target position [C x1 , C y1 ] can at least satisfy:
- Ch represents the current orientation data redetermined based on the yaw offset data rh, and the product of the translation distance dL T and the trigonometric function value of the current orientation data Ch together forms the distance adjustment variable. and Therefore, the current movement trajectory (that is, the current movement trajectory) is calculated and planned based on this.
- the real-time posture information corresponds to real-time posture information
- the target posture information corresponds to target posture information
- the current motion trajectory corresponds to the current rotation trajectory.
- the tumbling process may be implemented by specifically executing a quantitative closed-loop control method of the magnetically controlled capsule endoscope system, which may include the steps of: continuously acquiring real-time attitude information of the capsule endoscope; acquiring the target attitude of the capsule endoscope. information; according to the target attitude information, calculate the target attitude range and the current rotation trajectory of the external control magnet; control the external control magnet to move along the current rotation trajectory; until the external control magnet stops moving, the real-time attitude information is outside the target attitude range, then repeat the step "according to the target attitude information, calculate the target attitude range and the current rotation trajectory of the external control magnet; control the external control magnet to move along the current rotation trajectory" until The real-time attitude information is within the target attitude range.
- the capsule endoscope can be further restored to the initial posture information (that is, at least the position is restored).
- [C h , C v ] part in the posture state data sequence [C x , C y , C z Ch h , C v , C s ]).
- the present invention provides a first-view quantitative control method and system for a capsule endoscope that conforms to the operator's intuitive visual experience, and achieves an approximate "what you see is what you get" quantitative control of the capsule endoscope based on the captured image feedback.
- Position and posture control strengthen the purpose of capsule endoscopy, reduce the blindness of control actions, reduce the technical difficulty of magnetic control operations, and improve the convenience of capsule control; enable targeted scanning and inspection of key target areas, Reduce meaningless repeated area shooting and improve the efficiency of digestive tract examination; further optimize the angle and distance of capsule endoscope shooting, maximize the performance of the capsule endoscope imaging hardware system, and improve the image quality of digestive tract examination.
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Surgery (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Veterinary Medicine (AREA)
- Pathology (AREA)
- Public Health (AREA)
- Biophysics (AREA)
- Engineering & Computer Science (AREA)
- Biomedical Technology (AREA)
- Heart & Thoracic Surgery (AREA)
- Physics & Mathematics (AREA)
- Molecular Biology (AREA)
- Animal Behavior & Ethology (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Radiology & Medical Imaging (AREA)
- Optics & Photonics (AREA)
- Gastroenterology & Hepatology (AREA)
- Endoscopes (AREA)
Abstract
Description
本申请要求了申请日为2022年07月04日,申请号为202210787142.1,发明名称为“胶囊内窥镜第一视角定量控制方法、系统及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the filing date of July 4, 2022, the application number is 202210787142.1, and the invention name is "Capsule endoscope first-view quantitative control method, system and storage medium", and its entire content incorporated herein by reference.
本发明涉及医疗设备技术领域,尤其涉及一种胶囊内窥镜第一视角定量控制方法、系统及存储介质。The present invention relates to the technical field of medical equipment, and in particular to a capsule endoscope first perspective quantitative control method, system and storage medium.
磁控胶囊内窥镜系统,通过外部控制磁体(例如,永磁体或电磁体),对吞服到体内或设置于诸如仿真胃部、肠道等的空腔内的胶囊内窥镜,进行较远距离非接触式的控制。由此,可以采集得到人体内或空腔内某些参数作为中间结果,进而辅助消化道的检查,并辅助医护人员进行疾病的诊断和治疗,或辅助模拟实验的进行。The magnetically controlled capsule endoscope system uses external control magnets (such as permanent magnets or electromagnets) to compare capsule endoscopes that are swallowed into the body or placed in cavities such as simulated stomachs, intestines, etc. Remote contactless control. From this, certain parameters in the human body or cavity can be collected as intermediate results, thereby assisting in the examination of the digestive tract, assisting medical staff in the diagnosis and treatment of diseases, or assisting in the conduct of simulation experiments.
胶囊内窥镜内部设置轴向磁化的近似圆柱形磁铁,磁场分布具有近似轴对称性的特点,因此,5-DOF(Degree of Freedom,自由度)的外部控制磁体,通常无法有效、定量地控制6-DOF的胶囊内窥镜的自旋角度使其保持稳定。胶囊内窥镜的随机自旋导致所拍摄的影像的视场方位,发生同步旋转变化,人脑和人眼难以实时地建立起影像与胶囊内窥镜实际方向控制动作的映射关系,使得实时控制存在困难。现有技术中,通常采用旁观的第三视角控制方式,对胶囊内窥镜进行控制,操作胶囊内窥镜检查的医生或操作员无法依据胶囊内窥镜影像反馈,按照视觉习惯直观地进行胶囊内窥镜的上下、左右视场角度的调整,也无法进行前进、后退的位置控制,无法实现便捷地操控胶囊内窥镜与目标位置的距离、瞄准目标中心区域以及定点扫描拍摄消化道壁等目的。An axially magnetized approximately cylindrical magnet is installed inside the capsule endoscope, and the magnetic field distribution has the characteristics of approximately axial symmetry. Therefore, the 5-DOF (Degree of Freedom, degree of freedom) external control magnet usually cannot be controlled effectively and quantitatively. The spin angle of the 6-DOF capsule endoscope keeps it stable. The random spin of the capsule endoscope causes the orientation of the field of view of the captured image to change synchronously. It is difficult for the human brain and eyes to establish a mapping relationship between the image and the actual direction control action of the capsule endoscope in real time, making real-time control There are difficulties. In the existing technology, the capsule endoscope is usually controlled from a third-angle perspective by watching from the sidelines. The doctor or operator who operates the capsule endoscope cannot intuitively perform the capsule endoscopy based on the image feedback of the capsule endoscope and visual habits. The up and down, left and right field of view angles of the endoscope cannot be adjusted, and the forward and backward position control cannot be performed. It is impossible to conveniently control the distance between the capsule endoscope and the target position, aim at the center area of the target, and scan and photograph the wall of the digestive tract at fixed points. Purpose.
因而,有必要开发符合操作者直观视觉感受且基于胶囊内窥镜影像第一视角的定量控制方法和系统,加强胶囊内窥镜检查的目的性,减少操控动作的盲目性,降低磁控操作的技术难度,提高胶囊操控的便捷性,实现近似“所见即所得”的胶囊内窥镜的位置和姿态控制。从而,能够进行有针对性的关键目标区域扫描检查,减少无意义的重复区域拍摄,提高消化道检查的效率;进一步优化胶囊内窥镜拍摄的角度和距离,发挥胶囊内窥镜成像硬件系统的最佳性能,提升消化道检查的影像质量。Therefore, it is necessary to develop quantitative control methods and systems that conform to the operator's intuitive visual experience and are based on the first perspective of capsule endoscopy images to enhance the purpose of capsule endoscopy, reduce the blindness of control actions, and reduce the risk of magnetic control operations. Technical difficulty, improve the convenience of capsule control, and achieve position and attitude control of the capsule endoscope that is close to "what you see is what you get". As a result, it is possible to carry out targeted scanning inspections of key target areas, reduce meaningless repeated area shooting, and improve the efficiency of digestive tract inspections; the angle and distance of capsule endoscope shooting can be further optimized to give full play to the capabilities of the capsule endoscope imaging hardware system. Optimum performance to improve image quality for digestive tract examinations.
发明内容Contents of the invention
本发明的目的之一在于提供一种胶囊内窥镜第一视角定量控制方法,以解决现有技术中难以通过外部设备合适地调整胶囊内窥镜的视场角度,以及采集目标位置数据的过程繁琐,耗时长、用户体验感差的技术问题。One of the purposes of the present invention is to provide a quantitative control method for the first viewing angle of a capsule endoscope to solve the difficulty in the prior art of appropriately adjusting the field of view angle of the capsule endoscope through external equipment and the process of collecting target position data. Technical problems that are cumbersome, time-consuming, and have poor user experience.
本发明的目的之一在于提供一种胶囊内窥镜第一视角定量控制系统。One of the objects of the present invention is to provide a first viewing angle quantitative control system for a capsule endoscope.
本发明的目的之一在于提供一种存储介质。One object of the present invention is to provide a storage medium.
为实现上述发明目的之一,本发明一实施方式提供一种胶囊内窥镜第一视角定量控制方法,包括:获取胶囊内窥镜在第一视角下的视场偏移量;根据所述视场偏移量,计算惯性系下的姿态校准数据;根据所述姿态校准数据,调整所述胶囊内窥镜至校准位姿状态。In order to achieve one of the above-mentioned objects of the invention, one embodiment of the present invention provides a method for quantitatively controlling the first viewing angle of a capsule endoscope, which includes: obtaining the field of view offset of the capsule endoscope at the first viewing angle; The field offset is used to calculate the attitude calibration data in the inertial frame; and the capsule endoscope is adjusted to a calibration pose state based on the attitude calibration data.
作为本发明一实施方式的进一步改进,所述视场偏移量包括偏航角偏移量和俯仰角偏移量。As a further improvement of an embodiment of the present invention, the field of view offset includes a yaw angle offset and a pitch angle offset.
作为本发明一实施方式的进一步改进,所述“根据所述姿态校准数据,调整所述胶囊内窥镜至校准位姿状态”具体包括:根据所述姿态校准数据,按照预设的角度步长调整所述胶囊内窥镜的位姿,直至所述胶囊内窥镜达到所述校准位姿状态。As a further improvement of an embodiment of the present invention, the "adjusting the capsule endoscope to the calibration posture state according to the posture calibration data" specifically includes: according to the posture calibration data, according to the preset angle step Adjust the posture of the capsule endoscope until the capsule endoscope reaches the calibration posture state.
作为本发明一实施方式的进一步改进,所述“根据所述视场偏移量,计算惯性系下的姿态校准数据”具体包括:根据所述视场偏移量,确定惯性系下的外部偏移量;根据所述外部偏移量,在所述惯性系下拟合外部旋转矩阵;根据所述外部旋转矩阵,计算所述惯性系下的姿态校准数据。As a further improvement of an embodiment of the present invention, the "calculating the attitude calibration data in the inertial system according to the field of view offset" specifically includes: determining the external deflection in the inertial system according to the field of view offset. displacement; according to the external offset, fit an external rotation matrix under the inertial system; according to the external rotation matrix, calculate the attitude calibration data under the inertial system.
作为本发明一实施方式的进一步改进,所述姿态校准数据包括偏航偏移数据;所述“根据所述外部旋转矩阵,计算所述惯性系下的姿态校准数据”具体包括:将所述外部旋转矩阵投影至所述惯性系下的偏航调整平面,得到第一方向参数和第二方向参数,对所述第一方向参数和所述第二方向参数执行反正切变换处理,得到目标偏航数据;以所述目标偏航数据作为所述偏航偏移数据。 As a further improvement of an embodiment of the present invention, the attitude calibration data includes yaw offset data; the "calculating the attitude calibration data in the inertial system according to the external rotation matrix" specifically includes: converting the external The rotation matrix is projected to the yaw adjustment plane under the inertial frame to obtain the first direction parameter and the second direction parameter. The arc tangent transformation process is performed on the first direction parameter and the second direction parameter to obtain the target yaw. Data; use the target yaw data as the yaw offset data.
作为本发明一实施方式的进一步改进,所述“将所述外部旋转矩阵投影至所述惯性系下的偏航调整平面,得到第一方向参数和第二方向参数”具体包括:提取所述外部旋转矩阵中第一位置的数据和第二位置的数据,对应得到所述第一方向参数和所述第二方向参数;其中,所述第一位置的数据表征所述胶囊内窥镜执行偏航调整时在第一方向上的位置变化情况,所述第二位置的数据表征所述胶囊内窥镜执行偏航调整时在第二方向上的位置变化情况。As a further improvement of an embodiment of the present invention, the "projecting the external rotation matrix to the yaw adjustment plane under the inertial system to obtain the first direction parameter and the second direction parameter" specifically includes: extracting the external rotation matrix The data at the first position and the data at the second position in the rotation matrix correspond to the first direction parameter and the second direction parameter; wherein, the data at the first position represents the yaw performed by the capsule endoscope. The position change in the first direction during adjustment, and the data of the second position represent the position change in the second direction when the capsule endoscope performs yaw adjustment.
作为本发明一实施方式的进一步改进,所述姿态校准数据包括俯仰校准数据;所述“根据所述外部旋转矩阵,计算所述惯性系下的姿态校准数据”具体包括:将所述外部旋转矩阵投影至所述惯性系下的俯仰调整轴,得到第三方向参数,对所述第三方向参数执行反余弦变换,得到目标俯仰数据;根据所述目标俯仰数据和当前倾斜数据,计算所述俯仰校准数据。As a further improvement of an embodiment of the present invention, the attitude calibration data includes pitch calibration data; the "calculating the attitude calibration data in the inertial system according to the external rotation matrix" specifically includes: converting the external rotation matrix Project to the pitch adjustment axis under the inertial system to obtain the third direction parameter, perform inverse cosine transformation on the third direction parameter, and obtain the target pitch data; calculate the pitch according to the target pitch data and the current tilt data calibration data.
作为本发明一实施方式的进一步改进,所述“将所述外部旋转矩阵投影至所述惯性系下的俯仰调整轴,得到第三方向参数”具体包括:提取所述外部旋转矩阵中第三位置的数据,对应得到所述第三方向参数;其中,所述第三位置的数据表征所述胶囊内窥镜执行俯仰调整时的位置变化情况。As a further improvement of an embodiment of the present invention, the "projecting the external rotation matrix to the pitch adjustment axis under the inertial system to obtain the third direction parameter" specifically includes: extracting the third position in the external rotation matrix The data corresponding to the third direction parameter are obtained; wherein the data of the third position represents the position change of the capsule endoscope when it performs pitch adjustment.
作为本发明一实施方式的进一步改进,所述“根据所述外部偏移量,在所述惯性系下拟合外部旋转矩阵”具体包括:确定与所述视场偏移量对应的横滚角的数值,以所述横滚角为基准构建所述惯性系;在所述惯性系下,根据所述外部偏移量,拟合所述外部旋转矩阵;其中,所述外部旋转矩阵,表征所述胶囊内窥镜以预设的自旋轴次序依次旋转后,所处位置相对于原始位置的旋转变化情况。As a further improvement of an embodiment of the present invention, the "fitting an external rotation matrix in the inertial system according to the external offset" specifically includes: determining the roll angle corresponding to the field of view offset. The value of , the inertial system is constructed based on the roll angle; under the inertial system, the external rotation matrix is fitted according to the external offset; wherein the external rotation matrix represents the After the capsule endoscope is rotated in a preset spin axis sequence, the rotational changes of the position relative to the original position are described.
作为本发明一实施方式的进一步改进,所述“在所述惯性系下,根据所述外部偏移量,拟合所述外部旋转矩阵”具体包括:计算所述外部偏移量对应的偏航欧拉角和俯仰欧拉角;根据所述横滚角、所述偏航欧拉角和所述俯仰欧拉角的三角函数值,拟合所述外部旋转矩阵。As a further improvement of an embodiment of the present invention, the "fitting the external rotation matrix according to the external offset in the inertial frame" specifically includes: calculating the yaw corresponding to the external offset. Euler angle and pitch Euler angle; fit the external rotation matrix according to the trigonometric function values of the roll angle, the yaw Euler angle and the pitch Euler angle.
作为本发明一实施方式的进一步改进,所述视场偏移量包括偏航角偏移量和俯仰角偏移量,所述外部偏移量包括对应于所述偏航角偏移量的偏航偏移量,以及对应于所述俯仰角偏移量的俯仰偏移量;所述“计算所述外部偏移量对应的偏航欧拉角和俯仰欧拉角”具体包括:根据所述偏航偏移量和当前倾斜数据,计算所述偏航欧拉角;根据所述俯仰偏移量,计算所述俯仰欧拉角。As a further improvement of an embodiment of the present invention, the field of view offset includes a yaw angle offset and a pitch angle offset, and the external offset includes an offset corresponding to the yaw angle offset. The yaw offset, and the pitch offset corresponding to the pitch angle offset; the "calculating the yaw Euler angle and pitch Euler angle corresponding to the external offset" specifically includes: according to the The yaw offset and the current tilt data are used to calculate the yaw Euler angle; based on the pitch offset, the pitch Euler angle is calculated.
作为本发明一实施方式的进一步改进,所述“根据所述横滚角、所述偏航欧拉角和所述俯仰欧拉角的三角函数值,拟合所述外部旋转矩阵”具体包括:分别根据所述横滚角、所述偏航欧拉角和所述俯仰欧拉角的三角函数值,对应计算得到横滚旋转矩阵、偏航旋转矩阵和俯仰旋转矩阵;对所述偏航旋转矩阵、所述俯仰旋转矩阵和所述横滚旋转矩阵依次点乘,计算得到所述外部旋转矩阵。As a further improvement of an embodiment of the present invention, the "fitting of the external rotation matrix based on the trigonometric function values of the roll angle, the yaw Euler angle and the pitch Euler angle" specifically includes: According to the trigonometric function values of the roll angle, the yaw Euler angle and the pitch Euler angle, the roll rotation matrix, the yaw rotation matrix and the pitch rotation matrix are correspondingly calculated; for the yaw rotation The external rotation matrix is calculated by dot-multiplying the matrix, the pitch rotation matrix and the roll rotation matrix in sequence.
作为本发明一实施方式的进一步改进,所述“根据所述视场偏移量,确定惯性系下的外部偏移量”具体包括:根据预设的偏离相位角,构建坐标转换矩阵;根据所述坐标转换矩阵和所述视场偏移量,确定所述惯性系下的所述外部偏移量。As a further improvement of an embodiment of the present invention, the "determining the external offset in the inertial system based on the field of view offset" specifically includes: constructing a coordinate transformation matrix based on the preset deviation phase angle; The coordinate transformation matrix and the field of view offset determine the external offset in the inertial system.
作为本发明一实施方式的进一步改进,所述方法还包括:根据所述校准位姿状态,调整所述胶囊内窥镜与待检测部位之间的距离。As a further improvement of one embodiment of the present invention, the method further includes: adjusting the distance between the capsule endoscope and the site to be detected according to the calibration posture state.
作为本发明一实施方式的进一步改进,所述“根据所述校准位姿状态,调整所述胶囊内窥镜与待检测部位之间的距离”具体包括:固定并根据所述姿态校准数据中的偏航偏移数据计算当前方位数据,并根据所述当前方为数据确定距离调整方向,持续输出距离调整信号直至待测对象在检测图像中的占比符合预设要求。As a further improvement of an embodiment of the present invention, the "adjusting the distance between the capsule endoscope and the part to be detected according to the calibration posture state" specifically includes: fixing and adjusting the distance between the capsule endoscope and the part to be detected according to the posture calibration data. The yaw offset data is used to calculate the current orientation data, and the distance adjustment direction is determined based on the current orientation data, and the distance adjustment signal is continuously output until the proportion of the object to be measured in the detection image meets the preset requirements.
作为本发明一实施方式的进一步改进,所述“根据所述校准位姿状态,调整所述胶囊内窥镜与待检测部位之间的距离”具体包括:获取所述胶囊内窥镜的实时位姿信息和目标位姿信息;根据所述姿态校准数据中的偏航偏移数据计算当前方位数据,并根据所述实时位姿信息、所述目标位姿信息和所述当前方位数据,计算目标位姿范围和当前运动轨迹;控制所述胶囊内窥镜跟随所述当前运动轨迹运动。As a further improvement of an embodiment of the present invention, the "adjusting the distance between the capsule endoscope and the site to be detected according to the calibration posture state" specifically includes: obtaining the real-time position of the capsule endoscope. pose information and target pose information; calculate the current orientation data based on the yaw offset data in the attitude calibration data, and calculate the target based on the real-time pose information, the target pose information, and the current orientation data Position range and current motion trajectory; control the capsule endoscope to follow the current motion trajectory.
作为本发明一实施方式的进一步改进,所述“根据所述姿态校准数据中的偏航偏移数据计算当前方位数据,并根据所述实时位姿信息、所述目标位姿信息和所述当前方位数据,计算目标位姿范围和当前运动轨迹”具体包括:根据所述偏航偏移数据重新确定所述胶囊内窥镜的当前方位数据,并以所述当前方位数据确定所述胶囊内窥镜的前进、后退距离调整方向;根据预设的距离步长和所述当前方位数据,确定所述胶囊内窥镜的前进、后退距离调整变量,并根据所述距离调整变量、所 述实时位姿信息和所述目标位姿信息,计算所述目标位姿范围和所述当前运动轨迹。As a further improvement of an embodiment of the present invention, the "calculate the current orientation data based on the yaw offset data in the attitude calibration data, and calculate the current orientation data based on the real-time pose information, the target pose information and the current Orientation data, calculating target pose range and current motion trajectory" specifically includes: re-determining the current orientation data of the capsule endoscope based on the yaw offset data, and determining the capsule endoscope using the current orientation data. The forward and backward distance adjustment direction of the capsule endoscope; according to the preset distance step and the current orientation data, determine the forward and backward distance adjustment variables of the capsule endoscope, and adjust the variables and the distance according to the distance The real-time pose information and the target pose information are used to calculate the target pose range and the current motion trajectory.
作为本发明一实施方式的进一步改进,在所述“获取胶囊内窥镜在第一视角下的视场偏移量”之前,所述方法还包括:在惯性系下融合标定相互配合的控制设备和胶囊内窥镜的位姿数据,移动所述控制设备至与所述胶囊内窥镜对应的初始化位置;接收并根据胶囊内窥镜的初始姿态数据,旋转并修正胶囊内窥镜输出检测图像的显示状态。As a further improvement of an embodiment of the present invention, before "obtaining the field of view offset of the capsule endoscope at the first viewing angle", the method further includes: fusing and calibrating mutually cooperative control devices in an inertial frame and the pose data of the capsule endoscope, moving the control device to the initialization position corresponding to the capsule endoscope; receiving and based on the initial pose data of the capsule endoscope, rotating and correcting the output detection image of the capsule endoscope display status.
为实现上述发明目的之一,本发明一实施方式提供一种胶囊内窥镜第一视角定量控制系统,包括相互配合的胶囊内窥镜和定量控制装置,所述定量控制装置配置为,执行上述任一种技术方案所述的胶囊内窥镜第一视角定量控制方法。In order to achieve one of the above-mentioned objects of the invention, one embodiment of the present invention provides a first-angle quantitative control system for a capsule endoscope, which includes a capsule endoscope and a quantitative control device that cooperate with each other. The quantitative control device is configured to execute the above-mentioned The first visual angle quantitative control method of capsule endoscope according to any technical solution.
为实现上述发明目的之一,本发明一实施方式提供一种存储介质,其上存储有应用程序,该应用程序被执行时,实现上述任一种技术方案所述的胶囊内窥镜第一视角定量控制方法的步骤。In order to achieve one of the above-mentioned objects of the invention, one embodiment of the present invention provides a storage medium on which an application program is stored. When the application program is executed, the first viewing angle of the capsule endoscope according to any of the above technical solutions is realized. Steps in quantitative control methods.
与现有技术相比,本发明获取视场偏移量,并通过惯性系转换将视场偏移量量化为外部设备一侧的数据,根据得到的姿态校准数据来校准胶囊内窥镜的视场姿态角,最终将胶囊内窥镜调整至校准位姿状态,能够方便地辅助医疗工作者得到在预期视场姿态下更为准确的参数,实现了提升胶囊内窥镜位姿控制的精确性、精简采集目标位置数据的控制过程的效果,且优化了受试者的体验感,适合大范围推广应用。Compared with the existing technology, the present invention obtains the field of view offset, quantifies the field of view offset into data on the side of the external device through inertial frame conversion, and calibrates the field of view of the capsule endoscope based on the obtained attitude calibration data. Field posture angle, and finally adjust the capsule endoscope to the calibration posture state, can easily assist medical workers to obtain more accurate parameters in the expected field of view posture, and improve the accuracy of capsule endoscope posture control , streamlines the control process of collecting target position data, and optimizes the subject's experience, making it suitable for large-scale promotion and application.
与现有技术相比,本发明的有益效果是:提供了一种符合操作者直观视觉感受的胶囊内窥镜第一视角定量控制方法和系统,实现基于所拍摄图像反馈的、近似“所见即所得”的胶囊内窥镜定量位置和姿态控制;加强胶囊内窥镜检查的目的性,减少操控动作的盲目性,降低磁控操作的技术难度,提高胶囊操控的便捷性;能够对关键目标区域进行有针对性的扫描检查,减少无意义的重复区域拍摄,提高消化道检查的效率;进一步优化胶囊内窥镜拍摄的角度和距离,发挥胶囊内窥镜成像硬件系统的最佳性能,提升消化道检查的影像质量。Compared with the existing technology, the beneficial effects of the present invention are: providing a first-view quantitative control method and system for a capsule endoscope that conforms to the operator's intuitive visual experience, and achieves an approximate "seen" view based on the feedback of the captured image. That is, "what you get" quantitative position and posture control of capsule endoscopy; strengthen the purpose of capsule endoscopy, reduce the blindness of control actions, reduce the technical difficulty of magnetic control operation, and improve the convenience of capsule control; it can control key targets Conduct targeted scans and inspections in various areas to reduce meaningless repeated area shots and improve the efficiency of digestive tract inspections; further optimize the angle and distance of capsule endoscope shots to maximize the performance of the capsule endoscope imaging hardware system and improve Image quality of gastrointestinal examinations.
图1是本发明一实施方式中胶囊内窥镜第一视角定量控制系统的结构原理图。Figure 1 is a schematic structural diagram of a first-angle quantitative control system for a capsule endoscope in an embodiment of the present invention.
图2是本发明一实施方式中胶囊内窥镜第一视角定量控制方法的步骤示意图。FIG. 2 is a schematic diagram of the steps of a method for quantitatively controlling the first viewing angle of a capsule endoscope in an embodiment of the present invention.
图3是本发明一实施方式中实施胶囊内窥镜第一视角定量控制方法的过程中产生不同检测图像的示意图。FIG. 3 is a schematic diagram of different detection images generated during the implementation of the first angle of view quantitative control method of a capsule endoscope in an embodiment of the present invention.
图4是本发明一实施方式中实施胶囊内窥镜第一视角定量控制方法时胶囊内窥镜在惯性系下的状态示意图。FIG. 4 is a schematic diagram of the state of the capsule endoscope in the inertial system when implementing the first visual angle quantitative control method of the capsule endoscope in an embodiment of the present invention.
图5是本发明一实施方式中实施胶囊内窥镜第一视角定量控制方法时产生的检测图像的状态示意图。FIG. 5 is a schematic diagram of a state of a detection image generated when implementing the first angle of view quantitative control method of a capsule endoscope in an embodiment of the present invention.
图6是本发明另一实施方式中胶囊内窥镜第一视角定量控制方法的步骤示意图。Figure 6 is a schematic diagram of the steps of a method for quantitatively controlling the first viewing angle of a capsule endoscope in another embodiment of the present invention.
图7是本发明另一实施方式中胶囊内窥镜第一视角定量控制方法的第一实施例的部分步骤示意图。7 is a schematic diagram of some steps of the first embodiment of the quantitative control method for the first viewing angle of a capsule endoscope in another embodiment of the present invention.
图8是本发明另一实施方式中胶囊内窥镜第一视角定量控制方法的第二实施例的部分步骤示意图。8 is a schematic diagram of some steps of a second embodiment of a quantitative control method for the first viewing angle of a capsule endoscope in another embodiment of the present invention.
图9是本发明再一实施方式中实施胶囊内窥镜第一视角定量控制方法时胶囊内窥镜在惯性系下的状态示意图。FIG. 9 is a schematic diagram of the state of the capsule endoscope in the inertial system when the first viewing angle quantitative control method of the capsule endoscope is implemented in yet another embodiment of the present invention.
图10是本发明再一实施方式中胶囊内窥镜第一视角定量控制方法的步骤示意图。Figure 10 is a schematic diagram of the steps of a method for quantitatively controlling the first viewing angle of a capsule endoscope in yet another embodiment of the present invention.
图11是本发明再一实施方式中实施胶囊内窥镜第一视角定量控制方法的过程中产生的检测图像的状态示意图。FIG. 11 is a schematic diagram of a state of a detection image generated during the implementation of the first viewing angle quantitative control method of a capsule endoscope in yet another embodiment of the present invention.
图12是本发明又一实施方式中胶囊内窥镜第一视角定量控制方法的步骤示意图。Figure 12 is a schematic diagram of the steps of a quantitative control method for the first viewing angle of a capsule endoscope in yet another embodiment of the present invention.
图13是本发明又一实施方式中胶囊内窥镜第一视角定量控制方法的一个具体示例的部分步骤示意图。FIG. 13 is a partial step diagram of a specific example of a quantitative control method for the first viewing angle of a capsule endoscope in yet another embodiment of the present invention.
以下将结合附图所示的具体实施方式对本发明进行详细描述。但这些实施方式并不限制本发明,本领域的普通技术人员根据这些实施方式所做出的结构、方法、或功能上的变换均包含在本发明的 保护范围内。The present invention will be described in detail below with reference to the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention. Structural, method, or functional changes made by those of ordinary skill in the art based on these embodiments are all included in the scope of the present invention. within the scope of protection.
需要说明的是,术语“包括”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者还包括为这种过程、方法、物品或者设备所固有的要素。此外,术语“第一”、“第二”、“第三”等仅用于描述目的,而不能理解为指示或暗示相对重要性。It should be noted that the term "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus including a list of elements not only includes those elements, but also includes those not expressly listed other elements, or elements inherent to the process, method, article or equipment. Furthermore, the terms "first," "second," "third," etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
本发明一实施方式提供一种存储介质,其上存储有应用程序,应用程序被执行时,实现一种胶囊内窥镜第一视角定量控制方法,通过确定视场偏移量并利用特殊的坐标系转换得到姿态校准数据,从而根据姿态校准数据实现对胶囊内窥镜视角的控制。必要时,存储介质或所执行的胶囊内窥镜第一视角定量控制方法,还可以通过驱动胶囊内窥镜前进、后退动作,来控制胶囊内窥镜距目标区域的远近,能够提升控制精确性,降低运算所需的数据量需求,优化受试者体验,适合大范围推广应用。One embodiment of the present invention provides a storage medium on which an application program is stored. When the application program is executed, a method for quantitatively controlling the first viewing angle of a capsule endoscope is implemented by determining the offset of the field of view and using special coordinates. The attitude calibration data is obtained through system conversion, so that the angle of view of the capsule endoscope can be controlled based on the attitude calibration data. When necessary, the storage medium or the executed first-view quantitative control method of the capsule endoscope can also control the distance of the capsule endoscope from the target area by driving the capsule endoscope forward and backward, which can improve the control accuracy. , reducing the amount of data required for calculations, optimizing subject experience, and suitable for large-scale promotion and application.
所述存储介质可以是能够存取数据的任何可用介质,或可以是包含一个或多个可用介质集成的服务器、数据中心等存储设备。可用介质可以是例如软盘、硬盘、磁带等的磁性介质,或例如DVD(Digital Video Disc,高密度数字视频光盘)等的光介质,或例如SSD(Solid State Disk,固态硬盘)等的半导体介质。The storage medium may be any available medium capable of accessing data, or may be a storage device such as a server or data center integrated with one or more available media. Available media may be magnetic media such as floppy disks, hard disks, magnetic tapes, etc., or optical media such as DVD (Digital Video Disc, High Density Digital Video Disc), or semiconductor media such as SSD (Solid State Disk, Solid State Drive).
如图1所示,本发明一实施方式提供一种胶囊内窥镜第一视角定量控制系统100,包括相互配合的胶囊内窥镜11和定量控制装置12,所述定量控制装置12配置为执行一种胶囊内窥镜第一视角定量控制方法,能够实现对胶囊内窥镜11视角朝向的控制,使其精确地对准待检测部位;并且所述胶囊内窥镜第一视角定量控制方法能够简化控制过程、优化体验感并适合大范围推广应用。具体地,所述定量控制装置12可以设置有上述存储介质,来实现上述技术效果,当然也可以在定量控制装置12内部设置多种模块,通过模块间相互配合,共同实现上述技术效果。其中,所述胶囊内窥镜11可以优选地配置为具有胶囊状外观。As shown in Figure 1, one embodiment of the present invention provides a capsule endoscope first perspective quantitative control system 100, which includes a capsule endoscope 11 and a quantitative control device 12 that cooperate with each other. The quantitative control device 12 is configured to execute A quantitative control method for the first viewing angle of a capsule endoscope can control the viewing angle orientation of the capsule endoscope 11 so that it can be accurately aligned with the site to be detected; and the quantitative control method for the first viewing angle of a capsule endoscope can It simplifies the control process, optimizes the experience, and is suitable for large-scale promotion and application. Specifically, the quantitative control device 12 can be provided with the above-mentioned storage medium to achieve the above technical effects. Of course, multiple modules can also be provided inside the quantitative control device 12, and the above technical effects can be jointly achieved through mutual cooperation between the modules. Among them, the capsule endoscope 11 may be preferably configured to have a capsule-like appearance.
本发明一实施方式提供一种如图2所示的胶囊内窥镜第一视角定量控制方法。该方法对应的程序或指令可以搭载于上述存储介质中,该方法也可以以程序、指令或其他形式搭载于上述胶囊内窥镜第一视角定量控制系统中。所述胶囊内窥镜第一视角定量控制方法,具体可以包括下述步骤。One embodiment of the present invention provides a method for quantitatively controlling the first viewing angle of a capsule endoscope as shown in FIG. 2 . The program or instructions corresponding to the method can be installed in the above-mentioned storage medium, and the method can also be installed in the above-mentioned capsule endoscope first-view quantitative control system in the form of programs, instructions or other forms. The method for quantitatively controlling the first viewing angle of a capsule endoscope may specifically include the following steps.
步骤21,获取胶囊内窥镜在第一视角下的视场偏移量。Step 21: Obtain the field of view offset of the capsule endoscope at the first viewing angle.
步骤22,根据视场偏移量,计算惯性系下的姿态校准数据。Step 22: Calculate attitude calibration data in the inertial system based on the field of view offset.
步骤23,根据姿态校准数据,调整胶囊内窥镜至校准位姿状态。Step 23: Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
如此,能够根据视场偏移量确定胶囊内窥镜的视角发生偏移的情况。由于所述视场偏移量表征:“胶囊内窥镜一侧,在胶囊内窥镜自身的第一视角下,胶囊内窥镜与待检测部位之间的相对位置关系偏差”,因此可以通过惯性系转换,将该视场偏移量转换为外部系统能够调整的姿态校准数据,从而据此调整胶囊内窥镜的位姿,校正视场角度发生的偏移,使得视场中心对准目标区域。In this way, it is possible to determine the shift in the viewing angle of the capsule endoscope based on the field of view shift amount. Since the field of view offset represents: "On one side of the capsule endoscope, at the first viewing angle of the capsule endoscope itself, the relative positional relationship deviation between the capsule endoscope and the part to be detected", it can be passed Inertial frame conversion converts the field of view offset into attitude calibration data that can be adjusted by the external system, thereby adjusting the posture of the capsule endoscope and correcting the offset of the field of view angle so that the center of the field of view is aligned with the target area.
在其他优选的实施方式中,还可以包括:必要时,通过前进、后退动作控制胶囊内窥镜距目标区域的远近。如此,最终可以实现,根据所拍摄图像的反馈,进行胶囊内窥镜的上下、左右视场角度调整,以及前进、后退位置控制,以实现更加精准、有效地采集目标位置区域影像等数据的效果,且能够提升用户的使用体验。In other preferred embodiments, it may also include: controlling the distance of the capsule endoscope from the target area through forward and backward movements when necessary. In this way, it is finally possible to adjust the up and down, left and right field of view angles of the capsule endoscope according to the feedback from the captured images, as well as control the forward and backward positions, so as to achieve more accurate and effective collection of data such as images of the target location area. , and can improve the user experience.
其中,所述校准位姿状态表征:一种足以使得所述胶囊内窥镜能够对准所述待检测部位的胶囊内窥镜位姿状态。Wherein, the calibration posture state represents: a capsule endoscope posture state that is sufficient to enable the capsule endoscope to be aligned with the site to be detected.
所述视场偏移量表征:所述胶囊内窥镜的位姿(特别是其朝向)偏离待检测部位的程度。其中,偏离程度的衡量,可以是判断待检测部位的中心点和胶囊内窥镜的朝向之间的垂直距离差,可以是判断待检测部位在检测图像中的分布是否均匀,也可以是判断待检测部位在检测图像中的显示是否完整。所述视场偏移量的内容,可以包括视角偏移的方向(例如,在俯仰方向偏移,或在摆动或偏航方向偏移),也可以包括视角偏移的多少(例如,长度指标)。在一种特殊的实施方式中,胶囊内窥镜与待检测部位的距离可以被量化的测得;所述视角偏移的多少还可以是角度指标。视场偏移量的获取,可以是人为判断后输入,也可以是定量控制装置自动化计算得到。The field of view offset represents the degree to which the posture (especially its orientation) of the capsule endoscope deviates from the site to be detected. Among them, the degree of deviation can be measured by judging the vertical distance difference between the center point of the part to be detected and the orientation of the capsule endoscope, or by judging whether the distribution of the part to be detected is uniform in the detection image, or by judging whether the part to be detected is evenly distributed in the detection image, or by judging whether Check whether the detection part is displayed completely in the detection image. The content of the field of view offset may include the direction of the viewing angle offset (for example, offset in the pitch direction, or offset in the swing or yaw direction), and may also include the amount of the viewing angle offset (for example, length index ). In a special implementation, the distance between the capsule endoscope and the site to be detected can be quantitatively measured; the angle of view deviation can also be an angle indicator. The field of view offset can be obtained through human judgment and input, or it can be automatically calculated by the quantitative control device.
所述惯性系指代以地球为参考建立的世界坐标系。由于设置于胶囊内窥镜外部的定量控制装置通常与地球保持相对静止,所述惯性系还可以定义为:以所述定量控制装置为参考建立的外部坐标 系。从而,将以胶囊内窥镜为对象的视场偏移量,转化为惯性系层面下的姿态校准数据,能够辅助医疗工作者方便地调整胶囊内窥镜视角,以得到更为准确的校准检测图像。The inertial system refers to the world coordinate system established with the earth as a reference. Since the quantitative control device provided outside the capsule endoscope usually remains relatively stationary with the earth, the inertial system can also be defined as: the external coordinates established with the quantitative control device as a reference. Tie. Therefore, the field of view offset of the capsule endoscope is converted into attitude calibration data under the inertial system level, which can assist medical workers to easily adjust the viewing angle of the capsule endoscope to obtain more accurate calibration detection. image.
在本发明优选的实施方式中,所述视场偏移量包括偏航角偏移量和俯仰角偏移量。其中,所述偏航角偏移量表征检测图像所显示的、胶囊内窥镜当前在偏航角层面的偏移量;具体地,所述偏航角偏移量表征胶囊内窥镜的长度延伸方向在水平面上的投影,与预设的目标指向在水平面上的投影之间的角度差,也即表征胶囊内窥镜左右摆动的程度。所述俯仰角偏移量表征胶囊内窥镜的长度延伸方向在竖直面上的投影,与预设的目标指向在竖直面上的投影之间的角度差,也即表征胶囊内窥镜抬起落下的程度。如此,能够以所述视场偏移量作为中间量,建立胶囊内窥镜物体坐标系(或称,模型坐标系,可以解释为是胶囊内窥镜自身独立的坐标系)与惯性系之间的关系,达到从惯性系一侧调节物体坐标系一侧动作的效果。In a preferred embodiment of the present invention, the field of view offset includes a yaw angle offset and a pitch angle offset. Wherein, the yaw angle offset represents the current offset of the capsule endoscope at the yaw angle level as shown in the detection image; specifically, the yaw angle offset represents the length of the capsule endoscope. The angle difference between the projection of the extension direction on the horizontal plane and the projection of the preset target direction on the horizontal plane also represents the degree of left and right swing of the capsule endoscope. The pitch angle offset represents the angle difference between the projection of the length extension direction of the capsule endoscope on the vertical plane and the projection of the preset target direction on the vertical plane, that is, it represents the angle difference of the capsule endoscope. The degree of lifting and falling. In this way, the field of view offset can be used as an intermediate amount to establish the relationship between the capsule endoscope object coordinate system (or model coordinate system, which can be interpreted as an independent coordinate system of the capsule endoscope itself) and the inertial system. relationship, achieving the effect of adjusting the action on one side of the object coordinate system from one side of the inertial system.
具体地,图3中五张图像示出了不同状态下的检测图像30,五张图像其中任一可以是所述胶囊内窥镜在初始位姿状态下拍摄得到的检测图像,且其中另一可以是所述胶囊内窥镜在校准位姿状态下拍摄得到的检测图像。在一种优选的实施方式中,图3中的中图可以作为所述胶囊内窥镜在校准位姿状态下拍摄得到的检测图像,此时胶囊内窥镜能够对准待检测部位的中心位置,从而拍摄到更为完整全面且清晰准确的画面。Specifically, the five images in Figure 3 show the detection images 30 in different states. Any one of the five images can be a detection image captured by the capsule endoscope in the initial posture state, and another one of the five images can be a detection image captured by the capsule endoscope in the initial posture state. It may be a detection image captured by the capsule endoscope in a calibrated posture state. In a preferred embodiment, the middle picture in Figure 3 can be used as a detection image captured by the capsule endoscope in the calibration posture. At this time, the capsule endoscope can be aligned with the center of the part to be detected. , thereby capturing a more complete, clear and accurate picture.
然而,当胶囊内窥镜在初始位姿状态存在诸如±dv的俯仰角偏移量时,则会分别产生图3中的上图或下图两幅检测图像30作为对应的检测图像。当胶囊内窥镜在初始位姿状态存在诸如±dh的偏航角偏移量时,则会分别产生图3中右图或左图两幅检测图像30作为对应的检测图像。从而,执行本发明提供的上述胶囊内窥镜第一视角定量控制方法,能够有效且有针对性的消除以胶囊内窥镜为对象的俯仰角偏移量和偏航角偏移量。However, when the capsule endoscope has a pitch angle offset such as ±dv in the initial posture state, two detection images 30 shown in the upper or lower image in FIG. 3 will be generated as corresponding detection images. When the capsule endoscope has a yaw angle offset such as ±dh in the initial posture state, two detection images 30 shown on the right or left in Figure 3 will be generated as corresponding detection images. Therefore, by executing the quantitative control method for the first viewing angle of a capsule endoscope provided by the present invention, the pitch angle offset and the yaw angle offset targeting the capsule endoscope can be effectively and targetedly eliminated.
关于所述物体坐标系和所述惯性系之间的差异,则进一步如图4所示,胶囊内窥镜11在惯性系300中进行位姿调整时,其对应形成的检测图像30会在纵向V和横向H上对应进行调整(定义朝当前检测图像30的相对上方移动为图中所示沿纵向的正向V+移动,并定义朝当前检测图像30的相对右方移动为图中所示沿横向H的正向H+移动)。胶囊内窥镜11经过若干次位置调整后,其所对应的检测图像30的覆盖面积,能够形成如图4所示的球壳,可见,对于惯性系300而言,检测图像30在物体坐标系上的位置移动,并不严格遵循所述俯仰角偏移量的比例变化或偏航角偏移量的比例变化,而是检测图像30沿球壳移动且移动量相对于偏移量会发生畸变。利用本发明提供的技术方案,能够有效解决坐标系之间移动情况不匹配的问题,达到通过调整惯性系下的位置移动数据,完成对物体坐标系下的位置移动数据的调整。Regarding the difference between the object coordinate system and the inertial system, as further shown in FIG. 4 , when the capsule endoscope 11 adjusts its posture in the inertial system 300 , the corresponding detection image 30 formed by it will be in the longitudinal direction. V and horizontal H are adjusted correspondingly (the relative upward movement of the current detection image 30 is defined as the positive vertical V+ movement as shown in the figure, and the relative rightward movement of the current detection image 30 is defined as the vertical movement as shown in the figure). Positive H+ movement of transverse H). After several position adjustments of the capsule endoscope 11, the coverage area of the corresponding detection image 30 can form a spherical shell as shown in Figure 4. It can be seen that for the inertial system 300, the detection image 30 is in the object coordinate system The position movement on the spherical shell does not strictly follow the proportional change of the pitch angle offset or the proportional change of the yaw angle offset. Instead, the detection image 30 moves along the spherical shell and the movement amount will be distorted relative to the offset amount. . The technical solution provided by the present invention can effectively solve the problem of mismatch of movement conditions between coordinate systems, and achieve the adjustment of the position movement data in the object coordinate system by adjusting the position movement data in the inertial system.
在一种具体实施方式中,考虑到胶囊内窥镜自身成像的性质,在采用鱼眼镜头,且生成的检测图像具备诸如140°的较大视场角优势的同时,如图5所示,球面景象被压缩映射至平面,会导致检测图像并不是按照平直的线性分布,而是会随着偏离视场中心轴的角度的增加,对应产生一定畸变。为了在此种性质的影响下,继续保持成像效果的优异性,可以对上述步骤23的控制进行进一步改进,从而形成一种新的步骤23’,步骤23’包括:根据姿态校准数据,按照预设的角度步长调整胶囊内窥镜的位姿,直至胶囊内窥镜达到校准位姿状态。所述角度步长可以是针对姿态校准数据的任一层面上的步长;例如可以是在所述偏航角偏移量方向(横向H)上调整的角度步长,也可以是在所述俯仰角偏移量方向(纵向V)上调整的角度步长。In a specific implementation, considering the imaging properties of the capsule endoscope itself, a fisheye lens is used, and the generated detection image has the advantage of a larger field of view such as 140°, as shown in Figure 5. The spherical scene is compressed and mapped to a plane, which will cause the detection image not to be distributed in a straight linear manner, but will produce a certain distortion as the angle away from the central axis of the field of view increases. In order to continue to maintain the excellence of the imaging effect under the influence of this property, the control of the above step 23 can be further improved, thereby forming a new step 23'. Step 23' includes: according to the attitude calibration data, according to the preset Adjust the posture of the capsule endoscope by the set angle step until the capsule endoscope reaches the calibration posture state. The angular step size may be a step size on any level of attitude calibration data; for example, it may be an angular step size adjusted in the yaw angle offset direction (transverse direction H), or it may be an angular step size adjusted in the yaw angle offset direction (lateral H). The angle step for adjustment in the pitch angle offset direction (longitudinal V).
所述角度步长,可以配置为使检测图像中心区域中50%的部分保留为前后时刻图像面积,且/或配置为使视场图像发生约1/4尺度的平移。如此,能够有效增强调整过程中前后相邻时刻图像的连贯性,尽可能的减小“果冻效应”。一种实施方式中,可以设定所述角度步长为20°至30°中至少其中之一。The angle step size may be configured so that 50% of the central area of the detection image is retained as the image area at the preceding and following moments, and/or configured to cause the field of view image to be translated by approximately 1/4 scale. In this way, the coherence of images at adjacent moments during the adjustment process can be effectively enhanced and the "jelly effect" can be reduced as much as possible. In one embodiment, the angle step can be set to at least one of 20° and 30°.
本发明另一实施方式中提供一种胶囊内窥镜第一视角定量控制方法,如图6所示,所述方法具体包括下述步骤。In another embodiment of the present invention, a method for quantitatively controlling the first viewing angle of a capsule endoscope is provided. As shown in FIG. 6 , the method specifically includes the following steps.
步骤21,获取胶囊内窥镜在第一视角下的视场偏移量。Step 21: Obtain the field of view offset of the capsule endoscope at the first viewing angle.
步骤22,根据视场偏移量,计算惯性系下的姿态校准数据。其中,步骤22具体包括下述步骤:Step 22: Calculate attitude calibration data in the inertial system based on the field of view offset. Among them, step 22 specifically includes the following steps:
步骤221,根据视场偏移量,确定惯性系下的外部偏移量;Step 221: Determine the external offset in the inertial frame according to the field of view offset;
步骤222,根据外部偏移量,在惯性系下拟合外部旋转矩阵; Step 222: Fit the external rotation matrix in the inertial frame according to the external offset;
步骤223,根据外部旋转矩阵,计算惯性系下的姿态校准数据。Step 223: Calculate attitude calibration data in the inertial system according to the external rotation matrix.
步骤23,根据姿态校准数据,调整胶囊内窥镜至校准位姿状态。Step 23: Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
如此,能够首先将视场偏移量从物体坐标系转换至惯性系,然后经过外部旋转矩阵的运算,进一步将惯性系下的视场偏移量转化为姿态校准数据,便于医疗工作者或控制系统直接利用该姿态校准数据对胶囊内窥镜的视角朝向进行校准。上述整个过程使数据依次经过物体坐标系、惯性系两坐标系的处理,实现了两坐标系之间数据的转换,在不损失控制准确性的基础上,简化了控制逻辑。In this way, the field of view offset can first be converted from the object coordinate system to the inertial system, and then through the operation of the external rotation matrix, the field of view offset in the inertial system can be further converted into attitude calibration data, which is convenient for medical workers or control The system directly uses the attitude calibration data to calibrate the viewing angle direction of the capsule endoscope. The above entire process causes the data to be processed through the object coordinate system and the inertial system in sequence, realizing the conversion of data between the two coordinate systems, simplifying the control logic without losing control accuracy.
其中,所述外部偏移量为对应所述视场偏移量在所述惯性系下的偏移程度;所述外部旋转矩阵为根据所述外部偏移量生成的、包含表征所述偏移程度的角度数据的矩阵。Wherein, the external offset is the offset degree of the corresponding field of view offset in the inertial system; the external rotation matrix is generated according to the external offset and includes a representation of the offset. A matrix of degree angle data.
在上述另一实施方式的基础上,本发明进一步提供基于该实施方式的第一实施例,具体地,步骤223具体包括步骤2231和步骤2232。如图6和图7所示,该第一实施例具体包括下述步骤。Based on the above another embodiment, the present invention further provides a first embodiment based on this embodiment. Specifically, step 223 specifically includes step 2231 and step 2232. As shown in Figures 6 and 7, the first embodiment specifically includes the following steps.
步骤21,获取胶囊内窥镜在第一视角下的视场偏移量。Step 21: Obtain the field of view offset of the capsule endoscope at the first viewing angle.
步骤221,根据视场偏移量,确定惯性系下的外部偏移量。Step 221: Determine the external offset in the inertial frame based on the field of view offset.
步骤222,根据外部偏移量,在惯性系下拟合外部旋转矩阵。Step 222: Fit the external rotation matrix in the inertial frame according to the external offset.
步骤2231,将外部旋转矩阵投影至惯性系下的偏航调整平面,得到第一方向参数和第二方向参数,对第一方向参数和第二方向参数执行反正切变换处理,得到目标偏航数据。Step 2231: Project the external rotation matrix to the yaw adjustment plane under the inertial frame to obtain the first direction parameter and the second direction parameter. Perform arctangent transformation processing on the first direction parameter and the second direction parameter to obtain the target yaw data. .
步骤2232,以目标偏航数据作为偏航偏移数据。Step 2232: Use target yaw data as yaw offset data.
步骤23,根据姿态校准数据,调整胶囊内窥镜至校准位姿状态。Step 23: Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
其中,所述姿态校准数据包括偏航偏移数据。如此,能够利用惯性系下的三角函数关系,将复合有多重维度外部偏移量且数据内容复杂的外部旋转矩阵,集中于偏航调整层面上,从而将对胶囊内窥镜的控制至少划分为包括偏航调整这一分支的分层控制逻辑,能够更为准确快速地调整胶囊内窥镜至少在偏航调整层面的偏移。Wherein, the attitude calibration data includes yaw offset data. In this way, the trigonometric function relationship under the inertial system can be used to concentrate the external rotation matrix with multi-dimensional external offsets and complex data content on the yaw adjustment level, thereby dividing the control of the capsule endoscope into at least The hierarchical control logic including the yaw adjustment branch can more accurately and quickly adjust the offset of the capsule endoscope at least at the yaw adjustment level.
具体地,定义胶囊内窥镜具有第一旋转轴、第二旋转轴和第三旋转轴。其中,在胶囊内窥镜根据第一旋转轴旋转时,会发生自旋角或横滚角层面的姿态调整,所述第一旋转轴沿胶囊内窥镜长度方向延伸,或处于胶囊内窥镜一个对称平面内并平行于胶囊内窥镜的设计轴线指向顶部的方向延伸。在胶囊内窥镜根据第二旋转轴旋转时,会发生偏航角层面的姿态调整,所述第二旋转轴在所述第一旋转轴垂直于重力方向水平布置时,垂直于所述第一旋转轴且平行于重力方向延伸。在胶囊内窥镜根据第三旋转轴旋转时,会发生俯仰角层面的姿态调整,所述第三旋转轴垂直于所述第一旋转轴和所述第二旋转轴所形成的平面。Specifically, it is defined that the capsule endoscope has a first rotation axis, a second rotation axis, and a third rotation axis. Wherein, when the capsule endoscope rotates according to the first rotation axis, the attitude adjustment at the spin angle or roll angle level occurs, and the first rotation axis extends along the length direction of the capsule endoscope, or is at the position of the capsule endoscope. A symmetry plane extends in a direction pointing toward the top parallel to the design axis of the capsule endoscope. When the capsule endoscope rotates according to the second rotation axis, the attitude adjustment at the yaw angle level will occur. When the first rotation axis is arranged horizontally perpendicular to the direction of gravity, the second rotation axis is perpendicular to the first rotation axis. The axis of rotation extends parallel to the direction of gravity. When the capsule endoscope rotates according to the third rotation axis, the attitude adjustment at the pitch angle level occurs, and the third rotation axis is perpendicular to the plane formed by the first rotation axis and the second rotation axis.
在胶囊内窥镜存在偏航角层面的偏移量时,可以认为是在物体坐标系下,胶囊内窥镜根据所述第二旋转轴发生了旋转,相当于在所述第一旋转轴和所述第三旋转轴所在平面上产生两种运动分量。在该偏移量被转化为惯性系下所述外部旋转矩阵中的角度数据后,会对应产生所述第一方向参数和所述第二方向参数。从而,融合上述两种方向参数,能够计算得到目标偏航数据,以作为偏航偏移数据,进而对胶囊内窥镜在偏航层面的视角朝向进行控制。When the capsule endoscope has an offset at the yaw angle level, it can be considered that in the object coordinate system, the capsule endoscope has rotated according to the second rotation axis, which is equivalent to the rotation between the first rotation axis and Two motion components are generated on the plane where the third rotation axis is located. After the offset is converted into angle data in the external rotation matrix in the inertial frame, the first direction parameter and the second direction parameter are generated correspondingly. Therefore, by fusing the above two directional parameters, the target yaw data can be calculated and used as yaw offset data to control the viewing angle direction of the capsule endoscope at the yaw level.
对于所述投影的方式,可以对外部旋转矩阵进行逆运算,得到仅包含偏航情况的外部偏航矩阵Rx,在一种实施方式中,外部偏航矩阵Rx至少可以满足:
For the projection method, the external rotation matrix can be inverted to obtain an external yaw matrix R x that only contains yaw conditions. In one implementation, the external yaw matrix R x can at least satisfy:
其中,c2≡cos(θ2),s2≡sin(θ2),θ2为对应于偏航偏移程度的欧拉角(即偏航角ψ)。Among them, c 2 ≡ cos (θ 2 ), s 2 ≡ sin (θ 2 ), θ 2 is the Euler angle corresponding to the degree of yaw offset (ie, the yaw angle ψ).
优选地,所述投影的方式还可以是,根据外部旋转矩阵中不同位置上数据的内涵,直接提取对应位置上的数据,得到所述第一方向参数和所述第二方向参数。例如,在一种实施方式中,定义外部旋转矩阵为R,则其至少可以满足:
Preferably, the projection method may also be to directly extract the data at the corresponding positions according to the connotations of the data at different positions in the external rotation matrix to obtain the first direction parameter and the second direction parameter. For example, in one implementation, if the external rotation matrix is defined as R, then it can at least satisfy:
其中,c0≡cos(θ0),s0≡sin(θ0),θ0为对应于横滚或自旋偏移程度的欧拉角(即横滚角φ),c1≡cos(θ1),s1≡sin(θ1),θ1为对应于俯仰偏移程度的欧拉角(即俯仰角θ)。具体地,所述步骤2231可以具体包括:提取外部旋转矩阵中第一位置的数据和第二位置的数据,对应得到第一方向参数和第二方向参数。其中,所述第一位置的数据,表征所述胶囊内窥镜执行偏航调整时在第一方向上的位置变化情况;所述第二位置的数据,表征所述胶囊内窥镜执行偏航调整时在第二方向上的位置变化情况。结合前文所述,第一方向可以是所述第一旋转轴或第三旋转轴其中之一指向的方向,第二方向可以是所述第一旋转轴或第三旋转轴其中另一指向的方向。Among them, c 0 ≡cos(θ 0 ), s 0 ≡sin(θ 0 ), θ 0 is the Euler angle (that is, the roll angle φ) corresponding to the degree of roll or spin offset, c 1 ≡cos( θ 1 ), s 1 ≡sin(θ 1 ), θ 1 is the Euler angle corresponding to the degree of pitch offset (that is, the pitch angle θ). Specifically, the step 2231 may specifically include: extracting the data of the first position and the data of the second position in the external rotation matrix, and correspondingly obtaining the first direction parameter and the second direction parameter. Wherein, the data at the first position represents the position change in the first direction when the capsule endoscope performs yaw adjustment; the data at the second position represents the position change of the capsule endoscope during yaw adjustment. Position changes in the second direction during adjustment. In conjunction with the foregoing, the first direction may be the direction in which one of the first rotation axis or the third rotation axis points, and the second direction may be the direction in which the other of the first rotation axis or the third rotation axis points. .
优选地,所述第一位置可以是所述外部旋转矩阵R中的R20处,所述第二位置可以是所述外部旋转矩阵R中的R21处。基于此,所述第一方向参数即为(c0s1c2+s0s2),所述第二方向参数即为(s0s1c2-c0s2)。Preferably, the first position may be at R 20 in the outer rotation matrix R, and the second position may be at R 21 in the outer rotation matrix R. Based on this, the first direction parameter is (c 0 s 1 c 2 +s 0 s 2 ), and the second direction parameter is (s 0 s 1 c 2 -c 0 s 2 ).
进一步地,所述反正切变换优选为四象限反正切变换,并具体可以是,以所述第一方向参数和所述第二方向参数作为基本参量形成坐标,并对四象限反正切变换后的数据执行弧度角度转换,最终处理得到所述目标偏航数据。其中,定义所述目标偏航数据为Ah,定义所述偏航偏移数据为rh,则其至少可以满足:
Further, the arctangent transformation is preferably a four-quadrant arctangent transformation, and specifically, the coordinates are formed using the first direction parameter and the second direction parameter as basic parameters, and the four-quadrant arctangent transformation is The data is converted into radians and angles, and finally processed to obtain the target yaw data. Wherein, the target yaw data is defined as A h and the yaw offset data is defined as rh, then it can at least satisfy:
图6和图7除了上文所述的步骤以外,还提供了其他步骤,该其他步骤可以作为所述第一实施例的另一部分而补充于上文的步骤中,也可以作为独立于上述步骤形成的实施例而形成一种新的实施例。对于后者,本发明提供基于上述另一实施方式的一种实施例,具体地,步骤223具体包括步骤2233和步骤2234。该实施例具体包括下述步骤。In addition to the steps described above, Figures 6 and 7 also provide other steps. These other steps can be used as another part of the first embodiment to supplement the above steps, or can be used as an independent step. The formed embodiment forms a new embodiment. For the latter, the present invention provides an embodiment based on another embodiment described above. Specifically, step 223 specifically includes step 2233 and step 2234. This embodiment specifically includes the following steps.
步骤21,获取胶囊内窥镜在第一视角下的视场偏移量。Step 21: Obtain the field of view offset of the capsule endoscope at the first viewing angle.
步骤221,根据视场偏移量,确定惯性系下的外部偏移量。Step 221: Determine the external offset in the inertial frame based on the field of view offset.
步骤222,根据外部偏移量,在惯性系下拟合外部旋转矩阵。Step 222: Fit the external rotation matrix in the inertial frame according to the external offset.
步骤2233,将外部旋转矩阵投影至惯性系下的俯仰调整轴,得到第三方向参数,对第三方向参数执行反余弦变换,得到目标俯仰数据。Step 2233: Project the external rotation matrix to the pitch adjustment axis under the inertial system to obtain the third direction parameter, and perform inverse cosine transformation on the third direction parameter to obtain the target pitch data.
步骤2234,根据目标俯仰数据和当前倾斜数据,计算俯仰校准数据。Step 2234: Calculate pitch calibration data based on the target pitch data and current tilt data.
步骤23,根据姿态校准数据,调整胶囊内窥镜至校准位姿状态。Step 23: Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
其中,所述姿态校准数据包括俯仰校准数据。如此,能够利用惯性系下的三角函数关系,将复合有多重维度外部偏移量且数据内容复杂的外部旋转矩阵,集中于俯仰调整层面上,从而将对胶囊内窥镜的控制至少划分为包括俯仰调整这一分支的分层控制逻辑,能够更为准确快速地调整胶囊内窥镜至少在俯仰调整层面的偏移。Wherein, the attitude calibration data includes pitch calibration data. In this way, the trigonometric function relationship under the inertial system can be used to concentrate the external rotation matrix that contains multi-dimensional external offsets and complex data content on the pitch adjustment level, thereby dividing the control of the capsule endoscope into at least The hierarchical control logic of the pitch adjustment branch can more accurately and quickly adjust the offset of the capsule endoscope at least at the pitch adjustment level.
沿用上文对三种旋转轴的定义,在胶囊内窥镜存在俯仰层面的偏移量时,可以认为是在物体坐标系下,胶囊内窥镜根据所述第三旋转轴发生了旋转,相当于在所述第一旋转轴和所述第二旋转轴所在平面上产生两种运动分量,该两种运动分量可以共同形成所述第三方向参数。对该第三方向参数进行处理,能够计算得到目标俯仰数据以进一步计算俯仰校准数据,完成对胶囊内窥镜在俯仰层面的视角朝向的控制。Following the above definitions of the three rotation axes, when the capsule endoscope has an offset in the pitch plane, it can be considered that the capsule endoscope has rotated according to the third rotation axis in the object coordinate system, which is equivalent to Since two motion components are generated on the plane where the first rotation axis and the second rotation axis are located, the two motion components can jointly form the third direction parameter. By processing the third direction parameter, the target pitch data can be calculated to further calculate the pitch calibration data, thereby completing the control of the viewing angle orientation of the capsule endoscope at the pitch level.
对于所述投影的方式,可以对外部旋转矩阵进行逆运算,得到仅包含俯仰情况的外部俯仰矩阵
Ry,在一种实施方式中,外部俯仰矩阵Ry至少可以满足:
For the projection method, the external rotation matrix can be inverted to obtain an external pitch matrix that only contains pitch conditions. Ry , in one implementation, the external pitch matrix Ry can at least satisfy:
优选地,所述投影的方式还可以是,根据外部旋转矩阵中不同位置上数据的内涵,直接提取对应位置上的数据,得到所述第三方向参数。例如,在一种实施方式中,所述步骤2233可以具体包括:提取外部旋转矩阵中第三位置的数据,对应得到第三方向参数。其中,所述第三位置的数据表征所述胶囊内窥镜执行俯仰调整时的位置变化情况。Preferably, the projection method may also be to directly extract the data at the corresponding positions according to the connotations of the data at different positions in the external rotation matrix to obtain the third direction parameter. For example, in one implementation, the step 2233 may specifically include: extracting the data of the third position in the external rotation matrix, and correspondingly obtaining the third direction parameter. Wherein, the data of the third position represents the position change of the capsule endoscope when it performs pitch adjustment.
优选地,所述第三位置可以是所述外部旋转矩阵R中的R22处。基于此,所述第三方向参数即为(c1c2)。进一步地,在执行反余弦变换后,还可以对得到的数据执行弧度角度转换,最终处理得到所述目标俯仰数据。其中,定义所述目标俯仰数据为Av,定义所述当前倾斜数据为Cv,定义所述俯仰校准数据为rv,则其至少可以满足:
Preferably, the third position may be at R 22 in the external rotation matrix R. Based on this, the third direction parameter is (c 1 c 2 ). Further, after performing inverse cosine transformation, the obtained data can also be converted into radian angle, and finally processed to obtain the target pitch data. Wherein, the target pitch data is defined as Av , the current tilt data is defined as C v , and the pitch calibration data is defined as rv, then it can at least satisfy:
其中,所述当前倾斜数据Cv表征胶囊内窥镜当前姿态在惯性坐标系下相对于重力方向的倾斜角度数。在胶囊内窥镜的所述第一旋转轴或长度延伸方向沿重力方向布置时,所述当前倾斜数据Cv=0。所述当前倾斜数据Cv可以利用与胶囊内窥镜相配合的控制系统,实施一种胶囊内窥镜控制系统位姿标定方法得到。当然,当前倾斜数据Cv可以仅作为胶囊内窥镜位姿状态的一个自由度;所述位姿状态可以共计包括六个自由度,具体可以形成位姿状态数据序列[Cx,Cy,Cz Ch,Cv,Cs]。其中,[Cx,Cy,Cz]表示胶囊内窥镜在惯性系下相对于X方向、Y方向和Z方向的坐标,[Ch,Cv,Cs]表示胶囊内窥镜在俯仰层面、摆动或偏航层面和自旋或横滚层面的姿态调整情况。作为补充地,Ch可以对应被定义为当前方位数据,Cs可以对应被定义为当前旋转数据。优选地,位置状态序列[Cx,Cy,Cz]可以具有5mm的精度,位姿状态[Ch,Cv,Cs]可以具有5°的精度。The current tilt data C v represents the number of tilt angles of the capsule endoscope's current attitude relative to the direction of gravity in the inertial coordinate system. When the first rotation axis or length extension direction of the capsule endoscope is arranged along the direction of gravity, the current tilt data C v =0. The current tilt data C v can be obtained by implementing a capsule endoscope control system pose calibration method using a control system that cooperates with the capsule endoscope. Of course, the current tilt data C v can only be used as one degree of freedom of the capsule endoscope pose state; the pose state can include a total of six degrees of freedom, and specifically can form a pose state data sequence [C x , C y , C z C h , C v , C s ]. Among them, [C x , C y , C z ] represents the coordinates of the capsule endoscope relative to the X direction, Y direction and Z direction in the inertial system, and [C h , C v , C s ] represents the coordinates of the capsule endoscope in the inertial system. Attitude adjustments at the pitch level, swing or yaw level, and spin or roll level. Supplementally, Ch h may be correspondingly defined as the current orientation data, and C s may be correspondingly defined as the current rotation data. Preferably, the position state sequence [C x , C y , C z ] can have an accuracy of 5 mm, and the pose state [C h , C v , C s ] can have an accuracy of 5°.
优选地,定义上述步骤的组合为本发明所述另一实施方式的第一实施例,具体地,步骤223具体包括步骤2231、步骤2232、步骤2233和步骤2234。该第一实施例可以具有如图6和图7所示的下述步骤。Preferably, the combination of the above steps is defined as the first example of another embodiment of the present invention. Specifically, step 223 specifically includes step 2231, step 2232, step 2233 and step 2234. This first embodiment may have the following steps as shown in FIGS. 6 and 7 .
步骤21,获取胶囊内窥镜在第一视角下的视场偏移量。Step 21: Obtain the field of view offset of the capsule endoscope at the first viewing angle.
步骤221,根据视场偏移量,确定惯性系下的外部偏移量。Step 221: Determine the external offset in the inertial frame based on the field of view offset.
步骤222,根据外部偏移量,在惯性系下拟合外部旋转矩阵。Step 222: Fit the external rotation matrix in the inertial frame according to the external offset.
步骤2231,将外部旋转矩阵投影至惯性系下的偏航调整平面,得到第一方向参数和第二方向参数,对第一方向参数和第二方向参数执行反正切变换处理,得到目标偏航数据。Step 2231: Project the external rotation matrix to the yaw adjustment plane under the inertial frame to obtain the first direction parameter and the second direction parameter. Perform arctangent transformation processing on the first direction parameter and the second direction parameter to obtain the target yaw data. .
步骤2232,以目标偏航数据作为偏航偏移数据。Step 2232: Use target yaw data as yaw offset data.
步骤2233,将外部旋转矩阵投影至惯性系下的俯仰调整轴,得到第三方向参数,对第三方向参数执行反余弦变换,得到目标俯仰数据。 Step 2233: Project the external rotation matrix to the pitch adjustment axis under the inertial system to obtain the third direction parameter, and perform inverse cosine transformation on the third direction parameter to obtain the target pitch data.
步骤2234,根据目标俯仰数据和当前倾斜数据,计算俯仰校准数据。Step 2234: Calculate pitch calibration data based on the target pitch data and current tilt data.
步骤23,根据姿态校准数据,调整胶囊内窥镜至校准位姿状态。Step 23: Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
与此相对地,本发明针对所述步骤222提供一种基于所述另一实施方式的第二实施例,具体地,步骤222具体包括步骤2221和步骤2222。该第二实施例可以与上述第一实施例相组合,形成较优的新的实施例,也可以独立地实施。其中,如图6和图8所示,所述第二实施例具体可以包括下述步骤。In contrast, the present invention provides a second embodiment based on the other implementation mode for step 222. Specifically, step 222 specifically includes step 2221 and step 2222. The second embodiment can be combined with the above-mentioned first embodiment to form a better new embodiment, or can be implemented independently. As shown in Figures 6 and 8, the second embodiment may specifically include the following steps.
步骤21,获取胶囊内窥镜在第一视角下的视场偏移量。Step 21: Obtain the field of view offset of the capsule endoscope at the first viewing angle.
步骤221,根据视场偏移量,确定惯性系下的外部偏移量。Step 221: Determine the external offset in the inertial frame based on the field of view offset.
步骤2221,确定与视场偏移量对应的横滚角的数值,以横滚角为基准构建所述惯性系。Step 2221: Determine the value of the roll angle corresponding to the offset of the field of view, and construct the inertial system based on the roll angle.
步骤2222,在惯性系下,根据外部偏移量,拟合外部旋转矩阵。Step 2222: In the inertial frame, fit the external rotation matrix according to the external offset.
步骤223,根据外部旋转矩阵,计算惯性系下的姿态校准数据。Step 223: Calculate attitude calibration data in the inertial system according to the external rotation matrix.
步骤23,根据姿态校准数据,调整胶囊内窥镜至校准位姿状态。Step 23: Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
其中,所述外部旋转矩阵,表征所述胶囊内窥镜以预设的自旋轴次序依次旋转后,所处位置相对于原始位置的旋转变化情况。The external rotation matrix represents the rotational change of the position of the capsule endoscope relative to the original position after the capsule endoscope is rotated in a preset spin axis sequence.
惯性系的建立需要基于胶囊内窥镜的某个参数为基准进行构建,优选地,所述某个参数可以选取难以通过控制系统调整的参数,从而弥补该参数控制上的缺陷。举例而言,所述控制系统或具体是其中的定量控制装置中,可以设置有外部控制磁体,用于实现对应于胶囊内窥镜的[Cx,Cy,Cz]三个自由度的位置控制;相应地,所述位置控制可以是依据位置控制序列[Mx,My,Mz]进行。所述外部控制磁体还用于实现对应于当前方位数据Ch和当前倾斜数据Cv的姿态控制;相应地,所述姿态控制可以是依据姿态控制序列[Mh,Mv]进行。The establishment of the inertial system needs to be based on a certain parameter of the capsule endoscope. Preferably, the certain parameter can be selected as a parameter that is difficult to adjust through the control system, thereby making up for the defects in the control of this parameter. For example, the control system or specifically the quantitative control device therein may be provided with an external control magnet to achieve three degrees of freedom corresponding to [C x , Cy , C z ] of the capsule endoscope. Position control; accordingly, the position control may be performed based on the position control sequence [M x , My , M z ]. The external control magnet is also used to implement attitude control corresponding to the current orientation data Ch and the current tilt data C v ; accordingly, the attitude control may be performed according to the attitude control sequence [M h , M v ].
基于此,外部控制磁体可以基于一种位姿控制数据序列[Mx,My,Mz Mh,Mv]实现对胶囊内窥镜位姿的调整和控制。优选地,所述外部控制磁体具有1mm的位置控制精度和1°的姿态控制精度。所述调整和控制的方式,可以是执行一种诸如控制胶囊内窥镜在人体消化道运动的装置及方法和/或一种诸如控制磁控胶囊内窥镜系统的位姿标定表示方法。Based on this, the external control magnet can adjust and control the posture of the capsule endoscope based on a posture control data sequence [M x , My y , M z M h , M v ]. Preferably, the external control magnet has a position control accuracy of 1 mm and an attitude control accuracy of 1°. The adjustment and control method may be to implement a device and method such as controlling the movement of a capsule endoscope in the human digestive tract and/or a method of position and orientation calibration such as controlling a magnetically controlled capsule endoscope system.
继续地,前文定义θ0为对应于横滚或自旋偏移程度的欧拉角,也即可以通过设定横滚角(或称,横滚欧拉角)θ0为定值,并以该横滚角θ0为基准构建惯性系,从而简化运算并达到相同的技术效果。优选地,定义横滚角则上述定义所述偏航偏移数据rh和所述俯仰校准数据rv可以被简化为,至少满足:
Continuing, the previous definition θ 0 is the Euler angle corresponding to the degree of roll or spin offset, that is, the roll angle (or roll Euler angle) θ 0 can be set as a constant value, and The roll angle θ 0 is used as a reference to construct an inertial system, thereby simplifying the calculation and achieving the same technical effect. Preferably, define the roll angle Then the above definition of the yaw offset data rh and the pitch calibration data rv can be simplified to, at least satisfy:
对于所述外部旋转矩阵的拟合过程,具体地,本发明提供一种基于上述第二实施例的具体示例,其中,步骤2222具体包括步骤22221和步骤22222。该具体示例包括下述步骤。Regarding the fitting process of the external rotation matrix, specifically, the present invention provides a specific example based on the above-mentioned second embodiment, in which step 2222 specifically includes step 22221 and step 22222. This specific example includes the following steps.
步骤21,获取胶囊内窥镜在第一视角下的视场偏移量。Step 21: Obtain the field of view offset of the capsule endoscope at the first viewing angle.
步骤221,根据视场偏移量,确定惯性系下的外部偏移量。Step 221: Determine the external offset in the inertial frame based on the field of view offset.
步骤2221,确定与视场偏移量对应的横滚角的数值,以横滚角为基准构建所述惯性系。 Step 2221: Determine the value of the roll angle corresponding to the offset of the field of view, and construct the inertial system based on the roll angle.
步骤22221,计算外部偏移量对应的偏航欧拉角和俯仰欧拉角。Step 22221: Calculate the yaw Euler angle and pitch Euler angle corresponding to the external offset.
步骤22222,根据横滚角、偏航欧拉角和俯仰欧拉角的三角函数值,拟合外部旋转矩阵。Step 22222: Fit the external rotation matrix according to the trigonometric function values of the roll angle, yaw Euler angle and pitch Euler angle.
步骤223,根据外部旋转矩阵,计算惯性系下的姿态校准数据。Step 223: Calculate attitude calibration data in the inertial system according to the external rotation matrix.
步骤23,根据姿态校准数据,调整胶囊内窥镜至校准位姿状态。Step 23: Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
如此,能够从偏航欧拉角、俯仰欧拉角和横滚角三个层面综合生成外部旋转矩阵,以便后续执行步骤223及其衍生步骤时,能够通过提取对应位置的数据或执行逆运算实现对应技术效果。In this way, the external rotation matrix can be comprehensively generated from the three levels of yaw Euler angle, pitch Euler angle and roll angle, so that when step 223 and its derivative steps are subsequently performed, it can be achieved by extracting the data of the corresponding position or performing an inverse operation. Corresponding technical effects.
具体地,外部旋转矩阵R可以是在预设模型的基础上,填入上述三角函数值生成的,也可以是分别生成对应于偏航欧拉角、俯仰欧拉角和横滚角的矩阵后,根据外部旋转矩阵自身的定义运算得到的。其中,对应于偏航欧拉角的矩阵可以是前文定义的外部偏航矩阵Rx,对应于俯仰欧拉角的矩阵可以是前文定义的外部俯仰矩阵Ry,而对应于横滚角或横滚欧拉角的矩阵可以是一种外部横滚矩阵Rz,其可以至少满足:
Specifically, the external rotation matrix R can be generated by filling in the above trigonometric function values based on the preset model, or it can be generated by respectively generating matrices corresponding to the yaw Euler angle, pitch Euler angle and roll angle. , obtained by operating according to the definition of the external rotation matrix itself. Among them, the matrix corresponding to the yaw Euler angle can be the external yaw matrix R x defined previously, the matrix corresponding to the pitch Euler angle can be the external pitch matrix R y defined previously, and the matrix corresponding to the roll angle or lateral angle The matrix of rolling Euler angles can be an external rolling matrix R z , which can at least satisfy:
基于此,步骤22222可以被细化为包括步骤:分别根据所述横滚角、所述偏航欧拉角和所述俯仰欧拉角的三角函数值,对应计算得到横滚旋转矩阵、偏航旋转矩阵和俯仰旋转矩阵;对所述偏航旋转矩阵、所述俯仰旋转矩阵和所述横滚旋转矩阵依次点乘,计算得到所述外部旋转矩阵。Based on this, step 22222 can be refined to include the steps of: calculating the roll rotation matrix, yaw, and yaw according to the trigonometric function values of the roll angle, the yaw Euler angle, and the pitch Euler angle respectively. Rotation matrix and pitch rotation matrix; dot multiply the yaw rotation matrix, the pitch rotation matrix and the roll rotation matrix in sequence to calculate the external rotation matrix.
从而,在横滚角时,所述外部旋转矩阵R的拟合和化简过程可以具体为:
Therefore, at the roll angle When , the fitting and simplification process of the external rotation matrix R can be specifically as follows:
对于偏航欧拉角θ2和俯仰欧拉角θ1的计算,可以是根据所述视场偏移量,或具体地,根据所述外部偏移量计算得到的。在一种优选的实施方式中,所述视场偏移量包括偏航角偏移量dh和俯仰角偏移量dv,所述外部偏移量包括对应于所述偏航角偏移量dh的偏航偏移量dh1,以及对应于所述俯仰角偏移量dv的俯仰偏移量dv1。则,所述步骤22221还可以进一步包括下述步骤:根据所述偏航偏移量和当前倾斜数据Cv,计算所述偏航欧拉角;根据所述俯仰偏移量,计算所述俯仰欧拉角。结合前文所述对横滚角θ0的限定,上述三种欧拉角至少可以满足:
The calculation of the yaw Euler angle θ 2 and the pitch Euler angle θ 1 may be calculated based on the field of view offset, or specifically, based on the external offset. In a preferred embodiment, the field of view offset includes a yaw angle offset dh and a pitch angle offset dv, and the external offset includes an offset corresponding to the yaw angle offset dh yaw offset dh 1 , and pitch offset dv 1 corresponding to the pitch angle offset dv. Then, the step 22221 may further include the following steps: calculating the yaw Euler angle according to the yaw offset and the current tilt data C v ; calculating the pitch according to the pitch offset. Euler angles. Combined with the limitations on roll angle θ 0 mentioned above, the above three Euler angles can at least satisfy:
如此,能够将外部旋转矩阵与外部偏移量,特别是视场偏移量相结合,便于后续针对性的进行 视角的调整和控制。In this way, the external rotation matrix can be combined with the external offset, especially the field of view offset, to facilitate subsequent targeted operations. Viewing angle adjustment and control.
而对于视场偏移量和外部偏移量之间的转换关系,则可以通过预设的偏离相位角建立和实现,也即所述步骤221还可以具体包括下述步骤。The conversion relationship between the field of view offset and the external offset can be established and implemented through a preset deviation phase angle, that is, step 221 may also specifically include the following steps.
步骤2211,根据预设的偏离相位角,构建坐标转换矩阵。Step 2211: Construct a coordinate transformation matrix based on the preset deviation phase angle.
步骤2212,根据坐标转换矩阵和视场偏移量,确定惯性系下的外部偏移量。Step 2212: Determine the external offset in the inertial system based on the coordinate transformation matrix and the field of view offset.
具体地,定义所述偏离相位角为所述视场偏移量为[dh,dv],所述外部偏移量为[dh1,dv1],则三者之间至少满足:
Specifically, the deviation phase angle is defined as The field of view offset is [dh, dv], and the external offset is [dh 1 , dv 1 ], then at least the three conditions must be met:
当然,由于在其他实施方式中,所述视场偏移量并不仅包含偏航角偏移量和俯仰角偏移量,因此所述视场偏移量、所述外部偏移量中的元素并不必然是2个,所述坐标转换矩阵的阶数并不必然是2*2阶,实际的元素个数和矩阵阶数跟随视场偏移量中具体偏移量的数量情况自适应地产生。但可以明确地,所述坐标转换矩阵是根据所述偏离相位角的三角函数值构成的。Of course, since in other implementations, the field of view offset does not only include the yaw angle offset and the pitch angle offset, the elements in the field of view offset and the external offset It is not necessarily 2. The order of the coordinate transformation matrix is not necessarily 2*2. The actual number of elements and matrix order are adaptively adapted according to the number of specific offsets in the field of view offset. produce. However, it is clear that the coordinate transformation matrix is formed according to the trigonometric function value of the deviation phase angle.
上文提供的技术方案是建立在外部控制磁体和胶囊内窥镜的自由度无法匹配,放弃对胶囊内窥镜在自旋角或横滚角层面的校正,将其赋值为预设数值的前提下的,如此实现良好的控制效率。而如图9所示,位于位置C的胶囊内窥镜在并未进行横滚角φ层面的校正时,会相对于坐标系产生一定偏移,医疗工作者在进行C位置偏航角方向hc层面的调整,或在进行C位置俯仰角方向vc层面的位置调整时,则会与自身第一视角的控制逻辑产生区别,造成阅片困难,并且难以向系统输入准确的指令。The technical solution provided above is based on the premise that the degrees of freedom of the external control magnet and the capsule endoscope cannot match. The correction of the capsule endoscope at the level of spin angle or roll angle is abandoned and assigned to a preset value. down, thus achieving good control efficiency. As shown in Figure 9, when the capsule endoscope at position C is not corrected at the roll angle φ level, there will be a certain offset relative to the coordinate system. When the medical worker performs the yaw angle direction hc at position C The adjustment of the plane, or the position adjustment of the C position, pitch angle direction, vc plane, will be different from the control logic of the own first perspective, making it difficult to read the film, and it is difficult to input accurate instructions to the system.
基于此,为了适应对自旋角或横滚角层面视角控制的缺失,还可以在步骤21之前设置一种前置步骤,通过图像处理层面的校正,对胶囊内窥镜输出的检测图像的显示状态进行调整。如此,不仅能够适应前文提供的步骤,还能够保持检测图像输出时的显示方向(或称,观察视角方向)的统一,防止医疗工作者阅片时出现眩晕的情况,辅助医疗工作者输出准确的控制指令。Based on this, in order to adapt to the lack of perspective control at the spin angle or roll angle level, a pre-step can also be set before step 21 to display the detection image output by the capsule endoscope through correction at the image processing level. Status is adjusted. In this way, it can not only adapt to the steps provided above, but also maintain the unity of the display direction (or viewing angle direction) when detecting image output, prevent medical workers from dizziness when reading pictures, and assist medical workers in outputting accurate images. Control instruction.
基于此,本发明提供的再一实施方式具体包括如图10所示的下述步骤。Based on this, another embodiment provided by the present invention specifically includes the following steps as shown in FIG. 10 .
步骤201,在惯性系下融合标定相互配合的控制设备和胶囊内窥镜的位姿数据,移动所述控制设备至与所述胶囊内窥镜对应的初始化位置。Step 201: fuse and calibrate the pose data of the cooperating control device and the capsule endoscope in an inertial system, and move the control device to an initialization position corresponding to the capsule endoscope.
步骤202,接收并根据胶囊内窥镜的初始姿态数据,旋转并修正胶囊内窥镜输出检测图像的显示状态。Step 202: Receive and based on the initial attitude data of the capsule endoscope, rotate and correct the display state of the output detection image of the capsule endoscope.
步骤21,获取胶囊内窥镜在第一视角下的视场偏移量。Step 21: Obtain the field of view offset of the capsule endoscope at the first viewing angle.
步骤22,根据视场偏移量,计算惯性系下的姿态校准数据。Step 22: Calculate attitude calibration data in the inertial system based on the field of view offset.
步骤23,根据姿态校准数据,调整胶囊内窥镜至校准位姿状态。Step 23: Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
如此,如图9和图11所示,可以补偿上述因横滚角φ而形成的方位差,从图像处理层面弥补对横滚角φ的控制不足,形成一种更为高效的技术方案,使得图11中纵向的正相V+能够与惯性系下的俯仰角方向的正相Vw相对应,并使横向的正相H+能够与惯性系下的偏航角方向的正相Hw相对应。进而,调整并反映为:与图9中位置A处的位置A俯仰角方向va与惯性系球壳俯仰角方向对齐,且位置A偏航角方向ha与惯性系球壳偏航角方向对齐相类似的状态;也反映为:与图9中位置B处的位置B俯仰角方向vb与惯性系球壳俯仰角方向对齐,且位置B偏航方向hb与惯性系球壳偏航角方向对齐相类似的状态。In this way, as shown in Figures 9 and 11, the above-mentioned azimuth difference caused by the roll angle φ can be compensated, and the lack of control of the roll angle φ can be compensated from the image processing level, forming a more efficient technical solution, so that The longitudinal positive phase V+ in Figure 11 can correspond to the positive phase Vw in the pitch angle direction in the inertial frame, and the lateral positive phase H+ can correspond to the positive phase Hw in the yaw angle direction in the inertial frame. Furthermore, it is adjusted and reflected as follows: the pitch angle direction va of position A at position A in Figure 9 is aligned with the pitch angle direction of the inertial system spherical shell, and the yaw angle direction ha of position A is aligned with the yaw angle direction of the inertial system spherical shell. A similar state; it is also reflected as: the pitch angle direction vb of position B at position B in Figure 9 is aligned with the pitch angle direction of the inertial system spherical shell, and the yaw direction hb of position B is aligned with the yaw angle direction of the inertial system spherical shell. Similar status.
当然,在其他实施方式中,也可以如图9所示,设计控制诸如位置A离心方向ra、位置B离心方向rb或位置C离心方向rc的技术方案,从而为胶囊内窥镜的位姿调整增加一个新的自由度。所述“离心方向”指代远离或靠近所述惯性系球壳的球心O的方向。Of course, in other embodiments, as shown in FIG. 9 , a technical solution may be designed to control the centrifugal direction ra at position A, the centrifugal direction rb at position B, or the centrifugal direction rc at position C, so as to adjust the posture of the capsule endoscope. Add a new degree of freedom. The "centrifugal direction" refers to the direction away from or close to the spherical center O of the spherical shell of the inertial system.
其中,对于步骤201,所述控制设备可以是所述外部控制磁体。步骤201中“融合标定”部分还可以进一步执行一种磁控胶囊内窥镜系统的位姿标定表示方法,并执行下述步骤:获取外部控制磁体在第一物体坐标系中的第一坐标信息;获取胶囊内窥镜在第二物体坐标系中的第二坐标信息;建立惯性系;将所述第一坐标信息修正为所述惯性系中的外部控制磁体的位置信息和/或姿态信息,并 且将五自由度(5-DOF)状态信息明确表示为位姿控制数据序列[Mx,My,Mz Mh,Mv];将所述第二坐标信息修正为所述惯性系中的胶囊内窥镜的位置信息和/或姿态信息,并且将六自由度(6-DOF)状态信息明确表示为位姿状态数据序列[Cx,Cy,Cz Ch,Cv,Cs]。Wherein, for step 201, the control device may be the external control magnet. The "fusion calibration" part in step 201 can further perform a posture calibration representation method of the magnetically controlled capsule endoscope system, and perform the following steps: obtain the first coordinate information of the external control magnet in the first object coordinate system ; Acquire the second coordinate information of the capsule endoscope in the second object coordinate system; establish an inertial system; correct the first coordinate information to the position information and/or attitude information of the external control magnet in the inertial system, and And the five degrees of freedom (5-DOF) state information is clearly expressed as the pose control data sequence [M x , My y , M z M h , M v ]; the second coordinate information is corrected into the inertial system The position information and/or attitude information of the capsule endoscope, and the six degrees of freedom (6-DOF) state information is clearly expressed as the pose state data sequence [C x ,C y ,C z Ch ,C v ,C s ].
步骤201中“移动控制设备至……初始化位置”部分,可以具体是:控制外部控制磁体移动,直至位姿控制数据序列[Mx,My,Mz Mh,Mv]中平面位置控制数据[Mx,My],与位姿状态数据序列[Cx,Cy,Cz Ch,Cv,Cs]中平面位置状态数据[Cx,Cy]相等;控制外部控制磁体移动,直至位姿控制数据序列[Mx,My,Mz Mh,Mv]中竖直位置控制数据Mz,与位姿状态数据序列[Cx,Cy,Cz Ch,Cv,Cs]中竖直位置状态数据Cz之差dz,满足预设的高度差数值。The "move the control device to the initial position" part in step 201 can be specifically: controlling the movement of the external control magnet until the plane position is controlled in the pose control data sequence [M x , My y , M z M h , M v ] The data [M x , M y ] is equal to the plane position state data [C x , C y ] in the pose state data sequence [C x , C y , C z C h , C v , C s ]; control external control The magnet moves until the vertical position control data M z in the pose control data sequence [M x , My y , M z M h , M v ] is consistent with the pose state data sequence [C x , C y , C z C h , C v , C s ], the difference dz between the vertical position status data C z satisfies the preset height difference value.
其中,对于步骤202,还可以进一步执行一种胶囊内窥镜图像校正方法来完成对检测图像的校正。例如,可以具体包括步骤:获取当前检测图像以及与所述当前检测图像对应的加速度信息序列;根据所述加速度信息序列,计算对应所述当前检测图像的图像校正因子,得到当前校正因子,并判断所述胶囊内窥镜的当前姿态信息是否包含于加速度检测死区范围内;若否,则根据所述当前校正因子,校正所述当前检测图像;若是,则根据对应所述胶囊内窥镜当前姿态的前向姿态的先校正因子,校正所述当前检测图像。从而,仅利用简单的加速度信息序列,即可完成对检测图像观察视角方向的校正,使得检测图像始终按照同一个合适的观察方向输出。此时,相当于设定所述横滚角为定值,也即设定横滚角 Among them, for step 202, a capsule endoscope image correction method may be further executed to complete the correction of the detection image. For example, it may specifically include the steps of: obtaining the current detection image and the acceleration information sequence corresponding to the current detection image; calculating the image correction factor corresponding to the current detection image according to the acceleration information sequence, obtaining the current correction factor, and determining Whether the current posture information of the capsule endoscope is included in the acceleration detection dead zone range; if not, correct the current detection image according to the current correction factor; if yes, correct the current detection image according to the current correction factor of the capsule endoscope. The first correction factor of the forward posture of the posture corrects the current detection image. Therefore, by using only a simple acceleration information sequence, the viewing angle direction of the detection image can be corrected, so that the detection image is always output in the same appropriate observation direction. At this time, it is equivalent to setting the roll angle to a constant value, that is, setting the roll angle
上文提供了在偏航角、俯仰角和横滚角等层面对胶囊内窥镜的位姿控制,而在本发明提供的又一实施方式中,提供了一种添附有新的步骤24的胶囊内窥镜第一视角定量控制方法,从而能够使得胶囊内窥镜能够沿某一方向,调整其与对应检测图像所表征实际位置之间的距离,实现更多自由度上的位置调整。如图12所示,该又一实施方式可以包括下述步骤。The above provides the posture control of the capsule endoscope at the yaw angle, pitch angle, roll angle, etc., and in another embodiment provided by the present invention, a new step 24 is provided. The quantitative control method of the first viewing angle of the capsule endoscope enables the capsule endoscope to adjust the distance between it and the actual position represented by the corresponding detection image in a certain direction, achieving position adjustment with more degrees of freedom. As shown in Figure 12, this further embodiment may include the following steps.
步骤21,获取胶囊内窥镜在第一视角下的视场偏移量。Step 21: Obtain the field of view offset of the capsule endoscope at the first viewing angle.
步骤22,根据视场偏移量,计算惯性系下的姿态校准数据。Step 22: Calculate attitude calibration data in the inertial system based on the field of view offset.
步骤23,根据姿态校准数据,调整胶囊内窥镜至校准位姿状态。Step 23: Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
步骤24,根据校准位姿状态,调整胶囊内窥镜与待检测部位之间的距离。Step 24: Adjust the distance between the capsule endoscope and the part to be detected according to the calibration posture state.
所述距离的调整,可以通过调整所述平面位置控制数据[Mx,My],来影响所述平面位置状态数据[Cx,Cy]来实现。在一种实施方式中,所述距离调整的方向,可以是根据前文所述偏航偏移数据所确定的方向进行,从而符合第一视角的控制逻辑,直观地以检测图像为依据,选择性控制胶囊内窥镜靠近或远离所述待检测部位,调整胶囊内窥镜与待检测部位之间的位置距离远近。The adjustment of the distance can be achieved by adjusting the plane position control data [M x , My ] to affect the plane position status data [C x , Cy ]. In one embodiment, the direction of the distance adjustment can be based on the direction determined by the yaw offset data mentioned above, so as to comply with the control logic of the first perspective, intuitively based on the detection image, and selectively Control the capsule endoscope to approach or move away from the site to be detected, and adjust the distance between the capsule endoscope and the site to be detected.
在另一种实施方式中,所述距离调整过程的“跳出循环”条件,可以是待测对象在检测图像中的画面占比已经符合预设的要求。例如,待测对象的面积占检测图像面积的50%。如此,可以平衡畸变影响,并且得到更好的视觉观察效果。基于此,所述步骤24还可以具体包括:固定并根据所述姿态校准数据中的偏航偏移数据计算当前方位数据(也即上述Ch),并根据所述当前方位数据确定距离调整方向,持续输出距离调整信号直至待测对象在检测图像中的占比符合预设要求。In another embodiment, the "leaving out of loop" condition of the distance adjustment process may be that the screen ratio of the object to be measured in the detection image has met the preset requirements. For example, the area of the object to be measured accounts for 50% of the area of the detection image. In this way, the effects of distortion can be balanced and better visual observation results can be obtained. Based on this, the step 24 may also specifically include: fixing and calculating the current orientation data (that is, the above-mentioned Ch ) based on the yaw offset data in the attitude calibration data, and determining the distance adjustment direction based on the current orientation data. , continue to output the distance adjustment signal until the proportion of the object to be measured in the detection image meets the preset requirements.
具体地,距离调整的技术方案,在该又一实施方式的一个具体实例中,可以包括如图12和图13所示的下述步骤。Specifically, the technical solution for distance adjustment, in a specific example of this further embodiment, may include the following steps as shown in FIGS. 12 and 13 .
步骤21,获取胶囊内窥镜在第一视角下的视场偏移量。 Step 21: Obtain the field of view offset of the capsule endoscope at the first viewing angle.
步骤22,根据视场偏移量,计算惯性系下的姿态校准数据。Step 22: Calculate attitude calibration data in the inertial system based on the field of view offset.
步骤23,根据姿态校准数据,调整胶囊内窥镜至校准位姿状态。Step 23: Adjust the capsule endoscope to the calibration posture state according to the posture calibration data.
步骤24,根据校准位姿状态,调整胶囊内窥镜与待检测部位之间的距离。步骤24可以进一步包括:Step 24: Adjust the distance between the capsule endoscope and the part to be detected according to the calibration posture state. Step 24 may further include:
步骤241,获取胶囊内窥镜的实时位姿信息和目标位姿信息;Step 241, obtain the real-time pose information and target pose information of the capsule endoscope;
步骤242,根据所述姿态校准数据中的偏航偏移数据计算当前方位数据,并根据实时位姿信息、目标位姿信息和当前方位数据,计算目标位姿范围和当前运动轨迹;Step 242: Calculate current orientation data based on the yaw offset data in the attitude calibration data, and calculate the target pose range and current motion trajectory based on the real-time pose information, target pose information, and current orientation data;
步骤243,控制胶囊内窥镜跟随当前运动轨迹运动。Step 243: Control the capsule endoscope to follow the current movement trajectory.
所述实时位姿信息,表征胶囊内窥镜在经过步骤21至步骤23的位姿校准后,跟随诸如定量控制装置、外部控制磁体或其他外部设备的控制继续进行运动的过程中,所形成的不同位姿所对应的位姿信息。所述实时位姿信息,可以包括对应于所述校准位姿状态的校准位姿信息。所述当前方位数据与上述Ch可以做等同解释。The real-time pose information represents the process of the capsule endoscope continuing to move under the control of a quantitative control device, an external control magnet or other external equipment after undergoing the pose calibration in steps 21 to 23. The pose information corresponding to different poses. The real-time pose information may include calibration pose information corresponding to the calibration pose state. The current orientation data and the above Ch can be interpreted equivalently.
如此,能够按照偏航偏移数据和设定的目标位姿信息,自动地规划运动控制路线,控制完成第一视角校正后的胶囊内窥镜运动直至其处于目标位姿信息所指向的位姿状态。有效地复合了至少两个自由度(例如,俯仰角和偏航角,优选还可以包括横滚角)下的姿态控制,以及至少两个自由度(例如,平面位置控制数据[Mx,My],优选还可以包括竖直位置控制数据Mz)下的位置控制,方便医疗工作者轻松高效地对胶囊内窥镜进行控制。In this way, the motion control route can be automatically planned according to the yaw offset data and the set target pose information, and the movement of the capsule endoscope after the first perspective correction is controlled until it is in the pose pointed by the target pose information. state. Effectively combines attitude control under at least two degrees of freedom (for example, pitch angle and yaw angle, preferably also including roll angle), and at least two degrees of freedom (for example, plane position control data [M x , M y ], preferably also includes position control under the vertical position control data M z ), to facilitate medical workers to control the capsule endoscope easily and efficiently.
当然,所述控制设备及其外部控制磁体对胶囊内窥镜形成的上述控制方案,并不局限于上述内容,还可以根据不同的场景需求,产生更多基于上文方案的细化实施方式,或沿用上文方案构思后形成的其他实施方式。举例而言,所述控制设备控制胶囊内窥镜移动的方式,可以是拖拽、翻滚、跳跃。其中,拖拽平移应用于消化道较平坦的底部或顶部区域;翻滚移动应用于较小褶皱、缓坡区域;跳跃移动则应用于较大障碍、较陡坡度区域以及谷底区域(例如胃底、胃窦)的跨越。在三种不同的控制方式下,可以通过调整所述差值dz,使胶囊内窥镜处于合适的高度,来增强控制的稳定性和效率。Of course, the above-mentioned control scheme formed by the control device and its external control magnet on the capsule endoscope is not limited to the above content. More detailed implementations based on the above scheme can also be produced according to different scene requirements. Or other implementations formed after following the above scheme concept. For example, the control device may control the movement of the capsule endoscope by dragging, rolling, or jumping. Among them, drag translation is applied to the flatter bottom or top area of the digestive tract; tumbling movement is applied to smaller folds and gentle slope areas; jumping movement is applied to larger obstacles, steeper slope areas, and valley bottom areas (such as the fundus of the stomach, stomach sinus) crossing. Under three different control modes, the difference dz can be adjusted to keep the capsule endoscope at a suitable height, thereby enhancing the stability and efficiency of the control.
其中,对于拖拽方案而言,胶囊内窥镜平移距离dLT(dLT>0前进,dLT<0后退)一般设定为固定典型值(例如30mm),或者为能够体现输入力度反馈的可变值。完成拖拽平移动作后,胶囊内窥镜的视场近似保持不变,胶囊内窥镜与待测对象的距离发生dLT大小的改变。此时,所述实时位姿信息对应包括实时位置信息,所述目标位姿信息对应包括目标位置信息,所述当前运动轨迹对应包括当前移动轨迹。Among them, for the drag scheme, the translation distance dL T of the capsule endoscope (dL T >0 forward, dL T <0 backward) is generally set to a fixed typical value (such as 30mm), or to a value that can reflect the input force feedback. Variable value. After completing the dragging and translation action, the field of view of the capsule endoscope remains approximately unchanged, and the distance between the capsule endoscope and the object to be measured changes by dL T. At this time, the real-time pose information corresponds to real-time position information, the target pose information corresponds to target position information, and the current movement trajectory corresponds to the current movement trajectory.
在执行所述拖拽之前,可以将胶囊内窥镜调整至相对于惯性系竖直的状态,例如,在胶囊内窥镜处于沉底状态下,调节姿态控制序列[Mh,Mv]中的Mv=0,而在胶囊内窥镜处于吸顶状态下,则调节姿态控制序列[Mh,Mv]中的Mv=180。进一步地,所述拖拽过程可以是具体执行一种磁控胶囊内窥镜系统的定量闭环控制方法实现,可以包括步骤:持续获取胶囊内窥镜的实时位置信息;获取所述胶囊内窥镜的目标位置信息;根据所述目标位置信息,确定目标位置范围;根据所述实时位置信息和所述目标位置信息,计算外部控制磁体的当前移动轨迹;控制所述外部控制磁体沿所述当前移动轨迹运动;若直至所述控制磁体停止运动,所述实时位置信息在所述目标位置范围外,则重复步骤“根据所述实时位置信息和所述目标位置信息,计算外部控制磁体的当前移动轨迹;控制所述外部控制磁体沿所述当前移动轨迹运动”,直至所述实时位置信息在所述目标位置范围内。Before performing the dragging, the capsule endoscope can be adjusted to a vertical state relative to the inertial system. For example, when the capsule endoscope is in a bottomed state, adjust the attitude control sequence [M h , M v ] M v =0, and when the capsule endoscope is in the ceiling-ceiling state, adjust M v =180 in the attitude control sequence [M h , M v ]. Further, the dragging process may be implemented by specifically executing a quantitative closed-loop control method of the magnetically controlled capsule endoscope system, which may include the steps of: continuously obtaining real-time position information of the capsule endoscope; obtaining the capsule endoscope target position information; determine the target position range according to the target position information; calculate the current movement trajectory of the external control magnet according to the real-time position information and the target position information; control the external control magnet to move along the current Trajectory movement; if the real-time position information is outside the target position range until the control magnet stops moving, repeat the step "calculate the current movement trajectory of the external control magnet based on the real-time position information and the target position information.";Control the external control magnet to move along the current movement trajectory" until the real-time position information is within the target position range.
具体地,所述当前移动轨迹的生成过程,还可以被细化为:根据所述实时位置信息、所述目标位置信息和所述偏航偏移数据,计算目标位姿范围和胶囊内窥镜移动轨迹;根据所述胶囊内窥镜移动轨迹,计算所述当前移动轨迹。从而,完成由胶囊内窥镜一侧到控制设备一侧控制方案的转换。 Specifically, the generation process of the current movement trajectory can also be refined into: calculating the target pose range and capsule endoscope according to the real-time position information, the target position information and the yaw offset data. Movement trajectory; calculate the current movement trajectory according to the movement trajectory of the capsule endoscope. Thus, the conversion of the control scheme from the capsule endoscope side to the control device side is completed.
在一种优选的实施方式中,上述计算过程还可以被细化为包括下述步骤。In a preferred implementation, the above calculation process can also be refined to include the following steps.
步骤2421,根据所述偏航偏移数据重新确定所述胶囊内窥镜的当前方位数据,并以所述当前方位数据确定所述胶囊内窥镜的前进、后退距离调整方向;Step 2421, re-determine the current orientation data of the capsule endoscope based on the yaw offset data, and use the current orientation data to determine the forward and backward distance adjustment directions of the capsule endoscope;
步骤2422,根据预设的距离步长和所述当前方位数据,确定所述胶囊内窥镜的前进、后退距离调整变量,并根据所述距离调整变量、所述实时位姿信息和所述目标位姿信息,计算所述目标位姿范围和所述当前运动轨迹。Step 2422: Determine the forward and backward distance adjustment variables of the capsule endoscope based on the preset distance step and the current orientation data, and use the distance adjustment variables, the real-time pose information and the target pose information, calculate the target pose range and the current motion trajectory.
在拖拽方案中,所述距离步长可以被具体定义为上述平移距离dLT,所述当前运动轨迹对应可以包括当前移动轨迹。基于此,可以将胶囊内窥镜拖拽至目标位置[Cx1,Cy1]处。其中,所述目标位置[Cx1,Cy1]至少可以满足:
In the drag scheme, the distance step size may be specifically defined as the above-mentioned translation distance dL T , and the current movement trajectory may include the current movement trajectory. Based on this, the capsule endoscope can be dragged to the target position [C x1 , C y1 ]. Among them, the target position [C x1 , C y1 ] can at least satisfy:
其中,Ch表征根据偏航偏移数据rh重新确定的当前方位数据,平移距离dLT与当前方位数据Ch的三角函数值的乘积共同形成所述距离调整变量和从而据此计算规划形成所述当前运动轨迹(也即,所述当前移动轨迹)。Among them, Ch represents the current orientation data redetermined based on the yaw offset data rh, and the product of the translation distance dL T and the trigonometric function value of the current orientation data Ch together forms the distance adjustment variable. and Therefore, the current movement trajectory (that is, the current movement trajectory) is calculated and planned based on this.
对于翻滚方案而言,所述距离步长可以被具体定义为翻滚距离dLR,其一般可以限定为胶囊内窥镜的长轴周长,例如在一种实施方式中dLR=±67mm。对应地,所述实时位姿信息对应包括实时姿态信息,所述目标位姿信息则对应包括目标姿态信息,所述当前运动轨迹对应可以包括当前转动轨迹。For the tumbling scheme, the distance step can be specifically defined as the tumbling distance dL R , which can generally be defined as the long axis circumference of the capsule endoscope, for example, in one embodiment dL R =±67 mm. Correspondingly, the real-time posture information corresponds to real-time posture information, the target posture information corresponds to target posture information, and the current motion trajectory corresponds to the current rotation trajectory.
进一步地,所述翻滚过程可以是具体执行一种磁控胶囊内窥镜系统的定量闭环控制方法实现,可以包括步骤:持续获取胶囊内窥镜的实时姿态信息;获取胶囊内窥镜的目标姿态信息;根据所述目标姿态信息,计算目标姿态范围和外部控制磁体的当前转动轨迹;控制所述外部控制磁体沿所述当前转动轨迹运动;若直至所述外部控制磁体停止运动,所述实时姿态信息在所述目标姿态范围外,则重复步骤“根据所述目标姿态信息,计算目标姿态范围和外部控制磁体的当前转动轨迹;控制所述外部控制磁体沿所述当前转动轨迹运动”,直至所述实时姿态信息在所述目标姿态范围内。此外,由于翻滚之后会影响胶囊内窥镜的姿态信息,因此在胶囊内窥镜移动至目标位置后,还可以将胶囊内窥镜进一步恢复为初始的姿态信息(也即,至少恢复所述位姿状态数据序列[Cx,Cy,Cz Ch,Cv,Cs]中的[Ch,Cv]部分)。Further, the tumbling process may be implemented by specifically executing a quantitative closed-loop control method of the magnetically controlled capsule endoscope system, which may include the steps of: continuously acquiring real-time attitude information of the capsule endoscope; acquiring the target attitude of the capsule endoscope. information; according to the target attitude information, calculate the target attitude range and the current rotation trajectory of the external control magnet; control the external control magnet to move along the current rotation trajectory; until the external control magnet stops moving, the real-time attitude information is outside the target attitude range, then repeat the step "according to the target attitude information, calculate the target attitude range and the current rotation trajectory of the external control magnet; control the external control magnet to move along the current rotation trajectory" until The real-time attitude information is within the target attitude range. In addition, since the posture information of the capsule endoscope will be affected after rolling, after the capsule endoscope moves to the target position, the capsule endoscope can be further restored to the initial posture information (that is, at least the position is restored). [C h , C v ] part in the posture state data sequence [C x , C y , C z Ch h , C v , C s ]).
综上,本发明提供了一种符合操作者直观视觉感受的胶囊内窥镜第一视角定量控制方法和系统,实现基于所拍摄图像反馈的、近似“所见即所得”的胶囊内窥镜定量位置和姿态控制;加强胶囊内窥镜检查的目的性,减少操控动作的盲目性,降低磁控操作的技术难度,提高胶囊操控的便捷性;能够对关键目标区域进行有针对性的扫描检查,减少无意义的重复区域拍摄,提高消化道检查的效率;进一步优化胶囊内窥镜拍摄的角度和距离,发挥胶囊内窥镜成像硬件系统的最佳性能,提升消化道检查的影像质量。In summary, the present invention provides a first-view quantitative control method and system for a capsule endoscope that conforms to the operator's intuitive visual experience, and achieves an approximate "what you see is what you get" quantitative control of the capsule endoscope based on the captured image feedback. Position and posture control; strengthen the purpose of capsule endoscopy, reduce the blindness of control actions, reduce the technical difficulty of magnetic control operations, and improve the convenience of capsule control; enable targeted scanning and inspection of key target areas, Reduce meaningless repeated area shooting and improve the efficiency of digestive tract examination; further optimize the angle and distance of capsule endoscope shooting, maximize the performance of the capsule endoscope imaging hardware system, and improve the image quality of digestive tract examination.
应当理解,虽然本说明书按照实施方式加以描述,但并非每个实施方式仅包含一个独立的技术方案,说明书的这种叙述方式仅仅是为清楚起见,本领域技术人员应当将说明书作为一个整体,各 实施方式中的技术方案也可以经适当组合,形成本领域技术人员可以理解的其他实施方式。It should be understood that although this specification is described in terms of implementations, not each implementation only contains an independent technical solution. This description of the specification is only for the sake of clarity. Persons skilled in the art should take the specification as a whole and understand each individual solution. The technical solutions in the embodiments can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
上文所列出的一系列的详细说明仅仅是针对本发明的可行性实施方式的具体说明,它们并非用以限制本发明的保护范围,凡未脱离本发明技艺精神所作的等效实施方式或变更均应包含在本发明的保护范围之内。 The series of detailed descriptions listed above are only specific descriptions of feasible implementations of the present invention. They are not intended to limit the protection scope of the present invention. Any equivalent implementations or implementations that do not deviate from the technical spirit of the present invention are not intended to limit the protection scope of the present invention. All changes should be included in the protection scope of the present invention.
Claims (20)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210787142.1A CN117378987A (en) | 2022-07-04 | 2022-07-04 | Quantitative control method, system and storage medium for first visual angle of capsule endoscope |
CN202210787142.1 | 2022-07-04 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024008042A1 true WO2024008042A1 (en) | 2024-01-11 |
Family
ID=89439702
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/105552 WO2024008042A1 (en) | 2022-07-04 | 2023-07-03 | Method for quantitatively controlling first viewing angle of capsule endoscope, system and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117378987A (en) |
WO (1) | WO2024008042A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118490146A (en) * | 2024-04-24 | 2024-08-16 | 元化智能科技(深圳)有限公司 | Capsule endoscope control method, device and control system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101778592A (en) * | 2007-08-13 | 2010-07-14 | 奥林巴斯医疗株式会社 | Body interior observing system, and body interior observing method |
US20130225981A1 (en) * | 2011-03-02 | 2013-08-29 | Olympus Medical Systems Corp. | Position detecting apparatus of capsule endoscope, capsule endoscope system and computer readable recording medium |
CN105852783A (en) * | 2016-04-22 | 2016-08-17 | 重庆金山科技(集团)有限公司 | Capsule endoscope control system |
CN106264427A (en) * | 2016-08-04 | 2017-01-04 | 北京千安哲信息技术有限公司 | Capsule endoscope and control device, system and detection method |
CN107361722A (en) * | 2017-06-28 | 2017-11-21 | 重庆金山医疗器械有限公司 | Alimentary canal diagnostic equipment and capsule endoscope display image visual angle regulating method and system |
CN112089392A (en) * | 2020-10-14 | 2020-12-18 | 深圳市资福医疗技术有限公司 | Capsule endoscope control method, device, equipment, system and storage medium |
-
2022
- 2022-07-04 CN CN202210787142.1A patent/CN117378987A/en active Pending
-
2023
- 2023-07-03 WO PCT/CN2023/105552 patent/WO2024008042A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101778592A (en) * | 2007-08-13 | 2010-07-14 | 奥林巴斯医疗株式会社 | Body interior observing system, and body interior observing method |
US20130225981A1 (en) * | 2011-03-02 | 2013-08-29 | Olympus Medical Systems Corp. | Position detecting apparatus of capsule endoscope, capsule endoscope system and computer readable recording medium |
CN105852783A (en) * | 2016-04-22 | 2016-08-17 | 重庆金山科技(集团)有限公司 | Capsule endoscope control system |
CN106264427A (en) * | 2016-08-04 | 2017-01-04 | 北京千安哲信息技术有限公司 | Capsule endoscope and control device, system and detection method |
CN107361722A (en) * | 2017-06-28 | 2017-11-21 | 重庆金山医疗器械有限公司 | Alimentary canal diagnostic equipment and capsule endoscope display image visual angle regulating method and system |
CN112089392A (en) * | 2020-10-14 | 2020-12-18 | 深圳市资福医疗技术有限公司 | Capsule endoscope control method, device, equipment, system and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118490146A (en) * | 2024-04-24 | 2024-08-16 | 元化智能科技(深圳)有限公司 | Capsule endoscope control method, device and control system |
Also Published As
Publication number | Publication date |
---|---|
CN117378987A (en) | 2024-01-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109448041B (en) | Capsule endoscope image three-dimensional reconstruction method and system | |
TWI532460B (en) | Reconstruct images from multiple camera capsules in vivo | |
CN103905792B (en) | A kind of 3D localization methods and device based on PTZ CCTV cameras | |
CN109448105B (en) | Method and system for generating 3D human skeleton based on multi-depth image sensor | |
CN106308946A (en) | Augmented reality device applied to stereotactic surgical robot and method of augmented reality device | |
CN107431796A (en) | The omnibearing stereo formula of panoramic virtual reality content catches and rendered | |
CN114630611A (en) | System and method for changing orientation during video-guided clinical procedures using real-time image processing | |
WO2020143118A1 (en) | Capsule endoscope and positioning method and system therefor | |
ES3024938T3 (en) | Real-time tracking for three-dimensional imaging | |
CN112075914A (en) | Capsule endoscopy system | |
WO2018025483A1 (en) | Video outputting system, video outputting method, and control apparatus | |
CN109730683A (en) | Endoscope object size calculation method and analysis system | |
WO2024008042A1 (en) | Method for quantitatively controlling first viewing angle of capsule endoscope, system and storage medium | |
WO2024002012A1 (en) | Endoscope image correction method and system, and computer storage medium | |
CN110074807A (en) | The portable engaging member of the imaging region of patient is determined in panorama, computerized tomography or cephalometry x-ray imaging | |
CN115330594A (en) | A rapid target recognition and calibration method based on UAV oblique photography 3D model | |
WO2022133683A1 (en) | Mixed reality display method, mixed reality device, and storage medium | |
CN107680688A (en) | A kind of pelvic cavity emulation Minimally Invasive Surgery vision guided navigation verification method based on 3D printing | |
JP2016171946A (en) | Image processing apparatus, method, and program | |
CN114724200B (en) | Human face rigid body model and method, device and storage medium for gaze point detection | |
CN110074810A (en) | The portable engaging member of the movement of calibration object in panorama, computerized tomography or cephalometry x-ray imaging | |
JP6392192B2 (en) | Image registration device, method of operating image registration device, and program | |
Li et al. | Towards semi-autonomous manipulation of an electromagnetically actuated soft-tethered colonoscope based on visual servo control | |
CN108938086A (en) | Endoscope distortion correction method and operation navigation device | |
CN110958444A (en) | 720-degree view field environment situation sensing method and situation sensing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23834809 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 23834809 Country of ref document: EP Kind code of ref document: A1 |