Endoscopic image detection method, device, equipment and storage medium

By projecting three-dimensional image data to the real-time detection image of the endoscope, the problem of inconvenient viewing of image data during endoscopic surgery is solved, the position accuracy of the target detection image is improved, and the accuracy of the surgery is enhanced.

CN114022547BActive Publication Date: 2024-08-27ZHUHAI ZHONGKE HUAYING HEALTH TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111080451.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-15
Publication Date
2024-08-27
Estimated Expiration
2041-09-15

AI Technical Summary

Technical Problem

During endoscopic surgery, doctors need to view the lesion area based on CT, MR and other image data, which results in inconvenient operation and low accuracy of target detection image position.

Method used

By obtaining the three-dimensional image data and spatial point position information of the area to be detected, and using preset projection rules to project this information into the real-time detection image of the endoscope, a target detection image is generated to ensure accurate orientation and position of the endoscope lens.

Benefits of technology

The accuracy of the position of the endoscope detection target detection image is improved, allowing doctors to view the spatial point position information of the area to be detected in the real-time display screen, thereby enhancing the accuracy of surgery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114022547B
    Figure CN114022547B
Patent Text Reader

Abstract

The present application discloses an endoscopic image detection method, apparatus, device and storage medium, the method comprising: obtaining three-dimensional image data of an area to be detected and multiple spatial point position information corresponding to the three-dimensional image data; based on a preset projection rule, projecting the multiple spatial point position information into a real-time detection image of the endoscope to obtain target spatial point position information corresponding to each spatial point position information; obtaining the current spatial position and current orientation of the endoscope lens; respectively calculating the distance between each target spatial point position information and the current spatial position to obtain the corresponding target distance between the current spatial position and each target spatial point position information; if the positional relationship between the current spatial position and the area to be detected is determined to meet a preset condition based on each target distance, then generating a target detection image corresponding to the area to be detected based on the current orientation of the endoscope lens and each target spatial point position information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent medical technology, and in particular to an endoscopic image detection method, device, equipment and storage medium. Background Art

[0002] An endoscope is a detection instrument that integrates traditional optics, ergonomics, precision machinery, modern electronics, mathematics, and software. It has an image sensor, optical lens, light source, mechanical device, etc. It can enter the stomach through the mouth or other natural orifices into the body. Endoscopes can be used to see lesions that X-rays cannot show, so they are very useful to doctors. For example, with the help of an endoscope, doctors can observe ulcers or tumors in the stomach and develop the best treatment plan accordingly;

[0003] Endoscopic technology Modern minimally invasive surgical technology without surgery will increasingly replace traditional surgery and is undergoing rapid changes, among which the application of endoscopic technology is of particular significance; known as the "third eye of mankind", it is an ENT diagnosis and treatment "optical fiber" non-invasive device that integrates "examination-diagnosis-treatment". It is one of the most advanced technologies in the field of ENT treatment in the world and is the first breakthrough in the use of optical fibers in the history of human medicine;

[0004] With the existing technology, doctors have to rely on the preoperative diagnosis results of CT, MR and other images every time. During the actual endoscopic surgery diagnosis process, doctors have to rely on memory or check the lesion area of ​​previous CT, MR and other image data on multiple screens, which is very inconvenient and also affects the accuracy of detection of image position in the target area to be detected. Summary of the invention

[0005] In order to solve the above technical problems, in response to the above problems, the present application discloses an endoscopic image detection method, which can project the spatial point position information in the three-dimensional image data of the area to be detected into the real-time detection image of the endoscope during the use of the endoscope, so that the endoscope can detect in real time whether the endoscope has reached the area to be detected based on the target spatial point position information corresponding to each spatial point position information obtained by the projection, and determine the target detection image of the endoscope based on the target spatial point position information after the endoscope reaches the area to be detected; this design not only allows the doctor to view the spatial point position information of the area to be detected in real time on the display screen of the endoscope, but also improves the accuracy of the position of the target detection image detected by the endoscope.

[0006] In order to achieve the above-mentioned object of the invention, the present application provides an endoscopic image detection method, the method comprising:

[0007] Acquire three-dimensional image data of the area to be detected and position information of multiple spatial points corresponding to the three-dimensional image data;

[0008] Based on a preset projection rule, the plurality of spatial point position information are projected into a real-time detection image of an endoscope to obtain target spatial point position information corresponding to each spatial point position information, wherein the target spatial point position information represents the position information of the target point in the target projection area in the real-time detection image of the endoscope;

[0009] Obtain the current spatial position and current orientation of the endoscope lens;

[0010] Calculating the distance between each target space point position information and the current space position respectively to obtain the target distances corresponding to each other between the current space position and each target space point position information;

[0011] If the positional relationship between the current spatial position and the area to be detected determined based on the distances to each target meets a preset condition, a target detection image corresponding to the area to be detected is generated based on the current orientation of the endoscope lens and the position information of each target spatial point, wherein the target detection image is used to represent a two-dimensional image corresponding to the current orientation in the area to be detected detected by the endoscope.

[0012] In some embodiments, the multiple spatial point position information is projected into the real-time detection image of the endoscope based on a preset projection rule to obtain target spatial point position information corresponding to each spatial point position information, wherein the target spatial point position information represents the position information of the target point in the target projection area in the real-time detection image of the endoscope, including:

[0013] Determine the position of the marking point from the plurality of spatial point position information;

[0014] Determining the marked spatial position of the endoscope lens of the endoscope in the area to be inspected based on the marked point position;

[0015] Perform matrix calculation based on the marked spatial position and the marked point position to obtain a first transformation matrix corresponding to the plurality of spatial point position information;

[0016] Based on the first conversion matrix, the plurality of spatial point position information are projected into the detection image of the endoscope to obtain target spatial point position information corresponding to each spatial point position information.

[0017] In some embodiments, obtaining the current orientation of the endoscope lens includes:

[0018] Obtaining the current coordinates of the lens center of the endoscope lens;

[0019] Determine the Euler angle of the lens center according to the current coordinates of the lens center;

[0020] The current orientation of the endoscope lens is determined according to the Euler angle of the lens center.

[0021] In some embodiments, if the positional relationship between the current spatial position and the area to be detected is determined based on the distances of each target to meet a preset condition, a target detection image corresponding to the area to be detected is generated based on the current orientation of the endoscope lens and the position information of each target spatial point, and the above also includes

[0022] Determine whether the distance of each target is less than or equal to a preset threshold;

[0023] If there is at least one target distance less than a preset threshold, it is determined that the positional relationship between the current spatial position of the endoscope lens and the area to be detected meets the preset condition, and the step of generating the target detection image is executed.

[0024] In some embodiments, generating a target detection image corresponding to the area to be detected based on the current orientation of the endoscope lens and the position information of each target space point includes:

[0025] Performing conversion matrix calculation based on the current orientation of the endoscope lens and characteristic information of the imaging device of the endoscope to obtain a second conversion matrix of the target space point position information;

[0026] A target detection image corresponding to the area to be detected is generated based on the second transformation matrix and the position information of each target space point.

[0027] In some embodiments, the calculation of the transformation matrix based on the current orientation of the endoscope lens and the characteristic information of the imaging device of the endoscope to obtain the second transformation matrix of the target space point position information includes:

[0028] Calculating a rotation matrix based on the current orientation of the endoscope lens to obtain a rotation matrix;

[0029] A transformation matrix is ​​calculated based on the characteristic information of the imaging device of the endoscope and the rotation matrix to obtain a second transformation matrix corresponding to the target space point position information.

[0030] The calculation of the rotation matrix based on the current orientation of the endoscope lens to obtain the rotation matrix includes:

[0031] Obtaining the current coordinates of the lens center of the endoscope lens;

[0032] Determine the Euler angle of the lens center according to the current coordinates of the lens center;

[0033] A rotation matrix is ​​calculated based on the Euler angles to obtain a rotation matrix for determining the current orientation of the endoscope lens.

[0034] In some implementations, generating the target detection image corresponding to the area to be detected based on the second transformation matrix and the position information of each target space point includes:

[0035] Performing matrix transformation on the position information of each target space point based on the second transformation matrix to obtain the target position information corresponding to the position information of each target space point;

[0036] Generate corresponding target detection images based on the geometric figures corresponding to each target position information.

[0037] In some embodiments, before acquiring the three-dimensional image data of the area to be detected and the position information of multiple spatial points corresponding to the three-dimensional image data, the method further includes:

[0038] Acquiring medical images;

[0039] Performing three-dimensional reconstruction on the medical image to obtain a three-dimensional structure diagram corresponding to the medical image;

[0040] Performing image segmentation processing on the three-dimensional structure image to obtain three-dimensional image data of the area to be detected;

[0041] A plurality of spatial point position information corresponding to the three-dimensional image data is determined from the three-dimensional image data of the area to be detected.

[0042] The present application also provides an endoscopic image detection device, the device comprising:

[0043] A first acquisition module, used to acquire three-dimensional image data of the area to be detected and position information of multiple spatial points corresponding to the three-dimensional image data;

[0044] A position information determination module, for projecting the plurality of spatial point position information into a real-time detection image of an endoscope based on a preset projection rule, and obtaining target spatial point position information corresponding to each spatial point position information, wherein the target spatial point position information represents the position information of the target point in a target projection area in the real-time detection image of the endoscope;

[0045] A second acquisition module is used to acquire the current spatial position and current orientation of the endoscope lens;

[0046] A distance determination module is used to calculate the distance between each target space point position information and the current space position, and obtain the corresponding target distance between the current space position and each target space point position information;

[0047] An image determination module is used to generate a target detection image corresponding to the area to be detected based on the current orientation of the endoscope lens and the position information of each target space point if the positional relationship between the current spatial position and the area to be detected based on each target distance meets a preset condition, wherein the target detection image is used to represent a two-dimensional image corresponding to the current orientation in the area to be detected detected by the endoscope.

[0048] The present application also provides an endoscopic image detection device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the endoscopic image detection method as described above.

[0049] The present application also provides a computer-readable storage medium, characterized in that the storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded by a processor and executed by the endoscopic image detection method as described above.

[0050] Implementing the embodiments of the present application has the following beneficial effects:

[0051] The endoscopic image detection method disclosed in the present application can project the spatial point position information in the three-dimensional image data of the area to be detected into the real-time detection image of the endoscope during the use of the endoscope, so that the endoscope can detect in real time whether the endoscope has reached the area to be detected based on the target spatial point position information corresponding to each spatial point position information obtained by the projection, and determine the target detection image of the endoscope based on the target spatial point position information after the endoscope reaches the area to be detected; this design not only allows the doctor to view the spatial point position information of the area to be detected in real time on the display screen of the endoscope, but also improves the accuracy of the position of the target detection image detected by the endoscope. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the endoscopic image detection method, device, equipment and storage medium described in the present application, the drawings required for the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1 A schematic diagram of a flow chart of an endoscopic image detection method provided in an embodiment of the present application;

[0054] Figure 2 A flowchart of a method for determining position information of a target space point provided in an embodiment of the present application;

[0055] Figure 3 A schematic flow chart of a method for determining the current orientation of an endoscope lens provided in an embodiment of the present application;

[0056] Figure 4 A schematic diagram of the structure of another endoscopic image detection device provided in an embodiment of the present application;

[0057] Figure 5 A schematic diagram of the structure of an endoscopic image detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0059] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0060] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0061] Euler angles are a group of three independent angular parameters used to determine the position of a fixed rotating rigid body. They are composed of the nutation angle θ, the precession angle ψ and the rotation angle φ. They were named after Euler who first proposed them.

[0062] The following combination Figure 1 The image detection method of the present application can be applied to the field of intelligent medical care. Specifically, it can be applied to image detection in endoscopic surgery; it can be applied to human tissue areas that need to be diagnosed.

[0063] Please refer to Figure 1, which shows a flow chart of an endoscopic image detection method provided in an embodiment of the present application. This specification provides method operation steps as described in the embodiment or flow chart, but based on conventional; or non-creative labor, more or fewer operation steps may be included. The order of steps listed in the embodiment is only one way of executing the steps among many, and does not represent the only execution order. The endoscopic image detection method can be executed in the order of the methods shown in the embodiment or the accompanying drawings. Specifically, Figure 1 As shown, the method includes:

[0064] S101, obtaining three-dimensional image data of a region to be detected and position information of multiple spatial points corresponding to the three-dimensional image data;

[0065] It should be noted that, in the embodiment of the present application, the three-dimensional image data of the area to be detected may be a three-dimensional structural diagram of the lesion area that needs to be detected or diagnosed during surgery or other areas that need to be detected or viewed;

[0066] In the embodiment of the present application, the area to be detected is segmented from a three-dimensional image that is different from an image detected by an endoscope;

[0067] In the embodiment of the present application, the method for acquiring the three-dimensional image data of the area to be detected may include but is not limited to:

[0068] Acquiring medical images;

[0069] In the embodiment of the present application, the medical image may be acquired by a medical imaging device, for example, a CT image, an MR image or a THz image;

[0070] Performing three-dimensional reconstruction on the medical image to obtain a three-dimensional structure diagram corresponding to the medical image;

[0071] In the embodiment of the present application, an existing three-dimensional reconstruction method can be used to perform three-dimensional reconstruction on a medical image to obtain a three-dimensional structure diagram corresponding to the medical image;

[0072] Performing image segmentation processing on the three-dimensional structure image to obtain three-dimensional image data of the area to be detected;

[0073] Specifically, by performing three-dimensional reconstruction using the collected CT image data, the three-dimensional structure of the overall area of ​​the tissue where the area to be detected is located can be segmented first, such as the three-dimensional structure diagram of the bronchial area, and then the three-dimensional image data of the area to be detected can be segmented from the three-dimensional structure of the overall area, such as one or more lesion areas.

[0074] In the embodiment of the present application, the three-dimensional structure diagram can be segmented into regions, and the three-dimensional image data of the region to be detected can be segmented based on the treatment needs, that is, the three-dimensional structure diagram of the region to be detected;

[0075] Determine the position information of multiple spatial points corresponding to the three-dimensional image data from the three-dimensional image data of the area to be detected;

[0076] Among them, based on the position information of multiple spatial points, the contour of the area to be detected corresponding to the three-dimensional image data can be outlined; that is, the position information of multiple spatial points can be used to represent the contour information of the area to be detected.

[0077] Specifically, it may include n points, where n is a positive integer greater than or equal to 3;

[0078] The coordinates of each point can be expressed using A i It means, where i is (1, ..., n), A i is the three-dimensional space coordinate, and its coordinate can be expressed by A i (X i ,Y i ,Z i )express.

[0079] S103, based on a preset projection rule, projecting multiple spatial point position information into a real-time detection image of the endoscope to obtain target spatial point position information corresponding to each spatial point position information, wherein the target spatial point position information represents the position information of the target point in the target projection area in the real-time detection image of the endoscope;

[0080] In the embodiment of the present application, the preset projection rule may be a matrix conversion rule, based on which multiple spatial point position information corresponding to the three-dimensional image data is projected into the real-time detection image of the endoscope, thereby obtaining target spatial point position information corresponding to each spatial point position information;

[0081] The target spatial point position information may be the spatial point position information projected onto the corresponding spatial point position information in the real-time display image collected by the endoscope based on the preset projection rule; the spatial point position information corresponds to the target spatial point position information one by one; the target spatial point position information may be expressed as B i (X i ,Y i ,Z i ), where i is (1, ..., n);

[0082] Specifically, the target points corresponding to the position information of each target spatial point form a target projection area in the real-time detection image of the endoscope; specifically, the target projection area can be outlined based on the target points corresponding to the position information of each target spatial point, wherein the target projection area has the same structure as the outline of the area to be detected corresponding to the three-dimensional image data outlined based on the position information of multiple spatial points;

[0083] That is, the target projection area is the contour area of ​​the area to be detected projected onto the endoscope display screen based on the preset projection rule.

[0084] In the embodiments of the present application, Figure 2 , which is a flow chart of a method for determining the position information of a target space point provided in an embodiment of the present application, specifically, as follows:

[0085] S201, determining a marking point position from a plurality of spatial point position information;

[0086] In the embodiment of the present application, any position is selected from the plurality of spatial point position information corresponding to the three-dimensional image data of the area to be detected for marking, which can be recorded as the marking point position;

[0087] For example, the location of the mark point can be marked with A mark (u,v,w) represents.

[0088] S203, determining the marked spatial position of the endoscope lens of the endoscope in the area to be inspected based on the marked point position;

[0089] In the embodiment of the present application, the target marking point position corresponding to the marking point position in the detection area can be determined based on the marking point position;

[0090] In the embodiment of the present application, based on the position of the marking point in the three-dimensional image data of the area to be detected, the target marking point position corresponding to the marking point position is selected in the actual area to be detected; wherein the actual area to be detected may be the area to be detected on the target object, for example, it may be the bronchus and other areas on the human body;

[0091] Specifically, the marker point position and the target marker point position may refer to the same position in the area to be detected;

[0092] When the endoscope moves to the target marking point position, the marking space position of the endoscope lens is obtained;

[0093] In the embodiment of the present application, the marked spatial position may be the position of the endoscope lens when the endoscope is moved to the target marked point position of the area to be detected during the actual use of the endoscope;

[0094] For example, marking a spatial position can be done with B mark (x,y,z) represents.

[0095] S205, performing matrix calculation based on the marked spatial position and the marked point position to obtain a first transformation matrix corresponding to the plurality of spatial point position information;

[0096] In the embodiment of the present application, the offset matrix can be determined based on the marking space position and the marking point position;

[0097] Specifically, the offset matrix may be determined based on the offset vector between the marker space position and the marker point position;

[0098] Among them, the offset matrix T(xu,yv,zw);

[0099] In the embodiment of the present application, the projection matrix M can be calculated based on the offset matrix T and the matrix conversion rule;

[0100] Specifically, the projection matrix M can be

[0101] Specifically, the projection matrix M may be used as the first transformation matrix.

[0102] In another embodiment of the present application, when projecting the position information of multiple spatial points into the real-time detection image of the endoscope, no rotation is required, so the offset matrix T can also be directly used as the first transformation matrix.

[0103] S207, based on the first conversion matrix, project the plurality of spatial point position information onto the detection image of the endoscope to obtain target spatial point position information corresponding to each of the spatial point position information.

[0104] In the embodiment of the present application, when the first transformation matrix is ​​the projection matrix M, the target space point position information B i The calculation formula is:

[0105] In the embodiment of the present application, when the first transformation matrix is ​​the offset matrix T(xu, yv, zw), the target space point position information B i The calculation formula is B i =A i +T.

[0106] In the embodiment of the present application, the transparency of the target projection area can be adjusted according to actual needs;

[0107] Specifically, the transparency of the image of the target projection area and the display image of the original three-dimensional image data of the area to be inspected can be made the same.

[0108] The transparency of the image of the target projection area may also be set to 0, that is, only the outline of the target projection area is displayed; the display screen of the image collected by the endoscope itself will not be blocked.

[0109] S105, obtaining the current spatial position and current orientation of the endoscope lens;

[0110] In the embodiment of the present application, the current spatial position of the endoscope lens may be the coordinate position of the lens center of the endoscope lens;

[0111] Specifically, the current orientation of the endoscope lens may be determined based on the current spatial position of the endoscope lens.

[0112] In the embodiments of the present application, Figure 3 , which is a flow chart of a method for determining the current orientation of an endoscope lens provided in an embodiment of the present application, specifically, as follows:

[0113] S301, obtaining the current coordinates of the lens center of the endoscope lens;

[0114] In an embodiment of the present application, a posture sensor provided on the endoscope lens is used to obtain the current coordinates of the center of the lens; wherein the posture sensor can be used to detect its position and three-dimensional posture.

[0115] Specifically, if the posture sensor is set at the center of the endoscope lens, the coordinates of the posture sensor collected by the posture sensor are the current coordinates of the lens center;

[0116] If the posture sensor is set on the endoscope lens and the distance between it and the lens center is m, the current coordinates of the lens center can be calculated based on the coordinates of the posture sensor collected by the posture sensor and the distance m.

[0117] S303, determining the Euler angle of the lens center according to the current coordinates;

[0118] In an embodiment of the present application, the posture sensor may determine the Euler angle of the lens center based on the acquired coordinates of the lens center;

[0119] S305: Determine the current orientation of the endoscope lens according to the Euler angle of the lens center.

[0120] In an embodiment of the present application, a direction vector based on the Euler angle can be calculated based on the nutation angle θ, the precession angle (i.e., the precession angle) ψ, and the rotation angle φ in the Euler angle, and the direction vector can represent the orientation of the endoscope lens at the current position.

[0121] S107, respectively calculating the distance between each target space point position information and the current space position, to obtain the corresponding target distance between the current space position and each target space point position information;

[0122] In the embodiment of the present application, the distance between each target position information and the current spatial position may be calculated respectively;

[0123] Specifically, the current spatial position of the endoscope can be expressed as C cur (X cur ,Y cur ,Z cur )express;

[0124] Calculate each target location information B i With C cur The target distance between

[0125] Specifically, the target distance can be represented by L;

[0126] Specifically,

[0127] S109, if it is determined based on the distances of each target that the positional relationship between the current spatial position and the area to be detected meets a preset condition, then a target detection image corresponding to the area to be detected is generated based on the current orientation of the endoscope lens and the position information of each target spatial point, wherein the target detection image is used to represent a two-dimensional image corresponding to the current orientation in the area to be detected detected by the endoscope;

[0128] In the embodiment of the present application, if the positional relationship between the current spatial position and the area to be detected is determined based on each target distance to meet the preset condition, before generating the target detection image corresponding to the area to be detected based on the current orientation of the endoscope lens and the position information of each target spatial point, the positional relationship between the current spatial position of the endoscope lens and the area to be detected can be determined based on each target distance;

[0129] Specifically, it can be determined whether the distance of each target is less than or equal to a preset threshold value;

[0130] If there is at least one target distance less than a preset threshold, determining that the positional relationship between the current spatial position of the endoscope lens and the area to be detected meets a preset condition, and executing the step of generating a target detection image;

[0131] In the embodiment of the present application, if there is a target distance among all target distances that is less than a preset threshold, it can be determined that the positional relationship between the current spatial position of the endoscope lens and the area to be detected meets the preset condition;

[0132] Specifically, the preset condition may be that the current spatial position of the endoscope lens is within a preset range outside the area to be detected;

[0133] Specifically, the distance between the current spatial position of the endoscope lens and at least one point in the area to be detected may be less than a preset distance threshold;

[0134] Preferably, the distance between the current spatial position of the endoscope lens and at least one point in the area to be detected may be less than 1 mm.

[0135] In an embodiment of the present application, if the current spatial position of the endoscope lens is within a preset range outside the area to be detected, a target detection image corresponding to the area to be detected is generated based on the current orientation of the endoscope lens and the position information of each target spatial point.

[0136] In an embodiment of the present application, a target detection image corresponding to the area to be detected is generated based on the current orientation of the endoscope lens and the position information of each target space point, including the following steps:

[0137] Determine a second transformation matrix of the target space point position information based on the current orientation of the endoscope lens and characteristic information of the imaging device of the endoscope;

[0138] In the embodiment of the present specification, the imaging device of the endoscope may be a camera, and its characteristic information may include the center of the camera pixel and the imaging device to B i The offset vector between the shooting points;

[0139] In the embodiment of this specification, a rotation matrix is ​​calculated based on the current orientation of the endoscope lens to obtain a rotation matrix;

[0140] Specifically, the current orientation can be represented by a vector determined by Euler angles; further, the rotation matrix can be calculated based on the Euler angles of the endoscope lens center;

[0141] Specifically, the following steps may be included:

[0142] Get the current coordinates of the lens center of the endoscope lens;

[0143] Determine the Euler angle of the lens center according to the current coordinates of the lens center;

[0144] Specifically, the current orientation of the endoscope lens can be measured using T i (θ, φ, ψ) represents; where θ represents the nutation angle, ψ represents the precession angle and φ represents the rotation angle;

[0145] Perform matrix calculation based on Euler angles to obtain the current orientation of the endoscope lens and determine the rotation matrix

[0146] Based on the T i The calculation process of the rotation matrix R (θ, φ, ψ) is as follows:

[0147]

[0148]

[0149]

[0150] Then, R = R x *R y *R z

[0151] In the embodiment of the present specification, a transformation matrix is ​​calculated based on the characteristic information of the imaging device of the endoscope and the rotation matrix to obtain a second transformation matrix corresponding to the position information of the target space point.

[0152] Specifically, it can be based on the center of the camera pixel and the imaging device to B i The offset vector and the rotation matrix between the shooting points are calculated to obtain a second transformation matrix corresponding to the position information of the target space point;

[0153] Specifically, the second transformation matrix may be a projection matrix P;

[0154] Furthermore, taking the imaging device as a camera as an example, its projection matrix P is expressed as:

[0155]

[0156] Among them, 1 / dx (pixel / mm) and 1 / dy (pixel / mm) are the conversion factors from the image coordinate system to the pixel coordinate system, u0, v0 are the centers of the camera pixels; T0 is the distance from the camera to B i The offset vector between the capture points.

[0157] Generate a target detection image corresponding to the area to be detected based on the second conversion matrix and the position information of each target space point;

[0158] In the embodiment of the present specification, each target space point position information is transformed based on the second transformation matrix to obtain the target position information corresponding to each target space point position information;

[0159] Specifically, the target position information is two-dimensional coordinate information, which can be expressed as K i (u,v) indicates;

[0160] K i The calculation formula is:

[0161]

[0162] From the above calculation formula, we can get the two-dimensional target position information K after the position information of each target space point is transformed by the projection matrix P: i .

[0163] Generate corresponding target detection images based on the geometric figures corresponding to each target position information.

[0164] In the embodiment of the present application, a geometric image is drawn based on the position information of each target, and all the drawn geometric images are spliced ​​to obtain a target detection image;

[0165] Specifically, the target detection image may be a two-dimensional image of the area to be detected detected by the endoscope at the current viewing angle.

[0166] It can be seen from the embodiments of the endoscopic image detection method, device, equipment and storage medium provided by the present application that the embodiments of the present application obtain three-dimensional image data of the area to be detected and multiple spatial point position information corresponding to the three-dimensional image data; based on a preset projection rule, the multiple spatial point position information is projected into the real-time detection image of the endoscope to obtain target spatial point position information corresponding to each spatial point position information, wherein the target spatial point position information represents the position information of the target point in the target projection area in the real-time detection image of the endoscope; the current spatial position and current orientation of the endoscope lens are obtained; the distance between each target spatial point position information and the current spatial position is calculated respectively, to obtain the target distance corresponding to the current spatial position and each target spatial point position information; if the positional relationship between the current spatial position and the area to be detected is determined to meet the preset conditions based on each target distance, then based on the endoscope The current orientation of the endoscope lens and the position information of each target spatial point generate a target detection image corresponding to the area to be detected, wherein the target detection image is used to represent the two-dimensional image corresponding to the current orientation in the area to be detected detected by the endoscope; using the technical solution provided in the embodiment of this specification, the spatial point position information in the three-dimensional image data of the area to be detected can be projected into the real-time detection image of the endoscope during the use of the endoscope, so that the endoscope can detect in real time whether the endoscope has reached the area to be detected based on the target spatial point position information corresponding to each spatial point position information obtained by the projection, and determine the target detection image of the endoscope based on the target spatial point position information after the endoscope reaches the area to be detected; this design not only allows the doctor to view the spatial point position information of the area to be detected in real time on the display screen of the endoscope, but also improves the accuracy of the position of the target detection image detected by the endoscope.

[0167] The present application also provides an endoscope image detection device, such as Figure 4 As shown, it is a structural schematic diagram of an endoscopic image detection device provided in an embodiment of the present application; specifically, the device includes:

[0168] A first acquisition module 410 is used to acquire three-dimensional image data of the area to be detected and position information of multiple spatial points corresponding to the three-dimensional image data;

[0169] The position information determination module 420 is used to project the position information of multiple spatial points into the real-time detection image of the endoscope based on a preset projection rule, and obtain the target spatial point position information corresponding to each spatial point position information, wherein the target spatial point position information represents the position information of the target point in the target projection area in the real-time detection image of the endoscope;

[0170] A second acquisition module 430 is used to acquire the current spatial position and current orientation of the endoscope lens;

[0171] The distance determination module 440 is used to calculate the distance between each target space point position information and the current space position, and obtain the corresponding target distance between the current space position and each target space point position information;

[0172] The image determination module 450 is used to generate a target detection image corresponding to the area to be detected based on the current orientation of the endoscope lens and the position information of each target space point if the positional relationship between the current spatial position and the area to be detected based on the distances to each target meets a preset condition, wherein the target detection image is used to represent a two-dimensional image corresponding to the current orientation in the area to be detected detected by the endoscope.

[0173] In the embodiment of the present application, the location information determination module 420 includes:

[0174] A first determining unit, used to determine a marking point position from a plurality of spatial point position information;

[0175] A second determining unit, used to determine the marked spatial position of the endoscope lens of the endoscope in the area to be detected based on the position of the marked point;

[0176] A first calculation and determination unit, configured to perform matrix calculation based on the marked spatial position and the marked point position to obtain a first transformation matrix corresponding to the plurality of spatial point position information;

[0177] The position information determining unit is used to project multiple spatial point position information into the detection image of the endoscope based on the first conversion matrix to obtain target spatial point position information corresponding to each spatial point position information.

[0178] In the embodiment of the present application, the second acquisition module 430 includes:

[0179] A first acquisition unit, used to acquire the current coordinates of the lens center of the endoscope lens;

[0180] A third determining unit, configured to determine the Euler angle of the lens center according to the current coordinates of the lens center;

[0181] The fourth determining unit is used to determine the current orientation of the endoscope lens according to the Euler angle of the lens center.

[0182] In the embodiment of the present application, it also includes:

[0183] A judgment module, used to judge whether the distance of each target is less than or equal to a preset threshold;

[0184] The position relationship determination module is used to determine whether the position relationship between the current spatial position of the endoscope lens and the area to be detected meets the preset conditions if there is at least one target distance less than a preset threshold, and execute the target detection image generation step.

[0185] In the embodiment of the present application, the image determination module 460 includes:

[0186] A matrix determination unit, used to calculate a conversion matrix based on the current orientation of the endoscope lens and characteristic information of an imaging device of the endoscope to obtain a second conversion matrix of the target space point position information;

[0187] The image determination unit is used to generate a target detection image corresponding to the area to be detected based on the second conversion matrix and the position information of each target space point.

[0188] In an embodiment of the present application, the matrix determination unit includes:

[0189] A first matrix determination subunit is used to calculate a rotation matrix based on the current orientation of the endoscope lens to obtain a rotation matrix;

[0190] The second matrix determination subunit calculates the transformation matrix based on the characteristic information of the imaging device of the endoscope and the rotation matrix to obtain a second transformation matrix corresponding to the target space point position information.

[0191] In an embodiment of the present application, the first matrix determination subunit includes:

[0192] An acquisition submodule, used to acquire the current coordinates of the lens center of the endoscope lens;

[0193] A determination submodule, used to determine the Euler angle of the lens center according to the current coordinates of the lens center;

[0194] Matrix calculation is performed based on the Euler angle to obtain the current orientation of the endoscope lens to determine the rotation matrix.

[0195] In an embodiment of the present application, the image determination unit includes:

[0196] A position information determination subunit, configured to perform matrix transformation on the position information of each target space point based on a second transformation matrix to obtain target position information corresponding to the position information of each target space point;

[0197] The image determination subunit is used to generate a corresponding target detection image based on the geometric figures corresponding to each target position information.

[0198] In the embodiment of the present application, it also includes:

[0199] A fourth acquisition module, used for acquiring medical images;

[0200] A three-dimensional reconstruction module is used to perform three-dimensional reconstruction on the medical image to obtain a three-dimensional structure diagram corresponding to the medical image;

[0201] An image segmentation module is used to perform image segmentation processing on the three-dimensional structure image to obtain three-dimensional image data of the area to be detected;

[0202] The position information determination module is used to determine the position information of multiple spatial points corresponding to the three-dimensional image data from the three-dimensional image data of the area to be detected.

[0203] An embodiment of the present application provides an endoscopic image detection device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the endoscopic image detection method as described in the above method embodiment.

[0204] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.

[0205] Figure 5 The schematic diagram of the structure of an endoscopic image detection device provided in an embodiment of the present application, the internal structure of the endoscopic image detection device may include but is not limited to: a processor, a network interface and a memory, wherein the processor, the network interface and the memory in the endoscopic image detection device can be connected by a bus or other means, as shown in the embodiment of the present specification Figure 5 The example of connecting through bus is taken in the following.

[0206] Among them, the processor (or CPU (Central Processing Unit)) is the computing core and control core of the endoscopic image detection device. The network interface may optionally include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.). The memory is a memory device in the endoscopic image detection device, which is used to store programs and data. It is understandable that the memory here can be a high-speed RAM storage device, or a non-volatile storage device (non-volatile memory), such as at least one disk storage device; optionally, it can also be at least one storage device located away from the aforementioned processor. The memory provides a storage space, which stores the operating system of the endoscopic image detection device, which may include but is not limited to: Windows system (an operating system), Linux (an operating system), etc., and this application does not limit this; and, in the storage space, one or more instructions suitable for being loaded and executed by the processor are also stored, and these instructions can be one or more computer programs (including program codes). In an embodiment of the present application, the processor loads and executes one or more instructions stored in the memory to implement the endoscopic image detection method provided by the above method embodiment.

[0207] An embodiment of the present application also provides a computer-readable storage medium, which can be set in an endoscopic image detection device to store at least one instruction, at least one program, a code set or an instruction set related to an endoscopic image detection method in an embodiment of the method. The at least one instruction, the at least one program, the code set or the instruction set can be loaded and executed by a processor of the electronic device to implement the endoscopic image detection method provided by the above-mentioned method embodiment.

[0208] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0209] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0210] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.

[0211] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0212] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0213] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. An endoscopic image detection method, characterized in that: The method includes: Acquire three-dimensional image data of the area to be detected and position information of multiple spatial points corresponding to the three-dimensional image data; Based on a preset projection rule, the multiple spatial point position information is projected into the real-time detection image of the endoscope to obtain target spatial point position information corresponding to each spatial point position information, including: determining the marked point position from the multiple spatial point position information; determining the marked spatial position of the endoscope lens of the endoscope in the area to be detected based on the marked point position; performing matrix calculation based on the marked spatial position and the marked point position to obtain a first transformation matrix corresponding to the multiple spatial point position information; based on the first transformation matrix, the multiple spatial point position information is projected into the detection image of the endoscope to obtain target spatial point position information corresponding to each spatial point position information; wherein the target spatial point position information represents the position information of the target point in the target projection area in the real-time detection image of the endoscope; Acquire the current spatial position and current orientation of the endoscope lens, wherein the process of acquiring the current orientation includes: acquiring the current coordinates of the lens center of the endoscope lens; determining the Euler angle of the lens center according to the current coordinates of the lens center; and determining the current orientation of the endoscope lens according to the Euler angle of the lens center; Calculating the distance between each target space point position information and the current space position respectively to obtain the target distances corresponding to each other between the current space position and each target space point position information; Determine respectively whether each target distance is less than or equal to a preset threshold; if there is at least one target distance less than the preset threshold, generate a target detection image corresponding to the area to be detected based on the current orientation of the endoscope lens and the position information of each target space point, wherein the target detection image is used to represent a two-dimensional image corresponding to the current orientation in the area to be detected detected by the endoscope.

2. The endoscopic image detection method according to claim 1, characterized in that: The generating of the target detection image corresponding to the area to be detected based on the current orientation of the endoscope lens and the position information of each target space point includes: Performing conversion matrix calculation based on the current orientation of the endoscope lens and characteristic information of the imaging device of the endoscope to obtain a second conversion matrix of the target space point position information; A target detection image corresponding to the area to be detected is generated based on the second transformation matrix and the position information of each target space point.

3. The endoscopic image detection method according to claim 2, characterized in that: The step of calculating a conversion matrix based on the current orientation of the endoscope lens and the characteristic information of the imaging device of the endoscope to obtain a second conversion matrix of the target space point position information includes: Calculating a rotation matrix based on the current orientation of the endoscope lens to obtain a rotation matrix; A transformation matrix is ​​calculated based on the characteristic information of the imaging device of the endoscope and the rotation matrix to obtain a second transformation matrix corresponding to the target space point position information.

4. The endoscopic image detection method according to claim 3, characterized in that: The calculation of the rotation matrix based on the current orientation of the endoscope lens to obtain the rotation matrix includes: Obtaining the current coordinates of the lens center of the endoscope lens; Determine the Euler angle of the lens center according to the current coordinates of the lens center; A rotation matrix is ​​calculated based on the Euler angles to obtain a rotation matrix for determining the current orientation of the endoscope lens.

5. The endoscopic image detection method according to claim 2, characterized in that: The generating the target detection image corresponding to the to-be-detected area based on the second transformation matrix and the position information of each target space point includes: Performing matrix transformation on the position information of each target space point based on the second transformation matrix to obtain the target position information corresponding to the position information of each target space point; Generate corresponding target detection images based on the geometric figures corresponding to each target position information.

6. The endoscopic image detection method according to claim 1, characterized in that: Before acquiring the three-dimensional image data of the area to be detected and the position information of multiple spatial points corresponding to the three-dimensional image data, the method further includes: Acquiring medical images; Performing three-dimensional reconstruction on the medical image to obtain a three-dimensional structure diagram corresponding to the medical image; Performing image segmentation processing on the three-dimensional structure image to obtain three-dimensional image data of the area to be detected; A plurality of spatial point position information corresponding to the three-dimensional image data is determined from the three-dimensional image data of the area to be detected.

7. An endoscopic image detection device, characterized in that: The device comprises: A first acquisition module, used to acquire three-dimensional image data of the area to be detected and position information of multiple spatial points corresponding to the three-dimensional image data; A position information determination module, for projecting the plurality of spatial point position information onto a real-time detection image of an endoscope based on a preset projection rule, and obtaining target spatial point position information corresponding to each spatial point position information, including: determining a mark point position from the plurality of spatial point position information; determining the mark spatial position of the endoscope lens of the endoscope in the area to be detected based on the mark point position; performing matrix calculation based on the mark spatial position and the mark point position, and obtaining a first transformation matrix corresponding to the plurality of spatial point position information; projecting the plurality of spatial point position information onto the detection image of the endoscope based on the first transformation matrix, and obtaining target spatial point position information corresponding to each spatial point position information; wherein the target spatial point position information represents the position information of the target point in the target projection area in the real-time detection image of the endoscope; A second acquisition module is used to acquire the current spatial position and current orientation of the endoscope lens, wherein the process of acquiring the current orientation includes: acquiring the current coordinates of the lens center of the endoscope lens; determining the Euler angle of the lens center according to the current coordinates of the lens center; and determining the current orientation of the endoscope lens according to the Euler angle of the lens center. A distance determination module is used to calculate the distance between each target space point position information and the current space position, and obtain the corresponding target distance between the current space position and each target space point position information; An image determination module is used to determine whether the distance of each target is less than or equal to a preset threshold value; if there is at least one target distance less than the preset threshold value, a target detection image corresponding to the area to be detected is generated based on the current orientation of the endoscope lens and the position information of each target space point, wherein the target detection image is used to represent a two-dimensional image corresponding to the current orientation in the area to be detected detected by the endoscope.

8. An endoscope image detection device, characterized in that: The device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the endoscopic image detection method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor. The endoscopic image detection method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Endoscope robot control method and device based on pressure sensor information

    CN105796043A

  • Image processing device and image processing method

    CN107106110A

  • Real-time three-dimensional reconstruction method applied to binocular endoscope medical image

    CN110033465A

  • Target detection method and apparatus

    US20200320296A1