Capsule endoscope position determination method and device based on magnetic array

文档序号:1867406 发布日期:2021-11-23 浏览:35次 中文

阅读说明:本技术 一种基于磁阵列的胶囊内窥镜位置测定方法及装置 (Capsule endoscope position determination method and device based on magnetic array ) 是由 不公告发明人 于 2020-05-19 设计创作,主要内容包括:本发明公开了一种基于磁阵列的胶囊内窥镜位置测定方法及装置,其中,方法包括:获取磁传感器阵列检测到的外部磁场向量;获取磁传感器阵列中每个磁传感器在预先建立的世界坐标系中坐标;基于磁传感器阵列中每个磁传感器的坐标和检测到的外部磁场向量计算得到外部空间磁场的分布方向;获取胶囊内窥镜中加速度传感器检测到的加速度;将外部磁场向量和加速度进行数据融合,得到胶囊内窥镜的初始姿态角;利用分布方向对初始姿态角进行校正,得到矫正后的胶囊内窥镜的姿态角。本发明利用检测到的外部空间磁场的分布方向来对姿态角进行校正,从而在外部空间磁场在任何变化的情况下都能够检测到准确的姿态角,提高了胶囊内窥镜姿态角检测的准确性。(The invention discloses a capsule endoscope position determination method and device based on a magnetic array, wherein the method comprises the following steps: acquiring an external magnetic field vector detected by a magnetic sensor array; acquiring coordinates of each magnetic sensor in the magnetic sensor array in a pre-established world coordinate system; calculating the distribution direction of the external space magnetic field based on the coordinates of each magnetic sensor in the magnetic sensor array and the detected external magnetic field vector; acquiring acceleration detected by an acceleration sensor in the capsule endoscope; carrying out data fusion on the external magnetic field vector and the acceleration to obtain an initial attitude angle of the capsule endoscope; and correcting the initial attitude angle by using the distribution direction to obtain the corrected attitude angle of the capsule endoscope. The invention corrects the attitude angle by using the distribution direction of the detected external space magnetic field, thereby being capable of detecting the accurate attitude angle under any change condition of the external space magnetic field and improving the accuracy of detecting the attitude angle of the capsule endoscope.)

1. A capsule endoscope position determination method based on a magnetic array is characterized by comprising the following steps:

acquiring an external magnetic field vector detected by a magnetic sensor array, wherein the external magnetic field vector is generated by an external space magnetic field for drawing the capsule endoscope to move, the external space magnetic field is a magnetic field with uniform distribution in a preset range, the magnetic sensor array comprises a plurality of uniformly arranged magnetic sensors, and the plurality of uniformly arranged magnetic sensors are distributed on the same plane;

acquiring coordinates of each magnetic sensor in the magnetic sensor array in a pre-established world coordinate system;

calculating the distribution direction of the external space magnetic field based on the coordinates of each magnetic sensor in the magnetic sensor array and the detected external magnetic field vector;

acquiring acceleration detected by an acceleration sensor in the capsule endoscope;

performing data fusion on the external magnetic field vector and the acceleration to obtain an initial attitude angle of the capsule endoscope;

and correcting the initial attitude angle by using the distribution direction to obtain the corrected attitude angle of the capsule endoscope.

2. The method of claim 1, wherein the calculating the distribution direction of the external spatial magnetic field based on the coordinates of each magnetic sensor in the array of magnetic sensors and the detected external magnetic field vector comprises:

calculating an attitude angle of a plane where the magnetic sensor array is located in the world coordinate system based on the coordinates of each magnetic sensor;

acquiring the magnetic field direction of an external magnetic field vector detected by each magnetic sensor;

and calculating the distribution direction based on the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction.

3. The method according to claim 2, wherein the calculating an attitude angle of a plane in which the magnetic sensor array is located in the world coordinate system based on the coordinates of each magnetic sensor comprises:

and calculating an included angle between the plane of the magnetic sensor array and the plane of any two axes in the world coordinate system based on the coordinates of the magnetic sensor to obtain an attitude angle of the plane of the magnetic sensor array in the world coordinate system.

4. The method according to claim 2, wherein the calculating the distribution direction based on the attitude angle of the plane in which the magnetic sensor array is located in the world coordinate system and the magnetic field direction comprises:

calculating the relative direction of the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction of the external magnetic field vector detected by each magnetic sensor to obtain a plurality of relative direction data;

and averaging the relative direction data to obtain the distribution direction.

5. A magnetic array-based capsule endoscope position determination device, comprising:

the capsule endoscope comprises a first acquisition module, a second acquisition module and a control module, wherein the first acquisition module is used for acquiring an external magnetic field vector detected by a magnetic sensor array, the external magnetic field vector is a magnetic field vector generated by an external space magnetic field used for drawing the capsule endoscope to move, the external space magnetic field is a magnetic field which is uniformly distributed in a preset range, the magnetic sensor array comprises a plurality of uniformly arranged magnetic sensors, and the plurality of uniformly arranged magnetic sensors are distributed on the same plane;

the second acquisition module is used for acquiring coordinates of each magnetic sensor in the magnetic sensor array in a world coordinate system established in advance;

the calculation module is used for calculating the distribution direction of the external space magnetic field based on the coordinate of each magnetic sensor in the magnetic sensor array and the detected external magnetic field vector;

the third acquisition module is used for acquiring the acceleration detected by the acceleration sensor in the capsule endoscope;

the fusion module is used for carrying out data fusion on the external magnetic field vector and the acceleration to obtain an initial attitude angle of the capsule endoscope;

and the correction module is used for correcting the initial attitude angle by utilizing the distribution direction to obtain the corrected attitude angle of the capsule endoscope.

6. The apparatus of claim 5, wherein the computing module comprises:

a first calculation unit, configured to calculate, based on the coordinates of each magnetic sensor, an attitude angle of a plane in which the magnetic sensor array is located in the world coordinate system;

an acquisition unit configured to acquire a magnetic field direction of the external magnetic field vector detected by each magnetic sensor;

and the second calculation unit is used for calculating the distribution direction based on the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction.

7. The apparatus of claim 6, wherein the first computing unit comprises:

and the first calculating subunit is used for calculating an included angle between the plane of the magnetic sensor array and the plane of any two axes in the world coordinate system based on the coordinates of the magnetic sensor to obtain the attitude angle of the plane of the magnetic sensor array in the world coordinate system.

8. The apparatus of claim 6, wherein the second computing unit comprises:

the second calculating subunit is used for calculating the relative direction of the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction of the external magnetic field vector detected by each magnetic sensor to obtain a plurality of pieces of relative direction data;

and the third calculation subunit is used for averaging the relative direction data to obtain the distribution direction.

9. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as claimed in any one of claims 1 to 4 when executing the computer program.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program when executed by a processor implementing the steps of the method of any one of claims 1 to 4.

Technical Field

The invention relates to the technical field of capsule endoscopes, in particular to a capsule endoscope position measuring method and device based on a magnetic array.

Background

Capsule endoscopes are used primarily to probe the field of view of gastrointestinal portions such as the alimentary canal and to provide a data basis for medical examination and diagnosis.

After the capsule endoscope is inserted into the body, it is necessary to drive the capsule endoscope to move to a predetermined position to capture an image. At present, a magnetic control mode is often adopted for driving a capsule endoscope, an active controllable capsule system adopting an external magnetic field driving mode is widely used at present, the system comprises a permanent magnet which is arranged in a capsule or a permanent magnet layer and an external traction magnet which are coated on the outer surface of the capsule, the external traction magnet can adopt a magnetic force arm which can be manually controlled, or a triaxial Helmholtz coil can be adopted, and the capsule is driven to move such as rolling, pitching, yawing and advancing through a universal uniform rotating magnetic field of the triaxial Helmholtz coil.

In the above magnetic control method, the acceleration sensor and the magnetic field sensor are usually used to perform a main measurement operation, and the attitude angle of the capsule can be measured by fusing the data of the acceleration vector of the capsule and the spatial magnetic field vector of the position where the acceleration vector is located. The space magnetic field vector is an external preset magnetic field generated by an external traction magnet, the external preset magnetic field is generally set by medical personnel and is used for controlling the capsule to move in the alimentary canal of the human body, and the generated magnetic field is in periodic variation.

However, the inventor finds that, when the spatial attitude angle of the capsule is measured by the magnetic field sensor, the external preset magnetic field must satisfy a certain preset condition, that is, the external preset magnetic field needs to be a horizontal directional magnetic field (or a horizontal magnetic field with a magnetic induction line parallelism higher than 95%), and only the external preset magnetic field satisfying the condition can be fused with the acceleration sensor data to accurately calculate the attitude angle of the capsule, that is, calculate the attitude angle, that is, determine the position of the capsule.

However, in the actual use process, there are many variable factors, so that the external magnetic field changes, especially the direction changes, which will cause the accuracy of the detected capsule endoscope to be greatly reduced, and further cause the control accuracy of the capsule endoscope to be reduced.

Disclosure of Invention

Accordingly, the present invention is directed to a method and an apparatus for measuring the position of a capsule endoscope using a magnetic array, which solve the problem of the accuracy of the attitude angle of the capsule endoscope detected when the external magnetic field is changed in the related art.

In one aspect of the embodiments of the present invention, a method for determining a position of a capsule endoscope based on a magnetic array is provided, which includes: acquiring an external magnetic field vector detected by a magnetic sensor array, wherein the external magnetic field vector is generated by an external space magnetic field for drawing the capsule endoscope to move, the external space magnetic field is a magnetic field with uniform distribution in a preset range, the magnetic sensor array comprises a plurality of uniformly arranged magnetic sensors, and the plurality of uniformly arranged magnetic sensors are distributed on the same plane; acquiring coordinates of each magnetic sensor in the magnetic sensor array in a pre-established world coordinate system; calculating the distribution direction of the external space magnetic field based on the coordinates of each magnetic sensor in the magnetic sensor array and the detected external magnetic field vector; acquiring acceleration detected by an acceleration sensor in the capsule endoscope; performing data fusion on the external magnetic field vector and the acceleration to obtain an initial attitude angle of the capsule endoscope; and correcting the initial attitude angle by using the distribution direction to obtain the corrected attitude angle of the capsule endoscope.

Optionally, the calculating a distribution direction of the external spatial magnetic field based on the coordinates of each magnetic sensor in the magnetic sensor array and the detected external magnetic field vector includes: calculating an attitude angle of a plane where the magnetic sensor array is located in the world coordinate system based on the coordinates of each magnetic sensor; acquiring the magnetic field direction of an external magnetic field vector detected by each magnetic sensor; and calculating the distribution direction based on the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction.

Optionally, the calculating, based on the coordinates of each magnetic sensor, an attitude angle of a plane in which the magnetic sensor array is located in the world coordinate system includes: and calculating an included angle between the plane of the magnetic sensor array and the plane of any two axes in the world coordinate system based on the coordinates of the magnetic sensor to obtain an attitude angle of the plane of the magnetic sensor array in the world coordinate system.

Optionally, the calculating the distribution direction based on the attitude angle of the plane in which the magnetic sensor array is located in the world coordinate system and the magnetic field direction includes: calculating the relative direction of the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction of the external magnetic field vector detected by each magnetic sensor to obtain a plurality of relative direction data; and averaging the relative direction data to obtain the distribution direction.

In another aspect of the embodiments of the present invention, there is provided a magnetic array-based capsule endoscope position determination apparatus including: the capsule endoscope comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring an external magnetic field vector detected by a magnetic sensor array, the external magnetic field vector is generated by an external space magnetic field used for drawing the capsule endoscope to move, the external space magnetic field is a magnetic field which is uniformly distributed in a preset range, the magnetic sensor array comprises a plurality of uniformly arranged magnetic sensors, the plurality of uniformly arranged magnetic sensors are distributed on the same plane, and the plane is perpendicular to a magnetic induction line of the external space magnetic field; the second acquisition module is used for acquiring coordinates of each magnetic sensor in the magnetic sensor array in a world coordinate system established in advance; the calculation module is used for calculating the distribution direction of the external space magnetic field based on the coordinate of each magnetic sensor in the magnetic sensor array and the detected external magnetic field vector; the third acquisition module is used for acquiring the acceleration detected by the acceleration sensor in the capsule endoscope; the fusion module is used for carrying out data fusion on the external magnetic field vector and the acceleration to obtain an initial attitude angle of the capsule endoscope; and the correction module is used for correcting the initial attitude angle by utilizing the distribution direction to obtain the corrected attitude angle of the capsule endoscope.

Optionally, the calculation module comprises: a first calculation unit, configured to calculate, based on the coordinates of each magnetic sensor, an attitude angle of a plane in which the magnetic sensor array is located in the world coordinate system; an acquisition unit configured to acquire a magnetic field direction of the external magnetic field vector detected by each magnetic sensor; and the second calculation unit is used for calculating the distribution direction based on the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction.

Optionally, the first computing unit includes: and the first calculating subunit is used for calculating an included angle between the plane of the magnetic sensor array and the plane of any two axes in the world coordinate system based on the coordinates of the magnetic sensor to obtain the attitude angle of the plane of the magnetic sensor array in the world coordinate system.

Optionally, the second computing unit includes: the second calculating subunit is used for calculating the relative direction of the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction of the external magnetic field vector detected by each magnetic sensor to obtain a plurality of pieces of relative direction data; and the third calculation subunit is used for averaging the relative direction data to obtain the distribution direction.

In another aspect of the embodiments of the present invention, there is provided a computer apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the magnetic array based capsule endoscope position determination method when executing the computer program.

In another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program: the computer program, when executed by a processor, implements the steps of the magnetic array-based capsule endoscope position determination method.

The technical scheme of the invention has the following advantages:

according to the embodiment of the invention, the external magnetic field vector of the external space magnetic field is detected by utilizing the magnetic sensor array, and the distribution direction of the external space magnetic field is further calculated; and then fusing the external magnetic field vector with the acceleration of the capsule endoscope to obtain an initial attitude angle, and correcting the initial attitude angle by using the distribution direction to obtain the actual attitude angle of the capsule endoscope. The distribution direction of the detected external space magnetic field is utilized to correct the attitude angle, so that the accurate attitude angle can be detected under any change of the external space magnetic field, and the accuracy of detecting the attitude angle of the capsule endoscope is improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.

FIG. 1 is a flowchart showing a specific example of a magnetic array-based capsule endoscope position determination method according to embodiment 1 of the present invention;

FIG. 2 is a schematic block diagram showing a specific example of the magnetic array-based capsule endoscope position determination apparatus according to embodiment 2 of the present invention;

fig. 3 is a schematic structural diagram of a computer device in embodiment 3 of the present invention.

Detailed Description

The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.

In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.

In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

Example 1

The embodiment of the invention provides a capsule endoscope position determination method based on a magnetic array, which can be executed by an upper computer, wherein the magnetic sensor array is connected to the upper computer, and the capsule endoscope is wirelessly connected to the upper computer for data communication. As shown in fig. 1, the method includes:

step S101, obtaining an external magnetic field vector detected by a magnetic sensor array, wherein the external magnetic field vector is a magnetic field vector generated by an external space magnetic field for drawing the capsule endoscope to move, the external space magnetic field is a magnetic field which is uniformly distributed in a preset range, the magnetic sensor array comprises a plurality of uniformly arranged magnetic sensors, and the plurality of uniformly arranged magnetic sensors are distributed on the same plane. The magnetic sensor array may be a magnetic sensor square array of M x M magnetic sensors, each magnetic sensor may measure an external magnetic field vector at its location, wherein the external spatial magnetic field is generated by a traction magnet that generates a uniformly distributed magnetic field around the capsule endoscope. Normally, the plane of the magnetic sensor is perpendicular to the magnetic induction line of the external space magnetic field. But since the external spatial magnetic field is not distributed in the magnetic field of the standard scene during use. An external magnetic field vector is detected at a plurality of locations by a magnetic sensor array, including magnetic field strength and magnetic field direction.

Step S102, obtaining coordinates of each magnetic sensor in the magnetic sensor array in a world coordinate system established in advance. In the embodiment of the present invention, the world coordinate system may use longitude, latitude and altitude as coordinate values of three axial directions, or may use a current known location point as a coordinate origin to establish the coordinate system. Since the magnetic sensor array is used to measure the external magnetic field vector, its position can be adjusted and set manually. For example, it is controlled to a specified position by a robot arm, the position of which is known because the specified position is a target point of control, and then its coordinates in a world coordinate system are calculated by coordinate conversion. Since the magnetic sensor array can be equivalent to one plane and the magnetic sensors can be equivalent to one point, the coordinates of each magnetic sensor can be calculated.

Step S103, calculating a distribution direction of the external spatial magnetic field based on the coordinates of each magnetic sensor in the magnetic sensor array and the detected external magnetic field vector.

After the coordinates of each magnetic sensor are obtained through calculation, the magnetic field direction of each magnetic sensor can be obtained through calculation by combining the detected external magnetic field vector, and then the magnetic field directions of all the magnetic sensors are integrated to obtain the distribution direction of the external space magnetic field.

The attitude angle of the surface where the magnetic sensor array is located can be obtained through the coordinate calculation of each magnetic sensor, and then the distribution direction of the external space magnetic field is obtained through the calculation by utilizing the attitude angle and the magnetic field vector detected by the magnetic sensors. Specifically, the calculating the distribution direction of the external spatial magnetic field based on the coordinates of each magnetic sensor in the magnetic sensor array and the detected external magnetic field vector includes: calculating an attitude angle of a plane where the magnetic sensor array is located in the world coordinate system based on the coordinates of each magnetic sensor; acquiring the magnetic field direction of an external magnetic field vector detected by each magnetic sensor; and calculating the distribution direction based on the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction.

In the embodiment of the invention, the distribution direction of the external space magnetic field is obtained by calculating the attitude angle of the plane where the magnetic sensor array is located and the magnetic field direction in the external magnetic field vector detected by the magnetic sensor, so that the detection of the distribution direction of the external space magnetic field is realized.

And step S104, acquiring the acceleration detected by the acceleration sensor in the capsule endoscope. In the embodiment of the invention, an acceleration sensor is arranged in the capsule endoscope and used for detecting the acceleration of the capsule endoscope, and then the acceleration is transmitted to an upper computer in real time through a wireless communication module in the capsule endoscope.

And S105, carrying out data fusion on the external magnetic field vector and the acceleration to obtain an initial attitude angle of the capsule endoscope.

And after the upper computer acquires the acceleration of the capsule endoscope, fusing the acceleration with the detected external magnetic field vector to obtain the initial attitude angle of the capsule endoscope. The method for obtaining the attitude angle by fusing the external magnetic field vector and the acceleration data is the prior art, and the calculation method of the initial attitude angle in the embodiment of the invention is the same as that of the initial attitude angle, and is not repeated here.

And S106, correcting the initial attitude angle by using the distribution direction to obtain the corrected attitude angle of the capsule endoscope.

As described in the background of the present invention, in the case where the distribution direction of the external spatial magnetic field is not the horizontal directional magnetic field, the attitude angle calculated by the above method is not accurate enough, that is, the initial attitude angle in the embodiment of the present invention has a certain error. On the basis, in the embodiment of the invention, since the distribution direction of the external space magnetic field is already calculated, the corrected attitude angle is obtained by correcting the initial attitude angle by using the distribution direction. That is, the distribution direction of the external space magnetic field is used as a correction parameter to correct the initial attitude angle, so that the influence of noise caused by the direction change of the external space magnetic field is eliminated, and the accurate detection of the attitude angle of the capsule endoscope is realized.

The data fusion method of the external magnetic field vector and the acceleration is known, and in the fusion process, the initial attitude angle is obtained mainly by using the magnetic field direction of the external magnetic field vector and the direction of the acceleration. In the inconvenient case of acceleration, the accuracy of the initial attitude angle is completely affected by the magnetic field direction of the external magnetic field vector. Therefore, in a specific correction process, the relative errors of different magnetic field distribution directions relative to the horizontal orientation magnetic field in the calculation of the attitude angle of the capsule endoscope can be calculated in a statistical calculation mode, a corresponding table of the magnetic field distribution direction deviation and the error amount is formed, then in the process of correcting the initial attitude angle, the error amount corresponding to the distribution direction of the external magnetic field (the error amount is an angle measurement) is obtained, and then the initial attitude angle is corrected by using the error amount, so that the final attitude angle is obtained. In the embodiment of the invention, the calculation of the attitude angle is to determine the position information of the capsule endoscope.

According to the embodiment of the invention, the external magnetic field vector of the external space magnetic field is detected by utilizing the magnetic sensor array, and the distribution direction of the external space magnetic field is further calculated; and then fusing the external magnetic field vector with the acceleration of the capsule endoscope to obtain an initial attitude angle, and correcting the initial attitude angle by using the distribution direction to obtain the actual attitude angle of the capsule endoscope. The distribution direction of the detected external space magnetic field is utilized to correct the attitude angle, so that the accurate attitude angle can be detected under any change of the external space magnetic field, and the accuracy of detecting the attitude angle of the capsule endoscope is improved.

As an optional implementation manner, in an embodiment of the present invention, the calculating, based on the coordinates of each magnetic sensor, an attitude angle of a plane in which the magnetic sensor array is located in the world coordinate system includes: and calculating an included angle between the plane of the magnetic sensor array and the plane of any two axes in the world coordinate system based on the coordinates of the magnetic sensor to obtain an attitude angle of the plane of the magnetic sensor array in the world coordinate system.

In the embodiment of the invention, the attitude angle of the plane where the magnetic sensor array is located can be obtained by converting the included angle between the plane and each axial plane in the world coordinate system.

As another optional implementation manner, in an embodiment of the present invention, the calculating the distribution direction based on the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction includes: calculating the relative direction of the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction of the external magnetic field vector detected by each magnetic sensor to obtain a plurality of relative direction data; and averaging the relative direction data to obtain the distribution direction.

Because the magnetic field distribution has a certain rule, in the embodiment of the invention, the distribution direction of the assets is calculated by averaging the relative directions detected by each magnetic sensor, and compared with a single magnetic sensor, the accuracy of calculating the distribution direction of the external space magnetic field is greatly improved, so that the accuracy of the attitude angle of the capsule endoscope is improved.

Example 2

The present embodiment provides a magnetic array-based capsule endoscope position determination apparatus which can be used to perform the method of embodiment 1 above, as shown in fig. 2, the apparatus comprising:

the first acquisition module 201 is configured to acquire an external magnetic field vector detected by a magnetic sensor array, where the external magnetic field vector is a magnetic field vector generated by an external spatial magnetic field used for dragging a capsule endoscope to move, the external spatial magnetic field is a magnetic field with uniform distribution in a preset range, the magnetic sensor array includes a plurality of uniformly arranged magnetic sensors, the plurality of uniformly arranged magnetic sensors are distributed on the same plane, and the plane is perpendicular to a magnetic sensing line of the external spatial magnetic field;

a second obtaining module 202, configured to obtain coordinates of each magnetic sensor in the magnetic sensor array in a pre-established world coordinate system;

a calculating module 203, configured to calculate a distribution direction of the external spatial magnetic field based on coordinates of each magnetic sensor in the magnetic sensor array and the detected external magnetic field vector;

a third acquiring module 204, configured to acquire an acceleration detected by an acceleration sensor in the capsule endoscope;

a fusion module 205, configured to perform data fusion on the external magnetic field vector and the acceleration to obtain an initial attitude angle of the capsule endoscope;

a correcting module 206, configured to correct the initial attitude angle by using the distribution direction, so as to obtain a corrected attitude angle of the capsule endoscope.

According to the embodiment of the invention, the external magnetic field vector of the external space magnetic field is detected by utilizing the magnetic sensor array, and the distribution direction of the external space magnetic field is further calculated; and then fusing the external magnetic field vector with the acceleration of the capsule endoscope to obtain an initial attitude angle, and correcting the initial attitude angle by using the distribution direction to obtain the actual attitude angle of the capsule endoscope. The distribution direction of the detected external space magnetic field is utilized to correct the attitude angle, so that the accurate attitude angle can be detected under any change of the external space magnetic field, and the accuracy of detecting the attitude angle of the capsule endoscope is improved.

Optionally, the calculation module comprises: a first calculation unit, configured to calculate, based on the coordinates of each magnetic sensor, an attitude angle of a plane in which the magnetic sensor array is located in the world coordinate system; an acquisition unit configured to acquire a magnetic field direction of the external magnetic field vector detected by each magnetic sensor; and the second calculation unit is used for calculating the distribution direction based on the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction.

Optionally, the first computing unit includes: and the first calculating subunit is used for calculating an included angle between the plane of the magnetic sensor array and the plane of any two axes in the world coordinate system based on the coordinates of the magnetic sensor to obtain the attitude angle of the plane of the magnetic sensor array in the world coordinate system.

Optionally, the second computing unit includes: the second calculating subunit is used for calculating the relative direction of the attitude angle of the plane where the magnetic sensor array is located in the world coordinate system and the magnetic field direction of the external magnetic field vector detected by each magnetic sensor to obtain a plurality of pieces of relative direction data; and the third calculation subunit is used for averaging the relative direction data to obtain the distribution direction.

For specific description in the embodiments of the present invention, reference may be made to the above method embodiments, which are not described herein again

Example 3

The present embodiment also provides a computer device, such as a desktop computer, a rack-mounted server, a blade server, a tower server, or a rack-mounted server (including an independent server or a server cluster composed of multiple servers) capable of executing programs. The computer device 120 of the present embodiment includes at least but is not limited to: a memory 121, a processor 122, which may be communicatively coupled to each other via a system bus, as shown in FIG. 3. It is noted that FIG. 3 only shows computer device 120 having components 121 and 122, but it is understood that not all of the shown components are required and that more or fewer components may be implemented instead.

In this embodiment, the memory 121 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 121 may be an internal storage unit of the computer device 120, such as a hard disk or a memory of the computer device 120. In other embodiments, the memory 121 may also be an external storage device of the computer device 120, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 120. Of course, the memory 121 may also include both internal and external storage devices for the computer device 120. In this embodiment, the memory 21 is generally used for storing an operating system and various types of application software installed in the computer device 120, such as program codes of the capsule endoscope position determination method based on the magnetic array described in the embodiment. Further, the memory 121 may also be used to temporarily store various types of data that have been output or are to be output.

Processor 122 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 122 generally operates to control the overall operation of the computer device 120. In this embodiment, the processor 122 is configured to execute the program codes stored in the memory 121 or process data, for example, to implement the magnetic array-based capsule endoscope position determination method of the embodiment.

The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of the embodiment is used for storing transformation matrix acquisition, panoramic image stitching and neural network training devices, and when being executed by a processor, the computer-readable storage medium realizes the magnetic array-based capsule endoscope position determination method of the embodiment.

It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:胶囊内窥镜

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!