WO2023138619A1 - Endoscope image processing method and apparatus, readable medium, and electronic device - Google Patents

Endoscope image processing method and apparatus, readable medium, and electronic device Download PDF

Info

Publication number
WO2023138619A1
WO2023138619A1 PCT/CN2023/072905 CN2023072905W WO2023138619A1 WO 2023138619 A1 WO2023138619 A1 WO 2023138619A1 CN 2023072905 W CN2023072905 W CN 2023072905W WO 2023138619 A1 WO2023138619 A1 WO 2023138619A1
Authority
WO
WIPO (PCT)
Prior art keywords
tissue
image
tissue image
endoscope
sample
Prior art date
Application number
PCT/CN2023/072905
Other languages
French (fr)
Chinese (zh)
Inventor
边成
李永会
杨延展
杨志雄
Original Assignee
小荷医疗器械(海南)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 小荷医疗器械(海南)有限公司 filed Critical 小荷医疗器械(海南)有限公司
Publication of WO2023138619A1 publication Critical patent/WO2023138619A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10068Endoscopic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30241Trajectory

Definitions

  • the present disclosure relates to the technical field of image processing, and in particular, to a processing method, device, readable medium, and electronic device for an endoscope image.
  • endoscopy As a commonly used and effective inspection method, endoscopy has been widely used in the medical field because it can visually observe the internal tissues of the human body. When the endoscope enters the internal tissues of the human body for inspection, there may be blind spots in the field of vision. If the blind spots are too large, it may lead to missed inspections and further lead to invalid inspections.
  • An optional solution is to perform 3D modeling based on the images collected by the endoscope to determine the proportion of the blind area. Whether the 3D modeling is accurate will directly affect the accuracy of the proportion of the blind area.
  • the present disclosure provides a method for processing endoscopic images, the method comprising:
  • the proportion of the blind area during the endoscopic examination is determined.
  • the present disclosure provides an endoscopic image processing device, the device comprising:
  • An acquisition module configured to acquire a set of tissue images collected by the endoscope in the tissue to be measured, the set of tissue images including a plurality of tissue images arranged according to the acquisition time;
  • a positioning module configured to determine a depth image and a pose parameter corresponding to each of the tissue images according to the tissue image set;
  • a trajectory determination module configured to determine the movement trajectory of the endoscope according to the posture parameters corresponding to each of the tissue images
  • a contour determination module configured to determine the contour of the tissue to be measured according to the depth image corresponding to each of the tissue images
  • a processing module configured to determine a blind area ratio during the endoscopic inspection process according to the motion track and the contour of the tissue to be measured.
  • the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect of the present disclosure are implemented.
  • an electronic device including:
  • a processing device configured to execute the computer program in the storage device to implement the steps of the method described in the first aspect of the present disclosure.
  • the present disclosure first acquires the tissue images collected by the endoscope in the tissue to be measured according to multiple collection moments. Then, according to the tissue image set, the depth image and pose parameters corresponding to each tissue image are determined. Then, according to the posture parameters corresponding to each tissue image, the motion trajectory of the endoscope is determined, and according to the depth image corresponding to each tissue image, the contour of the tissue to be measured is determined. Finally, according to the motion trajectory and the outline of the tissue to be measured, the proportion of the blind area during the endoscopic examination is determined.
  • the present disclosure uses the depth image corresponding to the tissue image to And posture parameters, determine the trajectory of the endoscope and the outline of the tissue to be tested, and determine the proportion of the blind area in the inspection process, which can realize the monitoring of the inspection range, effectively avoid missed inspections, and ensure the effectiveness of endoscopic inspection.
  • Fig. 1 is a flow chart of a method for processing endoscopic images according to an exemplary embodiment
  • Fig. 2 is a flow chart of another endoscopic image processing method shown according to an exemplary embodiment
  • Fig. 3 is a flow chart of another endoscopic image processing method shown according to an exemplary embodiment
  • Fig. 4 is a schematic diagram showing the outline of the tissue to be measured according to an exemplary embodiment
  • Fig. 5 is a schematic diagram of a positioning model according to an exemplary embodiment
  • Fig. 6 is a flow chart of another endoscopic image processing method shown according to an exemplary embodiment
  • Fig. 7 is a schematic diagram of a depth sub-model and an attitude sub-model according to an exemplary embodiment
  • Fig. 8 is a flowchart showing a training positioning model according to an exemplary embodiment
  • Fig. 9 is a schematic diagram of another attitude sub-model according to an exemplary embodiment.
  • Fig. 10 is a flow chart showing another training positioning model according to an exemplary embodiment
  • Fig. 11 is a flow chart of another endoscopic image processing method shown according to an exemplary embodiment
  • Fig. 12 is a block diagram of an endoscopic image processing device according to an exemplary embodiment
  • Fig. 13 is a block diagram of another endoscopic image processing device according to an exemplary embodiment
  • Fig. 14 is a block diagram of another endoscopic image processing device according to an exemplary embodiment
  • Fig. 15 is a block diagram of another endoscopic image processing device according to an exemplary embodiment
  • Fig. 16 is a block diagram of an electronic device according to an exemplary embodiment.
  • the term “comprise” and its variations are open-ended, ie “including but not limited to”.
  • the term “based on” is “based at least in part on”.
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
  • Fig. 1 is a flowchart of a method for processing endoscopic images according to an exemplary embodiment. As shown in Fig. 1, the method may include the following steps:
  • Step 101 acquire a tissue image set collected by an endoscope in a tissue to be measured, the tissue image set includes a plurality of tissue images arranged according to the acquisition time.
  • the endoscope will continuously collect histograms in the tissue to be tested according to the preset collection cycle image to get an organized image set.
  • the tissue image set may include multiple tissue images arranged according to the acquisition time, and the interval between the acquisition time corresponding to any two adjacent tissue images is the acquisition period.
  • multiple tissue images collected within a preset time period can be used as a tissue image set, or a preset number of tissue images (for example: 100) collected continuously can be used as a tissue image set, which is not specifically limited in the present disclosure.
  • the endoscope described in the embodiments of the present disclosure may be, for example, a colonoscope, a gastroscope, etc.
  • the tissue to be measured is the intestinal tract, and the tissue image is the intestinal tract image.
  • the tissue to be measured may be the esophagus, stomach, or duodenum, and the image of the above tissue may be an image of the esophagus, stomach, or duodenum.
  • the endoscope can also be used to acquire images of other tissues, which is not specifically limited in the present disclosure.
  • tissue image set it may first be judged whether the plurality of tissue images contained therein are valid, so as to filter out invalid tissue images. If a tissue image is an invalid image, the tissue image can be discarded directly. If the tissue image is a valid image, the tissue image can be retained to obtain a filtered tissue image set, which can reduce unnecessary data processing and improve processing speed. For example, a pre-trained recognition model can be used to recognize each tissue image in the tissue image set to determine whether the tissue image is valid.
  • the recognition model can be, for example, CNN (English: Convolutional Neural Networks, Chinese: Convolutional Neural Network) or LSTM (English: Long Short-Term Memory, Chinese: Long Short-Term Memory Network), or an Encoder in a Transformer (such as a Vision Transformer), which is not specifically limited in this disclosure.
  • each tissue image in the tissue image set may also be preprocessed, which may be understood as performing enhancement processing on the data included in each tissue image. In order to ensure the quality of the tissue image, the preprocessing will not modify the blur or color of the tissue image.
  • the preprocessing can include: multi-crop processing, flip processing (including: left-right flip, up-down flip, rotation, etc.), random affine transformation, size transformation (English: Resize) and other processing.
  • the final preprocessed tissue image can be an image of a specified size (for example, it can be 384*384).
  • Step 102 according to the tissue image set, determine the depth image and pose parameters corresponding to each tissue image.
  • the depth image and pose parameters corresponding to each tissue image may be sequentially determined.
  • the depth image corresponding to each tissue image includes the depth (also can be understood as distance) of each pixel in the tissue image, so the corresponding depth image can reflect the geometry of the visible surface in the tissue image without being affected by the texture, color, etc. in the tissue image, that is, the corresponding depth image can represent the structural information of the tissue to be measured corresponding to the tissue image.
  • the attitude parameters corresponding to each tissue image can be understood as the attitude parameters of the endoscope when acquiring the tissue image, and the attitude parameters corresponding to multiple continuous tissue images can represent the movement process of the endoscope in the tissue to be measured.
  • the attitude parameters can include, for example, a rotation matrix and a translation vector.
  • Step 103 according to the posture parameters corresponding to each tissue image, determine the movement trajectory of the endoscope.
  • Step 104 Determine the contour of the tissue to be measured according to the depth image corresponding to each tissue image.
  • the posture parameters corresponding to each tissue image in the tissue image set can represent the movement process of the endoscope in the tissue to be measured, so the motion trajectory of the endoscope in the tissue to be measured can be obtained according to the posture parameters corresponding to each tissue image, and the motion trajectory can include the position of the endoscope when acquiring each tissue image, and can also include the angle of the endoscope when acquiring each tissue image.
  • the corresponding depth image can represent the structural information of the tissue corresponding to the tissue image. Therefore, the contour of the tissue to be measured can be obtained according to the depth image corresponding to each tissue image.
  • the contour of the tissue to be measured can reflect the overall shape of the tissue to be measured, and can also be understood as a template of the tissue to be measured. If the endoscope is a colonoscope as an example, then the tissue to be tested is the intestinal tract, and the outline of the tissue to be tested can be a distorted cylinder. Specifically, the centerline of the tissue to be measured can be determined according to multiple depth images corresponding to the tissue image set, and then the contour of the tissue to be measured can be obtained according to a preset radius.
  • Modeling may also be performed according to multiple depth images corresponding to the tissue image set to obtain the outline of the tissue to be measured, which is not specifically limited in the present disclosure. It should be noted that the execution order of step 103 and step 104 shown in FIG. 1 is an exemplary implementation manner, and step 104 may be executed first, and then step 103 may be executed, or step 103 and step 104 may be executed simultaneously, which is not specifically limited in the present disclosure.
  • Step 105 according to the motion trajectory and the outline of the tissue to be measured, determine the proportion of the blind area during the endoscopic examination.
  • the field of view of the endoscope when capturing each tissue image can be determined according to the position and angle of the endoscope when capturing each tissue image.
  • the field of view can be understood as the area of the tissue to be measured that the endoscope can observe when capturing the tissue image.
  • the visual field areas corresponding to each tissue image can be spliced to obtain the area that can be observed during the endoscopic examination, so as to obtain the blind area ratio during the endoscopic examination.
  • the blind area ratio can be understood as the ratio of the blind area (that is, the part that cannot be observed in the field of view of the endoscope) to the outline of the tissue to be measured during the endoscopic examination. Determining the proportion of the blind area on the basis of the depth image and the motion track can reflect the inspection range in the inspection process in time, thereby avoiding missed inspections and ensuring the effectiveness of endoscopic inspections.
  • the tissue images collected by the endoscope in the tissue to be measured are acquired according to multiple acquisition moments. Then, according to the tissue image set, the depth image and pose parameters corresponding to each tissue image are determined. Then, according to the posture parameters corresponding to each tissue image, the motion trajectory of the endoscope is determined, and according to the depth image corresponding to each tissue image, the contour of the tissue to be measured is determined. Finally, according to the motion trajectory and the outline of the tissue to be measured, the proportion of the blind area during the endoscopic examination is determined.
  • the present disclosure determines the movement trajectory of the endoscope and the outline of the tissue to be measured, and determines the blind area ratio in the inspection process, so as to realize the monitoring of the inspection range and effectively avoid missed inspections, thereby ensuring the effectiveness of endoscopic inspection.
  • step 102 may be:
  • the depth image and attitude parameters corresponding to the tissue image are determined through the pre-trained positioning model, and the collection time of the historical tissue image is before the collection time of the tissue image.
  • each tissue image and the corresponding historical tissue image may be sequentially input into the pre-trained positioning model, so that the positioning model determines the corresponding depth image and pose parameters of the tissue image according to the tissue image and the corresponding historical tissue image.
  • the collection time of the corresponding historical tissue image is before the collection time of the tissue image, that is, the tissue image set
  • the corresponding historical tissue image is located before the tissue image, which may be the tissue image set, the previous tissue image before the tissue image.
  • the tissue image collected by the endoscope at time t can be denoted as It
  • the historical tissue image corresponding to the tissue image can be denoted as It-1, that is, the image collected by the endoscope at time t-1.
  • the positioning model can be understood as a SLAM (English: Simultaneous Localization and Mapping, Chinese: Simultaneous Localization and Mapping) model, which can simultaneously determine the corresponding depth image and attitude parameters according to each tissue image and the historical tissue image corresponding to the tissue image.
  • the positioning model can determine the depth image corresponding to each tissue image, and there is no need to add a depth sensor when the endoscope is inspected, which is convenient for operation and saves costs.
  • the positioning model can determine the attitude parameters to accurately obtain the motion trajectory of the endoscope.
  • the pose parameters may include a rotation matrix and a translation vector
  • the motion trajectory may include the position and angle of the endoscope when capturing each tissue image.
  • the implementation manner of step 103 is:
  • the position and angle of the endoscope when acquiring the historical tissue image corresponding to the tissue image are determined.
  • the position and angle of the endoscope when acquiring the tissue image can be determined according to the posture parameters corresponding to each tissue image, and then the position and angle of the endoscope when acquiring all the tissue images can be arranged according to the sequence indicated by the acquisition time, so as to obtain the movement trajectory of the endoscope.
  • the position of the endoscope when acquiring the tissue image can be determined according to the position of the historical tissue image corresponding to the tissue image and the translation vector corresponding to the tissue image in sequence
  • the angle of the endoscope when acquiring the tissue image can be determined according to the angle when the endoscope acquires the historical tissue image corresponding to the tissue image and the rotation matrix corresponding to the tissue image.
  • the position and angle of the first tissue image in the tissue image set can be set as a preset initial position and initial angle, and then the position and angle of the second tissue image can be determined according to the position and angle of the first tissue image, and the corresponding rotation matrix and translation vector of the second tissue image. Then determine the position and angle of the third tissue image according to the position and angle of the second tissue image, and the corresponding rotation matrix and translation vector of the third tissue image, and so on, to obtain the movement track of the endoscope in the tissue to be measured.
  • Fig. 2 is a flowchart of another endoscopic image processing method shown according to an exemplary embodiment, as shown in Fig. 2, step 104 may include:
  • Step 1041 Determine the centerline of the tissue to be measured according to the depth image corresponding to each tissue image.
  • Step 1042 determine the outline of the tissue to be measured according to the centerline of the tissue to be measured.
  • the midpoint of the tissue to be measured in the tissue image can be determined, and then the midpoints of the tissue to be measured in each tissue image can be connected to obtain the centerline of the tissue to be measured. Then, according to the preset radius and centerline, the outline of the tissue to be measured is determined.
  • the contour of the intestinal tract is a cylinder established according to the preset radius and centerline.
  • the manner of determining the midpoint of the tissue to be measured in each tissue image may first determine the distance of boundaries in the tissue image (for example, may include: left boundary, right boundary, upper boundary, lower boundary, etc.), and then determine a point that is equally distant from each boundary in the depth image as the midpoint of the tissue to be measured in the tissue image.
  • Fig. 3 is a flow chart of another endoscopic image processing method shown according to an exemplary embodiment. As shown in Fig. 3, the implementation of step 105 may include:
  • Step 1051 according to the position and angle of the endoscope when collecting each tissue image, and the viewing angle of the endoscope, determine the field of view corresponding to the tissue image.
  • Step 1052 Determine the total visual field area according to the visual field area corresponding to each tissue image.
  • Step 1053 according to the total field of view and the outline of the tissue to be measured, determine the proportion of the blind area.
  • the field of view of the endoscope when acquiring each tissue image can be determined according to the position and angle of the endoscope when acquiring each tissue image, and the viewing angle of the endoscope itself.
  • the viewing angle of the endoscope is determined by the optical lens of the endoscope, and the viewing angle may be, for example, 100 degrees or 120 degrees.
  • the field of view area can be understood as the area of the tissue to be measured covered by the tissue image. Take the outline of the tissue to be measured as shown in Figure 4 as an example, wherein the thick solid line represents the outline of the tissue to be measured (for the convenience of presentation, a two-dimensional section is used here to represent the outline of the tissue to be measured.
  • the outline of the tissue to be measured is three-dimensional, such as a cylinder), where k(0) represents the position of the endoscope at time t0.
  • the angle of the endoscope at time t0 can be expressed as ⁇ (0) (it should be noted that ⁇ (0) is not shown in FIG. It can be obtained that the field of view corresponding to the tissue image collected at time t0 is point A to point B on the contour.
  • a Monte Carlo method (English: Monte Carlo method) can be used to evenly distribute X test points (X ⁇ 100) on the contour of the tissue to be tested, and then determine the area of the visual field according to the number of test points included in the visual field.
  • the visual field area corresponding to each tissue image can be spliced to obtain the total visual field area.
  • the visual field areas corresponding to each tissue image can be summed, and the summation result can be used as the total visual field area, or the test points covered in the visual field areas corresponding to each tissue image can be summed to obtain the total number of test points included in the total visual field area, which can be used as the total visual field area.
  • the ratio of the total visual field area to the total area of the outline of the tissue to be measured can be used as the ratio of the observation area, and then (1-the ratio of the observation area) can be used as the ratio of the blind area.
  • the total number of test points included in the total field of view is Y, that is, Y test points are covered in the area that can be observed during the endoscopic examination, and there are X test points distributed on the outline of the tissue to be tested, so the ratio of the observation area can be determined to be Y/X first, and then the ratio of the blind area can be further determined to be 1-Y/X.
  • step 1051 may be implemented through the following steps:
  • Step 1) Convert the position of the endoscope when acquiring the tissue image into a center position corresponding to the center line of the tissue to be measured according to the posture parameters corresponding to each tissue image.
  • Step 2) Determine the central viewing angle corresponding to the central position according to the posture parameters corresponding to the tissue image, the viewing angle of the endoscope, and the angle of the endoscope when collecting the tissue image.
  • Step 3 Determine the maximum viewing area corresponding to the center position.
  • Step 4) Determine the field of view corresponding to the tissue image according to the central viewing angle and the maximum field of view.
  • the position and viewing angle of the endoscope may be converted to the central position and central viewing angle on the centerline of the tissue to be measured. It can be understood that, when the endoscope is at the position when the tissue image is collected, the field of view that can be observed by the endoscope according to the angle when the tissue image is collected is the same as the field of view that the endoscope can observe by the central perspective according to the angle when the tissue image is collected at the central position. Also shown in Fig.
  • d(0) indicates that the position of the endoscope at time t0 is converted to the center position on the center line
  • the viewing angle of the endoscope is ⁇
  • the corresponding central viewing angle can be ⁇ , so that the field of view observed by the endoscope at the central viewing angle on d(0) according to the angle when the tissue image is collected is also from point A to point B.
  • the central position and the corresponding central viewing angle can be determined in the following ways:
  • a vertical line can be drawn from the position of the endoscope when the tissue image is collected to the outline of the tissue to be measured, and the position where the vertical line intersects the center line is the center position, ie d(0). Then, a geometric transformation can be performed according to the viewing angle ⁇ of the endoscope and the angle of the endoscope when collecting the tissue image, so as to obtain the central viewing angle ⁇ .
  • the maximum viewing area corresponding to the central position can be determined.
  • the maximum viewing area corresponding to the center position can be understood as the maximum range that the endoscope can observe at the center position, that is, the maximum range that can be observed by rotating the optical lens of the endoscope by 360 degrees.
  • the structure of the positioning model may be as shown in FIG. 5 , which includes: a depth sub-model and an attitude sub-model.
  • the input of the depth sub-model and the input of the attitude sub-model are used as the input of the positioning model
  • the output of the depth sub-model and the output of the attitude sub-model are used as the output of the positioning model.
  • Fig. 6 is a flow chart showing another endoscopic image processing method according to an exemplary embodiment.
  • the positioning model includes: a depth sub-model and an attitude sub-model.
  • Step 102 may include:
  • Step 1021 Input the tissue image into the depth sub-model to obtain a depth image corresponding to the tissue image output by the depth sub-model.
  • the tissue image can be used as an input of the depth sub-model, and the depth sub-model can output a depth image corresponding to the tissue image.
  • the structure of the depth sub-model can be shown in (a) in Figure 7, which can be a UNet structure, which includes multiple stride convolution layers (English: stride conv) to downsample the tissue image, for example, it can downsample to 1/8 of the resolution of the tissue image, and then use multiple transpose convolution layers (English: transpose conv) to upsample to the resolution of the tissue image to obtain the depth image corresponding to the tissue image.
  • multiple stride convolution layers English: stride conv
  • transpose convolution layers English: transpose conv
  • Step 1022 input the tissue image and the corresponding historical tissue image into the pose sub-model, so as to obtain the pose parameters corresponding to the tissue image output by the pose sub-model.
  • the tissue image and the corresponding historical tissue image can be used as input of the attitude sub-model, and the attitude sub-model can output the rotation matrix and translation vector corresponding to the tissue image.
  • the tissue image and the corresponding historical tissue image may be concatenated (English: Concat), so as to input the concatenated result into the attitude sub-model.
  • the structure of the pose sub-model can be shown in (b) in Figure 7, which can be a ResNet structure (for example, ResNet34).
  • the stitching result of the tissue image and the corresponding historical tissue image is input into the initial convolution pooling layer, through multiple residual blocks (English: Residual block) in the middle, and finally the rotation matrix and translation vector corresponding to the tissue image are output by the fully connected layer.
  • Fig. 8 is a flow chart showing a training positioning model according to an exemplary embodiment. As shown in Fig. 8, the positioning model is trained through the following steps:
  • Step A input the sample tissue image into the depth sub-model to obtain the sample depth image corresponding to the sample tissue image, and input the historical sample tissue image into the depth sub-model to obtain the historical sample depth image corresponding to the historical sample tissue image, the historical sample tissue image is an image collected before the sample tissue image.
  • a sample tissue image (denoted as I a ) is used as an input of the depth sub-model, and the depth sub-model can output a sample depth image (denoted as D a ) corresponding to the sample tissue image.
  • the historical sample tissue image (denoted as I b ) is used as the input of the depth sub-model, and the depth sub-model can output the historical sample depth image (denoted as D b ) corresponding to the historical sample tissue image.
  • the sample tissue image may be obtained by extracting frames from an endoscopic video, and the endoscopic video may be a video recorded during a previous endoscopic examination, and may be obtained by selecting different endoscopic examinations for different users. Further, when frame-picking the endoscopic video, invalid images (such as images blocked by obstacles, overexposed, and low in definition) can be filtered out.
  • the historical sample tissue image is the tissue image of the previous frame of the sample tissue image.
  • Step B input the sample tissue image and the historical sample tissue image into the attitude sub-model to obtain the output of the attitude sub-model, the sample attitude parameters corresponding to the sample tissue image and the internal parameters of the endoscope for collecting the sample tissue image.
  • the endoscopic internal parameters include focal length and translation size.
  • the sample tissue image and the historical sample tissue image can be used as the input of the attitude sub-model, and the attitude sub-model can output the sample attitude parameters corresponding to the sample tissue image and the internal parameters of the endoscope (denoted as K) for collecting the sample tissue image.
  • the internal parameters of the endoscope may include focal length and translation size
  • the sample attitude parameters include a sample rotation matrix (represented as R) and a sample translation vector (represented as t).
  • the sample tissue image and the historical sample tissue image may be spliced, so as to input the spliced result into the pose sub-model.
  • the attitude sub-model can also add a linear layer (represented as an intrinsic layer) on the basis of the convolutional pooling layer, multiple residual blocks, and fully connected layers, as shown in Figure 9.
  • the fully connected layer (denoted as pose layer) outputs the sample pose parameters, and the linear layer is able to output endoscopic intrinsic parameters.
  • the form of the internal parameter K of the endoscope can be:
  • f x and f y respectively represent the focal length of the endoscope in the X and Y directions (in pixels), and c x and cy represent the origin at X, Y, respectively.
  • the attitude sub-model can obtain the internal parameters of the endoscope while obtaining the attitude parameters of the sample. It is not necessary to calibrate the endoscope in advance, which is easy to operate, and can be adapted to various endoscopes, which improves the scope of application of the depth sub-model.
  • step C the target loss is determined according to the internal parameters of the endoscope, the sample depth image, the historical sample depth image and the sample pose parameters.
  • Step D with the goal of reducing the target loss, use the backpropagation algorithm to train the localization model.
  • the localization model can be trained by using the backpropagation algorithm.
  • the sample tissue images and historical sample tissue images used to train the positioning model can be quickly obtained without pre-labeling. That is to say, the positioning model adopts an unsupervised learning training method.
  • the initial learning rate for training the positioning model can be set to: 1e-2
  • the Batch size can be set to: 16*4
  • the optimizer can be set to: SGD
  • the Epoch can be set to: 500
  • the size of the sample tissue image can be set to: 384 ⁇ 384.
  • Fig. 10 is a flow chart showing another training positioning model according to an exemplary embodiment. As shown in Fig. 10 , the implementation of step C may include:
  • Step C1 according to the sample depth image, the sample attitude parameters and the internal parameters of the endoscope, the historical sample tissue images are interpolated to obtain the interpolated tissue images.
  • Step C2 determining the photometric loss according to the sample tissue image and the interpolated tissue image.
  • differentiable bilinear interpolation can be performed on historical sample tissue images by using the sample depth image, sample attitude parameters, and endoscope internal parameters to obtain an interpolated tissue image.
  • Luminosity loss is thereby determined from the sample tissue image and the interpolated tissue image.
  • the interpolated tissue image can be understood as an image obtained by observing content in the sample tissue image from the perspective of collecting historical sample tissue images.
  • the pixel gray level of the same spatial point should be fixed in each image. Therefore, when the images collected from different viewing angles are converted to another viewing angle, the pixels at the same position in the two images under the same viewing angle should be the same. Therefore, the photometric loss can be understood as the difference between the sample tissue image and the interpolated tissue image.
  • the photometric loss can be determined by formula 1:
  • L p represents the photometric loss
  • p represents the pixel point
  • N represents the effective pixel point in the sample tissue image
  • represents the number of effective pixel points.
  • I a (p) represents the pixel value of p in the sample tissue image
  • I' a (p) represents the pixel value of p in the interpolated tissue image.
  • 1 means the L1 norm, which is more robust to discrete points.
  • Step C3 determining a smoothing loss according to the gradient of the sample depth image and the gradient of the sample tissue image.
  • the smoothing loss can be determined according to the gradient of the sample depth image and the gradient of the sample tissue image.
  • the smoothing loss can ensure that the sample depth image is generated under the guidance of the sample tissue image, so that the generated sample depth image can retain more gradient information at the edge, that is, the edge is more obvious and the detail information is richer.
  • the smoothing loss can be determined by formula 2:
  • L s represents the smoothing loss
  • Step C4 transforming the sample depth image into a first depth image according to the sample pose parameters and the internal parameters of the endoscope.
  • Step C5 transforming the historical sample depth image into a second depth image according to the sample pose parameters and the internal parameters of the endoscope.
  • Step C6 determining consistency loss according to the first depth image and the second depth image.
  • the sample depth image can be transformed into the first depth image (expressed as ), and transform the historical sample depth image into a second depth image (denoted as D b ') by using the sample pose parameters and the internal parameters of the endoscope.
  • the first depth image can be understood as converting the sample depth image into a depth image obtained by observing content in the sample tissue image from the perspective of collecting historical sample tissue images through attitude transformation.
  • the second depth image can be understood as a depth image obtained by observing content in the sample tissue image from the perspective of collecting the historical sample tissue image by interpolating the historical sample depth image.
  • the consistency loss is then determined based on the first depth image and the second depth image. That is, the consistency loss can reflect the difference between the first depth image and the second depth image.
  • consistency loss can be propagated to multiple sample depth images, which also ensures the scale consistency of multiple sample depth images, which is equivalent to smoothing multiple sample depth images to ensure spatial consistency.
  • the consistency loss can be determined by formula 3:
  • L G represents the consistency loss
  • D' b (p) represents the depth of p in the second depth image
  • Step C7 determining the target loss according to the photometric loss, smoothing loss and consistency loss.
  • the target loss can be determined from photometric loss, smoothness loss and consistency loss.
  • the weighted sum of photometric loss, smoothing loss and consistency loss can be obtained by formula 4 to obtain the target loss:
  • ⁇ , ⁇ , and ⁇ are weights corresponding to photometric loss, smoothing loss, and consistency loss, respectively, where ⁇ can be 0.7, ⁇ can be 0.7, and ⁇ can be 0.3.
  • step C2 may include:
  • Luminosity loss is determined according to the sample tissue image, the interpolated tissue image, and the structural similarity between the sample tissue image and the interpolated tissue image.
  • SSIM English: Structural Similarity, Chinese: Structural Similarity
  • SSIM can reflect the similarity of local structures.
  • the improved photometric loss can be determined by Equation 5:
  • ⁇ 1 and ⁇ 2 represent the preset weights respectively
  • SSIM(p) represents the pixel-by-pixel SSIM between the sample tissue image and the interpolated tissue image.
  • ⁇ 1 can be 0.7
  • ⁇ 2 can be 0.3.
  • the pixel-by-pixel SSIM between the sample tissue image and the interpolated tissue image can be determined by formula 6:
  • x represents the image block centered on p in the sample tissue image (the size can be 3*3)
  • y represents the image block centered on p in the interpolation tissue image is an image block of the same size in the center
  • ⁇ x represents the average value of pixel values in x
  • ⁇ y represents the average value of pixel values in y
  • ⁇ x represents the standard deviation of pixel values in x
  • ⁇ y represents the standard deviation of pixel values in y.
  • ⁇ 1 and ⁇ 2 represent preset constants
  • ⁇ 1 may be, for example, 0.0001
  • ⁇ 2 may be, for example, 0.0009.
  • Fig. 11 is a flowchart of another endoscopic image processing method shown according to an exemplary embodiment. As shown in Fig. 11, after step 105, the method may further include:
  • Step 106 outputting the ratio of the blind area, and sending a prompt message when the ratio of the blind area is greater than or equal to a preset ratio threshold, the prompt message is used to indicate that there is a risk of missed detection.
  • the blind area ratio can be output, for example, the blind area ratio can be displayed in real time on a display interface for displaying tissue images, so as to display the inspection range during endoscopy in real time.
  • a prompt message can be sent to remind the doctor that there is a large blind spot in the current field of view of the endoscope, and there is a risk of missed detection.
  • the presentation form of the prompt information may include: at least one of a text form, an image form, and a sound form.
  • the prompt information can be text or image prompts such as "the current risk of missed detection is high”, “please re-examine”, “please perform back-up”, etc., and the prompt information can also be voice prompts, beeps with a specified frequency, or alarm sounds.
  • the doctor can adjust the direction of the endoscope according to the prompt information, or execute the withdrawal of the endoscope, or re-examine.
  • the proportion of blind spots can be monitored in real time during the endoscopic examination by the doctor, and a prompt can be given when the proportion of blind spots is large, thereby effectively avoiding missed detection and ensuring the effectiveness of endoscopic examination.
  • the tissue images collected by the endoscope in the tissue to be measured are acquired according to multiple acquisition moments. Then, according to the tissue image set, the depth image and pose parameters corresponding to each tissue image are determined. Then, according to the posture parameters corresponding to each tissue image, the motion trajectory of the endoscope is determined, and according to the depth image corresponding to each tissue image, the contour of the tissue to be measured is determined. Finally, according to the motion trajectory and the outline of the tissue to be measured, the proportion of the blind area during the endoscopic examination is determined.
  • the present disclosure determines the movement trajectory of the endoscope and the outline of the tissue to be measured, and determines the blind area ratio in the inspection process, so as to realize the monitoring of the inspection range and effectively avoid missed inspections, thereby ensuring the effectiveness of endoscopic inspection.
  • Fig. 12 is a block diagram of an endoscopic image processing device according to an exemplary embodiment. As shown in Fig. 12, the device 200 may include:
  • the acquisition module 201 is configured to acquire a tissue image set collected by the endoscope in the tissue to be measured, and the tissue image set includes a plurality of tissue images arranged according to the acquisition time.
  • the positioning module 202 is configured to determine the depth image and pose parameters corresponding to each tissue image according to the tissue image set.
  • the trajectory determination module 203 is configured to determine the movement trajectory of the endoscope according to the posture parameters corresponding to each tissue image, and the movement trajectory includes the position and angle of the endoscope when each tissue image is collected.
  • the contour determination module 204 is configured to determine the contour of the tissue to be measured according to the depth image corresponding to each tissue image.
  • the processing module 205 is configured to determine the proportion of the blind area during the endoscopic inspection process according to the motion track and the outline of the tissue to be measured.
  • the positioning module 202 can be used for:
  • the depth image and attitude parameters corresponding to the tissue image are determined through the pre-trained positioning model, and the collection time of the historical tissue image is before the collection time of the tissue image.
  • the attitude parameters may include a rotation matrix and a translation vector
  • the motion trajectory may include the position and angle of the endoscope when capturing each tissue image.
  • the trajectory determination module 203 can be used for:
  • the position and angle of the endoscope when acquiring the historical tissue image corresponding to the tissue image are determined.
  • Fig. 13 is a block diagram of another endoscopic image processing device shown according to an exemplary embodiment.
  • the contour determination module 204 may include:
  • the centerline determination sub-module 2041 is configured to determine the centerline of the tissue to be measured according to the depth image corresponding to each tissue image.
  • the contour determination sub-module 2042 is configured to determine the contour of the tissue to be measured according to the centerline of the tissue to be measured.
  • Fig. 14 is a block diagram of another endoscopic image processing device according to an exemplary embodiment.
  • the processing module 205 may include:
  • the field of view determination sub-module 2051 is configured to determine the field of view corresponding to the tissue image according to the position and angle of the endoscope when collecting each tissue image, and the viewing angle of the endoscope.
  • the total visual field determination sub-module 2052 is configured to determine the total visual field area according to the visual field area corresponding to each tissue image.
  • the blind area determination sub-module 2053 is configured to determine the proportion of the blind area according to the total visual field area and the outline of the tissue to be measured.
  • the field of view determining submodule 2051 can be used to implement the following steps:
  • Step 1) Convert the position of the endoscope when acquiring the tissue image into a center position corresponding to the center line of the tissue to be measured according to the posture parameters corresponding to each tissue image.
  • Step 2) Determine the central viewing angle corresponding to the central position according to the posture parameters corresponding to the tissue image, the viewing angle of the endoscope, and the angle of the endoscope when collecting the tissue image.
  • Step 3 Determine the maximum viewing area corresponding to the center position.
  • Step 4) Determine the field of view corresponding to the tissue image according to the central viewing angle and the maximum field of view.
  • the positioning model includes: a depth sub-model and an attitude sub-model.
  • the positioning module 202 can be used for:
  • the tissue image is input into the depth sub-model to obtain a depth image corresponding to the tissue image output by the depth sub-model.
  • the tissue image and the corresponding historical tissue image are input into the attitude sub-model, so as to obtain the attitude parameters corresponding to the tissue image output by the attitude sub-model.
  • the localization model is trained by the following steps:
  • Step A input the sample tissue image into the depth sub-model to obtain the sample depth image corresponding to the sample tissue image, and input the historical sample tissue image into the depth sub-model to obtain the historical sample depth image corresponding to the historical sample tissue image, the historical sample tissue image is an image collected before the sample tissue image.
  • Step B input the sample tissue image and the historical sample tissue image into the attitude sub-model to obtain the output of the attitude sub-model, the sample attitude parameters corresponding to the sample tissue image and the internal parameters of the endoscope for collecting the sample tissue image.
  • the endoscopic internal parameters include focal length and translation size.
  • step C the target loss is determined according to the internal parameters of the endoscope, the sample depth image, the historical sample depth image and the sample pose parameters.
  • Step D with the goal of reducing the target loss, use the backpropagation algorithm to train the localization model.
  • step C may include:
  • Step C1 according to the sample depth image, the sample attitude parameters and the internal parameters of the endoscope, the historical sample tissue images are interpolated to obtain the interpolated tissue images.
  • Step C2 determining the photometric loss according to the sample tissue image and the interpolated tissue image.
  • Step C3 determining a smoothing loss according to the gradient of the sample depth image and the gradient of the sample tissue image.
  • Step C4 transforming the sample depth image into a first depth image according to the sample pose parameters and the internal parameters of the endoscope.
  • Step C5 transforming the historical sample depth image into a second depth image according to the sample pose parameters and the internal parameters of the endoscope.
  • Step C6 determining consistency loss according to the first depth image and the second depth image.
  • Step C7 determining the target loss according to the photometric loss, smoothing loss and consistency loss.
  • step C2 may include:
  • Luminosity loss is determined according to the sample tissue image, the interpolated tissue image, and the structural similarity between the sample tissue image and the interpolated tissue image.
  • Fig. 15 is a block diagram of another endoscopic image processing device according to an exemplary embodiment. As shown in Fig. 15, the device 200 may also include:
  • the prompting module 206 is configured to output the blind area ratio after determining the blind area ratio during the endoscopic examination according to the motion track and the outline of the tissue to be measured, and send a prompt message when the blind area ratio is greater than or equal to a preset ratio threshold, and the prompt information is used to indicate that there is a risk of missed detection.
  • the tissue images collected by the endoscope in the tissue to be measured are acquired according to multiple acquisition moments. Then, according to the tissue image set, the depth image and pose parameters corresponding to each tissue image are determined. Then, according to the posture parameters corresponding to each tissue image, the motion trajectory of the endoscope is determined, and according to the depth image corresponding to each tissue image, the contour of the tissue to be measured is determined. Finally, according to the motion trajectory and the outline of the tissue to be measured, the proportion of the blind area during the endoscopic examination is determined.
  • the present disclosure is based on the depth image corresponding to the tissue image and the attitude parameter Number, determine the trajectory of the endoscope and the outline of the tissue to be tested, and determine the proportion of the blind area in the inspection process, which can monitor the inspection range, effectively avoid missed inspections, and ensure the effectiveness of endoscopic inspection.
  • FIG. 16 it shows a schematic structural diagram of an electronic device (for example, the executive body of the embodiment of the present disclosure, which may be a terminal device or a server) 300 suitable for implementing the embodiments of the present disclosure.
  • the terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG. 16 is only an example, and should not limit the functions and application scope of the embodiments of the present disclosure.
  • an electronic device 300 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 301, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303.
  • ROM read-only memory
  • RAM random access memory
  • various programs and data necessary for the operation of the electronic device 300 are also stored.
  • the processing device 301, ROM 302, and RAM 303 are connected to each other through a bus 304.
  • An input/output (I/O) interface 305 is also connected to the bus 304 .
  • the following devices may be connected to the I/O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309.
  • the communication means 309 may allow the electronic device 300 to perform wireless or wired communication with other devices to exchange data. While FIG. 16 shows electronic device 300 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 309, or from storage means 308, or from ROM 302.
  • the processing device 301 When the computer program is executed by the processing device 301, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the terminal device and the server can communicate using any currently known or future-developed network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can be interconnected with any form or medium of digital data communication (for example, a communication network).
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include local area networks ("LANs”), wide area networks ("WANs”), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: acquires a set of tissue images collected by the endoscope in the tissue to be measured, and the set of tissue images includes a plurality of tissue images arranged according to the acquisition time; according to the set of tissue images, determine the depth image and attitude parameters corresponding to each of the tissue images; determine the motion trajectory of the endoscope according to the attitude parameters corresponding to each of the tissue images; Outline of the tissue to be measured to determine the blindness during the endoscopic examination area ratio.
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and conventional procedural programming languages—such as the “C” language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
  • LAN local area network
  • WAN wide area network
  • Internet service provider e.g., via the Internet using an Internet service provider
  • each block in the flowchart or block diagram may represent a module, program segment, or portion of code that includes one or more executable instructions for implementing specified logical functions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • the modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation of the module itself under certain circumstances, for example, the obtaining module may also be described as "a module for obtaining the tissue image set".
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs System on Chips
  • CPLDs Complex Programmable Logic Devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • a machine-readable storage medium would include one or more wire-based electrical connections, a portable computer disk, a hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage devices or any suitable combination of the foregoing.
  • Example 1 provides a method for processing an endoscope image, comprising: acquiring a tissue image set collected by an endoscope in a tissue to be measured, the tissue image set including a plurality of tissue images arranged according to the acquisition time; according to the tissue image set, determining a depth image and an attitude parameter corresponding to each tissue image; determining a motion track of the endoscope according to the attitude parameter corresponding to each tissue image; A blind zone ratio during the endoscopy procedure is determined.
  • Example 2 provides the method of Example 1.
  • determining the depth image and attitude parameters corresponding to each tissue image includes: sequentially according to each tissue image and the historical tissue image corresponding to the tissue image, and using a pre-trained positioning model to determine the depth image and attitude parameters corresponding to the tissue image.
  • the acquisition time of the historical tissue image is before the acquisition time of the tissue image.
  • Example 3 provides the method of Example 1, the attitude parameters include a rotation matrix and translation vector, and the motion trajectory includes the position and angle of the endoscope when acquiring each of the tissue images; determining the movement trajectory of the endoscope according to the attitude parameters corresponding to each of the tissue images includes: determining the position and angle of the endoscope when acquiring the tissue image according to the rotation matrix and translation vector corresponding to each of the tissue images, and the position and angle of the endoscope when acquiring the historical tissue image corresponding to the tissue image.
  • Example 4 provides the method of Example 1.
  • the determining the contour of the tissue to be measured according to the depth image corresponding to each of the tissue images includes: determining the centerline of the tissue to be measured according to the depth image corresponding to each of the tissue images; and determining the contour of the tissue to be measured according to the centerline of the tissue to be measured.
  • Example 5 provides the method of Example 1.
  • the determining the blind area ratio during the endoscopic examination according to the motion track and the outline of the tissue to be measured includes: determining the field of view area corresponding to the tissue image according to the position and angle of the endoscope when collecting each tissue image and the viewing angle of the endoscope; determining the total field of view area according to the field of view area corresponding to each tissue image; and determining the blind area ratio according to the total field of view area and the outline of the tissue to be tested.
  • Example 6 provides the method of Example 5.
  • determining the field of view corresponding to the tissue image includes: according to the attitude parameters corresponding to each of the tissue images, converting the position of the endoscope when acquiring the tissue images into a center position corresponding to the center line of the tissue to be measured; Determine the central viewing angle corresponding to the central position; determine the maximum visual field area corresponding to the central position; determine the visual field area corresponding to the tissue image according to the central viewing angle and the maximum visual field area.
  • Example 7 provides the method of Example 2, wherein the positioning model includes: a depth sub-model and a pose sub-model; determining the depth image and pose parameters corresponding to the tissue image through the pre-trained positioning model according to each tissue image and the historical tissue image corresponding to the tissue image in turn, including: inputting the tissue image into the depth sub-model to obtain the depth image corresponding to the tissue image output by the depth sub-model; inputting the tissue image and the corresponding historical tissue image into the pose sub-model to obtain the pose corresponding to the tissue image output by the pose sub-model parameters.
  • Example 8 provides the method of Example 7.
  • the positioning model is obtained through the following steps of training: inputting the sample tissue image into the depth sub-model to obtain the sample depth image corresponding to the sample tissue image, and inputting the historical sample tissue image into the depth sub-model to obtain the historical sample depth image corresponding to the historical sample tissue image, the historical sample tissue image is an image collected before the sample tissue image;
  • the sample posture parameters corresponding to the image and the internal parameters of the endoscope for collecting the sample tissue image, the internal parameters of the endoscope include focal length and translation size; according to the internal parameters of the endoscope, the sample depth image, the historical sample depth image and the sample posture parameters, determine the target loss; aiming at reducing the target loss, use the back propagation algorithm to train the positioning model.
  • Example 9 provides the method of Example 8.
  • the determining target loss according to the internal parameters of the endoscope, the sample depth image, the historical sample depth image, and the sample pose parameters includes: performing interpolation on the historical sample tissue image according to the sample depth image, the sample pose parameter, and the endoscope internal parameters to obtain an interpolated tissue image; determining a photometric loss according to the sample tissue image and the interpolated tissue image; transforming the sample depth image into a first depth image according to the sample pose parameter and the endoscope internal parameter; transforming the historical sample depth image into a second depth image according to the sample pose parameter and the endoscope internal parameter; determining a consistency loss according to the first depth image and the second depth image; determining the target loss according to the photometric loss, the smoothing loss, and the consistency loss.
  • Example 10 provides the method of Example 9, the determining the photometric loss according to the sample tissue image and the interpolated tissue image includes: determining the photometric loss according to the sample tissue image, the interpolated tissue image, and the structural similarity between the sample tissue image and the interpolated tissue image.
  • Example 11 provides the methods of Examples 1 to 10. After determining the blind area ratio during the endoscopic inspection according to the motion track and the contour of the tissue to be tested, the method further includes: outputting the blind area ratio, and sending a prompt message when the blind area ratio is greater than or equal to a preset ratio threshold, and the prompt information is used to indicate that there is a risk of missed detection.
  • Example 12 provides an endoscope image processing device, including: an acquisition module, used to acquire a tissue image set collected by an endoscope in a tissue to be measured, the tissue image set including a plurality of tissue images arranged according to the acquisition time; a positioning module, used to determine the depth image and posture parameters corresponding to each of the tissue images according to the tissue image set; a trajectory determination module, used to determine the movement trajectory of the endoscope according to the posture parameters corresponding to each of the tissue images; The outline of the tissue to be measured; a processing module, configured to determine a blind area ratio during the endoscopic inspection process according to the motion track and the outline of the tissue to be measured.
  • an acquisition module used to acquire a tissue image set collected by an endoscope in a tissue to be measured, the tissue image set including a plurality of tissue images arranged according to the acquisition time
  • a positioning module used to determine the depth image and posture parameters corresponding to each of the tissue images according to the tissue image set
  • a trajectory determination module used to determine the movement trajectory of the endo
  • Example 13 provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the methods described in Example 1 to Example 11 are implemented.
  • Example 14 provides an electronic device, including: a storage device, on which a computer program is stored; a processing device, configured to execute the computer program in the storage device, so as to implement the steps of the methods described in Example 1 to Example 11.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Radiology & Medical Imaging (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Multimedia (AREA)
  • Medical Informatics (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Endoscopes (AREA)
  • Image Analysis (AREA)

Abstract

The present invention relates to the technical field of image processing, and relates to an endoscope image processing method and apparatus, a readable medium, and an electronic device. The method comprises: obtaining a tissue image set collected by an endoscope in a tissue to be tested; determining, according to the tissue image set, a depth image and an attitude parameter corresponding to each tissue image; determining a motion trajectory of the endoscope according to the attitude parameter corresponding to each tissue image; determining, according to the depth image corresponding to each tissue image, a contour of the tissue to be tested; and determining a blind area proportion in an endoscope examination process according to the motion trajectory and the contour of the tissue to be tested. According to the present invention, the motion trajectory of the endoscope and the contour of the tissue to be tested are determined according to the depth image and the attitude parameter corresponding to each tissue image, and on this basis, the blind area proportion in the examination process is determined, so that the monitoring of an examination range can be achieved, and missed examinations can be effectively avoided, thereby ensuring the effectiveness of an endoscope examination.

Description

内窥镜图像的处理方法、装置、可读介质和电子设备Endoscopic image processing method, device, readable medium and electronic equipment
相关申请的交叉引用Cross References to Related Applications
本申请要求于2022年01月21日提交的,申请号为202210074391.6、发明名称为“内窥镜图像的处理方法、装置、可读介质和电子设备”的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with application number 202210074391.6 and titled "Processing Method, Device, Readable Medium, and Electronic Equipment for Endoscopic Image" filed on January 21, 2022. The entire content of this application is incorporated by reference in this application.
技术领域technical field
本公开涉及图像处理技术领域,具体地,涉及一种内窥镜图像的处理方法、装置、可读介质和电子设备。The present disclosure relates to the technical field of image processing, and in particular, to a processing method, device, readable medium, and electronic device for an endoscope image.
背景技术Background technique
内窥镜检查作为一种常用、有效的检查手段,由于能够直观地观察到人体内部组织的情况,在医疗领域得到了广泛应用。在内窥镜进入人体内部组织进行检查时,视野中可能存在盲区,如果盲区过大,可能导致漏检,进一步导致检查无效。一种可选的解决方案是根据内窥镜采集的图像进行三维建模,以确定盲区的比例,三维建模是否准确,直接影响盲区比例的准确度。由于人体组织(例如:肠道、胃等)是软组织,内窥镜在进入软组织的过程中,不可避免会触碰到软组织的组织壁,使得软组织产生较大的位移,导致三维建模的结果出现误差。同时,检查过程中如果碰到息肉,检查人员会有冲水、切除息肉等行为,也会降低三维建模的准确度。As a commonly used and effective inspection method, endoscopy has been widely used in the medical field because it can visually observe the internal tissues of the human body. When the endoscope enters the internal tissues of the human body for inspection, there may be blind spots in the field of vision. If the blind spots are too large, it may lead to missed inspections and further lead to invalid inspections. An optional solution is to perform 3D modeling based on the images collected by the endoscope to determine the proportion of the blind area. Whether the 3D modeling is accurate will directly affect the accuracy of the proportion of the blind area. Since human tissues (such as intestines, stomach, etc.) are soft tissues, the endoscope will inevitably touch the tissue walls of the soft tissues during the process of entering the soft tissues, causing large displacements of the soft tissues, resulting in errors in the results of 3D modeling. At the same time, if a polyp is encountered during the inspection, the inspector will flush water, remove the polyp, etc., which will also reduce the accuracy of the 3D modeling.
发明内容Contents of the invention
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。This Summary is provided to introduce a simplified form of concepts that are described in detail later in the Detailed Description. This summary of the invention is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.
第一方面,本公开提供一种内窥镜图像的处理方法,所述方法包括:In a first aspect, the present disclosure provides a method for processing endoscopic images, the method comprising:
获取内窥镜在待测组织内采集的组织图像集,所述组织图像集中包括按照采集时刻排列的多个组织图像;Obtaining a set of tissue images collected by the endoscope in the tissue to be tested, the set of tissue images including a plurality of tissue images arranged according to the acquisition time;
根据所述组织图像集,确定每个所述组织图像对应的深度图像和姿态参数;Determining a depth image and a pose parameter corresponding to each of the tissue images according to the tissue image set;
根据每个所述组织图像对应的姿态参数,确定所述内窥镜的运动轨迹;determining the motion trajectory of the endoscope according to the posture parameters corresponding to each of the tissue images;
根据每个所述组织图像对应的深度图像,确定所述待测组织的轮廓;determining the contour of the tissue to be measured according to the depth image corresponding to each of the tissue images;
根据所述运动轨迹和所述待测组织的轮廓,确定所述内窥镜检查过程中的盲区比例。According to the motion trajectory and the outline of the tissue to be measured, the proportion of the blind area during the endoscopic examination is determined.
第二方面,本公开提供一种内窥镜图像的处理装置,所述装置包括:In a second aspect, the present disclosure provides an endoscopic image processing device, the device comprising:
获取模块,用于获取内窥镜在待测组织内采集的组织图像集,所述组织图像集中包括按照采集时刻排列的多个组织图像;An acquisition module, configured to acquire a set of tissue images collected by the endoscope in the tissue to be measured, the set of tissue images including a plurality of tissue images arranged according to the acquisition time;
定位模块,用于根据所述组织图像集,确定每个所述组织图像对应的深度图像和姿态参数;A positioning module, configured to determine a depth image and a pose parameter corresponding to each of the tissue images according to the tissue image set;
轨迹确定模块,用于根据每个所述组织图像对应的姿态参数,确定所述内窥镜的运动轨迹;A trajectory determination module, configured to determine the movement trajectory of the endoscope according to the posture parameters corresponding to each of the tissue images;
轮廓确定模块,用于根据每个所述组织图像对应的深度图像,确定所述待测组织的轮廓;A contour determination module, configured to determine the contour of the tissue to be measured according to the depth image corresponding to each of the tissue images;
处理模块,用于根据所述运动轨迹和所述待测组织的轮廓,确定所述内窥镜检查过程中的盲区比例。A processing module, configured to determine a blind area ratio during the endoscopic inspection process according to the motion track and the contour of the tissue to be measured.
第三方面,本公开提供一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现本公开第一方面所述方法的步骤。In a third aspect, the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect of the present disclosure are implemented.
第四方面,本公开提供一种电子设备,包括:In a fourth aspect, the present disclosure provides an electronic device, including:
存储装置,其上存储有计算机程序;a storage device on which a computer program is stored;
处理装置,用于执行所述存储装置中的所述计算机程序,以实现本公开第一方面所述方法的步骤。A processing device configured to execute the computer program in the storage device to implement the steps of the method described in the first aspect of the present disclosure.
通过上述技术方案,本公开首先获取内窥镜在待测组织内按照多个采集时刻采集的组织图像。再根据组织图像集,确定每个组织图像对应的深度图像以及姿态参数。之后根据每个组织图像对应的姿态参数,确定内窥镜的运动轨迹,并根据每个组织图像对应的深度图像,确定待测组织的轮廓。最后根据运动轨迹和待测组织的轮廓,确定内窥镜检查过程中的盲区比例。本公开根据组织图像对应的深度图像以 及姿态参数,确定内窥镜的运动轨迹和待测组织的轮廓,并以此确定检查过程中的盲区比例,能够实现对检查范围的监控,有效避免漏检,从而保证内窥镜检查的有效性。Through the above technical solution, the present disclosure first acquires the tissue images collected by the endoscope in the tissue to be measured according to multiple collection moments. Then, according to the tissue image set, the depth image and pose parameters corresponding to each tissue image are determined. Then, according to the posture parameters corresponding to each tissue image, the motion trajectory of the endoscope is determined, and according to the depth image corresponding to each tissue image, the contour of the tissue to be measured is determined. Finally, according to the motion trajectory and the outline of the tissue to be measured, the proportion of the blind area during the endoscopic examination is determined. The present disclosure uses the depth image corresponding to the tissue image to And posture parameters, determine the trajectory of the endoscope and the outline of the tissue to be tested, and determine the proportion of the blind area in the inspection process, which can realize the monitoring of the inspection range, effectively avoid missed inspections, and ensure the effectiveness of endoscopic inspection.
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。Other features and advantages of the present disclosure will be described in detail in the detailed description that follows.
附图说明Description of drawings
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。在附图中:The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale. In the attached picture:
图1是根据一示例性实施例示出的一种内窥镜图像的处理方法的流程图;Fig. 1 is a flow chart of a method for processing endoscopic images according to an exemplary embodiment;
图2是根据一示例性实施例示出的另一种内窥镜图像的处理方法的流程图;Fig. 2 is a flow chart of another endoscopic image processing method shown according to an exemplary embodiment;
图3是根据一示例性实施例示出的另一种内窥镜图像的处理方法的流程图;Fig. 3 is a flow chart of another endoscopic image processing method shown according to an exemplary embodiment;
图4是根据一示例性实施例示出的待测组织的轮廓的示意图;Fig. 4 is a schematic diagram showing the outline of the tissue to be measured according to an exemplary embodiment;
图5是根据一示例性实施例示出的一种定位模型的示意图;Fig. 5 is a schematic diagram of a positioning model according to an exemplary embodiment;
图6是根据一示例性实施例示出的另一种内窥镜图像的处理方法的流程图;Fig. 6 is a flow chart of another endoscopic image processing method shown according to an exemplary embodiment;
图7是根据一示例性实施例示出的一种深度子模型和姿态子模型的示意图;Fig. 7 is a schematic diagram of a depth sub-model and an attitude sub-model according to an exemplary embodiment;
图8是根据一示例性实施例示出的一种训练定位模型的流程图;Fig. 8 is a flowchart showing a training positioning model according to an exemplary embodiment;
图9是根据一示例性实施例示出的另一种姿态子模型的示意图;Fig. 9 is a schematic diagram of another attitude sub-model according to an exemplary embodiment;
图10是根据一示例性实施例示出的另一种训练定位模型的流程图;Fig. 10 is a flow chart showing another training positioning model according to an exemplary embodiment;
图11是根据一示例性实施例示出的另一种内窥镜图像的处理方法的流程图;Fig. 11 is a flow chart of another endoscopic image processing method shown according to an exemplary embodiment;
图12是根据一示例性实施例示出的一种内窥镜图像的处理装置的框图;Fig. 12 is a block diagram of an endoscopic image processing device according to an exemplary embodiment;
图13是根据一示例性实施例示出的另一种内窥镜图像的处理装置的框图;Fig. 13 is a block diagram of another endoscopic image processing device according to an exemplary embodiment;
图14是根据一示例性实施例示出的另一种内窥镜图像的处理装置的框图;Fig. 14 is a block diagram of another endoscopic image processing device according to an exemplary embodiment;
图15是根据一示例性实施例示出的另一种内窥镜图像的处理装置的框图;Fig. 15 is a block diagram of another endoscopic image processing device according to an exemplary embodiment;
图16是根据一示例性实施例示出的一种电子设备的框图。Fig. 16 is a block diagram of an electronic device according to an exemplary embodiment.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided so that the disclosure will be more thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only, and are not intended to limit the protection scope of the present disclosure.
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that the various steps described in the method implementations of the present disclosure may be executed in different orders, and/or executed in parallel. Additionally, method embodiments may include additional steps and/or omit performing illustrated steps. The scope of the present disclosure is not limited in this respect.
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。As used herein, the term "comprise" and its variations are open-ended, ie "including but not limited to". The term "based on" is "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one further embodiment"; the term "some embodiments" means "at least some embodiments." Relevant definitions of other terms will be given in the description below.
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the sequence or interdependence of the functions performed by these devices, modules or units.
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless the context clearly indicates otherwise, it should be understood as "one or more".
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are used for illustrative purposes only, and are not used to limit the scope of these messages or information.
图1是根据一示例性实施例示出的一种内窥镜图像的处理方法的流程图,如图1所示,该方法包括可以下步骤:Fig. 1 is a flowchart of a method for processing endoscopic images according to an exemplary embodiment. As shown in Fig. 1, the method may include the following steps:
步骤101,获取内窥镜在待测组织内采集的组织图像集,组织图像集中包括按照采集时刻排列的多个组织图像。Step 101, acquire a tissue image set collected by an endoscope in a tissue to be measured, the tissue image set includes a plurality of tissue images arranged according to the acquisition time.
举例来说,在进行内窥镜检查时,内窥镜会按照预设的采集周期,在待测组织内不断地采集组织图 像,以得到组织图像集。组织图像集中可以包括按照采集时刻排列的多个组织图像,任意相邻的两个组织图像对应的采集时刻之间的间隔为采集周期。具体的,可以将预设时长(例如:30s)内采集的多个组织图像作为一个组织图像集,也可以将连续采集的预设数量个(例如:100个)组织图像作为一个组织图像集,本公开对此不作具体限定。需要说明的是,本公开实施例中所述的内窥镜,例如可以是肠镜、胃镜等,若内窥镜为肠镜,那么待测组织即为肠道,组织图像即为肠道图像。若内窥镜为胃镜,那么待测组织可以为食道、胃部、十二指肠,上述组织图像可以为食道图像、胃部图像或者十二指肠图像。内窥镜还可以用于采集其他组织的图像,本公开对此不作具体限定。For example, during an endoscopic examination, the endoscope will continuously collect histograms in the tissue to be tested according to the preset collection cycle image to get an organized image set. The tissue image set may include multiple tissue images arranged according to the acquisition time, and the interval between the acquisition time corresponding to any two adjacent tissue images is the acquisition period. Specifically, multiple tissue images collected within a preset time period (for example: 30s) can be used as a tissue image set, or a preset number of tissue images (for example: 100) collected continuously can be used as a tissue image set, which is not specifically limited in the present disclosure. It should be noted that the endoscope described in the embodiments of the present disclosure may be, for example, a colonoscope, a gastroscope, etc. If the endoscope is a colonoscope, then the tissue to be measured is the intestinal tract, and the tissue image is the intestinal tract image. If the endoscope is a gastroscope, the tissue to be measured may be the esophagus, stomach, or duodenum, and the image of the above tissue may be an image of the esophagus, stomach, or duodenum. The endoscope can also be used to acquire images of other tissues, which is not specifically limited in the present disclosure.
内窥镜检查过程中,可能由于进镜手法不稳定,或者内窥镜的位置不合适等原因,会采集到很多无效的图像,例如障碍物遮挡、曝光度过大、清晰度过低等图像。这些无效的图像会对内窥镜的检查结果产生干扰。因此,在得到组织图像集之后,可以先判断其中包括的多个组织图像是否有效,以过滤掉无效的组织图像。若某个组织图像为无效的图像,可以直接丢弃该组织图像。若该组织图像为有效图像,可以保留该组织图像,以得到过滤后的组织图像集,这样能够减少不必要的数据处理,提高处理速度。例如,可以利用预先训练的识别模型对组织图像集中的每个组织图像进行识别,以确定该组织图像是否有效,识别模型例如可以是CNN(英文:Convolutional Neural Networks,中文:卷积神经网络)或者LSTM(英文:Long Short-Term Memory,中文:长短期记忆网络),也可以是Transformer(例如Vision Transformer)中的Encoder等,本公开对此不作具体限定。进一步的,还可以对组织图像集中的每个组织图像进行预处理,可以理解为对每个组织图像中包括的数据进行增强处理。为了保证组织图像的质量,预处理不会对组织图像的模糊度或者色彩进行修改,因此预处理可以包括:multi-crop处理、翻转处理(包括:左右翻转、上下翻转、旋转等)、随机仿射变换、尺寸变换(英文:Resize)等处理,最后得到的预处理后的组织图像可以是指定尺寸(例如可以是384*384)的图像。During the endoscopic inspection process, many invalid images may be collected due to unstable approach or improper position of the endoscope, such as images blocked by obstacles, overexposure, and low definition. These invalid images can interfere with the endoscopic examination results. Therefore, after obtaining the tissue image set, it may first be judged whether the plurality of tissue images contained therein are valid, so as to filter out invalid tissue images. If a tissue image is an invalid image, the tissue image can be discarded directly. If the tissue image is a valid image, the tissue image can be retained to obtain a filtered tissue image set, which can reduce unnecessary data processing and improve processing speed. For example, a pre-trained recognition model can be used to recognize each tissue image in the tissue image set to determine whether the tissue image is valid. The recognition model can be, for example, CNN (English: Convolutional Neural Networks, Chinese: Convolutional Neural Network) or LSTM (English: Long Short-Term Memory, Chinese: Long Short-Term Memory Network), or an Encoder in a Transformer (such as a Vision Transformer), which is not specifically limited in this disclosure. Furthermore, each tissue image in the tissue image set may also be preprocessed, which may be understood as performing enhancement processing on the data included in each tissue image. In order to ensure the quality of the tissue image, the preprocessing will not modify the blur or color of the tissue image. Therefore, the preprocessing can include: multi-crop processing, flip processing (including: left-right flip, up-down flip, rotation, etc.), random affine transformation, size transformation (English: Resize) and other processing. The final preprocessed tissue image can be an image of a specified size (for example, it can be 384*384).
步骤102,根据组织图像集,确定每个组织图像对应的深度图像和姿态参数。Step 102, according to the tissue image set, determine the depth image and pose parameters corresponding to each tissue image.
示例的,针对组织图像集中的每个组织图像,可以依次确定每个组织图像对应的深度图像和姿态参数。每个组织图像对应的深度图像,包括了该组织图像中每个像素点的深度(也可以理解为距离),因此对应的深度图像能够反映该组织图像中可见表面的几何形状,而不受该组织图像中纹理、颜色等的影响,也就是说,通过对应的深度图像可以表征该组织图像对应的待测组织的结构信息。每个组织图像对应的姿态参数,可以理解为内窥镜在采集该组织图像时的姿态参数,连续多个组织图像对应的姿态参数,能够表征内窥镜在待测组织内的运动过程,姿态参数例如可以包括旋转矩阵和平移向量。For example, for each tissue image in the tissue image set, the depth image and pose parameters corresponding to each tissue image may be sequentially determined. The depth image corresponding to each tissue image includes the depth (also can be understood as distance) of each pixel in the tissue image, so the corresponding depth image can reflect the geometry of the visible surface in the tissue image without being affected by the texture, color, etc. in the tissue image, that is, the corresponding depth image can represent the structural information of the tissue to be measured corresponding to the tissue image. The attitude parameters corresponding to each tissue image can be understood as the attitude parameters of the endoscope when acquiring the tissue image, and the attitude parameters corresponding to multiple continuous tissue images can represent the movement process of the endoscope in the tissue to be measured. The attitude parameters can include, for example, a rotation matrix and a translation vector.
步骤103,根据每个组织图像对应的姿态参数,确定内窥镜的运动轨迹。Step 103, according to the posture parameters corresponding to each tissue image, determine the movement trajectory of the endoscope.
步骤104,根据每个组织图像对应的深度图像,确定待测组织的轮廓。Step 104: Determine the contour of the tissue to be measured according to the depth image corresponding to each tissue image.
示例的,组织图像集中每个组织图像对应的姿态参数,能够表征内窥镜在待测组织内的运动过程,因此可以根据每个组织图像对应的姿态参数,得到内窥镜在待测组织内的运动轨迹,运动轨迹可以包括内窥镜在采集每个组织图像时的位置,还可以包括内窥镜在采集每个组织图像时的角度。For example, the posture parameters corresponding to each tissue image in the tissue image set can represent the movement process of the endoscope in the tissue to be measured, so the motion trajectory of the endoscope in the tissue to be measured can be obtained according to the posture parameters corresponding to each tissue image, and the motion trajectory can include the position of the endoscope when acquiring each tissue image, and can also include the angle of the endoscope when acquiring each tissue image.
同时,对应的深度图像可以表征该组织图像对应的组织的结构信息,因此可以根据每个组织图像对应的深度图像,得到待测组织的轮廓,待测组织的轮廓能够反映待测组织整体的形状,也可以理解为待测组织的模板。以内窥镜为肠镜为例,那么待测组织即为肠道,待测组织的轮廓可以为一个扭曲的圆柱体。具体的,可以根据组织图像集对应的多个深度图像,确定待测组织的中心线,然后按照预设的半径得到待测组织的轮廓。还可以根据组织图像集对应的多个深度图像进行建模,以得到待测组织的轮廓,本公开对此不作具体限定。需要说明的是,图1所示的步骤103和步骤104的执行顺序是一种示例性的实现方式,也可以先执行步骤104,再执行步骤103,还可以是同时执行步骤103和步骤104,本公开对此不作具体限定。At the same time, the corresponding depth image can represent the structural information of the tissue corresponding to the tissue image. Therefore, the contour of the tissue to be measured can be obtained according to the depth image corresponding to each tissue image. The contour of the tissue to be measured can reflect the overall shape of the tissue to be measured, and can also be understood as a template of the tissue to be measured. If the endoscope is a colonoscope as an example, then the tissue to be tested is the intestinal tract, and the outline of the tissue to be tested can be a distorted cylinder. Specifically, the centerline of the tissue to be measured can be determined according to multiple depth images corresponding to the tissue image set, and then the contour of the tissue to be measured can be obtained according to a preset radius. Modeling may also be performed according to multiple depth images corresponding to the tissue image set to obtain the outline of the tissue to be measured, which is not specifically limited in the present disclosure. It should be noted that the execution order of step 103 and step 104 shown in FIG. 1 is an exemplary implementation manner, and step 104 may be executed first, and then step 103 may be executed, or step 103 and step 104 may be executed simultaneously, which is not specifically limited in the present disclosure.
步骤105,根据运动轨迹和待测组织的轮廓,确定内窥镜检查过程中的盲区比例。Step 105, according to the motion trajectory and the outline of the tissue to be measured, determine the proportion of the blind area during the endoscopic examination.
示例的,在得到运动轨迹和待测组织的轮廓之后,可以根据内窥镜在采集每个组织图像时的位置和角度,确定内窥镜在采集每个组织图像时的视野区域,视野区域可以理解为内窥镜在采集该组织图像时能够观察到的待测组织的区域。然后可以将每个组织图像对应的视野区域进行拼接,以得到内窥镜检查过程中能够观察到的区域,从而得到内窥镜检查过程中的盲区比例,具体的,可以先根据内窥镜检查过程中能够观察到的区域与待测组织的轮廓的比值,确定观察区域比例,然后再确定盲区比例,即盲区比 例=1-观察区域比例。盲区比例可以理解为内窥镜检查过程中盲区(即内窥镜的视野中无法观测到的部分)占待测组织的轮廓的比例。在深度图像和运动轨迹的基础上确定盲区比例,能够及时反应检查过程中的检查范围,从而避免漏检,保证内窥镜检查的有效性。For example, after obtaining the motion trajectory and the outline of the tissue to be measured, the field of view of the endoscope when capturing each tissue image can be determined according to the position and angle of the endoscope when capturing each tissue image. The field of view can be understood as the area of the tissue to be measured that the endoscope can observe when capturing the tissue image. Then the visual field areas corresponding to each tissue image can be spliced to obtain the area that can be observed during the endoscopic examination, so as to obtain the blind area ratio during the endoscopic examination. Specifically, the ratio of the observed area can be determined according to the ratio of the area that can be observed during the endoscopic examination to the outline of the tissue to be measured, and then the blind area ratio can be determined, that is, the blind area ratio Example=1-Observation Area Ratio. The blind area ratio can be understood as the ratio of the blind area (that is, the part that cannot be observed in the field of view of the endoscope) to the outline of the tissue to be measured during the endoscopic examination. Determining the proportion of the blind area on the basis of the depth image and the motion track can reflect the inspection range in the inspection process in time, thereby avoiding missed inspections and ensuring the effectiveness of endoscopic inspections.
综上所述,本公开首先获取内窥镜在待测组织内按照多个采集时刻采集的组织图像。再根据组织图像集,确定每个组织图像对应的深度图像以及姿态参数。之后根据每个组织图像对应的姿态参数,确定内窥镜的运动轨迹,并根据每个组织图像对应的深度图像,确定待测组织的轮廓。最后根据运动轨迹和待测组织的轮廓,确定内窥镜检查过程中的盲区比例。本公开根据组织图像对应的深度图像以及姿态参数,确定内窥镜的运动轨迹和待测组织的轮廓,并以此确定检查过程中的盲区比例,能够实现对检查范围的监控,有效避免漏检,从而保证内窥镜检查的有效性。To sum up, in the present disclosure, firstly, the tissue images collected by the endoscope in the tissue to be measured are acquired according to multiple acquisition moments. Then, according to the tissue image set, the depth image and pose parameters corresponding to each tissue image are determined. Then, according to the posture parameters corresponding to each tissue image, the motion trajectory of the endoscope is determined, and according to the depth image corresponding to each tissue image, the contour of the tissue to be measured is determined. Finally, according to the motion trajectory and the outline of the tissue to be measured, the proportion of the blind area during the endoscopic examination is determined. According to the depth image and attitude parameters corresponding to the tissue image, the present disclosure determines the movement trajectory of the endoscope and the outline of the tissue to be measured, and determines the blind area ratio in the inspection process, so as to realize the monitoring of the inspection range and effectively avoid missed inspections, thereby ensuring the effectiveness of endoscopic inspection.
在一种实现方式种,步骤102的实现方式可以为:In an implementation manner, the implementation manner of step 102 may be:
依次根据每个组织图像和该组织图像对应的历史组织图像,通过预先训练的定位模型确定该组织图像对应的深度图像以及姿态参数,历史组织图像的采集时刻在该组织图像的采集时刻之前。According to each tissue image and the historical tissue image corresponding to the tissue image in turn, the depth image and attitude parameters corresponding to the tissue image are determined through the pre-trained positioning model, and the collection time of the historical tissue image is before the collection time of the tissue image.
示例的,可以依次将每个组织图像和该组织图像对应的历史组织图像,输入预先训练的定位模型,以使定位模型根据该组织图像和对应的历史组织图像,确定该组织图像对应的深度图像以及姿态参数。其中,对应的历史组织图像的采集时刻,在该组织图像的采集时刻之前,即组织图像集中,对应的历史组织图像位于该组织图像之前,可以是组织图像集中,该组织图像之前的上一个组织图像。例如,内窥镜在t时刻采集的组织图像可以表示为It,那么该组织图像对应的历史组织图像可以表示为It-1,即内窥镜在t-1时刻采集的图像。For example, each tissue image and the corresponding historical tissue image may be sequentially input into the pre-trained positioning model, so that the positioning model determines the corresponding depth image and pose parameters of the tissue image according to the tissue image and the corresponding historical tissue image. Wherein, the collection time of the corresponding historical tissue image is before the collection time of the tissue image, that is, the tissue image set, and the corresponding historical tissue image is located before the tissue image, which may be the tissue image set, the previous tissue image before the tissue image. For example, the tissue image collected by the endoscope at time t can be denoted as It, then the historical tissue image corresponding to the tissue image can be denoted as It-1, that is, the image collected by the endoscope at time t-1.
可以将定位模型理解为SLAM(英文:Simultaneous Localization and Mapping,中文:同步定位与地图构建)模型,能够根据每个组织图像和该组织图像对应的历史组织图像,同步确定对应的深度图像以及姿态参数。定位模型能够确定每个组织图像对应的深度图像,无需在内窥镜进行检查时增加深度传感器,便于操作,也节省了成本。同时,定位模型能够确定姿态参数,以准确获得内窥镜的运动轨迹。The positioning model can be understood as a SLAM (English: Simultaneous Localization and Mapping, Chinese: Simultaneous Localization and Mapping) model, which can simultaneously determine the corresponding depth image and attitude parameters according to each tissue image and the historical tissue image corresponding to the tissue image. The positioning model can determine the depth image corresponding to each tissue image, and there is no need to add a depth sensor when the endoscope is inspected, which is convenient for operation and saves costs. At the same time, the positioning model can determine the attitude parameters to accurately obtain the motion trajectory of the endoscope.
在另一种实现方式中,姿态参数可以包括旋转矩阵和平移向量,运动轨迹可以包括内窥镜在采集每个组织图像时的位置和角度。相应的,步骤103的实现方式为:In another implementation manner, the pose parameters may include a rotation matrix and a translation vector, and the motion trajectory may include the position and angle of the endoscope when capturing each tissue image. Correspondingly, the implementation manner of step 103 is:
根据每个组织图像对应的旋转矩阵和平移向量,以及内窥镜在采集该组织图像对应的历史组织图像时的位置和角度,确定内窥镜在采集该组织图像时的位置和角度。According to the rotation matrix and translation vector corresponding to each tissue image, and the position and angle of the endoscope when acquiring the historical tissue image corresponding to the tissue image, the position and angle of the endoscope when acquiring the tissue image are determined.
示例的,可以根据每个组织图像对应的姿态参数,确定内窥镜在采集该组织图像时的位置和角度,然后按照采集时刻指示的顺序,将内窥镜在采集全部组织图像时的位置和角度进行排列,即可得到内窥镜的运动轨迹。具体的,可以依次根据内窥镜采集该组织图像对应的历史组织图像时的位置,和该组织图像对应的平移向量,确定内窥镜在采集该组织图像时的位置,并根据内窥镜采集该组织图像对应的历史组织图像时的角度,和该组织图像对应的旋转矩阵,确定内窥镜在采集该组织图像时的角度。For example, the position and angle of the endoscope when acquiring the tissue image can be determined according to the posture parameters corresponding to each tissue image, and then the position and angle of the endoscope when acquiring all the tissue images can be arranged according to the sequence indicated by the acquisition time, so as to obtain the movement trajectory of the endoscope. Specifically, the position of the endoscope when acquiring the tissue image can be determined according to the position of the historical tissue image corresponding to the tissue image and the translation vector corresponding to the tissue image in sequence, and the angle of the endoscope when acquiring the tissue image can be determined according to the angle when the endoscope acquires the historical tissue image corresponding to the tissue image and the rotation matrix corresponding to the tissue image.
例如,组织图像集中的第一个组织图像的位置和角度可以设置为预设的初始位置和初始角度,然后可以根据第一个组织图像的位置和角度,以及第二个组织图像对应的旋转矩阵和平移向量,确定第二个组织图像的位置和角度。然后再根据定第二个组织图像的位置和角度,以及第三个组织图像对应的旋转矩阵和平移向量,确定第三个组织图像的位置和角度,以此类推,以得到内窥镜在待测组织内的运动轨迹。For example, the position and angle of the first tissue image in the tissue image set can be set as a preset initial position and initial angle, and then the position and angle of the second tissue image can be determined according to the position and angle of the first tissue image, and the corresponding rotation matrix and translation vector of the second tissue image. Then determine the position and angle of the third tissue image according to the position and angle of the second tissue image, and the corresponding rotation matrix and translation vector of the third tissue image, and so on, to obtain the movement track of the endoscope in the tissue to be measured.
图2是根据一示例性实施例示出的另一种内窥镜图像的处理方法的流程图,如图2所示,步骤104可以包括:Fig. 2 is a flowchart of another endoscopic image processing method shown according to an exemplary embodiment, as shown in Fig. 2, step 104 may include:
步骤1041,根据每个组织图像对应的深度图像,确定待测组织的中心线。Step 1041: Determine the centerline of the tissue to be measured according to the depth image corresponding to each tissue image.
步骤1042,根据待测组织的中心线,确定待测组织的轮廓。Step 1042, determine the outline of the tissue to be measured according to the centerline of the tissue to be measured.
示例的,可以根据每个组织图像对应的深度图像,确定该组织图像中待测组织的中点,然后将每个组织图像中待测组织的中点连接起来,以得到待测组织的中心线。然后按照预设的半径以及中心线,确定待测组织的轮廓。以组织图像为肠道图像,待测组织为肠道来举例,那么肠道的轮廓即为按照预设的半径以及中心线建立的一个圆柱体。具体的,确定每个组织图像中待测组织的中点的方式,可以先确定该组织图中的边界(例如可以包括:左边界、右边界、上边界、下边界等)的距离,然后确定距离深度图像中各边界的距离均相等的点,作为该组织图像中待测组织的中点。 For example, according to the depth image corresponding to each tissue image, the midpoint of the tissue to be measured in the tissue image can be determined, and then the midpoints of the tissue to be measured in each tissue image can be connected to obtain the centerline of the tissue to be measured. Then, according to the preset radius and centerline, the outline of the tissue to be measured is determined. Taking the tissue image as an intestinal image and the tissue to be tested as an example of the intestinal tract, the contour of the intestinal tract is a cylinder established according to the preset radius and centerline. Specifically, the manner of determining the midpoint of the tissue to be measured in each tissue image may first determine the distance of boundaries in the tissue image (for example, may include: left boundary, right boundary, upper boundary, lower boundary, etc.), and then determine a point that is equally distant from each boundary in the depth image as the midpoint of the tissue to be measured in the tissue image.
图3是根据一示例性实施例示出的另一种内窥镜图像的处理方法的流程图,如图3所示,步骤105的实现方式可以包括:Fig. 3 is a flow chart of another endoscopic image processing method shown according to an exemplary embodiment. As shown in Fig. 3, the implementation of step 105 may include:
步骤1051,根据内窥镜在采集每个组织图像时的位置和角度,以及内窥镜的视角,确定该组织图像对应的视野区域。Step 1051, according to the position and angle of the endoscope when collecting each tissue image, and the viewing angle of the endoscope, determine the field of view corresponding to the tissue image.
步骤1052,根据每个组织图像对应的视野区域,确定总视野区域。Step 1052: Determine the total visual field area according to the visual field area corresponding to each tissue image.
步骤1053,根据总视野区域和待测组织的轮廓,确定盲区比例。Step 1053, according to the total field of view and the outline of the tissue to be measured, determine the proportion of the blind area.
举例来说,在得到运动轨迹和待测组织的轮廓之后,可以根据内窥镜在采集每个组织图像时的位置和角度,以及内窥镜本身的视角,确定内窥镜在采集每个组织图像时的视野区域。内窥镜的视角由内窥镜的光学镜头确定,视角例如可以是100度或者120度等。视野区域可以理解为该组织图像所覆盖的待测组织的面积。以图4所示待测组织的轮廓为例,其中粗实线表示待测组织的轮廓(为了便于展示,此处用二维截面来表示待测组织的轮廓,实际情况中,待测组织的轮廓为三维的,例如可以是圆柱体),其中k(0)表示内窥镜在t0时刻所在的位置,相应的,内窥镜在t0时刻的角度可以表示为α(0)(需要说明的是,α(0)并未展示在图4中),内窥镜的视角为φ,那么可以得到t0时刻采集的组织图像对应的视野区域即为轮廓上的A点至B点。具体的,可以采用蒙特卡洛方法(英文:Monte Carlo method),在待测组织的轮廓上均匀分布X个测试点(X≥100),然后根据视野区域内包括的测试点的数量,确定视野区域的面积。For example, after obtaining the motion trajectory and the outline of the tissue to be measured, the field of view of the endoscope when acquiring each tissue image can be determined according to the position and angle of the endoscope when acquiring each tissue image, and the viewing angle of the endoscope itself. The viewing angle of the endoscope is determined by the optical lens of the endoscope, and the viewing angle may be, for example, 100 degrees or 120 degrees. The field of view area can be understood as the area of the tissue to be measured covered by the tissue image. Take the outline of the tissue to be measured as shown in Figure 4 as an example, wherein the thick solid line represents the outline of the tissue to be measured (for the convenience of presentation, a two-dimensional section is used here to represent the outline of the tissue to be measured. In actual situations, the outline of the tissue to be measured is three-dimensional, such as a cylinder), where k(0) represents the position of the endoscope at time t0. Correspondingly, the angle of the endoscope at time t0 can be expressed as α(0) (it should be noted that α(0) is not shown in FIG. It can be obtained that the field of view corresponding to the tissue image collected at time t0 is point A to point B on the contour. Specifically, a Monte Carlo method (English: Monte Carlo method) can be used to evenly distribute X test points (X≥100) on the contour of the tissue to be tested, and then determine the area of the visual field according to the number of test points included in the visual field.
之后,可以将每个组织图像对应的视野区域进行拼接,以得到总视野区域。具体的,可以将每个组织图像对应的视野区域求和,将求和结果作为总视野区域,也可以将每个组织图像对应的视野区域中覆盖的测试点求并集,以得到总视野区域内包括的测试点的总数量,作为总视野区域。最后,可以将总视野区域与待测组织的轮廓的总面积的比值,作为观察区域比例,然后将(1-观察区域比例)作为盲区比例。例如,总视野区域内包括的测试点的总数量为Y,即内窥镜检查过程中能够观察到的区域内覆盖了Y个测试点,待测组织的轮廓上总共分布有X个测试点,那么可以先确定观察区域比例为Y/X,再进一步确定盲区比例为1-Y/X。Afterwards, the visual field area corresponding to each tissue image can be spliced to obtain the total visual field area. Specifically, the visual field areas corresponding to each tissue image can be summed, and the summation result can be used as the total visual field area, or the test points covered in the visual field areas corresponding to each tissue image can be summed to obtain the total number of test points included in the total visual field area, which can be used as the total visual field area. Finally, the ratio of the total visual field area to the total area of the outline of the tissue to be measured can be used as the ratio of the observation area, and then (1-the ratio of the observation area) can be used as the ratio of the blind area. For example, the total number of test points included in the total field of view is Y, that is, Y test points are covered in the area that can be observed during the endoscopic examination, and there are X test points distributed on the outline of the tissue to be tested, so the ratio of the observation area can be determined to be Y/X first, and then the ratio of the blind area can be further determined to be 1-Y/X.
在一种实现方式中,步骤1051可以通过以下步骤来实现:In an implementation manner, step 1051 may be implemented through the following steps:
步骤1)根据每个组织图像对应的姿态参数,将内窥镜在采集该组织图像时的位置,转换为对应在待测组织的中心线上的中心位置。Step 1) Convert the position of the endoscope when acquiring the tissue image into a center position corresponding to the center line of the tissue to be measured according to the posture parameters corresponding to each tissue image.
步骤2)根据该组织图像对应的姿态参数、内窥镜的视角,以及内窥镜在采集该组织图像时的角度,确定中心位置对应的中心视角。Step 2) Determine the central viewing angle corresponding to the central position according to the posture parameters corresponding to the tissue image, the viewing angle of the endoscope, and the angle of the endoscope when collecting the tissue image.
步骤3)确定中心位置对应的最大视野区域。Step 3) Determine the maximum viewing area corresponding to the center position.
步骤4)根据中心视角和最大视野区域,确定该组织图像对应的视野区域。Step 4) Determine the field of view corresponding to the tissue image according to the central viewing angle and the maximum field of view.
示例的,为了能够快速确定每个组织图像对应的视野区域,提高图像处理的效率,可以先将内窥镜的位置和视角,转换到待测组织的中心线上的中心位置和中心视角。可以理解为,内窥镜在采集该组织图像时的位置处,按照采集该组织图像时的角度以内窥镜的视角所能观察到的视野,与内窥镜在中心位置上按照采集该组织图像时的角度以中心视角观察到的视野相同。同样以图4所示,其中,d(0)表示内窥镜在t0时刻所在的位置转换到中心线上的中心位置,内窥镜的视角为φ,对应的中心视角可以为δ,使得内窥镜在d(0)上按照采集该组织图像时的角度以中心视角观察到的视野也为A点至B点。具体的,可以通过以下方式来确定中心位置和对应的中心视角:For example, in order to quickly determine the field of view corresponding to each tissue image and improve the efficiency of image processing, the position and viewing angle of the endoscope may be converted to the central position and central viewing angle on the centerline of the tissue to be measured. It can be understood that, when the endoscope is at the position when the tissue image is collected, the field of view that can be observed by the endoscope according to the angle when the tissue image is collected is the same as the field of view that the endoscope can observe by the central perspective according to the angle when the tissue image is collected at the central position. Also shown in Fig. 4, wherein, d(0) indicates that the position of the endoscope at time t0 is converted to the center position on the center line, the viewing angle of the endoscope is φ, and the corresponding central viewing angle can be δ, so that the field of view observed by the endoscope at the central viewing angle on d(0) according to the angle when the tissue image is collected is also from point A to point B. Specifically, the central position and the corresponding central viewing angle can be determined in the following ways:
可以先从内窥镜在采集该组织图像时的位置处,向待测组织的轮廓做垂线,垂线与中心线相交的位置即为中心位置,即d(0)。然后可以根据内窥镜的视角φ以及内窥镜在采集该组织图像时的角度,进行几何变换,以得到中心视角δ。A vertical line can be drawn from the position of the endoscope when the tissue image is collected to the outline of the tissue to be measured, and the position where the vertical line intersects the center line is the center position, ie d(0). Then, a geometric transformation can be performed according to the viewing angle φ of the endoscope and the angle of the endoscope when collecting the tissue image, so as to obtain the central viewing angle δ.
之后,可以根据中心位置,确定中心位置对应的最大视野区域。中心位置对应的最大视野区域,可以理解为内窥镜在中心位置可能观察到的最大范围,即将内窥镜的光学镜头旋转360度所能够观察到的最大范围。然后可以根据中心视角和最大视野区域,确定该组织图像对应的视野区域。具体的,可以根据中心视角和360度的比值,与最大视野区域的乘积,确定该组织图像对应的视野区域。例如,中心视角为120度,最大视野区域内包括的测试点的数量为210个,那么该组织图像对应的视野区域内包括的测试点的数量为210*(120/360)=70个。 Afterwards, according to the central position, the maximum viewing area corresponding to the central position can be determined. The maximum viewing area corresponding to the center position can be understood as the maximum range that the endoscope can observe at the center position, that is, the maximum range that can be observed by rotating the optical lens of the endoscope by 360 degrees. Then, the visual field area corresponding to the tissue image may be determined according to the central viewing angle and the maximum visual field area. Specifically, the visual field area corresponding to the tissue image may be determined according to the product of the ratio of the central viewing angle to 360 degrees and the maximum visual field area. For example, if the central viewing angle is 120 degrees and the number of test points included in the largest field of view is 210, then the number of test points included in the field of view corresponding to the tissue image is 210*(120/360)=70.
在一种实现方式种,定位模型的结构可以如图5所示,其中包括:深度子模型和姿态子模型。其中,深度子模型的输入与姿态子模型的输入,作为定位模型的输入,深度子模型的输出与姿态子模型的输出,作为定位模型的输出。In an implementation manner, the structure of the positioning model may be as shown in FIG. 5 , which includes: a depth sub-model and an attitude sub-model. Among them, the input of the depth sub-model and the input of the attitude sub-model are used as the input of the positioning model, and the output of the depth sub-model and the output of the attitude sub-model are used as the output of the positioning model.
图6是根据一示例性实施例示出的另一种内窥镜图像的处理方法的流程图,如图6所示,定位模型包括:深度子模型和姿态子模型。步骤102可以包括:Fig. 6 is a flow chart showing another endoscopic image processing method according to an exemplary embodiment. As shown in Fig. 6 , the positioning model includes: a depth sub-model and an attitude sub-model. Step 102 may include:
步骤1021,将该组织图像输入深度子模型,以得到深度子模型输出的该组织图像对应的深度图像。Step 1021: Input the tissue image into the depth sub-model to obtain a depth image corresponding to the tissue image output by the depth sub-model.
示例的,可以将该组织图像作为深度子模型的输入,深度子模型能够输出该组织图像对应的深度图像。深度子模型的结构可以如图7中的(a)所示,可以是一个UNet结构,其中包括多个步幅卷积层(英文:stride conv)对该组织图像进行下采样,例如可以下采样到该组织图像分辨率的1/8,再利用多个转置卷积层(英文:transpose conv)进行上采样到该组织图像的分辨率,得到该组织图像对应的深度图像。For example, the tissue image can be used as an input of the depth sub-model, and the depth sub-model can output a depth image corresponding to the tissue image. The structure of the depth sub-model can be shown in (a) in Figure 7, which can be a UNet structure, which includes multiple stride convolution layers (English: stride conv) to downsample the tissue image, for example, it can downsample to 1/8 of the resolution of the tissue image, and then use multiple transpose convolution layers (English: transpose conv) to upsample to the resolution of the tissue image to obtain the depth image corresponding to the tissue image.
步骤1022,将该组织图像和对应的历史组织图像输入姿态子模型,以得到姿态子模型输出的该组织图像对应的姿态参数。Step 1022, input the tissue image and the corresponding historical tissue image into the pose sub-model, so as to obtain the pose parameters corresponding to the tissue image output by the pose sub-model.
示例的,可以将该组织图像和对应的历史组织图像作为姿态子模型的输入,姿态子模型能够输出该组织图像对应的旋转矩阵和平移向量。具体的,可以将该组织图像和对应历史组织图像进行拼接(英文:Concat),以将拼接后的结果输入姿态子模型。姿态子模型的结构可以如图7中的(b)所示,可以是一个ResNet结构(例如可以是ResNet34),该组织图像和对应的历史组织图像的拼接结果输入最开始的卷积池化层,通过中间的多个残差块(英文:Residual block),最后由全连接层输出该组织图像对应的旋转矩阵和平移向量。For example, the tissue image and the corresponding historical tissue image can be used as input of the attitude sub-model, and the attitude sub-model can output the rotation matrix and translation vector corresponding to the tissue image. Specifically, the tissue image and the corresponding historical tissue image may be concatenated (English: Concat), so as to input the concatenated result into the attitude sub-model. The structure of the pose sub-model can be shown in (b) in Figure 7, which can be a ResNet structure (for example, ResNet34). The stitching result of the tissue image and the corresponding historical tissue image is input into the initial convolution pooling layer, through multiple residual blocks (English: Residual block) in the middle, and finally the rotation matrix and translation vector corresponding to the tissue image are output by the fully connected layer.
图8是根据一示例性实施例示出的一种训练定位模型的流程图,如图8所示,定位模型是通过以下步骤训练得到的:Fig. 8 is a flow chart showing a training positioning model according to an exemplary embodiment. As shown in Fig. 8, the positioning model is trained through the following steps:
步骤A,将样本组织图像输入深度子模型,以得到样本组织图像对应的样本深度图像,并将历史样本组织图像输入深度子模型,以得到历史样本组织图像对应的历史样本深度图像,历史样本组织图像为在样本组织图像之前采集的图像。Step A, input the sample tissue image into the depth sub-model to obtain the sample depth image corresponding to the sample tissue image, and input the historical sample tissue image into the depth sub-model to obtain the historical sample depth image corresponding to the historical sample tissue image, the historical sample tissue image is an image collected before the sample tissue image.
举例来说,将样本组织图像(表示为Ia)作为深度子模型的输入,深度子模型能够输出样本组织图像对应的样本深度图像(表示为Da)。同样的,将历史样本组织图像(表示为Ib)作为深度子模型的输入,深度子模型能够输出历史样本组织图像对应的历史样本深度图像(表示为Db)。其中,样本组织图像可以是从内窥镜视频中抽帧得来的,内窥镜视频可以是此前进行内窥镜检查时录制的视频,可以选用不同的内窥镜检查不同的用户得到。进一步的,在对内窥镜视频进行抽帧时,可以过滤掉无效的图像(例如障碍物遮挡、曝光度过大、清晰度过低等图像)。相应的,历史样本组织图像,即为样本组织图像前一帧的组织图像。For example, a sample tissue image (denoted as I a ) is used as an input of the depth sub-model, and the depth sub-model can output a sample depth image (denoted as D a ) corresponding to the sample tissue image. Similarly, the historical sample tissue image (denoted as I b ) is used as the input of the depth sub-model, and the depth sub-model can output the historical sample depth image (denoted as D b ) corresponding to the historical sample tissue image. Wherein, the sample tissue image may be obtained by extracting frames from an endoscopic video, and the endoscopic video may be a video recorded during a previous endoscopic examination, and may be obtained by selecting different endoscopic examinations for different users. Further, when frame-picking the endoscopic video, invalid images (such as images blocked by obstacles, overexposed, and low in definition) can be filtered out. Correspondingly, the historical sample tissue image is the tissue image of the previous frame of the sample tissue image.
步骤B,将样本组织图像和历史样本组织图像输入姿态子模型,以得到姿态子模型输出的,样本组织图像对应的样本姿态参数以及采集样本组织图像的内窥镜内参数,内窥镜内参数包括焦距和平移尺寸。Step B, input the sample tissue image and the historical sample tissue image into the attitude sub-model to obtain the output of the attitude sub-model, the sample attitude parameters corresponding to the sample tissue image and the internal parameters of the endoscope for collecting the sample tissue image. The endoscopic internal parameters include focal length and translation size.
示例的,可以将样本组织图像和历史样本组织图像作为姿态子模型的输入,姿态子模型能够输出样本组织图像对应的样本姿态参数以及采集样本组织图像的内窥镜内参数(表示为K)。其中,内窥镜内参数可以包括焦距和平移尺寸,样本姿态参数包括样本旋转矩阵(表示为R)和样本平移向量(表示为t)。具体的,可以将样本组织图像和历史样本组织图像进行拼接,以将拼接后的结果输入姿态子模型。For example, the sample tissue image and the historical sample tissue image can be used as the input of the attitude sub-model, and the attitude sub-model can output the sample attitude parameters corresponding to the sample tissue image and the internal parameters of the endoscope (denoted as K) for collecting the sample tissue image. Wherein, the internal parameters of the endoscope may include focal length and translation size, and the sample attitude parameters include a sample rotation matrix (represented as R) and a sample translation vector (represented as t). Specifically, the sample tissue image and the historical sample tissue image may be spliced, so as to input the spliced result into the pose sub-model.
在训练阶段,姿态子模型在卷积池化层、多个残差块以及全连接层的基础上,还可以增加一个线性层(表示为intrisic layer),如图9所示。全连接层(表示为pose layer)输出样本姿态参数,线性层能够输出内窥镜内参数。内窥镜内参数K的形式可以为:
In the training phase, the attitude sub-model can also add a linear layer (represented as an intrinsic layer) on the basis of the convolutional pooling layer, multiple residual blocks, and fully connected layers, as shown in Figure 9. The fully connected layer (denoted as pose layer) outputs the sample pose parameters, and the linear layer is able to output endoscopic intrinsic parameters. The form of the internal parameter K of the endoscope can be:
其中,fx和fy分别表示内窥镜在X、Y方向上的焦距(单位为像素),cx和cy分别表示原点在X、 Y方向上的平移尺寸(单位为像素)。姿态子模型能够在得到样本姿态参数的同时,得到内窥镜内参数,无需事先对内窥镜进行标定,便于操作,同时能够适应于各种不同的内窥镜,提高了深度子模型的适用范围。Among them, f x and f y respectively represent the focal length of the endoscope in the X and Y directions (in pixels), and c x and cy represent the origin at X, Y, respectively. The translation size in the Y direction in pixels. The attitude sub-model can obtain the internal parameters of the endoscope while obtaining the attitude parameters of the sample. It is not necessary to calibrate the endoscope in advance, which is easy to operate, and can be adapted to various endoscopes, which improves the scope of application of the depth sub-model.
步骤C,根据内窥镜内参数、样本深度图像、历史样本深度图像和样本姿态参数,确定目标损失。In step C, the target loss is determined according to the internal parameters of the endoscope, the sample depth image, the historical sample depth image and the sample pose parameters.
步骤D,以降低目标损失为目标,利用反向传播算法训练定位模型。Step D, with the goal of reducing the target loss, use the backpropagation algorithm to train the localization model.
示例的,可以根据内窥镜内参数、样本深度图像、历史样本深度图像和样本姿态参数,并以降低目标损失为目标,利用反向传播算法训练定位模型。在对定位模型进行训练时,不需要预先进行标注,就能快速获取到用于训练定位模型的样本组织图像以及历史样本组织图像,也就是说,定位模型采用的是无监督学习的训练方式。For example, according to the internal parameters of the endoscope, the sample depth image, the historical sample depth image and the sample pose parameters, and aiming at reducing the target loss, the localization model can be trained by using the backpropagation algorithm. When training the positioning model, the sample tissue images and historical sample tissue images used to train the positioning model can be quickly obtained without pre-labeling. That is to say, the positioning model adopts an unsupervised learning training method.
进一步的,训练定位模型的初始学习率可以设置为:1e-2,Batch size可以设置为:16*4,优化器可以选择:SGD,Epoch可以设置为:500,样本组织图像的大小可以为:384×384。Further, the initial learning rate for training the positioning model can be set to: 1e-2, the Batch size can be set to: 16*4, the optimizer can be set to: SGD, the Epoch can be set to: 500, and the size of the sample tissue image can be set to: 384×384.
图10是根据一示例性实施例示出的另一种训练定位模型的流程图,如图10所示,步骤C的实现方式可以包括:Fig. 10 is a flow chart showing another training positioning model according to an exemplary embodiment. As shown in Fig. 10 , the implementation of step C may include:
步骤C1,根据样本深度图像、样本姿态参数和内窥镜内参数,对历史样本组织图像进行插值,以得到插值组织图像。Step C1, according to the sample depth image, the sample attitude parameters and the internal parameters of the endoscope, the historical sample tissue images are interpolated to obtain the interpolated tissue images.
步骤C2,根据样本组织图像和插值组织图像确定光度损失。Step C2, determining the photometric loss according to the sample tissue image and the interpolated tissue image.
示例的,可以利用样本深度图像、样本姿态参数和内窥镜内参数,对历史样本组织图像进行可微双线性插值处理,得到插值组织图像。从而根据样本组织图像和插值组织图像确定光度损失。插值组织图像可以理解为以采集历史样本组织图像的视角观测样本组织图像中的内容得到的图像。按照光束平差法的原则,同一个空间点的像素灰度,在各个图像中应当是固定不变的,因此,将不同视角采集的图像转换到另一视角,相同视角下两个图像中相同位置的像素应该相同。因此,光度损失可以理解为样本组织图像和插值组织图像之间的差异。例如可以通过公式1来确定光度损失:
For example, differentiable bilinear interpolation can be performed on historical sample tissue images by using the sample depth image, sample attitude parameters, and endoscope internal parameters to obtain an interpolated tissue image. Luminosity loss is thereby determined from the sample tissue image and the interpolated tissue image. The interpolated tissue image can be understood as an image obtained by observing content in the sample tissue image from the perspective of collecting historical sample tissue images. According to the principle of beam adjustment method, the pixel gray level of the same spatial point should be fixed in each image. Therefore, when the images collected from different viewing angles are converted to another viewing angle, the pixels at the same position in the two images under the same viewing angle should be the same. Therefore, the photometric loss can be understood as the difference between the sample tissue image and the interpolated tissue image. For example, the photometric loss can be determined by formula 1:
其中,Lp表示光度损失,p表示像素点,N表示样本组织图像中有效的像素点,|N|表示有效的像素点的个数。Ia(p)表示样本组织图像中p的像素值I'a(p)表示插值组织图像中p的像素值。|| ||1表示L1范数,L1范数对于离散点更加鲁棒。Among them, L p represents the photometric loss, p represents the pixel point, N represents the effective pixel point in the sample tissue image, and |N| represents the number of effective pixel points. I a (p) represents the pixel value of p in the sample tissue image , and I' a (p) represents the pixel value of p in the interpolated tissue image. || || 1 means the L1 norm, which is more robust to discrete points.
步骤C3,根据样本深度图像的梯度和样本组织图像的梯度,确定平滑损失。Step C3, determining a smoothing loss according to the gradient of the sample depth image and the gradient of the sample tissue image.
示例的,在样本组织图像(或者插值组织图像)的低纹理区域,由于图像特征信息较少,光度损失的表现较弱,因此可以加入平滑损失作为正则项,来约束生成的样本深度图像。可以根据样本深度图像的梯度和样本组织图像的梯度,确定平滑损失,平滑损失能够保证样本深度图像是由样本组织图像引导生成,这样生成的样本深度图在边缘处能够保留更多的梯度信息,即边缘处更加明显,细节信息更加丰富。例如可以通过公式2来确定平滑损失:
For example, in the low-texture region of the sample tissue image (or interpolated tissue image), due to less image feature information, the performance of the photometric loss is weak, so smooth loss can be added as a regular term to constrain the generated sample depth image. The smoothing loss can be determined according to the gradient of the sample depth image and the gradient of the sample tissue image. The smoothing loss can ensure that the sample depth image is generated under the guidance of the sample tissue image, so that the generated sample depth image can retain more gradient information at the edge, that is, the edge is more obvious and the detail information is richer. For example, the smoothing loss can be determined by formula 2:
其中,Ls表示平滑损失,表示样本组织图像中p的梯度,表示样本深度图像中p的梯度。where L s represents the smoothing loss, Indicates the gradient of p in the sample tissue image, Denotes the gradient of p in the sample depth image.
步骤C4,根据样本姿态参数和内窥镜内参数,将样本深度图像变换为第一深度图像。Step C4, transforming the sample depth image into a first depth image according to the sample pose parameters and the internal parameters of the endoscope.
步骤C5,根据样本姿态参数和内窥镜内参数,将历史样本深度图像变换为第二深度图像。Step C5, transforming the historical sample depth image into a second depth image according to the sample pose parameters and the internal parameters of the endoscope.
步骤C6,根据第一深度图像和第二深度图像确定一致性损失。 Step C6, determining consistency loss according to the first depth image and the second depth image.
示例的,由于样本组织图像和历史样本组织图像面对的是同一个三维空间,因此样本深度图像和历史样本深度图像之间具有空间一致性。可以利用样本姿态参数和内窥镜内参数,将样本深度图像变换为第一深度图像(表示为),并利用样本姿态参数和内窥镜内参数,将历史样本深度图像变换为第二深度图像(表示为Db')。其中,第一深度图像可以理解为通过姿态变换将样本深度图像转换为,以采集历史样本组织图像的视角观测样本组织图像中的内容得到的深度图像。第二深度图像可以理解为通过对历史样本深度图像进行插值,以得到以采集历史样本组织图像的视角观测样本组织图像中的内容得到的深度图像。For example, since the sample tissue image and the historical sample tissue image face the same three-dimensional space, there is spatial consistency between the sample depth image and the historical sample depth image. The sample depth image can be transformed into the first depth image (expressed as ), and transform the historical sample depth image into a second depth image (denoted as D b ') by using the sample pose parameters and the internal parameters of the endoscope. Wherein, the first depth image can be understood as converting the sample depth image into a depth image obtained by observing content in the sample tissue image from the perspective of collecting historical sample tissue images through attitude transformation. The second depth image can be understood as a depth image obtained by observing content in the sample tissue image from the perspective of collecting the historical sample tissue image by interpolating the historical sample depth image.
然后再根据第一深度图像和第二深度图像确定一致性损失。也就是说,一致性损失能够反映第一深度图像与第二深度图像之间的差异。通过训练,一致性可以传播到多个样本深度图像中,这样也保证了多个样本深度图像的尺度一致性,相当于对多个样本深度图像进行平滑处理,保证了空间一致性。例如可以通过公式3来确定一致性损失:
The consistency loss is then determined based on the first depth image and the second depth image. That is, the consistency loss can reflect the difference between the first depth image and the second depth image. Through training, consistency can be propagated to multiple sample depth images, which also ensures the scale consistency of multiple sample depth images, which is equivalent to smoothing multiple sample depth images to ensure spatial consistency. For example, the consistency loss can be determined by formula 3:
其中,LG表示一致性损失,表示第一深度图像中p的深度,D'b(p)表示第二深度图像中p的深度。where L G represents the consistency loss, represents the depth of p in the first depth image, and D' b (p) represents the depth of p in the second depth image.
步骤C7,根据光度损失、平滑损失和一致性损失,确定目标损失。Step C7, determining the target loss according to the photometric loss, smoothing loss and consistency loss.
示例的,可以根据光度损失、平滑损失和一致性损失,确定目标损失。例如可以通过公式4对光度损失、平滑损失和一致性损失进行加权求和,得到目标损失:Exemplarily, the target loss can be determined from photometric loss, smoothness loss and consistency loss. For example, the weighted sum of photometric loss, smoothing loss and consistency loss can be obtained by formula 4 to obtain the target loss:
L=αLp+βLs+γLG   公式4L=αL p +βL s +γL G Formula 4
其中,α、β和γ分别为光度损失、平滑损失和一致性损失对应的权重,其中,α可以是0.7,β可以是0.7,γ可以是0.3。Wherein, α, β, and γ are weights corresponding to photometric loss, smoothing loss, and consistency loss, respectively, where α can be 0.7, β can be 0.7, and γ can be 0.3.
在又一种实现方式中,步骤C2可以包括:In yet another implementation, step C2 may include:
根据样本组织图像、插值组织图像,以及样本组织图像和插值组织图像的结构相似度,确定光度损失。Luminosity loss is determined according to the sample tissue image, the interpolated tissue image, and the structural similarity between the sample tissue image and the interpolated tissue image.
示例的,内窥镜在采集样本组织图像和历史样本组织图像时,光照条件可能会发生变化,因此,可以引入SSIM(英文:Structural Similarity,中文:结构相似度)来确定光度损失,以避免光照条件变化对光度损失的干扰。SSIM能够反映局部结构的相似度。改进后的光度损失可以通过公式5来确定:
For example, when the endoscope collects sample tissue images and historical sample tissue images, the lighting conditions may change. Therefore, SSIM (English: Structural Similarity, Chinese: Structural Similarity) can be introduced to determine the photometric loss, so as to avoid the interference of photometric loss due to changes in lighting conditions. SSIM can reflect the similarity of local structures. The improved photometric loss can be determined by Equation 5:
其中,λ1和λ2分别表示预设的权重,SSIM(p)表示样本组织图像与插值组织图像之间逐像素的SSIM。其中,λ1可以为0.7,λ2可以为0.3。Among them, λ1 and λ2 represent the preset weights respectively, and SSIM(p) represents the pixel-by-pixel SSIM between the sample tissue image and the interpolated tissue image. Wherein, λ 1 can be 0.7, and λ 2 can be 0.3.
进一步的,可以通过公式6来确定样本组织图像与插值组织图像之间逐像素的SSIM:
Further, the pixel-by-pixel SSIM between the sample tissue image and the interpolated tissue image can be determined by formula 6:
其中,x表示样本组织图像中以p为中心的图像块(大小可以为3*3),y表示插值组织图像中以p 为中心同等大小的图像块,τx表示x中像素值的平均值,τy表示的y中像素值的平均值,σx表示x中像素值的标准差,σy表示y中像素值的标准差。ε1和ε2表示预设的常量,ε1例如可以是0.0001,ε2例如可以是0.0009。Among them, x represents the image block centered on p in the sample tissue image (the size can be 3*3), and y represents the image block centered on p in the interpolation tissue image is an image block of the same size in the center, τ x represents the average value of pixel values in x, τ y represents the average value of pixel values in y, σ x represents the standard deviation of pixel values in x, and σ y represents the standard deviation of pixel values in y. ε1 and ε2 represent preset constants, ε1 may be, for example, 0.0001, and ε2 may be, for example, 0.0009.
图11是根据一示例性实施例示出的另一种内窥镜图像的处理方法的流程图,如图11所示,在步骤105之后,该方法还可以包括:Fig. 11 is a flowchart of another endoscopic image processing method shown according to an exemplary embodiment. As shown in Fig. 11, after step 105, the method may further include:
步骤106,输出盲区比例,并在盲区比例大于或等于预设的比例阈值的情况下,发出提示信息,提示信息用于指示存在漏检风险。Step 106, outputting the ratio of the blind area, and sending a prompt message when the ratio of the blind area is greater than or equal to a preset ratio threshold, the prompt message is used to indicate that there is a risk of missed detection.
举例来说,在确定盲区比例之后,可以输出盲区比例,例如可以在用于展示组织图像的显示界面中实时显示盲区比例,从而实时展示内窥镜检查过程中的检查范围。进一步的,还可以在盲区比例大于或等于预设的比例阈值(例如可以时20%)的情况下,发出提示信息,以提示医生内窥镜当前的视野存在较大的盲区,存在漏检风险。提示信息的呈现形式可以包括:文字形式、图像形式、声音形式中的至少一种。例如,提示信息可以是“当前漏检风险高”、“请重新检查”、“请执行退镜”等文字提示或者图像提示,提示信息也可以是语音、指定频率的蜂鸣声或者报警声等声音提示。这样,医生可以根据提示信息,调整内窥镜的方向,或者执行退镜,再或者重新进行检查。由此,可以在医生进行内窥镜检查过程中对盲区比例进行实时监控,并在盲区比例较大时进行提示,从而有效避免漏检,保证内窥镜检查的有效性。For example, after the blind area ratio is determined, the blind area ratio can be output, for example, the blind area ratio can be displayed in real time on a display interface for displaying tissue images, so as to display the inspection range during endoscopy in real time. Further, when the proportion of the blind spot is greater than or equal to a preset ratio threshold (for example, 20%), a prompt message can be sent to remind the doctor that there is a large blind spot in the current field of view of the endoscope, and there is a risk of missed detection. The presentation form of the prompt information may include: at least one of a text form, an image form, and a sound form. For example, the prompt information can be text or image prompts such as "the current risk of missed detection is high", "please re-examine", "please perform back-up", etc., and the prompt information can also be voice prompts, beeps with a specified frequency, or alarm sounds. In this way, the doctor can adjust the direction of the endoscope according to the prompt information, or execute the withdrawal of the endoscope, or re-examine. Thus, the proportion of blind spots can be monitored in real time during the endoscopic examination by the doctor, and a prompt can be given when the proportion of blind spots is large, thereby effectively avoiding missed detection and ensuring the effectiveness of endoscopic examination.
综上所述,本公开首先获取内窥镜在待测组织内按照多个采集时刻采集的组织图像。再根据组织图像集,确定每个组织图像对应的深度图像以及姿态参数。之后根据每个组织图像对应的姿态参数,确定内窥镜的运动轨迹,并根据每个组织图像对应的深度图像,确定待测组织的轮廓。最后根据运动轨迹和待测组织的轮廓,确定内窥镜检查过程中的盲区比例。本公开根据组织图像对应的深度图像以及姿态参数,确定内窥镜的运动轨迹和待测组织的轮廓,并以此确定检查过程中的盲区比例,能够实现对检查范围的监控,有效避免漏检,从而保证内窥镜检查的有效性。To sum up, in the present disclosure, firstly, the tissue images collected by the endoscope in the tissue to be measured are acquired according to multiple acquisition moments. Then, according to the tissue image set, the depth image and pose parameters corresponding to each tissue image are determined. Then, according to the posture parameters corresponding to each tissue image, the motion trajectory of the endoscope is determined, and according to the depth image corresponding to each tissue image, the contour of the tissue to be measured is determined. Finally, according to the motion trajectory and the outline of the tissue to be measured, the proportion of the blind area during the endoscopic examination is determined. According to the depth image and attitude parameters corresponding to the tissue image, the present disclosure determines the movement trajectory of the endoscope and the outline of the tissue to be measured, and determines the blind area ratio in the inspection process, so as to realize the monitoring of the inspection range and effectively avoid missed inspections, thereby ensuring the effectiveness of endoscopic inspection.
图12是根据一示例性实施例示出的一种内窥镜图像的处理装置的框图,如图12所示,该装置200可以包括:Fig. 12 is a block diagram of an endoscopic image processing device according to an exemplary embodiment. As shown in Fig. 12, the device 200 may include:
获取模块201,用于获取内窥镜在待测组织内采集的组织图像集,组织图像集中包括按照采集时刻排列的多个组织图像。The acquisition module 201 is configured to acquire a tissue image set collected by the endoscope in the tissue to be measured, and the tissue image set includes a plurality of tissue images arranged according to the acquisition time.
定位模块202,用于根据组织图像集,确定每个组织图像对应的深度图像和姿态参数。The positioning module 202 is configured to determine the depth image and pose parameters corresponding to each tissue image according to the tissue image set.
轨迹确定模块203,用于根据每个组织图像对应的姿态参数,确定内窥镜的运动轨迹,运动轨迹包括内窥镜在采集每个组织图像时的位置和角度。The trajectory determination module 203 is configured to determine the movement trajectory of the endoscope according to the posture parameters corresponding to each tissue image, and the movement trajectory includes the position and angle of the endoscope when each tissue image is collected.
轮廓确定模块204,用于根据每个组织图像对应的深度图像,确定待测组织的轮廓。The contour determination module 204 is configured to determine the contour of the tissue to be measured according to the depth image corresponding to each tissue image.
处理模块205,用于根据运动轨迹和待测组织的轮廓,确定内窥镜检查过程中的盲区比例。The processing module 205 is configured to determine the proportion of the blind area during the endoscopic inspection process according to the motion track and the outline of the tissue to be measured.
在一种应用场景中,定位模块202可以用于:In an application scenario, the positioning module 202 can be used for:
依次根据每个组织图像和该组织图像对应的历史组织图像,通过预先训练的定位模型确定该组织图像对应的深度图像以及姿态参数,历史组织图像的采集时刻在该组织图像的采集时刻之前。According to each tissue image and the historical tissue image corresponding to the tissue image in turn, the depth image and attitude parameters corresponding to the tissue image are determined through the pre-trained positioning model, and the collection time of the historical tissue image is before the collection time of the tissue image.
在另一种应用场景中,姿态参数可以包括旋转矩阵和平移向量,运动轨迹可以包括内窥镜在采集每个组织图像时的位置和角度。相应的,轨迹确定模块203可以用于:In another application scenario, the attitude parameters may include a rotation matrix and a translation vector, and the motion trajectory may include the position and angle of the endoscope when capturing each tissue image. Correspondingly, the trajectory determination module 203 can be used for:
根据每个组织图像对应的旋转矩阵和平移向量,以及内窥镜在采集该组织图像对应的历史组织图像时的位置和角度,确定内窥镜在采集该组织图像时的位置和角度。According to the rotation matrix and translation vector corresponding to each tissue image, and the position and angle of the endoscope when acquiring the historical tissue image corresponding to the tissue image, the position and angle of the endoscope when acquiring the tissue image are determined.
图13是根据一示例性实施例示出的另一种内窥镜图像的处理装置的框图,如图13所示,轮廓确定模块204可以包括:Fig. 13 is a block diagram of another endoscopic image processing device shown according to an exemplary embodiment. As shown in Fig. 13 , the contour determination module 204 may include:
中心线确定子模块2041,用于根据每个组织图像对应的深度图像,确定待测组织的中心线。The centerline determination sub-module 2041 is configured to determine the centerline of the tissue to be measured according to the depth image corresponding to each tissue image.
轮廓确定子模块2042,用于根据待测组织的中心线,确定待测组织的轮廓。The contour determination sub-module 2042 is configured to determine the contour of the tissue to be measured according to the centerline of the tissue to be measured.
图14是根据一示例性实施例示出的另一种内窥镜图像的处理装置的框图,如图14所示,处理模块205可以包括: Fig. 14 is a block diagram of another endoscopic image processing device according to an exemplary embodiment. As shown in Fig. 14, the processing module 205 may include:
视野确定子模块2051,用于根据内窥镜在采集每个组织图像时的位置和角度,以及内窥镜的视角,确定该组织图像对应的视野区域。The field of view determination sub-module 2051 is configured to determine the field of view corresponding to the tissue image according to the position and angle of the endoscope when collecting each tissue image, and the viewing angle of the endoscope.
总视野确定子模块2052,用于根据每个组织图像对应的视野区域,确定总视野区域。The total visual field determination sub-module 2052 is configured to determine the total visual field area according to the visual field area corresponding to each tissue image.
盲区确定子模块2053,用于根据总视野区域和待测组织的轮廓,确定盲区比例。The blind area determination sub-module 2053 is configured to determine the proportion of the blind area according to the total visual field area and the outline of the tissue to be measured.
在一种实现方式中,视野确定子模块2051可以用于实现以下步骤:In one implementation, the field of view determining submodule 2051 can be used to implement the following steps:
步骤1)根据每个组织图像对应的姿态参数,将内窥镜在采集该组织图像时的位置,转换为对应在待测组织的中心线上的中心位置。Step 1) Convert the position of the endoscope when acquiring the tissue image into a center position corresponding to the center line of the tissue to be measured according to the posture parameters corresponding to each tissue image.
步骤2)根据该组织图像对应的姿态参数、内窥镜的视角,以及内窥镜在采集该组织图像时的角度,确定中心位置对应的中心视角。Step 2) Determine the central viewing angle corresponding to the central position according to the posture parameters corresponding to the tissue image, the viewing angle of the endoscope, and the angle of the endoscope when collecting the tissue image.
步骤3)确定中心位置对应的最大视野区域。Step 3) Determine the maximum viewing area corresponding to the center position.
步骤4)根据中心视角和最大视野区域,确定该组织图像对应的视野区域。Step 4) Determine the field of view corresponding to the tissue image according to the central viewing angle and the maximum field of view.
在一种实现方式中,定位模型包括:深度子模型和姿态子模型。定位模块202可以用于:In an implementation manner, the positioning model includes: a depth sub-model and an attitude sub-model. The positioning module 202 can be used for:
将该组织图像输入深度子模型,以得到深度子模型输出的该组织图像对应的深度图像。将该组织图像和对应的历史组织图像输入姿态子模型,以得到姿态子模型输出的该组织图像对应的姿态参数。The tissue image is input into the depth sub-model to obtain a depth image corresponding to the tissue image output by the depth sub-model. The tissue image and the corresponding historical tissue image are input into the attitude sub-model, so as to obtain the attitude parameters corresponding to the tissue image output by the attitude sub-model.
在另一种实现方式中,定位模型是通过以下步骤训练得到的:In another implementation, the localization model is trained by the following steps:
步骤A,将样本组织图像输入深度子模型,以得到样本组织图像对应的样本深度图像,并将历史样本组织图像输入深度子模型,以得到历史样本组织图像对应的历史样本深度图像,历史样本组织图像为在样本组织图像之前采集的图像。Step A, input the sample tissue image into the depth sub-model to obtain the sample depth image corresponding to the sample tissue image, and input the historical sample tissue image into the depth sub-model to obtain the historical sample depth image corresponding to the historical sample tissue image, the historical sample tissue image is an image collected before the sample tissue image.
步骤B,将样本组织图像和历史样本组织图像输入姿态子模型,以得到姿态子模型输出的,样本组织图像对应的样本姿态参数以及采集样本组织图像的内窥镜内参数,内窥镜内参数包括焦距和平移尺寸。Step B, input the sample tissue image and the historical sample tissue image into the attitude sub-model to obtain the output of the attitude sub-model, the sample attitude parameters corresponding to the sample tissue image and the internal parameters of the endoscope for collecting the sample tissue image. The endoscopic internal parameters include focal length and translation size.
步骤C,根据内窥镜内参数、样本深度图像、历史样本深度图像和样本姿态参数,确定目标损失。In step C, the target loss is determined according to the internal parameters of the endoscope, the sample depth image, the historical sample depth image and the sample pose parameters.
步骤D,以降低目标损失为目标,利用反向传播算法训练定位模型。Step D, with the goal of reducing the target loss, use the backpropagation algorithm to train the localization model.
在又一种实现方式中,步骤C的实现方式可以包括:In yet another implementation, the implementation of step C may include:
步骤C1,根据样本深度图像、样本姿态参数和内窥镜内参数,对历史样本组织图像进行插值,以得到插值组织图像。Step C1, according to the sample depth image, the sample attitude parameters and the internal parameters of the endoscope, the historical sample tissue images are interpolated to obtain the interpolated tissue images.
步骤C2,根据样本组织图像和插值组织图像确定光度损失。Step C2, determining the photometric loss according to the sample tissue image and the interpolated tissue image.
步骤C3,根据样本深度图像的梯度和样本组织图像的梯度,确定平滑损失。Step C3, determining a smoothing loss according to the gradient of the sample depth image and the gradient of the sample tissue image.
步骤C4,根据样本姿态参数和内窥镜内参数,将样本深度图像变换为第一深度图像。Step C4, transforming the sample depth image into a first depth image according to the sample pose parameters and the internal parameters of the endoscope.
步骤C5,根据样本姿态参数和内窥镜内参数,将历史样本深度图像变换为第二深度图像。Step C5, transforming the historical sample depth image into a second depth image according to the sample pose parameters and the internal parameters of the endoscope.
步骤C6,根据第一深度图像和第二深度图像确定一致性损失。Step C6, determining consistency loss according to the first depth image and the second depth image.
步骤C7,根据光度损失、平滑损失和一致性损失,确定目标损失。Step C7, determining the target loss according to the photometric loss, smoothing loss and consistency loss.
在又一种实现方式中,步骤C2可以包括:In yet another implementation, step C2 may include:
根据样本组织图像、插值组织图像,以及样本组织图像和插值组织图像的结构相似度,确定光度损失。Luminosity loss is determined according to the sample tissue image, the interpolated tissue image, and the structural similarity between the sample tissue image and the interpolated tissue image.
图15是根据一示例性实施例示出的另一种内窥镜图像的处理装置的框图,如图15所示,该装置200还可以包括:Fig. 15 is a block diagram of another endoscopic image processing device according to an exemplary embodiment. As shown in Fig. 15, the device 200 may also include:
提示模块206,用于在根据运动轨迹和待测组织的轮廓,确定内窥镜检查过程中的盲区比例之后,输出盲区比例,并在盲区比例大于或等于预设的比例阈值的情况下,发出提示信息,提示信息用于指示存在漏检风险。The prompting module 206 is configured to output the blind area ratio after determining the blind area ratio during the endoscopic examination according to the motion track and the outline of the tissue to be measured, and send a prompt message when the blind area ratio is greater than or equal to a preset ratio threshold, and the prompt information is used to indicate that there is a risk of missed detection.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
综上所述,本公开首先获取内窥镜在待测组织内按照多个采集时刻采集的组织图像。再根据组织图像集,确定每个组织图像对应的深度图像以及姿态参数。之后根据每个组织图像对应的姿态参数,确定内窥镜的运动轨迹,并根据每个组织图像对应的深度图像,确定待测组织的轮廓。最后根据运动轨迹和待测组织的轮廓,确定内窥镜检查过程中的盲区比例。本公开根据组织图像对应的深度图像以及姿态参 数,确定内窥镜的运动轨迹和待测组织的轮廓,并以此确定检查过程中的盲区比例,能够实现对检查范围的监控,有效避免漏检,从而保证内窥镜检查的有效性。To sum up, in the present disclosure, firstly, the tissue images collected by the endoscope in the tissue to be measured are acquired according to multiple acquisition moments. Then, according to the tissue image set, the depth image and pose parameters corresponding to each tissue image are determined. Then, according to the posture parameters corresponding to each tissue image, the motion trajectory of the endoscope is determined, and according to the depth image corresponding to each tissue image, the contour of the tissue to be measured is determined. Finally, according to the motion trajectory and the outline of the tissue to be measured, the proportion of the blind area during the endoscopic examination is determined. The present disclosure is based on the depth image corresponding to the tissue image and the attitude parameter Number, determine the trajectory of the endoscope and the outline of the tissue to be tested, and determine the proportion of the blind area in the inspection process, which can monitor the inspection range, effectively avoid missed inspections, and ensure the effectiveness of endoscopic inspection.
下面参考图16,其示出了适于用来实现本公开实施例的电子设备(例如本公开实施例的执行主体,可以为终端设备或服务器)300的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图16示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring now to FIG. 16 , it shows a schematic structural diagram of an electronic device (for example, the executive body of the embodiment of the present disclosure, which may be a terminal device or a server) 300 suitable for implementing the embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG. 16 is only an example, and should not limit the functions and application scope of the embodiments of the present disclosure.
如图16所示,电子设备300可以包括处理装置(例如中央处理器、图形处理器等)301,其可以根据存储在只读存储器(ROM)302中的程序或者从存储装置308加载到随机访问存储器(RAM)303中的程序而执行各种适当的动作和处理。在RAM 303中,还存储有电子设备300操作所需的各种程序和数据。处理装置301、ROM 302以及RAM 303通过总线304彼此相连。输入/输出(I/O)接口305也连接至总线304。As shown in FIG. 16 , an electronic device 300 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 301, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic device 300 are also stored. The processing device 301, ROM 302, and RAM 303 are connected to each other through a bus 304. An input/output (I/O) interface 305 is also connected to the bus 304 .
通常,以下装置可以连接至I/O接口305:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置306;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置307;包括例如磁带、硬盘等的存储装置308;以及通信装置309。通信装置309可以允许电子设备300与其他设备进行无线或有线通信以交换数据。虽然图16示出了具有各种装置的电子设备300,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Generally, the following devices may be connected to the I/O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to perform wireless or wired communication with other devices to exchange data. While FIG. 16 shows electronic device 300 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置309从网络上被下载和安装,或者从存储装置308被安装,或者从ROM 302被安装。在该计算机程序被处理装置301执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 309, or from storage means 308, or from ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
在一些实施方式中,终端设备、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the terminal device and the server can communicate using any currently known or future-developed network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can be interconnected with any form or medium of digital data communication (for example, a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取内窥镜在待测组织内采集的组织图像集,所述组织图像集中包括按照采集时刻排列的多个组织图像;根据所述组织图像集,确定每个所述组织图像对应的深度图像和姿态参数;根据每个所述组织图像对应的姿态参数,确定所述内窥镜的运动轨迹;根据每个所述组织图像对应的深度图像,确定所述待测组织的轮廓;根据所述运动轨迹和所述待测组织的轮廓,确定所述内窥镜检查过程中的盲 区比例。The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: acquires a set of tissue images collected by the endoscope in the tissue to be measured, and the set of tissue images includes a plurality of tissue images arranged according to the acquisition time; according to the set of tissue images, determine the depth image and attitude parameters corresponding to each of the tissue images; determine the motion trajectory of the endoscope according to the attitude parameters corresponding to each of the tissue images; Outline of the tissue to be measured to determine the blindness during the endoscopic examination area ratio.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and conventional procedural programming languages—such as the “C” language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or portion of code that includes one or more executable instructions for implementing specified logical functions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block in the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or by combinations of special purpose hardware and computer instructions.
描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定,例如,获取模块还可以被描述为“获取组织图像集的模块”。The modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation of the module itself under certain circumstances, for example, the obtaining module may also be described as "a module for obtaining the tissue image set".
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described herein above may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), System on Chips (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include one or more wire-based electrical connections, a portable computer disk, a hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
根据本公开的一个或多个实施例,示例1提供了一种内窥镜图像的处理方法,包括:获取内窥镜在待测组织内采集的组织图像集,所述组织图像集中包括按照采集时刻排列的多个组织图像;根据所述组织图像集,确定每个所述组织图像对应的深度图像和姿态参数;根据每个所述组织图像对应的姿态参数,确定所述内窥镜的运动轨迹;根据每个所述组织图像对应的深度图像,确定所述待测组织的轮廓;根据所述运动轨迹和所述待测组织的轮廓,确定所述内窥镜检查过程中的盲区比例。According to one or more embodiments of the present disclosure, Example 1 provides a method for processing an endoscope image, comprising: acquiring a tissue image set collected by an endoscope in a tissue to be measured, the tissue image set including a plurality of tissue images arranged according to the acquisition time; according to the tissue image set, determining a depth image and an attitude parameter corresponding to each tissue image; determining a motion track of the endoscope according to the attitude parameter corresponding to each tissue image; A blind zone ratio during the endoscopy procedure is determined.
根据本公开的一个或多个实施例,示例2提供了示例1的方法,所述根据所述组织图像集,确定每个所述组织图像对应的深度图像和姿态参数,包括:依次根据每个组织图像和该组织图像对应的历史组织图像,通过预先训练的定位模型确定该组织图像对应的深度图像以及姿态参数,所述历史组织图像的采集时刻在该组织图像的采集时刻之前。According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1. According to the tissue image set, determining the depth image and attitude parameters corresponding to each tissue image includes: sequentially according to each tissue image and the historical tissue image corresponding to the tissue image, and using a pre-trained positioning model to determine the depth image and attitude parameters corresponding to the tissue image. The acquisition time of the historical tissue image is before the acquisition time of the tissue image.
根据本公开的一个或多个实施例,示例3提供了示例1的方法,所述姿态参数包括旋转矩阵和平移向量,所述运动轨迹包括所述内窥镜在采集每个所述组织图像时的位置和角度;所述根据每个所述组织图像对应的姿态参数,确定所述内窥镜的运动轨迹,包括:根据每个所述组织图像对应的旋转矩阵和平移向量,以及所述内窥镜在采集该组织图像对应的历史组织图像时的位置和角度,确定所述内窥镜在采集该组织图像时的位置和角度。According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, the attitude parameters include a rotation matrix and translation vector, and the motion trajectory includes the position and angle of the endoscope when acquiring each of the tissue images; determining the movement trajectory of the endoscope according to the attitude parameters corresponding to each of the tissue images includes: determining the position and angle of the endoscope when acquiring the tissue image according to the rotation matrix and translation vector corresponding to each of the tissue images, and the position and angle of the endoscope when acquiring the historical tissue image corresponding to the tissue image.
根据本公开的一个或多个实施例,示例4提供了示例1的方法,所述根据每个所述组织图像对应的深度图像,确定所述待测组织的轮廓,包括:根据每个所述组织图像对应的深度图像,确定所述待测组织的中心线;根据所述待测组织的中心线,确定所述待测组织的轮廓。 According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 1. The determining the contour of the tissue to be measured according to the depth image corresponding to each of the tissue images includes: determining the centerline of the tissue to be measured according to the depth image corresponding to each of the tissue images; and determining the contour of the tissue to be measured according to the centerline of the tissue to be measured.
根据本公开的一个或多个实施例,示例5提供了示例1的方法,所述根据所述运动轨迹和所述待测组织的轮廓,确定所述内窥镜检查过程中的盲区比例,包括:根据所述内窥镜在采集每个所述组织图像时的位置和角度,以及所述内窥镜的视角,确定该组织图像对应的视野区域;根据每个所述组织图像对应的视野区域,确定总视野区域;根据所述总视野区域和所述待测组织的轮廓,确定所述盲区比例。According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1. The determining the blind area ratio during the endoscopic examination according to the motion track and the outline of the tissue to be measured includes: determining the field of view area corresponding to the tissue image according to the position and angle of the endoscope when collecting each tissue image and the viewing angle of the endoscope; determining the total field of view area according to the field of view area corresponding to each tissue image; and determining the blind area ratio according to the total field of view area and the outline of the tissue to be tested.
根据本公开的一个或多个实施例,示例6提供了示例5的方法,所述根据所述内窥镜在采集每个所述组织图像时的位置和角度,以及所述内窥镜的视角,确定该组织图像对应的视野区域,包括:根据每个所述组织图像对应的姿态参数,将所述内窥镜在采集该组织图像时的位置,转换为对应在所述待测组织的中心线上的中心位置;根据该组织图像对应的姿态参数、所述内窥镜的视角,以及所述内窥镜在采集该组织图像时的角度,确定所述中心位置对应的中心视角;确定所述中心位置对应的最大视野区域;根据所述中心视角和所述最大视野区域,确定该组织图像对应的视野区域。According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 5. According to the position and angle of the endoscope when acquiring each of the tissue images, and the viewing angle of the endoscope, determining the field of view corresponding to the tissue image includes: according to the attitude parameters corresponding to each of the tissue images, converting the position of the endoscope when acquiring the tissue images into a center position corresponding to the center line of the tissue to be measured; Determine the central viewing angle corresponding to the central position; determine the maximum visual field area corresponding to the central position; determine the visual field area corresponding to the tissue image according to the central viewing angle and the maximum visual field area.
根据本公开的一个或多个实施例,示例7提供了示例2的方法,所述定位模型包括:深度子模型和姿态子模型;所述依次根据每个组织图像和该组织图像对应的历史组织图像,通过预先训练的定位模型确定该组织图像对应的深度图像以及姿态参数,包括:将该组织图像输入所述深度子模型,以得到所述深度子模型输出的该组织图像对应的深度图像;将该组织图像和对应的历史组织图像输入所述姿态子模型,以得到所述姿态子模型输出的该组织图像对应的姿态参数。According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 2, wherein the positioning model includes: a depth sub-model and a pose sub-model; determining the depth image and pose parameters corresponding to the tissue image through the pre-trained positioning model according to each tissue image and the historical tissue image corresponding to the tissue image in turn, including: inputting the tissue image into the depth sub-model to obtain the depth image corresponding to the tissue image output by the depth sub-model; inputting the tissue image and the corresponding historical tissue image into the pose sub-model to obtain the pose corresponding to the tissue image output by the pose sub-model parameters.
根据本公开的一个或多个实施例,示例8提供了示例7的方法,所述定位模型是通过以下步骤训练得到的:将样本组织图像输入所述深度子模型,以得到所述样本组织图像对应的样本深度图像,并将历史样本组织图像输入所述深度子模型,以得到所述历史样本组织图像对应的历史样本深度图像,所述历史样本组织图像为在所述样本组织图像之前采集的图像;将所述样本组织图像和所述历史样本组织图像输入所述姿态子模型,以得到所述姿态子模型输出的,所述样本组织图像对应的样本姿态参数以及采集所述样本组织图像的内窥镜内参数,所述内窥镜内参数包括焦距和平移尺寸;根据所述内窥镜内参数、所述样本深度图像、所述历史样本深度图像和所述样本姿态参数,确定目标损失;以降低所述目标损失为目标,利用反向传播算法训练所述定位模型。According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 7. The positioning model is obtained through the following steps of training: inputting the sample tissue image into the depth sub-model to obtain the sample depth image corresponding to the sample tissue image, and inputting the historical sample tissue image into the depth sub-model to obtain the historical sample depth image corresponding to the historical sample tissue image, the historical sample tissue image is an image collected before the sample tissue image; The sample posture parameters corresponding to the image and the internal parameters of the endoscope for collecting the sample tissue image, the internal parameters of the endoscope include focal length and translation size; according to the internal parameters of the endoscope, the sample depth image, the historical sample depth image and the sample posture parameters, determine the target loss; aiming at reducing the target loss, use the back propagation algorithm to train the positioning model.
根据本公开的一个或多个实施例,示例9提供了示例8的方法,所述根据所述内窥镜内参数、所述样本深度图像、所述历史样本深度图像和所述样本姿态参数,确定目标损失,包括:根据所述样本深度图像、所述样本姿态参数和所述内窥镜内参数,对所述历史样本组织图像进行插值,以得到插值组织图像;根据所述样本组织图像和所述插值组织图像确定光度损失;根据所述样本深度图像的梯度和所述样本组织图像的梯度,确定平滑损失;根据所述样本姿态参数和所述内窥镜内参数,将所述样本深度图像变换为第一深度图像;根据所述样本姿态参数和所述内窥镜内参数,将所述历史样本深度图像变换为第二深度图像;根据所述第一深度图像和所述第二深度图像确定一致性损失;根据所述光度损失、所述平滑损失和所述一致性损失,确定所述目标损失。According to one or more embodiments of the present disclosure, Example 9 provides the method of Example 8. The determining target loss according to the internal parameters of the endoscope, the sample depth image, the historical sample depth image, and the sample pose parameters includes: performing interpolation on the historical sample tissue image according to the sample depth image, the sample pose parameter, and the endoscope internal parameters to obtain an interpolated tissue image; determining a photometric loss according to the sample tissue image and the interpolated tissue image; transforming the sample depth image into a first depth image according to the sample pose parameter and the endoscope internal parameter; transforming the historical sample depth image into a second depth image according to the sample pose parameter and the endoscope internal parameter; determining a consistency loss according to the first depth image and the second depth image; determining the target loss according to the photometric loss, the smoothing loss, and the consistency loss.
根据本公开的一个或多个实施例,示例10提供了示例9的方法,所述根据所述样本组织图像和所述插值组织图像确定光度损失,包括:根据所述样本组织图像、所述插值组织图像,以及所述样本组织图像和所述插值组织图像的结构相似度,确定所述光度损失。According to one or more embodiments of the present disclosure, Example 10 provides the method of Example 9, the determining the photometric loss according to the sample tissue image and the interpolated tissue image includes: determining the photometric loss according to the sample tissue image, the interpolated tissue image, and the structural similarity between the sample tissue image and the interpolated tissue image.
根据本公开的一个或多个实施例,示例11提供了示例1至示例10的方法,在所述根据所述运动轨迹和所述待测组织的轮廓,确定所述内窥镜检查过程中的盲区比例之后,所述方法还包括:输出所述盲区比例,并在所述盲区比例大于或等于预设的比例阈值的情况下,发出提示信息,所述提示信息用于指示存在漏检风险。According to one or more embodiments of the present disclosure, Example 11 provides the methods of Examples 1 to 10. After determining the blind area ratio during the endoscopic inspection according to the motion track and the contour of the tissue to be tested, the method further includes: outputting the blind area ratio, and sending a prompt message when the blind area ratio is greater than or equal to a preset ratio threshold, and the prompt information is used to indicate that there is a risk of missed detection.
根据本公开的一个或多个实施例,示例12提供了一种内窥镜图像的处理装置,包括:获取模块,用于获取内窥镜在待测组织内采集的组织图像集,所述组织图像集中包括按照采集时刻排列的多个组织图像;定位模块,用于根据所述组织图像集,确定每个所述组织图像对应的深度图像和姿态参数;轨迹确定模块,用于根据每个所述组织图像对应的姿态参数,确定所述内窥镜的运动轨迹;轮廓确定模块,用于根据每个所述组织图像对应的深度图像,确定所述待测组织的轮廓;处理模块,用于根据所述运动轨迹和所述待测组织的轮廓,确定所述内窥镜检查过程中的盲区比例。According to one or more embodiments of the present disclosure, Example 12 provides an endoscope image processing device, including: an acquisition module, used to acquire a tissue image set collected by an endoscope in a tissue to be measured, the tissue image set including a plurality of tissue images arranged according to the acquisition time; a positioning module, used to determine the depth image and posture parameters corresponding to each of the tissue images according to the tissue image set; a trajectory determination module, used to determine the movement trajectory of the endoscope according to the posture parameters corresponding to each of the tissue images; The outline of the tissue to be measured; a processing module, configured to determine a blind area ratio during the endoscopic inspection process according to the motion track and the outline of the tissue to be measured.
根据本公开的一个或多个实施例,示例13提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现示例1至示例11中所述方法的步骤。 According to one or more embodiments of the present disclosure, Example 13 provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the methods described in Example 1 to Example 11 are implemented.
根据本公开的一个或多个实施例,示例14提供了一种电子设备,包括:存储装置,其上存储有计算机程序;处理装置,用于执行所述存储装置中的所述计算机程序,以实现示例1至示例11中所述方法的步骤。According to one or more embodiments of the present disclosure, Example 14 provides an electronic device, including: a storage device, on which a computer program is stored; a processing device, configured to execute the computer program in the storage device, so as to implement the steps of the methods described in Example 1 to Example 11.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the disclosure scope involved in this disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, but also covers other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。In addition, while operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or performed in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while the above discussion contains several specific implementation details, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。 Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

Claims (14)

  1. 一种内窥镜图像的处理方法,其特征在于,所述方法包括:A method for processing endoscopic images, characterized in that the method comprises:
    获取内窥镜在待测组织内采集的组织图像集,所述组织图像集中包括按照采集时刻排列的多个组织图像;Obtaining a set of tissue images collected by the endoscope in the tissue to be tested, the set of tissue images including a plurality of tissue images arranged according to the acquisition time;
    根据所述组织图像集,确定每个所述组织图像对应的深度图像和姿态参数;Determining a depth image and a pose parameter corresponding to each of the tissue images according to the tissue image set;
    根据每个所述组织图像对应的姿态参数,确定所述内窥镜的运动轨迹;determining the motion trajectory of the endoscope according to the posture parameters corresponding to each of the tissue images;
    根据每个所述组织图像对应的深度图像,确定所述待测组织的轮廓;determining the contour of the tissue to be measured according to the depth image corresponding to each of the tissue images;
    根据所述运动轨迹和所述待测组织的轮廓,确定所述内窥镜检查过程中的盲区比例。According to the motion trajectory and the outline of the tissue to be measured, the proportion of the blind area during the endoscopic examination is determined.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述组织图像集,确定每个所述组织图像对应的深度图像和姿态参数,包括:The method according to claim 1, characterized in that, according to the set of tissue images, determining the depth image and attitude parameters corresponding to each of the tissue images comprises:
    依次根据每个组织图像和该组织图像对应的历史组织图像,通过预先训练的定位模型确定该组织图像对应的深度图像以及姿态参数,所述历史组织图像的采集时刻在该组织图像的采集时刻之前。In turn, according to each tissue image and the historical tissue image corresponding to the tissue image, the depth image and attitude parameters corresponding to the tissue image are determined through the pre-trained positioning model, and the collection time of the historical tissue image is before the collection time of the tissue image.
  3. 根据权利要求1所述的方法,其特征在于,所述姿态参数包括旋转矩阵和平移向量,所述运动轨迹包括所述内窥镜在采集每个所述组织图像时的位置和角度;所述根据每个所述组织图像对应的姿态参数,确定所述内窥镜的运动轨迹,包括:The method according to claim 1, wherein the posture parameters include a rotation matrix and a translation vector, and the motion trajectory includes the position and angle of the endoscope when acquiring each of the tissue images; and determining the motion trajectory of the endoscope according to the posture parameters corresponding to each of the tissue images includes:
    根据每个所述组织图像对应的旋转矩阵和平移向量,以及所述内窥镜在采集该组织图像对应的历史组织图像时的位置和角度,确定所述内窥镜在采集该组织图像时的位置和角度。The position and angle of the endoscope when acquiring the tissue image are determined according to the rotation matrix and translation vector corresponding to each tissue image, and the position and angle of the endoscope when acquiring the historical tissue image corresponding to the tissue image.
  4. 根据权利要求1所述的方法,其特征在于,所述根据每个所述组织图像对应的深度图像,确定所述待测组织的轮廓,包括:The method according to claim 1, wherein the determining the contour of the tissue to be measured according to the depth image corresponding to each of the tissue images comprises:
    根据每个所述组织图像对应的深度图像,确定所述待测组织的中心线;determining the centerline of the tissue to be measured according to the depth image corresponding to each of the tissue images;
    根据所述待测组织的中心线,确定所述待测组织的轮廓。The contour of the tissue to be measured is determined according to the centerline of the tissue to be measured.
  5. 根据权利要求1所述的方法,其特征在于,所述根据所述运动轨迹和所述待测组织的轮廓,确定所述内窥镜检查过程中的盲区比例,包括:The method according to claim 1, characterized in that, according to the motion trajectory and the outline of the tissue to be measured, determining the proportion of the blind area during the endoscopic examination comprises:
    根据所述内窥镜在采集每个所述组织图像时的位置和角度,以及所述内窥镜的视角,确定该组织图像对应的视野区域;According to the position and angle of the endoscope when collecting each of the tissue images, and the viewing angle of the endoscope, determine the field of view corresponding to the tissue image;
    根据每个所述组织图像对应的视野区域,确定总视野区域;Determine the total field of view according to the field of view corresponding to each of the tissue images;
    根据所述总视野区域和所述待测组织的轮廓,确定所述盲区比例。The blind area ratio is determined according to the total field of view area and the outline of the tissue to be measured.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述内窥镜在采集每个所述组织图像时的位置和角度,以及所述内窥镜的视角,确定该组织图像对应的视野区域,包括:The method according to claim 5, wherein, according to the position and angle of the endoscope when collecting each of the tissue images, and the viewing angle of the endoscope, determining the field of view corresponding to the tissue image includes:
    根据每个所述组织图像对应的姿态参数,将所述内窥镜在采集该组织图像时的位置,转换为对应在所述待测组织的中心线上的中心位置;Converting the position of the endoscope when acquiring the tissue image into a center position corresponding to the center line of the tissue to be measured according to the posture parameters corresponding to each of the tissue images;
    根据该组织图像对应的姿态参数、所述内窥镜的视角,以及所述内窥镜在采集该组织图像时的角度,确定所述中心位置对应的中心视角;determining a central viewing angle corresponding to the central position according to the posture parameter corresponding to the tissue image, the viewing angle of the endoscope, and the angle of the endoscope when collecting the tissue image;
    确定所述中心位置对应的最大视野区域;determining the maximum field of view area corresponding to the central position;
    根据所述中心视角和所述最大视野区域,确定该组织图像对应的视野区域。Determine the visual field area corresponding to the tissue image according to the central viewing angle and the maximum visual field area.
  7. 根据权利要求2所述的方法,其特征在于,所述定位模型包括:深度子模型和姿态子模型;The method according to claim 2, wherein the positioning model comprises: a depth sub-model and an attitude sub-model;
    所述依次根据每个组织图像和该组织图像对应的历史组织图像,通过预先训练的定位模型确定该组织图像对应的深度图像以及姿态参数,包括:According to each tissue image and the historical tissue image corresponding to the tissue image in turn, the depth image and attitude parameters corresponding to the tissue image are determined through the pre-trained positioning model, including:
    将该组织图像输入所述深度子模型,以得到所述深度子模型输出的该组织图像对应的深度图像;inputting the tissue image into the depth sub-model to obtain a depth image corresponding to the tissue image output by the depth sub-model;
    将该组织图像和对应的历史组织图像输入所述姿态子模型,以得到所述姿态子模型输出的该组织图像对应的姿态参数。The tissue image and the corresponding historical tissue image are input into the attitude sub-model, so as to obtain the attitude parameters corresponding to the tissue image output by the attitude sub-model.
  8. 根据权利要求7所述的方法,其特征在于,所述定位模型是通过以下步骤训练得到的:The method according to claim 7, wherein the positioning model is obtained through the following steps of training:
    将样本组织图像输入所述深度子模型,以得到所述样本组织图像对应的样本深度图像,并将历史样本组织图像输入所述深度子模型,以得到所述历史样本组织图像对应的历史样本深度图像,所述历史样本组织图像为在所述样本组织图像之前采集的图像;inputting a sample tissue image into the depth sub-model to obtain a sample depth image corresponding to the sample tissue image, and inputting a historical sample tissue image into the depth sub-model to obtain a historical sample depth image corresponding to the historical sample tissue image, where the historical sample tissue image is an image collected before the sample tissue image;
    将所述样本组织图像和所述历史样本组织图像输入所述姿态子模型,以得到所述姿态子模型输出 的,所述样本组织图像对应的样本姿态参数以及采集所述样本组织图像的内窥镜内参数,所述内窥镜内参数包括焦距和平移尺寸;inputting the sample tissue image and the historical sample tissue image into the pose sub-model to obtain the pose sub-model output Wherein, the sample posture parameter corresponding to the sample tissue image and the internal parameters of the endoscope used to acquire the sample tissue image, the internal endoscope parameters include focal length and translation size;
    根据所述内窥镜内参数、所述样本深度图像、所述历史样本深度图像和所述样本姿态参数,确定目标损失;determining target loss based on the endoscope internal parameters, the sample depth image, the historical sample depth image, and the sample pose parameters;
    以降低所述目标损失为目标,利用反向传播算法训练所述定位模型。Aiming at reducing the target loss, the positioning model is trained using a backpropagation algorithm.
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述内窥镜内参数、所述样本深度图像、所述历史样本深度图像和所述样本姿态参数,确定目标损失,包括:The method according to claim 8, wherein the determining target loss according to the internal parameters of the endoscope, the sample depth image, the historical sample depth image and the sample pose parameters comprises:
    根据所述样本深度图像、所述样本姿态参数和所述内窥镜内参数,对所述历史样本组织图像进行插值,以得到插值组织图像;Interpolating the historical sample tissue image according to the sample depth image, the sample posture parameter and the endoscope internal parameter to obtain an interpolated tissue image;
    根据所述样本组织图像和所述插值组织图像确定光度损失;determining photometric loss based on the sample tissue image and the interpolated tissue image;
    根据所述样本深度图像的梯度和所述样本组织图像的梯度,确定平滑损失;determining a smoothing loss based on the gradient of the sample depth image and the gradient of the sample tissue image;
    根据所述样本姿态参数和所述内窥镜内参数,将所述样本深度图像变换为第一深度图像;transforming the sample depth image into a first depth image according to the sample pose parameter and the endoscope internal parameter;
    根据所述样本姿态参数和所述内窥镜内参数,将所述历史样本深度图像变换为第二深度图像;transforming the historical sample depth image into a second depth image according to the sample pose parameter and the endoscope internal parameter;
    根据所述第一深度图像和所述第二深度图像确定一致性损失;determining a consistency loss from the first depth image and the second depth image;
    根据所述光度损失、所述平滑损失和所述一致性损失,确定所述目标损失。The target loss is determined from the photometric loss, the smoothing loss and the consistency loss.
  10. 根据权利要求9所述的方法,其特征在于,所述根据所述样本组织图像和所述插值组织图像确定光度损失,包括:The method according to claim 9, wherein the determining the photometric loss according to the sample tissue image and the interpolated tissue image comprises:
    根据所述样本组织图像、所述插值组织图像,以及所述样本组织图像和所述插值组织图像的结构相似度,确定所述光度损失。The photometric loss is determined according to the sample tissue image, the interpolated tissue image, and the structural similarity between the sample tissue image and the interpolated tissue image.
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,在所述根据所述运动轨迹和所述待测组织的轮廓,确定所述内窥镜检查过程中的盲区比例之后,所述方法还包括:The method according to any one of claims 1-10, characterized in that, after determining the blind area ratio in the endoscopic examination process according to the motion trajectory and the outline of the tissue to be measured, the method further comprises:
    输出所述盲区比例,并在所述盲区比例大于或等于预设的比例阈值的情况下,发出提示信息,所述提示信息用于指示存在漏检风险。The blind area ratio is output, and when the blind area ratio is greater than or equal to a preset ratio threshold, a prompt message is sent, and the prompt information is used to indicate that there is a risk of missed detection.
  12. 一种内窥镜图像的处理装置,其特征在于,所述装置包括:A device for processing endoscopic images, characterized in that the device comprises:
    获取模块,用于获取内窥镜在待测组织内采集的组织图像集,所述组织图像集中包括按照采集时刻排列的多个组织图像;An acquisition module, configured to acquire a tissue image set collected by the endoscope in the tissue to be measured, the tissue image set including a plurality of tissue images arranged according to the acquisition time;
    定位模块,用于根据所述组织图像集,确定每个所述组织图像对应的深度图像和姿态参数;A positioning module, configured to determine a depth image and a pose parameter corresponding to each of the tissue images according to the tissue image set;
    轨迹确定模块,用于根据每个所述组织图像对应的姿态参数,确定所述内窥镜的运动轨迹;A trajectory determination module, configured to determine the movement trajectory of the endoscope according to the posture parameters corresponding to each of the tissue images;
    轮廓确定模块,用于根据每个所述组织图像对应的深度图像,确定所述待测组织的轮廓;A contour determination module, configured to determine the contour of the tissue to be measured according to the depth image corresponding to each of the tissue images;
    处理模块,用于根据所述运动轨迹和所述待测组织的轮廓,确定所述内窥镜检查过程中的盲区比例。A processing module, configured to determine a blind area ratio during the endoscopic inspection process according to the motion track and the contour of the tissue to be measured.
  13. 一种计算机可读介质,其上存储有计算机程序,其特征在于,该程序被处理装置执行时实现权利要求1-11中任一项所述方法的步骤。A computer-readable medium, on which a computer program is stored, characterized in that, when the program is executed by a processing device, the steps of the method described in any one of claims 1-11 are implemented.
  14. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    存储装置,其上存储有计算机程序;a storage device on which a computer program is stored;
    处理装置,用于执行所述存储装置中的所述计算机程序,以实现权利要求1-11中任一项所述方法的步骤。 A processing device, configured to execute the computer program in the storage device, so as to realize the steps of the method according to any one of claims 1-11.
PCT/CN2023/072905 2022-01-21 2023-01-18 Endoscope image processing method and apparatus, readable medium, and electronic device WO2023138619A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210074391.6 2022-01-21
CN202210074391.6A CN114429458A (en) 2022-01-21 2022-01-21 Endoscope image processing method and device, readable medium and electronic equipment

Publications (1)

Publication Number Publication Date
WO2023138619A1 true WO2023138619A1 (en) 2023-07-27

Family

ID=81313534

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/072905 WO2023138619A1 (en) 2022-01-21 2023-01-18 Endoscope image processing method and apparatus, readable medium, and electronic device

Country Status (2)

Country Link
CN (1) CN114429458A (en)
WO (1) WO2023138619A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114429458A (en) * 2022-01-21 2022-05-03 小荷医疗器械(海南)有限公司 Endoscope image processing method and device, readable medium and electronic equipment
CN114972144B (en) * 2022-05-23 2024-02-02 江苏势通生物科技有限公司 Method, device, storage medium and equipment for splicing intestinal images of capsule endoscope

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090048482A1 (en) * 2007-08-14 2009-02-19 Siemens Corporate Research, Inc. Image-based Path Planning for Automated Virtual Colonoscopy Navigation
CN112330729A (en) * 2020-11-27 2021-02-05 中国科学院深圳先进技术研究院 Image depth prediction method and device, terminal device and readable storage medium
CN113052956A (en) * 2021-03-19 2021-06-29 安翰科技(武汉)股份有限公司 Method, device and medium for constructing film reading model based on capsule endoscope
CN113240726A (en) * 2021-05-20 2021-08-10 南开大学 Real-time measurement method for optical target size under endoscope
CN113331769A (en) * 2020-03-02 2021-09-03 卡普索影像公司 Method and apparatus for detecting missed examination regions during endoscopy
CN113487605A (en) * 2021-09-03 2021-10-08 北京字节跳动网络技术有限公司 Tissue cavity positioning method, device, medium and equipment for endoscope
CN114429458A (en) * 2022-01-21 2022-05-03 小荷医疗器械(海南)有限公司 Endoscope image processing method and device, readable medium and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090048482A1 (en) * 2007-08-14 2009-02-19 Siemens Corporate Research, Inc. Image-based Path Planning for Automated Virtual Colonoscopy Navigation
CN113331769A (en) * 2020-03-02 2021-09-03 卡普索影像公司 Method and apparatus for detecting missed examination regions during endoscopy
CN112330729A (en) * 2020-11-27 2021-02-05 中国科学院深圳先进技术研究院 Image depth prediction method and device, terminal device and readable storage medium
CN113052956A (en) * 2021-03-19 2021-06-29 安翰科技(武汉)股份有限公司 Method, device and medium for constructing film reading model based on capsule endoscope
CN113240726A (en) * 2021-05-20 2021-08-10 南开大学 Real-time measurement method for optical target size under endoscope
CN113487605A (en) * 2021-09-03 2021-10-08 北京字节跳动网络技术有限公司 Tissue cavity positioning method, device, medium and equipment for endoscope
CN114429458A (en) * 2022-01-21 2022-05-03 小荷医疗器械(海南)有限公司 Endoscope image processing method and device, readable medium and electronic equipment

Also Published As

Publication number Publication date
CN114429458A (en) 2022-05-03

Similar Documents

Publication Publication Date Title
WO2023124877A1 (en) Endoscope image processing method and apparatus, and readable medium and electronic device
WO2023138619A1 (en) Endoscope image processing method and apparatus, readable medium, and electronic device
EP3979892A1 (en) Systems and methods for processing colon images and videos
US7857752B2 (en) Medical image processing apparatus and medical image processing method
US8939892B2 (en) Endoscopic image processing device, method and program
US10178941B2 (en) Image processing apparatus, image processing method, and computer-readable recording device
CN114332019B (en) Endoscopic image detection assistance system, method, medium, and electronic device
EP3998579B1 (en) Medical image processing method, apparatus and device, medium and endoscope
WO2023030370A1 (en) Endoscope image detection method and apparatus, storage medium, and electronic device
CN113470029B (en) Training method and device, image processing method, electronic device and storage medium
US20150237325A1 (en) Method and apparatus for converting 2d images to 3d images
WO2023207564A1 (en) Endoscope advancing and retreating time determining method and device based on image recognition
CN110288653B (en) Multi-angle ultrasonic image fusion method and system and electronic equipment
WO2023029741A1 (en) Tissue cavity locating method and apparatus for endoscope, medium and device
WO2023030373A1 (en) Method and apparatus for positioning tissue cavity, and readable medium and electronic device
CN108090954A (en) Abdominal cavity environmental map based on characteristics of image rebuilds the method with laparoscope positioning
JP7023196B2 (en) Inspection support equipment, methods and programs
Figueiredo et al. Hybrid multiscale affine and elastic image registration approach towards wireless capsule endoscope localization
JP7071240B2 (en) Inspection support equipment, methods and programs
WO2023125008A1 (en) Artificial intelligence-based endoscope image processing method and apparatus, medium and device
WO2023165332A1 (en) Tissue cavity positioning method, apparatus, readable medium, and electronic device
WO2023198101A1 (en) Artificial intelligence-based oral cavity examination method and apparatus, electronic device, and medium
JP4487077B2 (en) 3D display method using video images continuously acquired by a single imaging device
Safavian et al. Endoscopic measurement of the size of gastrointestinal polyps using an electromagnetic tracking system and computer vision-based algorithm
JP7023195B2 (en) Inspection support equipment, methods and programs

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23742934

Country of ref document: EP

Kind code of ref document: A1